Re: Thoughts of AMX KVM support based on latest kernel

Thomas Gleixner
2021-11-16T23:35:57Z

On Tue, Nov 16 2021 at 20:12, Sean Christopherson wrote:
> 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!

As I was missing the preempt notifier... which makes it a different
story, but I still think that the simple version is good enough at least
for a start.

Thanks,

tglx