Messages in this thread | | | From | "Tian, Kevin" <> | Subject | RE: [PATCH v4 12/21] kvm: x86: Intercept #NM for saving IA32_XFD_ERR | Date | Wed, 5 Jan 2022 00:27:09 +0000 |
| |
> From: Sean Christopherson <seanjc@google.com> > Sent: Wednesday, January 5, 2022 4:01 AM > > On Wed, Dec 29, 2021, Yang Zhong wrote: > > +static void handle_nm_fault_irqoff(struct kvm_vcpu *vcpu) > > +{ > > + rdmsrl(MSR_IA32_XFD_ERR, vcpu->arch.guest_fpu.xfd_err); > > + kvm_queue_exception(vcpu, NM_VECTOR); > > This is still wrong, even though no additional supported is needed to support > nested XFD. If L1 wants to intercept #NM, then KVM must not inject the #NM > and > must not read XFD_ERR.
Sure. This v4 was sent out before we settled down this open in v3 discussion. We did fix it later and posted the sample logic here:
https://lore.kernel.org/all/BN9PR11MB52767789D59239DF5DD524758C469@BN9PR11MB5276.namprd11.prod.outlook.com/
Will include this fix in v5.
Thanks Kevin
| |