Re: [patch 13/31] x86/fpu: Move KVMs FPU swapping to FPU core

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

 



On 15/10/21 16:24, Liu, Jing2 wrote:
fpu_swap_kvm_fpu(bool enter_guest, u64 guest_needs_features) {
         possibly_reallocate(enter_guest, guest_needs_features);
When KVM traps guest wrmsr XFD in #NM, I think KVM need allocate
fpstate buffer for full features.

You mean XCR0 and XFD (not XFD in #NM), but yeah at the point of fpu_swap_kvm_fpu we are in atomic context.

Still, for now the first pass of AMX implementation doesn't need to do anything but swap the pointers, and it can simply allocate the full buffer at vCPU creation.

Paolo

Because in next vmexit, guest might have dynamic state and KVM
can be preempted before running fpu_swap_kvm_fpu().
Thus, here the current->thread.fpu.fpstate already has enough space
for saving guest.




[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