mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Naveen N Rao <naveen@kernel.org>
To: Christian Ludloff <ludloff@gmail.com>
Cc: x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	 Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	 "H. Peter Anvin" <hpa@zytor.com>,
	Nikunj A Dadhania <nikunj@amd.com>,
	 Manali Shukla <manali.shukla@amd.com>,
	Bharata B Rao <bharata@amd.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] x86/apic: Introduce a variable to track the number of EILVT registers
Date: Fri, 15 May 2026 19:20:54 +0530	[thread overview]
Message-ID: <agckJQQuLsARA4ul@blrnaveerao1> (raw)
In-Reply-To: <CAKSQd8X=OPYL5LCh+-TB=1QOMqoFLmcOZzNNwekvXZsbmnKOKA@mail.gmail.com>

On Fri, May 15, 2026 at 06:30:07AM -0700, Christian Ludloff wrote:
> On Fri, May 15, 2026 at 4:48 AM Christian Ludloff <ludloff@gmail.com> wrote:
> >
> > > + if (cpu_feature_enabled(X86_FEATURE_EXTAPIC))
> > > + apic_eilvt_count = APIC_EFEAT_XLC(apic_read(APIC_EFEAT));
> >
> > BKDG #21656, #21922, and #24141 for K7 were not published.
> > If you find them internally at AMD, consider publishing them.  :)
> > That way they could be archived, and referenced from then on.
> 
> minor extra K7 quirk, documented in the K7 datasheet (#21016):
> 
> before model 2, the chip was missing two of the pins required for
> proper APIC operation – so the APIC didn't quite work back then
> 
> > BKDG #26094 for K8 Fam Fh DDR1 documents 4 extended LVTs.
> 
> I mis-read that one – correction – it's 0 there, not 4
> 
> also, supposedly no bit 31 = 1 in the version register, but does have
> registers 400h and 410h (but not the other/later extended registers)
> 
> > BKDG #32559 for K8 Fam Fh DDR2 documents 1 extended LVT.
> > BKDG #41256 for K8 Fam 11h (LG) documents 4 extended LVTs.
> >
> > Fam 10h/12h, 14h and 16h, and 15h all have 4 – no surprises.
> >
> > The Fam 10h BKDG (#31116) has an explicit entry in its "Major
> > Changes Relative to Family 0Fh Processors" section: "Number
> > of extended LVT interrupts in APIC increased to 4." – AMD may
> > want to clarify what was correct vs not for those old K8 models.
> 
> per the correction above – K8 went from 0 to 1 to 4 extended LVTs

Right, I looked up what I could. The fallback below is explicitly for 
addressing those.

> 
> > > + if (!apic_eilvt_count && boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
> > > + apic_eilvt_count = APIC_EILVT_NR_AMD_10H;
> >
> > This seems... unsafe?
> 
> double-check it w.r.t. K7 and K8 Fam Fh DDR1, please

This fallback exists purely to retain the current default (except that 
it is now restricted to AMD processors)

The default being 4 (rather than 1 or even 0) is not really an issue 
because this function won't be invoked for older processors.  The common 
case is for this to be invoked with a BIOS-provided offset.  The only 
exception is for IBS for family 0x10, but that family has 4 extended 
LVTs present (see ibs_eilvt_setup()).


- Naveen


  reply	other threads:[~2026-05-15 13:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-15 11:48 Christian Ludloff
2026-05-15 13:30 ` Christian Ludloff
2026-05-15 13:50   ` Naveen N Rao [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-05-12 14:19 [PATCH v2 0/3] Support additional AMD " Naveen N Rao (AMD)
2026-05-12 14:19 ` [PATCH v2 2/3] x86/apic: Introduce a variable to track the number of " Naveen N Rao (AMD)

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=agckJQQuLsARA4ul@blrnaveerao1 \
    --to=naveen@kernel.org \
    --cc=bharata@amd.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ludloff@gmail.com \
    --cc=manali.shukla@amd.com \
    --cc=nikunj@amd.com \
    --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

all inboxes | Powered by JetHome®