From: Chen Gang <chengang@emindsoft.com.cn>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>,
QEMU Developers <qemu-devel@nongnu.org>,
Peter Crosthwaite <crosthwaite.peter@gmail.com>
Subject: Re: [Qemu-devel] [PATCH] translate-all.c: Remove writable protection feature for tb_alloc_page()
Date: Thu, 14 Jan 2016 18:26:19 +0800 [thread overview]
Message-ID: <569777CB.5060807@emindsoft.com.cn> (raw)
In-Reply-To: <CAFEAcA_Gzg_7PEQb_00GDgX3frV3v-d90BG5kcNHG9ZM+n5O1g@mail.gmail.com>
On 2016年01月14日 18:05, Peter Maydell wrote:
> On 14 January 2016 at 06:03, <chengang@emindsoft.com.cn> wrote:
>> From: Chen Gang <chengang@emindsoft.com.cn>
>>
>> Guest may allocate a readable, writable, and executable page, then write
>> data on the page, and execute data as code on the page too, then write
>> anther data still within the page.
>>
>> So remove this feature from linux-user: it not only consumes a little
>> performance, but also causes issue with the old Linux kernel under some
>> of architectures (they will directly generate segment fault for it).
>
> If we don't mark the page as non-writeable when we generate a TB
> from it, how do we detect when guest code later writes to that
> page (which means we need to invalidate the TB) ?
>
For me, what you said above sounds reasonable, at present, that's really
valuable to me :-)
I guess, you also mean: our qemu will catch the host page fault signal
and invalidate the TB.
Thanks.
--
Chen Gang (陈刚)
Open, share, and attitude like air, water, and life which God blessed
next prev parent reply other threads:[~2016-01-14 10:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-14 6:03 [Qemu-devel] [PATCH] translate-all.c: Remove writable protection feature for tb_alloc_page() chengang
2016-01-14 10:05 ` Peter Maydell
2016-01-14 10:26 ` Chen Gang [this message]
2016-01-14 10:30 ` Peter Maydell
2016-01-14 10:36 ` Chen Gang
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=569777CB.5060807@emindsoft.com.cn \
--to=chengang@emindsoft.com.cn \
--cc=crosthwaite.peter@gmail.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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.