Re: [PATCH v2 3/3] selftest: kvm: Support amx selftest

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

 



On Wed, Dec 22, 2021 at 04:15:02PM +0100, Paolo Bonzini wrote:
> On 12/22/21 22:47, Yang Zhong wrote:
> >+	/* Trigger #NM exception */
> >+	__tileloadd(tiledata);
> >+	GUEST_SYNC(10);
> >+
> >+	GUEST_DONE();
> >+}
> >+
> >+void guest_nm_handler(struct ex_regs *regs)
> >+{
> >+	/* Check if #NM is triggered by XFEATURE_MASK_XTILEDATA */
> >+	GUEST_SYNC(7);
> >+	GUEST_ASSERT(rdmsr(MSR_IA32_XFD_ERR) == XFEATURE_MASK_XTILEDATA);
> >+	GUEST_SYNC(8);
> >+	GUEST_ASSERT(rdmsr(MSR_IA32_XFD_ERR) == XFEATURE_MASK_XTILEDATA);
> >+	/* Clear xfd_err */
> >+	wrmsr(MSR_IA32_XFD_ERR, 0);
> >+	regs->rip += 3;
> >+	GUEST_SYNC(9);
> >+}
> 
> I don't understand why "regs->rip += 3" is needed though.
> 
> My idea was that, after GUEST_SYNC(9) and IRET, the guest would
> execute __tileloadd again; this time without generating #NM, so that
> after GUEST_SYNC(10) the host sees the loaded data in TMM0.
>
  
  Sorry, I didn't capture it before, and in that time, I wanted to skip this
  load intruction.

  Let me enbale amx before GUEST_SYNC(9), and then load tiles again.

  The new v3 will address this, thanks!

  Yang


 
> Thanks,
> 
> Paolo



[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