diff options
author | Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> | 2023-08-29 21:35:18 -0700 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@amd.com> | 2023-08-30 18:23:08 -0700 |
commit | 560142190bc347fdd4511a795bdcff768799519d (patch) | |
tree | 5da5527803b60f7028569c9357e181c1c4479555 /include | |
parent | 0c8ab1cddd6c1bf4e3722fcea111e614c22dcc09 (diff) |
xen_arm: Initialize RAM and add hi/low memory regions
In order to use virtio backends we need to initialize RAM for the
xen-mapcache (which is responsible for mapping guest memory using foreign
mapping) to work. Calculate and add hi/low memory regions based on
machine->ram_size.
Use the constants defined in public header arch-arm.h to be aligned with the xen
toolstack.
While using this machine, the toolstack should then pass real ram_size using
"-m" arg. If "-m" is not given, create a QEMU machine without IOREQ and other
emulated devices like TPM and VIRTIO. This is done to keep this QEMU machine
usable for /etc/init.d/xencommons.
Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/xen/xen_native.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/hw/xen/xen_native.h b/include/hw/xen/xen_native.h index a4b1aa9e5d..5d2718261f 100644 --- a/include/hw/xen/xen_native.h +++ b/include/hw/xen/xen_native.h @@ -539,4 +539,12 @@ static inline int xendevicemodel_set_irq_level(xendevicemodel_handle *dmod, #define GUEST_VIRTIO_MMIO_SPI_LAST 43 #endif +#if defined(__i386__) || defined(__x86_64__) +#define GUEST_RAM_BANKS 2 +#define GUEST_RAM0_BASE 0x40000000ULL /* 3GB of low RAM @ 1GB */ +#define GUEST_RAM0_SIZE 0xc0000000ULL +#define GUEST_RAM1_BASE 0x0200000000ULL /* 1016GB of RAM @ 8GB */ +#define GUEST_RAM1_SIZE 0xfe00000000ULL +#endif + #endif /* QEMU_HW_XEN_NATIVE_H */ |