Re: Thoughts of AMX KVM support based on latest kernel

From: Sean Christopherson
Date: Tue Nov 16 2021 - 15:12:58 EST


On Tue, Nov 16, 2021, Thomas Gleixner wrote:
> Now you could argue that the interrupt/softirq XSAVES should also read
> the XFD MSR and save it in guest_fpstate.xfd. Same in schedule()
> and kvm_put_guest_fpu(), i.e:
>
> XSAVES
> if (fpstate->is_guest) {
> rdmsrl(XFD, xfd);
> fpstate->xfd = xfd;
> __this_cpu_write(..., xfd);
> }
>
> We can do that, but I'm unhappy about this conditional in schedule(). So
> I was asking for doing a simple KVM only solution first:

Ah, the schedule() conditional is the part I was missing. Thanks!