lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 17 Aug 2013 10:24:19 +0200
From:	Borislav Petkov <bp@...en8.de>
To:	Ingo Molnar <mingo@...nel.org>, Joe Perches <joe@...ches.com>
Cc:	Youquan Song <youquan.song@...ux.intel.com>,
	Yinghai Lu <yinghai@...nel.org>,
	Gleb Natapov <gleb@...hat.com>,
	Youquan Song <youquan.song@...el.com>,
	Sheng Yang <sheng@...ux.intel.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"H. Peter Anvin" <hpa@...ux.intel.com>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] x86, apic: Enable x2APIC physical when cpu < 256 native

On Sat, Aug 17, 2013 at 09:42:56AM +0200, Ingo Molnar wrote:
> 
> * Youquan Song <youquan.song@...ux.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@...el.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.

This keeps popping up. Maybe it should be in checkpatch, Joe?

With the special handling of net/ and drivers/net/ of course.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ