From: Ingo Molnar <mingo@elte.hu>
To: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Song, Youquan" <youquan.song@intel.com>,
"Mallick, Asit K" <asit.k.mallick@intel.com>,
Prarit Bhargava <prarit@redhat.com>,
"trenn@suse.de" <trenn@suse.de>
Subject: Re: [patch] x86, x2apic: enable the bios request for x2apic optout
Date: Sat, 6 Aug 2011 09:00:21 +0200 [thread overview]
Message-ID: <20110806070019.GG13220@elte.hu> (raw)
In-Reply-To: <1312167661.17578.4.camel@sbsiddha-mobl2>
* Suresh Siddha <suresh.b.siddha@intel.com> wrote:
> On Sat, 2011-07-30 at 16:09 -0700, David Woodhouse wrote:
> > On Fri, 2011-07-29 at 17:52 -0700, Suresh Siddha wrote:
> > >
> > > + WARN(!eim, KERN_WARNING "Your BIOS is broken and requested that"
> > > + " x2apic be disabled\n This will leave your machine"
> > > + " vulnerable to irq-injection attacks\n Use"
> > > + " 'intremap=no_x2apic_optout' to override BIOS "
> > > + "request\n");
> >
> > Please don't break strings, except at the \n. I think checkpatch.pl even
> > has an exception to its 80-column rule for this, these days?
> >
> > If I see this message and search in the kernel source for the string
> > 'requested that x2apic be disabled', I should be able to find it.
>
> Sure. Updated patch appended. Thanks.
> ---
>
> From: Youquan Song <youquan.song@intel.com>
> Subject: x86, x2apic: enable the bios request for x2apic optout
>
> On the platforms which are x2apic and interrupt-remapping capable, Linux
> kernel is enabling x2apic even if the BIOS doesn't. This is to take
> advantage of the features that x2apic brings in.
>
> Some of the OEM platforms are running into issues because of this, as their
> bios is not x2apic aware. For example, this was resulting in interrupt migration
> issues on one of the platforms. Also if the BIOS SMI handling uses APIC
> interface to send SMI's, then the BIOS need to be aware of x2apic mode
> that OS has enabled.
>
> On some of these platforms, BIOS doesn't have a HW mechanism to turnoff
> the x2apic feature to prevent OS from enabling it.
>
> To resolve this mess, recent changes to the VT-d2 specification
> (http://download.intel.com/technology/computing/vptech/Intel(r)_VT_for_Direct_IO.pdf)
> includes a mechanism that provides BIOS a way to request system software
> to opt out of enabling x2apic mode.
>
> Look at the x2apic optout flag in the DMAR tables before enabling the x2apic
> mode in the platform. Also print a warning that we have disabled x2apic
> based on the BIOS request.
>
> Kernel boot parameter "intremap=no_x2apic_optout" can be used to override
> the BIOS x2apic optout request.
>
> Signed-off-by: Youquan Song <youquan.song@intel.com>
> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
> ---
> Documentation/kernel-parameters.txt | 3 +-
> arch/x86/kernel/apic/apic.c | 31 ++++++++++++------------
> drivers/iommu/dmar.c | 2 +-
> drivers/iommu/intr_remapping.c | 44 ++++++++++++++++++++++++++++------
> include/linux/dmar.h | 14 +++++++++-
> 5 files changed, 66 insertions(+), 28 deletions(-)
Guys, mind doing this on top of the DMAR cleanup patches Yinghai
posted? (if those patches are fine - i have not checked them in
detail yet)
Really, if we need to do silly BIOS workarounds then we might as well
use the opportunity to clean up this mess.
Thanks,
Ingo
next prev parent reply other threads:[~2011-08-06 7:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-30 0:52 [patch] x86, x2apic: enable the bios request for x2apic optout Suresh Siddha
2011-07-30 23:09 ` David Woodhouse
2011-08-01 3:01 ` Suresh Siddha
2011-08-06 7:00 ` Ingo Molnar [this message]
2011-08-08 17:48 ` Suresh Siddha
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=20110806070019.GG13220@elte.hu \
--to=mingo@elte.hu \
--cc=asit.k.mallick@intel.com \
--cc=dwmw2@infradead.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=prarit@redhat.com \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--cc=trenn@suse.de \
--cc=youquan.song@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