Re: [PATCH 1/1 v2] KVM: MMU: Use ptep_user for cmpxchg_gpte()

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

 



On 05/04/2011 05:00 PM, Takuya Yoshikawa wrote:
>
>  We do get_user() in read_gpte().  That is equivalent to
>  get_user_pages().  So we already broke that layer of abstraction.

At first, I broke hva_to_pfn() into two functions:
   hva_to_page
   hva_to_pfn
and used the former to get the page.

Ouch, what a complicated function.

But after making that patch, I thought it might be a bit extra to do such
things in the function which is doing low level page manipulations like
kmapping.

Actually, we are already assuming that the page returned by gfn_to_page is
always a usual page which contains gptes without extra checks.

When gfn_to_page() returns an error, it is actually a real page in host memory that can be scribbled on. So no further checks are needed.

Which way do you like the best?

I think it should work fine as is. The question is whether we're doing a layering violation here (but in any case, that was introduced by ptep_user, not this patch).

--
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