Re: [PATCH 2/3] KVM: MMU: Introduce a helper to read guest pte

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/20/2011 02:06 PM, Roedel, Joerg wrote:
On Wed, Apr 20, 2011 at 06:05:08AM -0400, Avi Kivity wrote:
>  On 04/20/2011 12:35 PM, Roedel, Joerg wrote:

>  >  This patch seems only to introduce another wrapper around
>  >  kvm_read_guest_page_mmu(), so I don't see a problem in this patch.
>
>  By patch 3, ptep_user will be computed in this function and no longer
>  available for setting the accessed bit later on.
>
>  >  The kvm_read_guest_page_mmu takes care whether it gets a l1-gfn or
>  >  l2-gfn (by calling mmu->translate_gpa).
>
>  But cmpxchg_gpte() does not.

You are right, cmpxchg_gpte needs to handle this too. But the bug is not
introduced with this patch-set it was there before.

Correct. The reason I don't want the helper, is so we can use ptep_user in both places (not for efficiency, just to make sure it's exactly the same value).

The cmpxchg_gpte function treats all table_gfns as l1-gfns. I'll send a
fix soon.

Thanks.

--
error compiling committee.c: too many arguments to function

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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux