aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/mmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r--arch/x86/kvm/mmu.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 3e893cd90389..417f36b7c0e4 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -283,8 +283,13 @@ static bool set_mmio_spte(struct kvm *kvm, u64 *sptep, gfn_t gfn,
283 283
284static bool check_mmio_spte(struct kvm *kvm, u64 spte) 284static bool check_mmio_spte(struct kvm *kvm, u64 spte)
285{ 285{
286 return likely(get_mmio_spte_generation(spte) == 286 unsigned int kvm_gen, spte_gen;
287 kvm_current_mmio_generation(kvm)); 287
288 kvm_gen = kvm_current_mmio_generation(kvm);
289 spte_gen = get_mmio_spte_generation(spte);
290
291 trace_check_mmio_spte(spte, kvm_gen, spte_gen);
292 return likely(kvm_gen == spte_gen);
288} 293}
289 294
290static inline u64 rsvd_bits(int s, int e) 295static inline u64 rsvd_bits(int s, int e)