From: Ingo Molnar <mingo@kernel.org>
To: Youquan Song <youquan.song@linux.intel.com>
Cc: Yinghai Lu <yinghai@kernel.org>, Gleb Natapov <gleb@redhat.com>,
Youquan Song <youquan.song@intel.com>,
Sheng Yang <sheng@linux.intel.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"H. Peter Anvin" <hpa@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] x86, apic: Enable x2APIC physical when cpu < 256 native
Date: Sat, 17 Aug 2013 09:42:56 +0200 [thread overview]
Message-ID: <20130817074256.GA18772@gmail.com> (raw)
In-Reply-To: <20130817134454.GA16835@linux-youquan.bj.intel.com>
* Youquan Song <youquan.song@linux.intel.com> wrote:
> > No problem - you might want to send another patch adding some comments to
> > the code, explaining why we don't switch to physical mode, quoting from
> > the SDM and so.
>
> Here is the revert patch.
>
> Subject: [PATCH] Revert "x86/apic: Enable x2APIC physical mode on native hardware too, when there are fewer than 256 CPUs"
>
> x2APIC without interrupt remapping is not architecture and no guarantee it
> will work in future.
> There are some words in SDM3, 10.12.7 Initialization by System
> Software Routing of device interrupts to local APIC units operating in
> x2APIC mode requires use of the interrupt-remapping architecture
> specified in the Intel Virtualization Technology for Directed I/O,
> Revision 1.3. Because of this, BIOS must enumerate support for and
> software must enable this interrupt remapping with Extended Interrupt
> Mode Enabled before it enabling x2APIC mode in the local APIC units.
>
> This reverts commit 3d1acb49d22fbbae96524040e9e2d4cbbb3adbef, do not use
> x2apic_pysical mode if interrupt remapping is not enabled even at CPU
> number fewer than 256.
>
> Signed-off-by: Youquan Song <youquan.song@intel.com>
> ---
> arch/x86/kernel/apic/apic.c | 7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
> index d9dd5a6..eca89c5 100644
> --- a/arch/x86/kernel/apic/apic.c
> +++ b/arch/x86/kernel/apic/apic.c
> @@ -1622,8 +1622,11 @@ void __init enable_IR_x2apic(void)
> goto skip_x2apic;
>
> if (ret < 0) {
> - /* IR is required if there is APIC ID > 255 */
> - if (max_physical_apicid > 255) {
> + /* IR is required if there is APIC ID > 255 even when running
> + * under KVM
> + */
> + if (max_physical_apicid > 255 ||
> + !hypervisor_x2apic_available()) {
Firstly, please use the customary (multi-line) comment
style:
/*
* Comment .....
* ...... goes here.
*/
specified in Documentation/CodingStyle.
Secondly, please send a patch against a vanilla (e.g.
v3.11-rc5) kernel, as I've already zapped your previous
patch from tip:x86/apic per your request.
Thanks,
Ingo
next prev parent reply other threads:[~2013-08-17 7:43 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-12 1:22 [PATCH] x86, apic: Enable x2APIC physical when cpu < 256 native Youquan Song
2013-07-23 9:17 ` Ingo Molnar
2013-07-24 14:04 ` Youquan Song
2013-07-25 22:01 ` Ingo Molnar
2013-07-29 16:48 ` Youquan Song
2013-07-24 3:55 ` [tip:x86/apic] x86/apic: Enable x2APIC physical mode on native hardware too, when there are fewer than 256 CPUs tip-bot for Youquan Song
2013-07-24 4:24 ` [PATCH] x86, apic: Enable x2APIC physical when cpu < 256 native Yinghai Lu
2013-07-24 6:22 ` Gleb Natapov
2013-07-25 14:05 ` Yinghai Lu
2013-07-29 17:05 ` Youquan Song
2013-08-14 18:40 ` Youquan Song
2013-08-14 11:11 ` Ingo Molnar
2013-08-17 13:44 ` Youquan Song
2013-08-17 7:42 ` Ingo Molnar [this message]
2013-08-17 8:24 ` Borislav Petkov
2013-08-17 9:03 ` Joe Perches
2013-08-17 15:44 ` Borislav Petkov
2013-08-17 16:26 ` Joe Perches
2013-08-18 10:02 ` Borislav Petkov
2013-08-17 19:52 ` Youquan Song
2013-08-19 7:11 ` Ingo Molnar
2013-08-02 19:12 ` Konrad Rzeszutek Wilk
2013-07-24 14:45 ` Konrad Rzeszutek Wilk
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=20130817074256.GA18772@gmail.com \
--to=mingo@kernel.org \
--cc=gleb@redhat.com \
--cc=hpa@linux.intel.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sheng@linux.intel.com \
--cc=tglx@linutronix.de \
--cc=yinghai@kernel.org \
--cc=youquan.song@intel.com \
--cc=youquan.song@linux.intel.com \
/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;
as well as URLs for NNTP newsgroup(s).