|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 13/17] libxl: Add xen-platform device for Q35 machine
Current Xen/QEMU method to control Xen Platform device is done by
setting the 'xen_platform_device' option value that modifies QEMU
emulated machine type, namely xenfv <--> pc.
In order to avoid multiplying machine types, this patch supplies
'-device xen-platform' directly to Qemu. To maintain backward
compatibility with existing Xen/QEMU setups, this is currently only
applicable to q35 machine. i440 emulation uses the old method (xenfv/pc
machine) to control Xen Platform device.
Signed-off-by: Thierry Escande <thierry.escande@xxxxxxxxxx>
---
tools/libs/light/libxl_dm.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/libs/light/libxl_dm.c b/tools/libs/light/libxl_dm.c
index 36f2813cde..a64e4779d0 100644
--- a/tools/libs/light/libxl_dm.c
+++ b/tools/libs/light/libxl_dm.c
@@ -1811,6 +1811,12 @@ static int libxl__build_device_model_args_new(libxl__gc
*gc,
flexarray_append(dm_args, state->dm_runas);
}
}
+
+ if (b_info->device_model_machine == LIBXL_DEVICE_MODEL_MACHINE_Q35 &&
+ libxl_defbool_val(b_info->u.hvm.xen_platform_pci)) {
+ flexarray_append(dm_args, "-device");
+ flexarray_append(dm_args, "xen-platform");
+ }
}
flexarray_append(dm_args, NULL);
*args = (char **) flexarray_contents(dm_args);
--
2.51.0
--
Thierry Escande | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |