From: Alex Williamson <alex.williamson@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Fix phys memory client - pass guest physical address not region offset
Date: Fri, 29 Apr 2011 09:41:44 -0600 [thread overview]
Message-ID: <1304091704.3418.14.camel@x201> (raw)
In-Reply-To: <20110429153450.GC27816@redhat.com>
On Fri, 2011-04-29 at 18:34 +0300, Michael S. Tsirkin wrote:
> On Fri, Apr 29, 2011 at 05:29:06PM +0200, Jan Kiszka wrote:
> > On 2011-04-29 17:06, Michael S. Tsirkin wrote:
> > > On Thu, Apr 28, 2011 at 09:15:23PM -0600, Alex Williamson wrote:
> > >> When we're trying to get a newly registered phys memory client updated
> > >> with the current page mappings, we end up passing the region offset
> > >> (a ram_addr_t) as the start address rather than the actual guest
> > >> physical memory address (target_phys_addr_t). If your guest has less
> > >> than 3.5G of memory, these are coincidentally the same thing. If
> >
> > I think this broke even with < 3.5G as phys_offset also encodes the
> > memory type while region_offset does not. So everything became RAMthis
> > way, no MMIO was announced.
> >
> > >> there's more, the region offset for the memory above 4G starts over
> > >> at 0, so the set_memory client will overwrite it's lower memory entries.
> > >>
> > >> Instead, keep track of the guest phsyical address as we're walking the
> > >> tables and pass that to the set_memory client.
> > >>
> > >> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> > >
> > > Acked-by: Michael S. Tsirkin <mst@redhat.com>
> > >
> > > Given all this, can yo tell how much time does
> > > it take to hotplug a device with, say, a 40G RAM guest?
> >
> > Why not collect pages of identical types and report them as one chunk
> > once the type changes?
>
> Sure, but before we bother to optimize this, is this too slow?
At a set_memory call per 4k page, it's probably worthwhile to factor in
some simply optimizations. My set_memory callback was being hit 10^6
times. Thanks,
Alex
next prev parent reply other threads:[~2011-04-29 15:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-29 3:15 [Qemu-devel] [PATCH] Fix phys memory client - pass guest physical address not region offset Alex Williamson
2011-04-29 15:06 ` Michael S. Tsirkin
2011-04-29 15:29 ` Jan Kiszka
2011-04-29 15:34 ` Michael S. Tsirkin
2011-04-29 15:41 ` Alex Williamson [this message]
2011-04-29 15:38 ` Alex Williamson
2011-04-29 15:45 ` Jan Kiszka
2011-04-29 15:55 ` Alex Williamson
2011-04-29 16:07 ` Jan Kiszka
2011-04-29 16:20 ` Alex Williamson
2011-04-29 16:31 ` Jan Kiszka
2011-05-01 10:29 ` Michael S. Tsirkin
2011-04-29 16:52 ` Alex Williamson
2011-05-03 13:15 ` Markus Armbruster
2011-05-03 14:20 ` Alex Williamson
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=1304091704.3418.14.camel@x201 \
--to=alex.williamson@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).