[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 07/21] xen-platform-pci: register xen-mmio as RAM for XEN_EMU
From: |
David Woodhouse |
Subject: |
[RFC PATCH 07/21] xen-platform-pci: register xen-mmio as RAM for XEN_EMULATE |
Date: |
Mon, 5 Dec 2022 17:31:23 +0000 |
From: Joao Martins <joao.m.martins@oracle.com>
This is a workaround while we find the most elegant solution
in grant table frames mapping.
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
---
hw/i386/xen/xen_platform.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c
index 914619d140..710039851a 100644
--- a/hw/i386/xen/xen_platform.c
+++ b/hw/i386/xen/xen_platform.c
@@ -469,8 +469,12 @@ static const MemoryRegionOps platform_mmio_handler = {
static void platform_mmio_setup(PCIXenPlatformState *d)
{
- memory_region_init_io(&d->mmio_bar, OBJECT(d), &platform_mmio_handler, d,
- "xen-mmio", 0x1000000);
+ if (xen_mode == XEN_EMULATE)
+ memory_region_init_ram(&d->mmio_bar, OBJECT(d), "xen-mmio", 0x1000000,
+ &error_fatal);
+ else
+ memory_region_init_io(&d->mmio_bar, OBJECT(d), &platform_mmio_handler,
d,
+ "xen-mmio", 0x1000000);
}
static int xen_platform_post_load(void *opaque, int version_id)
--
2.35.3
- Re: [RFC PATCH 13/21] i386/xen: implement HYPERVISOR_hvm_op, (continued)
- [RFC PATCH 05/21] hw/xen_backend: refactor xen_be_init(), David Woodhouse, 2022/12/05
- [RFC PATCH 16/21] i386/xen: handle register_vcpu_time_memory_area, David Woodhouse, 2022/12/05
- [RFC PATCH 11/21] i386/xen: implement HYPERCALL_xen_version, David Woodhouse, 2022/12/05
- [RFC PATCH 09/21] pc_piix: allow xenfv machine with XEN_EMULATE, David Woodhouse, 2022/12/05
- [RFC PATCH 18/21] kvm/ioapic: mark gsi-2 used in ioapic routing init, David Woodhouse, 2022/12/05
- [RFC PATCH 07/21] xen-platform-pci: register xen-mmio as RAM for XEN_EMULATE,
David Woodhouse <=
- [RFC PATCH 15/21] i386/xen: handle register_vcpu_info, David Woodhouse, 2022/12/05
- [RFC PATCH 12/21] i386/xen: set shared_info page, David Woodhouse, 2022/12/05
[RFC PATCH 21/21] i386/xen: implement HYPERVISOR_sched_op, David Woodhouse, 2022/12/05
[RFC PATCH 10/21] i386/xen: handle guest hypercalls, David Woodhouse, 2022/12/05