Sure, there would be a follow-on patch to relax this check after it's merged.+ /*Could we relax this in a followon patch? (after this series is merged)
+ * As a first step, a guest could only enable LBR feature if its cpu
+ * model is the same as the host because the LBR registers would
+ * be pass-through to the guest and they're model specific.
+ */
+ if (boot_cpu_data.x86_model != guest_cpuid_model(vcpu))
+ return false;
I assume you are referring to the LBR_FMT value in the perf_capabilities.
It's enough of the perf cap LBR version matches, don't need full model
number match.
This would require a way to configure the LBR versionSure, I may propose this configuration in the QEMU community.
from qemu.
Yes, we need this flexibility to cover as many platforms as possible.
This would allow more flexibility, for example migration from
Icelake to Skylake and vice versa.
-Andi