From: Paolo Bonzini <pbonzini@redhat.com>
To: Yang Zhong <yang.zhong@intel.com>, kvm@vger.kernel.org
Cc: seanjc@google.com, jun.nakajima@intel.com, kevin.tian@intel.com,
jing2.liu@linux.intel.com
Subject: Re: [PATCH v2 3/3] selftest: kvm: Support amx selftest
Date: Wed, 22 Dec 2021 16:15:02 +0100 [thread overview]
Message-ID: <2348d4e6-fb14-9c5b-5a6a-829d4ecd1839@redhat.com> (raw)
In-Reply-To: <20211222214731.2912361-4-yang.zhong@intel.com>
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.
Thanks,
Paolo
next prev parent reply other threads:[~2021-12-22 15:15 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 [this message]
2021-12-23 2:38 ` Yang Zhong
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=2348d4e6-fb14-9c5b-5a6a-829d4ecd1839@redhat.com \
--to=pbonzini@redhat.com \
--cc=jing2.liu@linux.intel.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=seanjc@google.com \
--cc=yang.zhong@intel.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