lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Ys3FodyfOxaT+NZU@google.com>
Date:   Tue, 12 Jul 2022 19:04:01 +0000
From:   Sean Christopherson <seanjc@...gle.com>
To:     Zhang Jiaming <jiaming@...china.com>
Cc:     pbonzini@...hat.com, vkuznets@...hat.com, wanpengli@...cent.com,
        jmattson@...gle.com, joro@...tes.org, tglx@...utronix.de,
        mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com,
        x86@...nel.org, hpa@...or.com, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, liqiong@...china.com,
        renyu@...china.com
Subject: Re: [PATCH] KVM: LAPIC: Fix a spelling mistake in comments

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
> --
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ