Re: [PATCH] KVM: x86: Always enable legacy fp/sse

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

 



On 8/17/22 05:29, Leonardo Brás wrote:
QEMU always calls kvm_put_xsave, even on this combination because
KVM_CAP_CHECK_EXTENSION_VM always returns true for KVM_CAP_XSAVE.
Any particular reason why it always returns true for KVM_CAP_XSAVE, even when
the CPU does not support it?

IIUC, if it returns false to this capability, kvm_put_xsave() should never be
called, and thus it can avoid bug reproduction.

Because it allows userspace to have a single path for saving/restoring FPU state. See for example the "migration" code in tools/testing/selftests/kvm/lib/x86_64/processor.c (the vcpu_save_state and vcpu_load_state functions).

In fact, the QEMU code that uses KVM_GET_FPU/KVM_SET_FPU in x86 is obsolete, because it's not been used since Linux 2.6.36.

Paolo




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux