Re: [patch 6/6] x86/fpu: Provide kvm_sync_guest_vmexit_xfd_state()

From: Thomas Gleixner
Date: Wed Dec 15 2021 - 04:49:24 EST


Jing,

On Wed, Dec 15 2021 at 14:35, Jing2 Liu wrote:
> On 12/14/2021 10:50 AM, Thomas Gleixner wrote:
>> KVM can disable the write emulation for the XFD MSR when the vCPU's fpstate
>> is already correctly sized to reduce the overhead.
>>
>> When write emulation is disabled the XFD MSR state after a VMEXIT is
>> unknown and therefore not in sync with the software states in fpstate and
>> the per CPU XFD cache.
>>
>> Provide kvm_sync_guest_vmexit_xfd_state() which has to be invoked after a
>> VMEXIT before enabling interrupts when write emulation is disabled for the
>> XFD MSR.
> Thanks for this function.
>
> s/kvm_sync_guest_vmexit_xfd_state/fpu_sync_guest_vmexit_xfd_state
> in subject and changelog.

I clearly need more sleep.