From: Jan Kiszka <jan.kiszka@siemens.com>
To: Glauber Costa <glommer@redhat.com>
Cc: kvm@vger.kernel.org, jes@sgi.com, avi@qumranet.com, aliguori@us.ibm.com
Subject: Re: [PATCH 1/9] Don't separate registrations with IO_MEM_ROM set
Date: Fri, 12 Sep 2008 18:26:37 +0200 [thread overview]
Message-ID: <48CA983D.6060101@siemens.com> (raw)
In-Reply-To: <20080912160432.GA3734@poweredge.glommer>
Glauber Costa wrote:
> On Fri, Sep 12, 2008 at 05:47:40PM +0200, Jan Kiszka wrote:
>> Glauber Costa wrote:
>>> Actually, all registrations are the same. If IO_MEM_ROM is set, we only
>>> need to take care of not passing its value as the phys_offset.
>> As you are turning things upside down already: :->
>>
>> Any idea how to deal with that "real-only" property of IO_MEM_ROM? And
>> how to handle memory remappings during runtime (like
>> i440fx_update_memory_mappings does)?
>>
>> I like the hook-approach for kvm_cpu_register_physical_memory a lot. But
>> note that - at least so far - cpu_register_physical_memory is sometimes
>> misused to change the protection or the origin of some memory region.
>> That should be taken into account. Or the qemu interface should be
>> refactored first so that kvm (or qemuaccel) can cleanly hook into
>> dedicated remapping/protection changing services.
>
> Right now, KVM does not seem to bother.
> The registering of memory does not account for any kind of protection, and the
> only flag we have is regarding logging being enabled or disabled (for that one,
> I do see the problem you describe, but haven't dig deeply yet).
>
> Calling of kvm_cpu_register_physical_what_a_big_name_memory() does not exclude
> the calling of qemu's version. So for what qemu itself is concerned, the protection
> changes still happen: only kvm takes no action about it.
Yes, lacking protection may not harm that much, more problematic can be
the inconsistencies memory remappings leave behind.
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2008-09-12 16:27 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-12 15:10 [PATCH 0/9] Simplify memory registration Glauber Costa
2008-09-12 15:10 ` [PATCH 1/9] Don't separate registrations with IO_MEM_ROM set Glauber Costa
2008-09-12 15:47 ` Jan Kiszka
2008-09-12 16:04 ` Glauber Costa
2008-09-12 16:26 ` Jan Kiszka [this message]
2008-09-12 18:47 ` Glauber Costa
2008-09-13 6:26 ` Jan Kiszka
2008-09-15 12:44 ` Glauber Costa
2008-09-15 13:08 ` Jan Kiszka
2008-09-15 13:15 ` Glauber Costa
2008-09-19 23:12 ` Avi Kivity
2008-09-12 15:10 ` [PATCH 2/9] do not use mem_hole anymore Glauber Costa
2008-09-12 15:10 ` [PATCH 3/9] allow intersecting region to be on the boundary Glauber Costa
2008-09-12 15:10 ` [PATCH 4/9] substitute is_allocated_mem with more general is_containing_region Glauber Costa
2008-09-12 15:10 ` [PATCH 5/9] move kvm_cpu_register_memory_area into qemu's Glauber Costa
2008-09-12 15:10 ` [PATCH 6/9] cleanup kvm memory registration Glauber Costa
2008-09-12 15:10 ` [PATCH 7/9] add debuging facilities to memory registration at libkvm Glauber Costa
2008-09-12 15:10 ` [PATCH 8/9] coalesce mmio regions without an explicit call Glauber Costa
2008-09-12 15:10 ` [PATCH 9/9] remove explicit calls to kvm_qemu_register_coalesced_mmio Glauber Costa
-- strict thread matches above, loose matches on Subject: below --
2008-09-19 16:08 [PATCHEY 0/9] Rrrreplace the ol' scurvy memory registration Glauber Costa
2008-09-19 16:08 ` [PATCH 1/9] Don't separate registrations with IO_MEM_ROM set Glauber Costa
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=48CA983D.6060101@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=aliguori@us.ibm.com \
--cc=avi@qumranet.com \
--cc=glommer@redhat.com \
--cc=jes@sgi.com \
--cc=kvm@vger.kernel.org \
/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