From: Zeng Guang <guang.zeng@intel.com>
To: "Gao, Chao" <chao.gao@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, "Christopherson,,
Sean" <seanjc@google.com>, Shuah Khan <shuah@kernel.org>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] KVM: selftest: Enhance handling WRMSR ICR register in x2APIC mode
Date: Fri, 24 Jun 2022 12:28:38 +0800 [thread overview]
Message-ID: <fc6c4f6e-07c6-2d16-5457-dbe03ceb1bee@intel.com> (raw)
In-Reply-To: <20220623103314.GA14006@gao-cwp>
On 6/23/2022 6:33 PM, Gao, Chao wrote:
> On Thu, Jun 23, 2022 at 05:45:11PM +0800, Zeng Guang wrote:
>
>> + ASSERT_EQ(icr & ~APIC_ICR_BUSY, val & ~APIC_ICR_BUSY);
> Probably add a comment for it would be better. E.g.,
>
> APIC_ICR_BUSY is removed and not used when CPU is in x2APIC mode.
> It is undefined whether write 1 to this bit will be preserved. So,
> even KVM keeps this bit cleared in some cases even in x2apic mode,
> no guarantee that hardware (specifically, CPU ucode when Intel IPI
> virtualization enabled) will clear the bit. So, skip checking this
> bit.
Hardware won't touch APIC_ICR_BUSY in x2apic mode. It totally depends on
KVM to
clear it or not if set for test purpose. While in Intel IPI
virtualization case,
KVM doesn't take care of this bit in vICR writes. So how about the
comments as
below:
APIC_ICR_BUSY is removed and not used when CPU is in x2APIC mode.
KVM doesn't guarantee to clear this bit in some cases e.g. When
Intel IPI virtualization enabled, if it's set for test purpose.
So, skip checking this bit.
Thanks.
Zeng Guang
next prev parent reply other threads:[~2022-06-24 4:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-23 9:45 [PATCH v2] KVM: selftest: Enhance handling WRMSR ICR register in x2APIC mode Zeng Guang
2022-06-23 10:33 ` Chao Gao
2022-06-23 20:34 ` Sean Christopherson
2022-06-24 2:55 ` Zeng Guang
2022-06-24 4:28 ` Zeng Guang [this message]
2022-06-24 5:48 ` Chao Gao
2022-06-24 8:05 ` Paolo Bonzini
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=fc6c4f6e-07c6-2d16-5457-dbe03ceb1bee@intel.com \
--to=guang.zeng@intel.com \
--cc=chao.gao@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=shuah@kernel.org \
/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