summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/paging_tmpl.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-07-13 14:27:06 +0300
committerAvi Kivity <avi@redhat.com>2010-08-02 06:40:42 +0300
commita3aa51cfaafe9179add88db20506ccb07e030b47 (patch)
treeb58ee2e25bb147d2bd4987eb1fa4d4737dd57bc9 /arch/x86/kvm/paging_tmpl.h
parent121eee97a7802acda8b78436cc53196e9885549f (diff)
KVM: MMU: Add drop_large_spte() helper
To clarify spte fetching code, move large spte handling into a helper. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/paging_tmpl.h')
-rw-r--r--arch/x86/kvm/paging_tmpl.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index 36dc0749c878..0fb7068d64c7 100644
--- a/arch/x86/kvm/paging_tmpl.h
+++ b/arch/x86/kvm/paging_tmpl.h
@@ -360,10 +360,7 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
kvm_flush_remote_tlbs(vcpu->kvm);
}
- if (is_large_pte(*sptep)) {
- drop_spte(vcpu->kvm, sptep, shadow_trap_nonpresent_pte);
- kvm_flush_remote_tlbs(vcpu->kvm);
- }
+ drop_large_spte(vcpu, sptep);
if (level <= gw->level) {
direct = 1;