On Wed, Jun 18, 2014 at 08:12:07PM -0300, [email protected] wrote:
> Reload remote vcpus MMU from GET_DIRTY_LOG codepath, before
> deleting a pinned spte.
>
> Signed-off-by: Marcelo Tosatti <[email protected]>
>
> ---
> arch/x86/kvm/mmu.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> Index: kvm.pinned-sptes/arch/x86/kvm/mmu.c
> ===================================================================
> --- kvm.pinned-sptes.orig/arch/x86/kvm/mmu.c 2014-06-13 16:50:50.040140594
> -0300
> +++ kvm.pinned-sptes/arch/x86/kvm/mmu.c 2014-06-13 16:51:05.620104451
> -0300
> @@ -1247,6 +1247,9 @@
> spte &= ~SPTE_MMU_WRITEABLE;
> spte = spte & ~PT_WRITABLE_MASK;
>
> + if (is_pinned_spte(spte))
> + mmu_reload_pinned_vcpus(kvm);
> +
Why write protect it at all? mmu_reload_pinned_vcpus() will unprotected it
anyway
on the next vmentry. Isn't it better to just report all pinned pages as dirty
alway.
> return mmu_spte_update(sptep, spte);
> }
>
>
>
--
Gleb.
--
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