public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Yang Zhong <yang.zhong@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, seanjc@google.com, jun.nakajima@intel.com,
	kevin.tian@intel.com, jing2.liu@linux.intel.com,
	yang.zhong@intel.com
Subject: Re: [PATCH v2 3/3] selftest: kvm: Support amx selftest
Date: Thu, 23 Dec 2021 10:38:46 +0800	[thread overview]
Message-ID: <20211223023846.GA10804@yangzhon-Virtual> (raw)
In-Reply-To: <2348d4e6-fb14-9c5b-5a6a-829d4ecd1839@redhat.com>

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

      reply	other threads:[~2021-12-23  2:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-22 21:47 [PATCH v2 0/3] AMX KVM selftest Yang Zhong
2021-12-22 14:05 ` Paolo Bonzini
2021-12-22 21:47 ` [WARNING: UNSCANNABLE EXTRACTION FAILED][PATCH v2 1/3] selftest: kvm: Reorder vcpu_load_state steps for AMX Yang Zhong
2022-01-12 21:05   ` Sean Christopherson
2022-01-13  6:31     ` Yang Zhong
2021-12-22 21:47 ` [PATCH v2 2/3] selftest: kvm: Move struct kvm_x86_state to header Yang Zhong
2021-12-22 21:47 ` [PATCH v2 3/3] selftest: kvm: Support amx selftest Yang Zhong
2021-12-22 15:15   ` Paolo Bonzini
2021-12-23  2:38     ` Yang Zhong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211223023846.GA10804@yangzhon-Virtual \
    --to=yang.zhong@intel.com \
    --cc=jing2.liu@linux.intel.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox