From: Chao Gao <chao.gao@intel.com>
To: Ahmed Abdelfattah <me@ahmedabdelfattah.dev>
Cc: Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>, <x86@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86/apic: Use the physical address for the local APIC resource
Date: Fri, 20 Nov 2026 16:37:24 +0800 [thread overview]
Message-ID: <awAGxH0bwT1xLNLy@intel.com> (raw)
In-Reply-To: <20261107-x86-apic-lapic-resource-v1-1-28de4cb3fb1e@ahmedabdelfattah.dev>
On Sat, Nov 07, 2026 at 12:08:07AM +0200, Ahmed Abdelfattah wrote:
>Since v6.6 the "Local APIC" entry is missing from /proc/iomem whenever
>the kernel maps the xAPIC itself.
What is the impact on end users if this isn't fixed? Please make it clear
in the changelog, even if it is minor.
No one else has noticed this since v6.6, so it looks to me that nothing
depends on this "Local APIC" entry.
>
>lapic_insert_resource() used to take the address from apic_phys. When
>apic_phys went away it was switched to apic_mmio_base, but that holds
>the fixmap virtual address, not the physical one:
>
> APIC: Mapped APIC to ffffffffff5fc000 ( fee00000)
>
>insert_resource() rejects that range because it lies outside
>iomem_resource, and as the return value is not checked, the failure
>goes unnoticed.
>
>Use mp_lapic_addr, which is the address apic_set_fixmap() maps. Keep
>the apic_mmio_base check, so the resource is still only added when the
>APIC was actually mapped.
>
>Fixes: 78c32000848c ("x86/apic: Get rid of apic_phys")
>Signed-off-by: Ahmed Abdelfattah <me@ahmedabdelfattah.dev>
Using the virtual address is clearly a mistake, so this fix looks good to
me. But the Fixes tag is wrong, as "apic_phys" already held the same
virtual address before that commit.
prev parent reply other threads:[~2026-11-20 8:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 22:08 [PATCH] x86/apic: Use the physical address for the local APIC resource Ahmed Abdelfattah via B4 Relay
2026-11-20 8:37 ` Chao Gao [this message]
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=awAGxH0bwT1xLNLy@intel.com \
--to=chao.gao@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=me@ahmedabdelfattah.dev \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@kernel.org \
--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