diff options
-rw-r--r-- | arch/x86/kvm/mmu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 9ad4cc553893..23752ef0839c 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -1189,10 +1189,8 @@ static int set_spte(struct kvm_vcpu *vcpu, u64 *shadow_pte, | |||
1189 | __func__, gfn); | 1189 | __func__, gfn); |
1190 | ret = 1; | 1190 | ret = 1; |
1191 | pte_access &= ~ACC_WRITE_MASK; | 1191 | pte_access &= ~ACC_WRITE_MASK; |
1192 | if (is_writeble_pte(spte)) { | 1192 | if (is_writeble_pte(spte)) |
1193 | spte &= ~PT_WRITABLE_MASK; | 1193 | spte &= ~PT_WRITABLE_MASK; |
1194 | kvm_x86_ops->tlb_flush(vcpu); | ||
1195 | } | ||
1196 | } | 1194 | } |
1197 | } | 1195 | } |
1198 | 1196 | ||
@@ -1241,9 +1239,11 @@ static void mmu_set_spte(struct kvm_vcpu *vcpu, u64 *shadow_pte, | |||
1241 | } | 1239 | } |
1242 | } | 1240 | } |
1243 | if (set_spte(vcpu, shadow_pte, pte_access, user_fault, write_fault, | 1241 | if (set_spte(vcpu, shadow_pte, pte_access, user_fault, write_fault, |
1244 | dirty, largepage, gfn, pfn, speculative)) | 1242 | dirty, largepage, gfn, pfn, speculative)) { |
1245 | if (write_fault) | 1243 | if (write_fault) |
1246 | *ptwrite = 1; | 1244 | *ptwrite = 1; |
1245 | kvm_x86_ops->tlb_flush(vcpu); | ||
1246 | } | ||
1247 | 1247 | ||
1248 | pgprintk("%s: setting spte %llx\n", __func__, *shadow_pte); | 1248 | pgprintk("%s: setting spte %llx\n", __func__, *shadow_pte); |
1249 | pgprintk("instantiating %s PTE (%s) at %ld (%llx) addr %p\n", | 1249 | pgprintk("instantiating %s PTE (%s) at %ld (%llx) addr %p\n", |