diff options
author | Avi Kivity <avi@qumranet.com> | 2007-01-05 19:36:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2007-01-06 02:55:26 -0500 |
commit | 86a5ba025d0a0b251817d0efbeaf7037d4175d21 (patch) | |
tree | 35dbc71edaa0d242ba4c0ca429c41cff67df38d0 /drivers/kvm/kvm.h | |
parent | 139bdb2d9e410d448281057a37b53770324ccac8 (diff) |
[PATCH] KVM: MMU: Page table write flood protection
In fork() (or when we protect a page that is no longer a page table), we can
experience floods of writes to a page, which have to be emulated. This is
expensive.
So, if we detect such a flood, zap the page so subsequent writes can proceed
natively.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/kvm/kvm.h')
-rw-r--r-- | drivers/kvm/kvm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index 6e4daf404146..201b2735ca91 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h | |||
@@ -238,6 +238,9 @@ struct kvm_vcpu { | |||
238 | struct kvm_mmu_page page_header_buf[KVM_NUM_MMU_PAGES]; | 238 | struct kvm_mmu_page page_header_buf[KVM_NUM_MMU_PAGES]; |
239 | struct kvm_mmu mmu; | 239 | struct kvm_mmu mmu; |
240 | 240 | ||
241 | gfn_t last_pt_write_gfn; | ||
242 | int last_pt_write_count; | ||
243 | |||
241 | struct kvm_guest_debug guest_debug; | 244 | struct kvm_guest_debug guest_debug; |
242 | 245 | ||
243 | char fx_buf[FX_BUF_SIZE]; | 246 | char fx_buf[FX_BUF_SIZE]; |