From: Avi Kivity <avi@redhat.com>
To: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
KVM list <kvm@vger.kernel.org>
Subject: Re: [PATCH 2/2] KVM: MMU: fix relaxing permission
Date: Thu, 27 May 2010 14:54:32 +0300 [thread overview]
Message-ID: <4BFE5D78.5040204@redhat.com> (raw)
In-Reply-To: <4BFE54F8.7030309@redhat.com>
On 05/27/2010 02:18 PM, Avi Kivity wrote:
>
>> And, i think use 'spte.w=1, spte.u=0' to emulate 'guest cr0.wp=0 and
>> gpte.w=0'
>> is not a good way since it can completely stop user process access,
>> but in this
>> case, user process is usually read and kernel lazily to write, just
>> like vdso,
>> it will generate a lots of #PF
>
> As soon as the guest kernel stops writing we switch back to
> gpte.w=gpte.u=1 and the guest can access it completely. For the case
> where both the kernel and userspace use interleaved access, you are
> right, but I don't see a better way, do you?
To expand, we only set spte.w=1 on write faults. So if the guest only
reads the page, we'll instantiate an spte with u=1 and w=0.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2010-05-27 11:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-26 2:44 [PATCH 1/2] KVM: SVM: fix compiling warning Xiao Guangrong
2010-05-26 2:46 ` [PATCH 2/2] KVM: MMU: fix relaxing permission Xiao Guangrong
2010-05-27 10:10 ` Avi Kivity
2010-05-27 11:00 ` Xiao Guangrong
2010-05-27 11:18 ` Avi Kivity
2010-05-27 11:54 ` Avi Kivity [this message]
2010-05-27 10:13 ` [PATCH 1/2] KVM: SVM: fix compiling warning Avi Kivity
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=4BFE5D78.5040204@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=xiaoguangrong@cn.fujitsu.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).