According to libvirt documentation for host-model [1] it is safe to use
it only if 'fallback' attribute is set to 'forbid', this indicates that
the libvirt and QEMU are new enough and can safely filter list of cpu
features that will be guaranteed to be visible inside of the guest.

[1] <https://libvirt.org/formatdomain.html#elementsCPU>

Signed-off-by: Pavel Hrdina <[email protected]>
---
 virtinst/domcapabilities.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/virtinst/domcapabilities.py b/virtinst/domcapabilities.py
index 4cbb7f20..4d505225 100644
--- a/virtinst/domcapabilities.py
+++ b/virtinst/domcapabilities.py
@@ -227,9 +227,9 @@ class DomainCapabilities(XMLBuilder):
         """
         Return True if domcaps reports support for cpu mode=host-model.
         host-model infact predates this support, however it wasn't
-        general purpose safe prior to domcaps advertisement
+        general purpose safe prior to domcaps advertisement.
         """
-        return [(m.name == "host-model" and m.supported)
+        return [(m.name == "host-model" and m.models[0].fallback == "forbid")
                 for m in self.cpu.modes]
 
 
-- 
2.20.1

_______________________________________________
virt-tools-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-tools-list

Reply via email to