From 86a5ba025d0a0b251817d0efbeaf7037d4175d21 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Fri, 5 Jan 2007 16:36:50 -0800 Subject: [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 Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/kvm/kvm.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/kvm/kvm.h') diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index 6e4daf4..201b273 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h @@ -238,6 +238,9 @@ struct kvm_vcpu { struct kvm_mmu_page page_header_buf[KVM_NUM_MMU_PAGES]; struct kvm_mmu mmu; + gfn_t last_pt_write_gfn; + int last_pt_write_count; + struct kvm_guest_debug guest_debug; char fx_buf[FX_BUF_SIZE]; -- cgit v1.1