Re: [PATCH RESEND v1] xen: recognize device_model_override

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/12/20 11:03 AM, Olaf Hering wrote:
Since Xen 4.2 libxl expects device_model_override="/path" instead of
device_model="/path".

This has been on my todo list but never got the priority it deserved. Thanks for taking it on. Without your patch, using 'xl create' on xl.cfg converted from domXML by the libxl driver results in

WARNING: ignoring device_model directive.
WARNING: Use "device_model_override" instead if you really want a non-default device_model

Adjust the code to parse this as <emulator>.

You also have to adjust all the failing {xl,xm}configtests.

While libxl also recognizes device_model_version="", this knob is not
supported by libvirt. A runtime detection exists to select either
"qemu-xen" or "qemu-xen-traditional".

Correct. It is selected based on the specified <emulator> and not modeled in domXML. Does it need to be exposed to the user? AFAIK those are the only two values we care about, and it is possible to determine which to use based on the <emulator>.

Regards,
Jim


Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
---
  src/libxl/xen_common.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c
index c82e487d80..88a784ed04 100644
--- a/src/libxl/xen_common.c
+++ b/src/libxl/xen_common.c
@@ -1508,7 +1508,7 @@ xenParseConfigCommon(virConfPtr conf,
      if (xenParseTimeOffset(conf, def) < 0)
          return -1;
- if (xenConfigCopyStringOpt(conf, "device_model", &def->emulator) < 0)
+    if (xenConfigCopyStringOpt(conf, "device_model_override", &def->emulator) < 0)
          return -1;
if (STREQ(nativeFormat, XEN_CONFIG_FORMAT_XL)) {
@@ -2242,7 +2242,7 @@ static int
  xenFormatEmulator(virConfPtr conf, virDomainDefPtr def)
  {
      if (def->emulator &&
-        xenConfigSetString(conf, "device_model", def->emulator) < 0)
+        xenConfigSetString(conf, "device_model_override", def->emulator) < 0)
          return -1;
return 0;





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux