|
| From: | Juergen Gross |
| Subject: | Re: [QEMU][PATCH v1 5/7] memory: add MemoryRegion map and unmap callbacks |
| Date: | Wed, 11 Oct 2023 09:01:09 +0200 |
| User-agent: | Mozilla Thunderbird |
On 10.10.23 02:17, Stefano Stabellini wrote:
On Thu, 5 Oct 2023, Vikram Garhwal 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>Can't we just use the existing Xen hooks in qemu_ram_ptr_length and xen_invalidate_map_cache_entry? Do we really need new ones?
I tried your idea first and it didn't work out. The existing hooks are invoked not only when explicitly [un]mapping memory regions, but in some other cases, too. Have a look for qemu_ram_ptr_length() call in flatview_write_continue(). Juergen
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
| [Prev in Thread] | Current Thread | [Next in Thread] |