Marcelo Tosatti wrote:
Since the sync page path can collapse flushes.

Also only flush if the spte was writable before.

Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]>

@@ -1241,9 +1239,12 @@ static void mmu_set_spte(struct kvm_vcpu
                }
        }
        if (set_spte(vcpu, shadow_pte, pte_access, user_fault, write_fault,
-                     dirty, largepage, gfn, pfn, speculative))
+                     dirty, largepage, gfn, pfn, speculative)) {
                if (write_fault)
                        *ptwrite = 1;
+               if (was_writeble)
+                       kvm_x86_ops->tlb_flush(vcpu);
+       }

I think we had cases where the spte.pfn contents changed, for example when a large page was replaced by a normal page, and also:

       } else if (pfn != spte_to_pfn(*shadow_pte)) {


--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to