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: <87bkg9xrzc.ffs@tglx>
Date:   Tue, 18 Jul 2023 15:35:19 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     LKML <linux-kernel@...r.kernel.org>
Cc:     x86@...nel.org, Linus Torvalds <torvalds@...ux-foundation.org>,
        Andrew Cooper <andrew.cooper3@...rix.com>,
        Tom Lendacky <thomas.lendacky@....com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Wei Liu <wei.liu@...nel.org>,
        Arjan van de Ven <arjan@...ux.intel.com>,
        Juergen Gross <jgross@...e.com>
Subject: Re: [patch 58/58] x86/apic: Turn on static calls

On Tue, Jul 18 2023 at 01:16, Thomas Gleixner wrote:
>  static __always_inline void __apic_send_IPI_mask(const struct cpumask *mask, int vector)
>  {
> -	apic->send_IPI_mask(mask, vector);
> +	static_call(apic_call_send_IPI_mask)(mask, vector);
>  }
>  
>  static __always_inline void __apic_send_IPI_self(int vector)
>  {
> -	apic->send_IPI_self(vector);
> +	static_call(apic_call_send_IPI_self)(vector);
>  }

I obviously must have missed to read the huge documentation section
about static_call() and modules. These two need to be static_call_mod().

I've force pushed the fixed up git branch to:

  git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git x86/apic

Delta patch on top of the original pile below.

Thanks,

        tglx
---
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index 78dfe8aaed83..f7eb72a1ae00 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -429,7 +429,7 @@ static __always_inline void __apic_send_IPI(int cpu, int vector)
 
 static __always_inline void __apic_send_IPI_mask(const struct cpumask *mask, int vector)
 {
-	static_call(apic_call_send_IPI_mask)(mask, vector);
+	static_call_mod(apic_call_send_IPI_mask)(mask, vector);
 }
 
 static __always_inline void __apic_send_IPI_mask_allbutself(const struct cpumask *mask, int vector)
@@ -449,7 +449,7 @@ static __always_inline void __apic_send_IPI_all(int vector)
 
 static __always_inline void __apic_send_IPI_self(int vector)
 {
-	static_call(apic_call_send_IPI_self)(vector);
+	static_call_mod(apic_call_send_IPI_self)(vector);
 }
 
 static __always_inline void apic_wait_icr_idle(void)
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 0c63d2d9d75c..66d531876d3b 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1875,6 +1875,7 @@ static __init void try_to_enable_x2apic(int remap_mode)
 		 * be addressed must not be brought online.
 		 */
 		x2apic_set_max_apicid(apic_limit);
+		x2apic_phys = 1;
 	}
 	x2apic_enable();
 }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ