[PATCH] qemu: Starting a domain with custom model and allowed-fallback failed when host lacks some CPU features

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

 



An attemp to start a domain requesting a custom CPU model, core2duo, for
example, will fail if some feature that the model needs doesn't exist in that
host, even though fallback attibute is set allow:
"error: the CPU is incompatible with host CPU: Host CPU does not provide
required features: monitor"
Of course we can start that domain through forbidding that feature, but
that may not be flexible.

Signed-off-by: Yi Wang <wang.yi59@xxxxxxxxxx>
---
 src/qemu/qemu_process.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 32ba8e3..1bb65d3 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -5324,7 +5324,8 @@ qemuProcessUpdateGuestCPU(virDomainDefPtr def,
         virCPUCompare(caps->host.arch,
                       virQEMUCapsGetHostModel(qemuCaps, def->virtType,
                                               VIR_QEMU_CAPS_HOST_CPU_FULL),
-                      def->cpu, true) < 0)
+                      def->cpu,
+                      def->cpu->fallback != VIR_CPU_FALLBACK_ALLOW) < 0)
         return -1;
 
     if (virCPUUpdate(def->os.arch, def->cpu,
-- 
1.8.3.1


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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