Re: [PATCH v2 1/6] KVM: x86: Clear all supported MPX xfeatures if they are not all set

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

 



On 1/12/2023 11:17 AM, Mingwei Zhang wrote:

But the permitted_xcr0 and supported_xcr0 seems never used
directly as the parameter of XSETBV, but only for size calculation.

Yeah, I saw that too, and tried to improve it [1]. Maybe this is not a big deal in KVM.

One more question: I am very confused by the implementation of
xstate_get_guest_group_perm(). It seems fetching the xfeatures from the
host process (&current->group_leader->thread.fpu). Is this intentional?
Does that mean in order to enable AMX in the guest we have to enable it
on the host process first?

Yes, it was designed that QEMU requests permissions via arch_prctl() before creating vCPU threads [2][3]. Granted, this feature capability will be advertised to the guest. Then, it will *enable* the feature, right?

Thanks,
Chang

[1] https://lore.kernel.org/kvm/20220823231402.7839-2-chang.seok.bae@xxxxxxxxx/
[2] https://lore.kernel.org/lkml/87wnmf66m5.ffs@tglx/
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=980fe2fddcff




[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