summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0016-xen_arm-Add-accel-xen-and-drop-extra-interface-openi.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0016-xen_arm-Add-accel-xen-and-drop-extra-interface-openi.patch')
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0016-xen_arm-Add-accel-xen-and-drop-extra-interface-openi.patch79
1 files changed, 0 insertions, 79 deletions
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0016-xen_arm-Add-accel-xen-and-drop-extra-interface-openi.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0016-xen_arm-Add-accel-xen-and-drop-extra-interface-openi.patch
deleted file mode 100644
index 14f2e240..00000000
--- a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0016-xen_arm-Add-accel-xen-and-drop-extra-interface-openi.patch
+++ /dev/null
@@ -1,79 +0,0 @@
1From a730d5ea4a0445a8c694b56583dd06bd000fae74 Mon Sep 17 00:00:00 2001
2From: Vikram Garhwal <vikram.garhwal@amd.com>
3Date: Wed, 4 Jan 2023 23:05:25 +0000
4Subject: [PATCH 16/16] xen_arm: Add "accel = xen" and drop extra interface
5 openings
6
7In order to use virtio backends we need to make sure that Xen accelerator
8is enabled (xen_enabled() returns true) as the memory/cache systems
9check for xen_enabled() to perform specific actions. Without that
10the xen-mapcache (which is needed for mapping guest memory) is not in use.
11
12Also drop extra interface opening as this is already done in xen-all.c
13(so drop xen_init_ioreq() completely) and skip virtio/tpm initialization
14if device emulation is not available.
15
16Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
17Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
18Reviewed-by: Stefano Stabellini <stefano.stabellini@amd.com>
19---
20 hw/arm/xen_arm.c | 29 ++---------------------------
21 1 file changed, 2 insertions(+), 27 deletions(-)
22
23diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c
24index fde919df29..4ac425a3c5 100644
25--- a/hw/arm/xen_arm.c
26+++ b/hw/arm/xen_arm.c
27@@ -137,30 +137,6 @@ void qmp_xen_set_global_dirty_log(bool enable, Error **errp)
28 {
29 }
30
31-static int xen_init_ioreq(XenIOState *state, unsigned int max_cpus)
32-{
33- xen_dmod = xendevicemodel_open(0, 0);
34- xen_xc = xc_interface_open(0, 0, 0);
35-
36- if (xen_xc == NULL) {
37- perror("xen: can't open xen interface\n");
38- return -1;
39- }
40-
41- xen_fmem = xenforeignmemory_open(0, 0);
42- if (xen_fmem == NULL) {
43- perror("xen: can't open xen fmem interface\n");
44- xc_interface_close(xen_xc);
45- return -1;
46- }
47-
48- xen_register_ioreq(state, max_cpus, xen_memory_listener);
49-
50- xenstore_record_dm_state(xenstore, "running");
51-
52- return 0;
53-}
54-
55 static void xen_enable_tpm(void)
56 {
57 #ifdef CONFIG_TPM
58@@ -198,9 +174,7 @@ static void xen_arm_init(MachineState *machine)
59
60 xen_init_ram(machine);
61
62- if (xen_init_ioreq(xam->state, machine->smp.cpus)) {
63- return;
64- }
65+ xen_register_ioreq(xam->state, machine->smp.cpus, xen_memory_listener);
66
67 xen_create_virtio_mmio_devices(xam);
68
69@@ -218,6 +192,7 @@ static void xen_arm_machine_class_init(ObjectClass *oc, void *data)
70 mc->max_cpus = 1;
71 /* Set explicitly here to make sure that real ram_size is passed */
72 mc->default_ram_size = 0;
73+ mc->default_machine_opts = "accel=xen";
74
75 machine_class_allow_dynamic_sysbus_dev(mc, TYPE_TPM_TIS_SYSBUS);
76 }
77--
782.17.1
79