xen: mapcache: Add support for grant mappings
authorEdgar E. Iglesias <edgar.iglesias@amd.com>
Tue, 30 Apr 2024 08:26:45 +0000 (10:26 +0200)
committerEdgar E. Iglesias <edgar.iglesias@amd.com>
Sun, 9 Jun 2024 18:16:14 +0000 (20:16 +0200)
commit9ecdd4bf08dfe4a37e16b8a8b228575aff641468
treebd717509502ee1f9866eed25a15033edba8f81f7
parent49a7202979e49c7c9c02461fce497a868ef6b143
xen: mapcache: Add support for grant mappings

Add a second mapcache for grant mappings. The mapcache for
grants needs to work with XC_PAGE_SIZE granularity since
we can't map larger ranges than what has been granted to us.

Like with foreign mappings (xen_memory), machines using grants
are expected to initialize the xen_grants MR and map it
into their address-map accordingly.

CC: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
hw/xen/xen-hvm-common.c
hw/xen/xen-mapcache.c
include/hw/xen/xen-hvm-common.h
include/sysemu/xen.h