diff options
author | Paul Mackerras <paulus@samba.org> | 2011-12-15 02:01:10 +0000 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-03-05 14:52:39 +0200 |
commit | a92bce95f0f967dfa6205527d7143d276b0be6a7 (patch) | |
tree | fe0fb65201a532f360f6100959b6442f6829c94d /drivers/cpufreq | |
parent | b5434032fcfd7490c6453feb397fb781762b6f09 (diff) | |
download | op-kernel-dev-a92bce95f0f967dfa6205527d7143d276b0be6a7.zip op-kernel-dev-a92bce95f0f967dfa6205527d7143d276b0be6a7.tar.gz |
KVM: PPC: Book3S HV: Keep HPTE locked when invalidating
This reworks the implementations of the H_REMOVE and H_BULK_REMOVE
hcalls to make sure that we keep the HPTE locked and in the reverse-
mapping chain until we have finished invalidating it. Previously
we would remove it from the chain and unlock it before invalidating
it, leaving a tiny window when the guest could access the page even
though we believe we have removed it from the guest (e.g.,
kvm_unmap_hva() has been called for the page and has found no HPTEs
in the chain). In addition, we'll need this for future patches where
we will need to read the R and C bits in the HPTE after invalidating
it.
Doing this required restructuring kvmppc_h_bulk_remove() substantially.
Since we want to batch up the tlbies, we now need to keep several
HPTEs locked simultaneously. In order to avoid possible deadlocks,
we don't spin on the HPTE bitlock for any except the first HPTE in
a batch. If we can't acquire the HPTE bitlock for the second or
subsequent HPTE, we terminate the batch at that point, do the tlbies
that we have accumulated so far, unlock those HPTEs, and then start
a new batch to do the remaining invalidations.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'drivers/cpufreq')
0 files changed, 0 insertions, 0 deletions