diff options
author | Alexander Graf <agraf@suse.de> | 2010-07-29 09:04:17 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-10-24 04:50:58 -0400 |
commit | 2e0908afaf03675d22e40ce45a66b8d2070214ac (patch) | |
tree | ce0d8f7cd57b50750b14740d2443fd6476db388d /arch/powerpc/include/asm | |
parent | 5302104235f0e9f05781b92a4ab25d20e4537f56 (diff) |
KVM: PPC: RCU'ify the Book3s MMU
So far we've been running all code without locking of any sort. This wasn't
really an issue because I didn't see any parallel access to the shadow MMU
code coming.
But then I started to implement dirty bitmapping to MOL which has the video
code in its own thread, so suddenly we had the dirty bitmap code run in
parallel to the shadow mmu code. And with that came trouble.
So I went ahead and made the MMU modifying functions as parallelizable as
I could think of. I hope I didn't screw up too much RCU logic :-). If you
know your way around RCU and locking and what needs to be done when, please
take a look at this patch.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r-- | arch/powerpc/include/asm/kvm_host.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h index e1da77579e65..fafc71aa3343 100644 --- a/arch/powerpc/include/asm/kvm_host.h +++ b/arch/powerpc/include/asm/kvm_host.h | |||
@@ -165,6 +165,7 @@ struct hpte_cache { | |||
165 | struct hlist_node list_pte; | 165 | struct hlist_node list_pte; |
166 | struct hlist_node list_vpte; | 166 | struct hlist_node list_vpte; |
167 | struct hlist_node list_vpte_long; | 167 | struct hlist_node list_vpte_long; |
168 | struct rcu_head rcu_head; | ||
168 | u64 host_va; | 169 | u64 host_va; |
169 | u64 pfn; | 170 | u64 pfn; |
170 | ulong slot; | 171 | ulong slot; |
@@ -295,6 +296,7 @@ struct kvm_vcpu_arch { | |||
295 | struct hlist_head hpte_hash_vpte[HPTEG_HASH_NUM_VPTE]; | 296 | struct hlist_head hpte_hash_vpte[HPTEG_HASH_NUM_VPTE]; |
296 | struct hlist_head hpte_hash_vpte_long[HPTEG_HASH_NUM_VPTE_LONG]; | 297 | struct hlist_head hpte_hash_vpte_long[HPTEG_HASH_NUM_VPTE_LONG]; |
297 | int hpte_cache_count; | 298 | int hpte_cache_count; |
299 | spinlock_t mmu_lock; | ||
298 | #endif | 300 | #endif |
299 | }; | 301 | }; |
300 | 302 | ||