From: Jan Kiszka <jan.kiszka@siemens.com>
To: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: KVM <kvm@vger.kernel.org>, Marcelo Tosatti <mtosatti@redhat.com>,
qemu-devel@nongnu.org, Kevin O'Connor <kevin@koconnor.net>,
Avi Kivity <avi@redhat.com>,
Anthony Liguori <anthony@codemonkey.ws>,
Liu Sheng <liusheng@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v2 3/5] Qemu: do not mark bios readonly
Date: Wed, 31 Oct 2012 08:21:09 +0100 [thread overview]
Message-ID: <5090D165.7010806@siemens.com> (raw)
In-Reply-To: <5090CCC7.9060503@linux.vnet.ibm.com>
On 2012-10-31 08:01, Xiao Guangrong wrote:
> On 10/31/2012 02:46 PM, Jan Kiszka wrote:
>
>>> Please allow me to clarify it more clearly.
>>>
>>> The flash is ROMD device means guest can not write it, any kinds of guest write
>>> access on this device can cause vmexit to kvm and return to userspace.
>>>
>>> We should pay more attention on it if we execute the code in ROMD since we
>>> can not use ROMD as stack/page table/IDT table and all other implicitly write access.
>>> Of course, if you do not use ROM as those purposes, it is okay. :)
>>
>> So the problem is that there is KVM code that still blindly writes to
>> guest memory and does not take the memory regions' protection flag into
>> account? And we cannot mark those regions read only in the host's page
>> table?
>
> KVM has the ability to catch this kind of write access on ROMD, it is just hard to
> emulate the implicitly memory access.
Drop them? It is highly unlikely that they trigger the magic
write-enable patterns at the right spot in a ROMD device.
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2012-10-31 7:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-25 9:20 [Qemu-devel] [PATCH v2 0/5] Qemu: implement readonly memory Xiao Guangrong
2012-10-25 9:21 ` [Qemu-devel] [PATCH v2 1/5] KVM: define KVM_CAP_READONLY_MEM unconditionally Xiao Guangrong
2012-10-25 12:14 ` Jan Kiszka
2012-10-25 9:21 ` [Qemu-devel] [PATCH v2 2/5] Qemu: update header files Xiao Guangrong
2012-10-25 11:03 ` Peter Maydell
2012-10-25 9:22 ` [Qemu-devel] [PATCH v2 3/5] Qemu: do not mark bios readonly Xiao Guangrong
2012-10-26 10:35 ` Jan Kiszka
2012-10-29 7:09 ` Xiao Guangrong
2012-10-29 7:44 ` Jan Kiszka
2012-10-29 8:31 ` Xiao Guangrong
2012-10-31 6:03 ` Jan Kiszka
2012-10-31 6:35 ` Xiao Guangrong
2012-10-31 6:46 ` Jan Kiszka
2012-10-31 7:01 ` Xiao Guangrong
2012-10-31 7:21 ` Jan Kiszka [this message]
2012-10-25 9:22 ` [Qemu-devel] [PATCH v2 4/5] Qemu: implement readonly memory Xiao Guangrong
2012-10-25 9:23 ` [Qemu-devel] [PATCH v2 5/5] Qemu: mark pci rom readonly Xiao Guangrong
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=5090D165.7010806@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=anthony@codemonkey.ws \
--cc=avi@redhat.com \
--cc=kevin@koconnor.net \
--cc=kvm@vger.kernel.org \
--cc=liusheng@linux.vnet.ibm.com \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=xiaoguangrong@linux.vnet.ibm.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).