From: Peter Xu <peterx@redhat.com>
To: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"David Hildenbrand" <david@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
qemu-devel@nongnu.org, sstabellini@kernel.org,
vikram.garhwal@amd.com, jgross@suse.com
Subject: Re: [QEMU][PATCH v3 5/7] memory: add MemoryRegion map and unmap callbacks
Date: Wed, 10 Apr 2024 14:56:53 -0400 [thread overview]
Message-ID: <Zhbg9alYH1-J9poU@x1n> (raw)
In-Reply-To: <CAJy5ezpCWkOqthGR1c5Nsfyi_W_yGL_d17Jcp0VckaCEwx9z3Q@mail.gmail.com>
On Wed, Apr 10, 2024 at 06:44:38PM +0200, Edgar E. Iglesias wrote:
> On Tue, Feb 27, 2024 at 11:37 PM Vikram Garhwal <vikram.garhwal@amd.com>
> wrote:
>
> > From: Juergen Gross <jgross@suse.com>
> >
> > In order to support mapping and unmapping guest memory dynamically to
> > and from qemu during address_space_[un]map() operations add the map()
> > and unmap() callbacks to MemoryRegionOps.
> >
> > Those will be used e.g. for Xen grant mappings when performing guest
> > I/Os.
> >
> > Signed-off-by: Juergen Gross <jgross@suse.com>
> > Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
> >
>
>
> Paolo, Peter, David, Phiippe, do you guys have any concerns with this patch?
This introduces a 3rd memory type afaict, neither direct nor !direct.
What happens if someone does address_space_write() to it? I didn't see it
covered here..
OTOH, the cover letter didn't mention too much either on the big picture:
https://lore.kernel.org/all/20240227223501.28475-1-vikram.garhwal@amd.com/
I want to have a quick grasp on whether it's justified worthwhile we should
introduce this complexity to qemu memory core.
Could I request a better cover letter when repost? It'll be great to
mention things like:
- what is grant mapping, why it needs to be used, when it can be used (is
it only relevant to vIOMMU=on)? Some more information on the high
level design using this type or MR would be great.
- why a 3rd memory type is required? Do we have other alternatives?
So it's all based on my very limited understanding of reading this:
https://xenbits.xenproject.org/docs/4.3-testing/misc/grant-tables.txt
If it's about cross-vm sharing memory, does it mean that in reality
there are RAMs allocated, but it's only about permission management?
In that case, is there any option we implement it with direct access
mode (however with some extra dynamic permissions applied on top using
some mechanism)?
- perhaps sold old links would be great too so people can read about the
context when it's not obvious, without a need to copy-paste.
Thanks,
--
Peter Xu
next prev parent reply other threads:[~2024-04-10 18:57 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-27 22:34 [QEMU][PATCH v3 0/7] Xen: support grant mappings Vikram Garhwal
2024-02-27 22:34 ` [QEMU][PATCH v3 1/7] softmmu: physmem: Split ram_block_add() Vikram Garhwal
2024-03-01 11:33 ` Alex Bennée
2024-04-10 11:10 ` Edgar E. Iglesias
2024-02-27 22:34 ` [QEMU][PATCH v3 2/7] xen: add pseudo RAM region for grant mappings Vikram Garhwal
2024-03-01 14:05 ` Alex Bennée
2024-04-10 11:12 ` Edgar E. Iglesias
2024-02-27 22:34 ` [QEMU][PATCH v3 3/7] softmmu: let qemu_map_ram_ptr() use qemu_ram_ptr_length() Vikram Garhwal
2024-03-01 17:04 ` Alex Bennée
2024-03-06 20:58 ` Vikram Garhwal
2024-04-10 11:15 ` Edgar E. Iglesias
2024-02-27 22:34 ` [QEMU][PATCH v3 4/7] xen: let xen_ram_addr_from_mapcache() return -1 in case of not found entry Vikram Garhwal
2024-03-01 17:08 ` Alex Bennée
2024-04-10 11:14 ` Edgar E. Iglesias
2024-02-27 22:34 ` [QEMU][PATCH v3 5/7] memory: add MemoryRegion map and unmap callbacks Vikram Garhwal
2024-02-29 23:10 ` Stefano Stabellini
2024-04-10 11:16 ` Edgar E. Iglesias
2024-04-10 16:44 ` Edgar E. Iglesias
2024-04-10 18:56 ` Peter Xu [this message]
2024-04-16 11:32 ` Edgar E. Iglesias
2024-04-16 13:28 ` Jürgen Groß
2024-04-16 15:55 ` Peter Xu
2024-04-17 10:34 ` Edgar E. Iglesias
2024-02-27 22:35 ` [QEMU][PATCH v3 6/7] xen: add map and unmap callbacks for grant region Vikram Garhwal
2024-02-29 23:10 ` Stefano Stabellini
2024-04-10 11:11 ` Edgar E. Iglesias
2024-02-27 22:35 ` [QEMU][PATCH v3 7/7] hw: arm: Add grant mapping Vikram Garhwal
2024-03-01 17:10 ` Alex Bennée
2024-03-06 20:56 ` Vikram Garhwal
2024-04-10 11:09 ` Edgar E. Iglesias
2024-02-28 13:27 ` [QEMU][PATCH v3 0/7] Xen: support grant mappings Manos Pitsidianakis
2024-02-28 18:59 ` Vikram Garhwal
2024-04-10 12:43 ` Edgar E. Iglesias
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=Zhbg9alYH1-J9poU@x1n \
--to=peterx@redhat.com \
--cc=david@redhat.com \
--cc=edgar.iglesias@gmail.com \
--cc=jgross@suse.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=sstabellini@kernel.org \
--cc=vikram.garhwal@amd.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).