aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/vmx.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-01-05 19:36:47 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2007-01-06 02:55:25 -0500
commit5f015a5b28c75bb6cc5158640db58689b1ee1b51 (patch)
tree7b103d11d256bfc83c8cd61841cdb893d2b09617 /drivers/kvm/vmx.c
parentebeace8609205bf5e1b96fe325b7dea148042232 (diff)
[PATCH] KVM: MMU: Remove invlpg interception
Since we write protect shadowed guest page tables, there is no need to trap page invalidations (the guest will always change the mapping before issuing the invlpg instruction). 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/vmx.c')
-rw-r--r--drivers/kvm/vmx.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 2a1c37eed711..59178ad4d344 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -1059,7 +1059,6 @@ static int vmx_vcpu_setup(struct kvm_vcpu *vcpu)
1059 | CPU_BASED_CR8_LOAD_EXITING /* 20.6.2 */ 1059 | CPU_BASED_CR8_LOAD_EXITING /* 20.6.2 */
1060 | CPU_BASED_CR8_STORE_EXITING /* 20.6.2 */ 1060 | CPU_BASED_CR8_STORE_EXITING /* 20.6.2 */
1061 | CPU_BASED_UNCOND_IO_EXITING /* 20.6.2 */ 1061 | CPU_BASED_UNCOND_IO_EXITING /* 20.6.2 */
1062 | CPU_BASED_INVDPG_EXITING
1063 | CPU_BASED_MOV_DR_EXITING 1062 | CPU_BASED_MOV_DR_EXITING
1064 | CPU_BASED_USE_TSC_OFFSETING /* 21.3 */ 1063 | CPU_BASED_USE_TSC_OFFSETING /* 21.3 */
1065 ); 1064 );
@@ -1438,17 +1437,6 @@ static int handle_io(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
1438 return 0; 1437 return 0;
1439} 1438}
1440 1439
1441static int handle_invlpg(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
1442{
1443 u64 address = vmcs_read64(EXIT_QUALIFICATION);
1444 int instruction_length = vmcs_read32(VM_EXIT_INSTRUCTION_LEN);
1445 spin_lock(&vcpu->kvm->lock);
1446 vcpu->mmu.inval_page(vcpu, address);
1447 spin_unlock(&vcpu->kvm->lock);
1448 vmcs_writel(GUEST_RIP, vmcs_readl(GUEST_RIP) + instruction_length);
1449 return 1;
1450}
1451
1452static int handle_cr(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) 1440static int handle_cr(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
1453{ 1441{
1454 u64 exit_qualification; 1442 u64 exit_qualification;
@@ -1636,7 +1624,6 @@ static int (*kvm_vmx_exit_handlers[])(struct kvm_vcpu *vcpu,
1636 [EXIT_REASON_EXCEPTION_NMI] = handle_exception, 1624 [EXIT_REASON_EXCEPTION_NMI] = handle_exception,
1637 [EXIT_REASON_EXTERNAL_INTERRUPT] = handle_external_interrupt, 1625 [EXIT_REASON_EXTERNAL_INTERRUPT] = handle_external_interrupt,
1638 [EXIT_REASON_IO_INSTRUCTION] = handle_io, 1626 [EXIT_REASON_IO_INSTRUCTION] = handle_io,
1639 [EXIT_REASON_INVLPG] = handle_invlpg,
1640 [EXIT_REASON_CR_ACCESS] = handle_cr, 1627 [EXIT_REASON_CR_ACCESS] = handle_cr,
1641 [EXIT_REASON_DR_ACCESS] = handle_dr, 1628 [EXIT_REASON_DR_ACCESS] = handle_dr,
1642 [EXIT_REASON_CPUID] = handle_cpuid, 1629 [EXIT_REASON_CPUID] = handle_cpuid,