Hi Giuseppe,

You're right, libvirt checks the specified model against its known
models.

However, the EPYC-Rome (not-v4) doesn't specify 'xsaves', just EPYC-Milan,
so it _seems_ the feature came from the default with cpu_model host-model,
which perhaps found EPYC Milan model closer to the host flags for reasons,
and used that CPU model file instead, which resulted in 'xsaves' required.

Since there is an increase in CPU feature flags changes recently (eg, the
'xsaves' you mentioned and also PKRU/xsave changes/regressions in kernel
5.15.0-85 per bug 2032164 comment 5), and these apparently may continue
to grow over time, as errata, security vulnerabilities, and other stuff
come up, maybe it's better not to rely on updates that require CPU model
updates in packages (specially 2 of them; qemu/libvirt).

So, in Yoga and later, Nova extends the 'libvirt.cpu_model_extra_flags' [1]
parsing with '+' and '-', so you can disable specific flags with '-', [2]
e.g., '-xsaves'.

This can be used with the unpatched QEMU, as it can use existing CPU
models.

I backported the patch to Focal/Ussuri's nova (it's present in Jammy/Yoga),
and built it in PPA [3].

Could you please test it, and see how it goes? More details in [1] and
[2].

Thanks!

[1] https://docs.openstack.org/nova/yoga/admin/cpu-models.html#cpu-
feature-flags

[2]
https://opendev.org/openstack/nova/commit/bcd6b42047ea9422a58a4273d831e23f2ea27092

[3] https://launchpad.net/~mfo/+archive/ubuntu/lp2048517

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2048517

Title:
  EPYC-Rome model without XSAVES may break live migration since the
  removal of the flag on the physical CPU

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/2048517/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to