|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/6] xen: extend XEN_DOMCTL_memory_mapping to handle cacheability
Hi Stefano, On 2/26/19 11:07 PM, Stefano Stabellini wrote: Reuse the existing padding field to pass cacheability information about the memory mapping, specifically, whether the memory should be mapped as normal memory or as device memory (this is what we have today). Add a cacheability parameter to map_mmio_regions. 0 means device memory, which is what we have today. On ARM, map device memory as p2m_mmio_direct_dev (as it is already done today) and normal memory as p2m_ram_rw. On x86, return error if the cacheability requested is not device memory. Signed-off-by: Stefano Stabellini <stefanos@xxxxxxxxxx> CC: JBeulich@xxxxxxxx CC: andrew.cooper3@xxxxxxxxxx --- xen/arch/arm/gic-v2.c | 3 ++- xen/arch/arm/p2m.c | 19 +++++++++++++++++-- xen/arch/arm/platforms/exynos5.c | 4 ++-- xen/arch/arm/platforms/omap5.c | 8 ++++---- xen/arch/arm/vgic-v2.c | 2 +- xen/arch/arm/vgic/vgic-v2.c | 2 +- xen/arch/x86/hvm/dom0_build.c | 7 +++++-- xen/arch/x86/mm/p2m.c | 6 +++++- xen/common/domctl.c | 8 +++++--- xen/drivers/vpci/header.c | 3 ++- xen/include/public/domctl.h | 4 +++- xen/include/xen/p2m-common.h | 3 ++- 12 files changed, 49 insertions(+), 20 deletions(-) diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c index e7eb01f..1ea3da2 100644 --- a/xen/arch/arm/gic-v2.c +++ b/xen/arch/arm/gic-v2.c @@ -690,7 +690,8 @@ static int gicv2_map_hwdown_extra_mappings(struct domain *d)ret = map_mmio_regions(d, gaddr_to_gfn(v2m_data->addr), Rather than extending map_mmio_regions, I would prefer if we kill this function (and unmap_mmio_mmio_regions) and instead use map_regions_p2mt. This means the conversation to p2mt should be done in the DOMCTL handling. We tend to use EOPNOTSUPP in such a case. Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |