diff options
author | Avi Kivity <avi@qumranet.com> | 2007-12-30 05:29:05 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 11:01:21 -0500 |
commit | d7824fff896a1698a07a8046dc362f4500c302f7 (patch) | |
tree | 249e23ec224bc621bea1ef24fa83f5a749d6b35b /include/asm-x86/kvm_host.h | |
parent | 7ec54588210df29ea637e6054489bc942c0ef371 (diff) |
KVM: MMU: Avoid calling gfn_to_page() in mmu_set_spte()
Since gfn_to_page() is a sleeping function, and we want to make the core mmu
spinlocked, we need to pass the page from the walker context (which can sleep)
to the shadow context (which cannot).
[marcelo: avoid recursive locking of mmap_sem]
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'include/asm-x86/kvm_host.h')
-rw-r--r-- | include/asm-x86/kvm_host.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h index 44b89259f6c4..20597bc16744 100644 --- a/include/asm-x86/kvm_host.h +++ b/include/asm-x86/kvm_host.h | |||
@@ -224,6 +224,11 @@ struct kvm_vcpu_arch { | |||
224 | int last_pt_write_count; | 224 | int last_pt_write_count; |
225 | u64 *last_pte_updated; | 225 | u64 *last_pte_updated; |
226 | 226 | ||
227 | struct { | ||
228 | gfn_t gfn; /* presumed gfn during guest pte update */ | ||
229 | struct page *page; /* page corresponding to that gfn */ | ||
230 | } update_pte; | ||
231 | |||
227 | struct i387_fxsave_struct host_fx_image; | 232 | struct i387_fxsave_struct host_fx_image; |
228 | struct i387_fxsave_struct guest_fx_image; | 233 | struct i387_fxsave_struct guest_fx_image; |
229 | 234 | ||