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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180911101454.GE12094@zn.tnic>
Date:   Tue, 11 Sep 2018 12:14:54 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     Pu Wen <puwen@...on.cn>
Cc:     tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
        x86@...nel.org, thomas.lendacky@....com, pbonzini@...hat.com,
        linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: [PATCH v6 08/16] x86/apic: Add Hygon Dhyana support to APIC

On Mon, Sep 10, 2018 at 09:17:27PM +0800, Pu Wen wrote:
> Add Hygon Dhyana support to the APIC subsystem as it use modern APIC.
> When running on 32 bit mode, bigsmp should be enabled if there are
> more than 8 cores online.
> 
> Signed-off-by: Pu Wen <puwen@...on.cn>
> ---
>  arch/x86/kernel/apic/apic.c     | 13 +++++++++++--
>  arch/x86/kernel/apic/probe_32.c |  1 +
>  2 files changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
> index 84132ed..709daf2 100644
> --- a/arch/x86/kernel/apic/apic.c
> +++ b/arch/x86/kernel/apic/apic.c
> @@ -224,6 +224,11 @@ static int modern_apic(void)
>  	if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
>  	    boot_cpu_data.x86 >= 0xf)
>  		return 1;
> +
> +	/* Hygon systems use modern APIC */
> +	if (boot_cpu_data.x86_vendor == X86_VENDOR_HYGON)
> +		return 1;
> +
>  	return lapic_get_version() >= 0x14;
>  }
>  
> @@ -1211,9 +1216,11 @@ void __init sync_Arb_IDs(void)
>  {
>  	/*
>  	 * Unsupported on P4 - see Intel Dev. Manual Vol. 3, Ch. 8.6.1 And not
> -	 * needed on AMD.
> +	 * needed on AMD or Hygon.
>  	 */
> -	if (modern_apic() || boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
> +	if (modern_apic() ||
> +	    boot_cpu_data.x86_vendor == X86_VENDOR_AMD ||
> +	    boot_cpu_data.x86_vendor == X86_VENDOR_HYGON)

This change is not needed, after the above hunk in modern_apic(), right?

With it removed:

Reviewed-by: Borislav Petkov <bp@...e.de>

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ