diff options
author | Avi Kivity <avi@redhat.com> | 2009-08-27 13:37:06 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-09-10 10:46:56 +0300 |
commit | 60f24784a92c25c269a5e741a8ce8ff63e887be8 (patch) | |
tree | e14483c4f507bad1756b8ce82f2f73b0190b026f /arch/x86 | |
parent | 5dadbfd64724c41716d4fc82df6f01b023d5b15d (diff) | |
download | op-kernel-dev-60f24784a92c25c269a5e741a8ce8ff63e887be8.zip op-kernel-dev-60f24784a92c25c269a5e741a8ce8ff63e887be8.tar.gz |
KVM: Optimize kvm_mmu_unprotect_page_virt() for tdp
We know no pages are protected, so we can short-circuit the whole thing
(including fairly nasty guest memory accesses).
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/mmu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 6f38178..eca41ae 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -2694,6 +2694,9 @@ int kvm_mmu_unprotect_page_virt(struct kvm_vcpu *vcpu, gva_t gva) gpa_t gpa; int r; + if (tdp_enabled) + return 0; + gpa = vcpu->arch.mmu.gva_to_gpa(vcpu, gva); spin_lock(&vcpu->kvm->mmu_lock); |