diff options
author | Avi Kivity <avi@redhat.com> | 2010-07-13 07:27:06 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-08-01 23:40:42 -0400 |
commit | a3aa51cfaafe9179add88db20506ccb07e030b47 (patch) | |
tree | b58ee2e25bb147d2bd4987eb1fa4d4737dd57bc9 /arch/x86/kvm/mmu.c | |
parent | 121eee97a7802acda8b78436cc53196e9885549f (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/mmu.c')
-rw-r--r-- | arch/x86/kvm/mmu.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 5a6019a534a3..b75d6cb44ab6 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -1492,6 +1492,14 @@ static void link_shadow_page(u64 *sptep, struct kvm_mmu_page *sp) | |||
1492 | __set_spte(sptep, spte); | 1492 | __set_spte(sptep, spte); |
1493 | } | 1493 | } |
1494 | 1494 | ||
1495 | static void drop_large_spte(struct kvm_vcpu *vcpu, u64 *sptep) | ||
1496 | { | ||
1497 | if (is_large_pte(*sptep)) { | ||
1498 | drop_spte(vcpu->kvm, sptep, shadow_trap_nonpresent_pte); | ||
1499 | kvm_flush_remote_tlbs(vcpu->kvm); | ||
1500 | } | ||
1501 | } | ||
1502 | |||
1495 | static void kvm_mmu_page_unlink_children(struct kvm *kvm, | 1503 | static void kvm_mmu_page_unlink_children(struct kvm *kvm, |
1496 | struct kvm_mmu_page *sp) | 1504 | struct kvm_mmu_page *sp) |
1497 | { | 1505 | { |