mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lyude Paul <lyude@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	"Linux regression tracking (Thorsten Leemhuis)"
	<regressions@leemhuis.info>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	Mario Limonciello <mario.limonciello@amd.com>,
	Borislav Petkov <bp@alien8.de>,
	Linux kernel regressions list <regressions@lists.linux.dev>
Subject: Re: Early boot regression from f0551af0213 ("x86/topology: Ignore non-present APIC IDs in a present package")
Date: Wed, 22 May 2024 15:35:21 -0400	[thread overview]
Message-ID: <d4496b4ed8a8a7bb34cf12e4cce65a6ad6705bc0.camel@redhat.com> (raw)
In-Reply-To: <87wmntkhak.ffs@tglx>

Awesome! This patch does seem to make the system boot, thank you for your help
<3

Tested-by: Lyude Paul <lyude@redhat.com>

On Thu, 2024-05-16 at 15:38 +0200, Thomas Gleixner wrote:
> Lyude!
> 
> On Wed, May 15 2024 at 19:15, Lyude Paul wrote:
> > On Tue, 2024-05-14 at 10:25 +0200, Thomas Gleixner wrote:
> > > 
> > > Which one of the debug patches did you use?
> > 
> > The one you sent on 4/18, when you also asked me for the output of
> > /sys/kernel/debug/x86/topo/
> > 
> > (I thought I remembered that patch not booting on previous kernels but maybe
> > I'm misremembering)
> 
> It booted with the -rc kernel too. :)
> 
> I found an interesting and probably related difference in the boot logs
> though. Up to 8 possible CPUs the kernel uses logical destination mode
> for the APIC. With more than 8 it uses physical destination mode.
> 
> Can you please test the patch below on top of 6.9 and validate that it
> boots w/o any magic command line parameter?
> 
> Thanks,
> 
>         tglx
> ---
> diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
> index 66fd4b2a37a3..db5e93a7c194 100644
> --- a/arch/x86/kernel/apic/apic.c
> +++ b/arch/x86/kernel/apic/apic.c
> @@ -1883,6 +1883,8 @@ static inline void try_to_enable_x2apic(int remap_mode) { }
>  static inline void __x2apic_enable(void) { }
>  #endif /* !CONFIG_X86_X2APIC */
>  
> +int irq_remap_mode = -1;
> +
>  void __init enable_IR_x2apic(void)
>  {
>  	unsigned long flags;
> @@ -1915,6 +1917,8 @@ void __init enable_IR_x2apic(void)
>  
>  	if (ir_stat < 0)
>  		restore_ioapic_entries();
> +	else
> +		irq_remap_mode = ir_stat;
>  	legacy_pic->restore_mask();
>  	local_irq_restore(flags);
>  }
> diff --git a/arch/x86/kernel/apic/apic_flat_64.c b/arch/x86/kernel/apic/apic_flat_64.c
> index f37ad3392fec..5cc386db3557 100644
> --- a/arch/x86/kernel/apic/apic_flat_64.c
> +++ b/arch/x86/kernel/apic/apic_flat_64.c
> @@ -12,6 +12,7 @@
>  #include <linux/export.h>
>  #include <linux/acpi.h>
>  
> +#include <asm/irq_remapping.h>
>  #include <asm/jailhouse_para.h>
>  #include <asm/apic.h>
>  
> @@ -130,7 +131,8 @@ static int physflat_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
>  
>  static int physflat_probe(void)
>  {
> -	return apic == &apic_physflat || num_possible_cpus() > 8 || jailhouse_paravirt();
> +	return apic == &apic_physflat || irq_remap_mode == IRQ_REMAP_XAPIC_MODE ||
> +		num_possible_cpus() > 8 || jailhouse_paravirt();
>  }
>  
>  static struct apic apic_physflat __ro_after_init = {
> diff --git a/arch/x86/kernel/apic/local.h b/arch/x86/kernel/apic/local.h
> index 842fe28496be..f633ab6dfa9f 100644
> --- a/arch/x86/kernel/apic/local.h
> +++ b/arch/x86/kernel/apic/local.h
> @@ -22,6 +22,8 @@ void x2apic_send_IPI_allbutself(int vector);
>  void x2apic_send_IPI_self(int vector);
>  extern u32 x2apic_max_apicid;
>  
> +extern int irq_remap_mode;
> +
>  /* IPI */
>  
>  DECLARE_STATIC_KEY_FALSE(apic_use_ipi_shorthand);
> 

-- 
Cheers,
 Lyude Paul (she/her)
 Software Engineer at Red Hat


  reply	other threads:[~2024-05-22 19:35 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17 21:21 Lyude Paul
2024-04-18  8:27 ` Borislav Petkov
2024-04-18 17:20   ` Lyude Paul
2024-04-18 19:13     ` Thomas Gleixner
2024-04-19  5:37       ` Thomas Gleixner
2024-04-19 17:38       ` Lyude Paul
2024-04-19 22:15         ` Thomas Gleixner
2024-04-23 17:09           ` Thomas Gleixner
2024-04-24 20:56           ` Lyude Paul
2024-04-25  2:11             ` Thomas Gleixner
2024-04-25 15:56               ` Lyude Paul
2024-04-25 21:42                 ` Thomas Gleixner
2024-05-02 10:33                   ` Mario Limonciello
2024-05-08  8:38                     ` Linux regression tracking (Thorsten Leemhuis)
2024-05-08 10:30                       ` Thomas Gleixner
2024-05-08 21:02                         ` Lyude Paul
2024-05-08 23:21                           ` Lyude Paul
2024-05-13 14:08                             ` Thomas Gleixner
2024-05-13 23:18                               ` Lyude Paul
2024-05-13 23:32                                 ` Lyude Paul
2024-05-14  8:25                                   ` Thomas Gleixner
2024-05-15 23:15                                     ` Lyude Paul
2024-05-16 13:38                                       ` Thomas Gleixner
2024-05-22 19:35                                         ` Lyude Paul [this message]
2024-05-22 22:12                                           ` Thomas Gleixner
2024-05-23  5:20                                             ` Linux regression tracking (Thorsten Leemhuis)
2024-05-23 10:47                                             ` Thomas Gleixner
2024-05-28 22:43                                               ` Thomas Gleixner
2024-06-03 16:22                                                 ` Lyude Paul
2024-06-05 23:15                                                 ` Lyude Paul
2024-06-06  9:50                                                   ` Thomas Gleixner
2024-05-09 19:22                         ` Lyude Paul
2024-05-08 21:47                     ` Thomas Gleixner
2024-05-08 22:09                       ` Mario Limonciello

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=d4496b4ed8a8a7bb34cf12e4cce65a6ad6705bc0.camel@redhat.com \
    --to=lyude@redhat.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=regressions@leemhuis.info \
    --cc=regressions@lists.linux.dev \
    --cc=tglx@linutronix.de \
    --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

Powered by JetHome