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]
Message-ID: <CAE9FiQUK3_vO_A1geKzNMWsRgsuUPrE4DGmwaFwbAhCaPGn8cg@mail.gmail.com>
Date:	Wed, 19 Dec 2012 08:03:25 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	"Zhang, Lin-Bao (Linux Kernel R&D)" <linbao.zhang@...com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"alan@...rguk.ukuu.org.uk" <alan@...rguk.ukuu.org.uk>,
	"mingo@...hat.com" <mingo@...hat.com>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"hpa@...or.com" <hpa@...or.com>, "x86@...nel.org" <x86@...nel.org>,
	"a.p.zijlstra@...llo.nl" <a.p.zijlstra@...llo.nl>,
	"jarkko.sakkinen@...el.com" <jarkko.sakkinen@...el.com>,
	"joerg.roedel@....com" <joerg.roedel@....com>,
	"agordeev@...hat.com" <agordeev@...hat.com>
Subject: Re: Why Linux kernel forced to enter X2APIC mode( just because of
 booting cpu has supported x2apic) without depending on BIOS' setting in
 MSR->x2apic enablement bit ?

On Wed, Dec 19, 2012 at 2:13 AM, Zhang, Lin-Bao (Linux Kernel R&D)
<linbao.zhang@...com> wrote:
>> > b) If BIOS feel the system doesn't meet x2apic conditions , it will not set
>> x2apic enablement bit in MSR ,and pass control to OS with xapic mode.
>>
>> kernel will check if cpuid support x2apic, if it supports x2apic, it will check if
>> DMAR/intr-remapping could be enabled, if so kernel will switch to x2apic.
>> otherwise it will stay with xapic.
>>
>> So you need to make cpuid show does not support x2apic --- check with intel
>> they have way to do that.
> My concerns is BIOS creates different ACPI tables in xAPIC mode and X2APIC mode.
> BIOS will auto detect if the system meets x2APIC condition , if no , it will not create right ACPI tables for this mode and don't set MSR bit.
> For this case (BIOS didn't set MSR , but BSP supports x2apic ) , I want to know
> 1, For Linux kernel, which ACPI tables will be used for x2apic and XAPIC ?

two MADT?

why two?

according to Intel, if your apic id < 255, even cpu is in x2apic state
already, you only have xapic entry in MADT.

> 2, why Linux kernel will set x2apic enablement bit in CPU msr ? generally speaking , BIOS set it and OS get it.
> If OS get it , who will read it ? BIOS ?  I consult BIOS designer , he said , their BIOS calling service(just like UEFI run time service)
> will also judge MSR again , so I don't know why Linux kernel will set MSR bit , unless OS has special target .

because os does not trust BIOS.

BIOS ONLY SHOULD only do thing it should do:
1. initialize memory.
2. assign some resource to pci devices bar
3. provide memory mem-map to bootloader and os.

If it don't want OS to use x2apic, disable that in CPUID.

>
>> or you can pass "nox2apic" in boot command line.
> Yeah, I think this would be fine if we really want to use xAPIC mode instead of x2apic mode.
> But I am puzzled why Linux kernel will force to enter x2apic just depends on BSP has supported x2apic ?
> "BSP supports x2apic" condition is enough for judging if OS can enable x2apic ?

if system support x2apic, os will try use x2apic at first, unless BIOS
mess it up.
--
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