From: Avi Kivity <avi@redhat.com>
To: Takuya Yoshikawa <takuya.yoshikawa@gmail.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
kvm@vger.kernel.org, yoshikawa.takuya@oss.ntt.co.jp
Subject: Re: [PATCH 1/1 v2] KVM: MMU: Use ptep_user for cmpxchg_gpte()
Date: Wed, 04 May 2011 17:27:00 +0300 [thread overview]
Message-ID: <4DC16234.7010900@redhat.com> (raw)
In-Reply-To: <20110504230035.b7f41443.takuya.yoshikawa@gmail.com>
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
next prev parent reply other threads:[~2011-05-04 14:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-01 5:30 [PATCH 0/1 v2] KVM: MMU: Use ptep_user for cmpxchg_gpte() Takuya Yoshikawa
2011-05-01 5:33 ` [PATCH 1/1 " Takuya Yoshikawa
2011-05-04 11:16 ` Marcelo Tosatti
2011-05-04 11:44 ` Avi Kivity
2011-05-04 11:58 ` Marcelo Tosatti
2011-05-04 12:11 ` Avi Kivity
2011-05-04 14:00 ` Takuya Yoshikawa
2011-05-04 14:27 ` Avi Kivity [this message]
2011-05-04 16:13 ` Marcelo Tosatti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DC16234.7010900@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=takuya.yoshikawa@gmail.com \
--cc=yoshikawa.takuya@oss.ntt.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.