public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Zhang Jiaming <jiaming@nfschina.com>
Cc: pbonzini@redhat.com, vkuznets@redhat.com, wanpengli@tencent.com,
	jmattson@google.com, joro@8bytes.org, tglx@linutronix.de,
	mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com,
	x86@kernel.org, hpa@zytor.com, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, liqiong@nfschina.com,
	renyu@nfschina.com
Subject: Re: [PATCH] KVM: LAPIC: Fix a spelling mistake in comments
Date: Tue, 12 Jul 2022 19:04:01 +0000	[thread overview]
Message-ID: <Ys3FodyfOxaT+NZU@google.com> (raw)
In-Reply-To: <Ys3Ex9GaoWAbNqF0@google.com>

On Tue, Jul 12, 2022, Sean Christopherson wrote:
> On Fri, Jul 01, 2022, Zhang Jiaming wrote:
> ---
>  arch/x86/kvm/lapic.c | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
> index 48740a235dee..ef5417d3ce95 100644
> --- a/arch/x86/kvm/lapic.c
> +++ b/arch/x86/kvm/lapic.c
> @@ -830,13 +830,16 @@ static bool kvm_apic_match_physical_addr(struct kvm_lapic *apic, u32 mda)
>  		return mda == kvm_x2apic_id(apic);
> 
>  	/*
> -	 * Hotplug hack: Make LAPIC in xAPIC mode also accept interrupts as if
> -	 * it were in x2APIC mode.  Hotplugged VCPUs start in xAPIC mode and
> -	 * this allows unique addressing of VCPUs with APIC ID over 0xff.
> -	 * The 0xff condition is needed because writable xAPIC ID.

Doh, this won't apply on kvm/queue, I unintentionally generated this as a delta
on top of your patch.  I'll remedy that before testing and officially posting.

> +	 * Hotplug hack: Accept interrupts for vCPUs in xAPIC mode as if they
> +	 * were in x2APIC mode if the target APIC ID can't be encoded as an
> +	 * xAPIC ID.  This allows unique addressing of hotplugged vCPUs (which
> +	 * start in xAPIC mode) with an APIC ID that is unaddressable in xAPIC
> +	 * mode.  Match the x2APIC ID if and only if the target APIC ID can't
> +	 * be encoded in xAPIC to avoid spurious matches against a vCPU that
> +	 * changed its (addressable) xAPIC ID (which is writable).
>  	 */
> -	if (kvm_x2apic_id(apic) > 0xff && mda == kvm_x2apic_id(apic))
> -		return true;
> +	if (mda > 0xff)
> +		return mda == kvm_x2apic_id(apic);
> 
>  	return mda == kvm_xapic_id(apic);
>  }
> 
> base-commit: ba0d159dd8844469d4e4defff4985a7b80f956e9
> --
> 

      reply	other threads:[~2022-07-12 19:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01  6:55 [PATCH] KVM: LAPIC: Fix a spelling mistake in comments Zhang Jiaming
2022-07-12 19:00 ` Sean Christopherson
2022-07-12 19:04   ` Sean Christopherson [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=Ys3FodyfOxaT+NZU@google.com \
    --to=seanjc@google.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jiaming@nfschina.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liqiong@nfschina.com \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=renyu@nfschina.com \
    --cc=tglx@linutronix.de \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    --cc=x86@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