[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] SMT/Hyperthreading detection not always correct



>>> On 03.09.18 at 13:55, <hans@xxxxxxxxxxx> wrote:
> I ran into the situation where I got this banner in the xl dmesg...
> 
> (XEN) ***************************************************
> (XEN) Booted on L1TF-vulnerable hardware with SMT/Hyperthreading
> (XEN) enabled.  Please assess your configuration and choose an
> (XEN) explicit 'smt=<bool>' setting.  See XSA-273.
> (XEN) ***************************************************
> 
> ...while hyperthreading is disabled in the bios settings.
> 
> Some lines from the POST messages:
> 
> ProLiant System BIOS - P68 (05/21/2018)
> [...]
> 2 Processor(s) detected, 12 total cores enabled, Hyperthreading is disabled
> Proc 1: Intel(R) Xeon(R) CPU X5675 @ 3.07GHz
> Proc 2: Intel(R) Xeon(R) CPU X5675 @ 3.07GHz
> 
> More debug info below. See the thread '"Booted on L1TF-vulnerable
> hardware with SMT/Hyperthreading enabled" .. or not?' in xen-users for
> even more.
> 
> Reaction from Andrew on xen-users thread: "Looks like Xen does have a
> bug identifying the topology.  Hyperthreading is definitely off, but
> there is no MADT so information is probably being derived from the
> legacy MP table.For now, set smt=0 if you want to skip the warning, and
> can you email xen-devel with a bug report please? "

"There is no MADT information" could have been a hint to you that first
of all you need ...

> -# xl dmesg
> (XEN) parameter "placeholder" unknown!
> (XEN) Xen version 4.11.1-pre (Debian
> 4.11.1~pre+1.733450b39b-1~exp1~mxbp9+1) (hans@xxxxxxxxxxx) (gcc (Debian
> 6.3.0-18+deb9u1) 6.3.0 20170516) debug=n  Wed Aug 22 15:26:44 UTC 2018
> (XEN) Bootloader: GRUB 2.02~beta3-5
> (XEN) Command line: placeholder dom0_max_vcpus=4 dom0_mem=4G,max:4G
> com2=115200,8n1 console=com2,vga noreboot xpti=no-dom0 cpuinfo
> dom0_vcpus_pin

... "loglvl=all" added so we can see all relevant information. In
particular ...

> (XEN) ACPI: RSDP 000F4F00, 0024 (r2 HP    )
> (XEN) ACPI: XSDT D7630140, 00B4 (r1 HP     ProLiant        2        162E)
> (XEN) ACPI: FACP D7630240, 00F4 (r3 HP     ProLiant        2        162E)
> (XEN) ACPI: DSDT D7630340, 20BD (r1 HP         DSDT        1 INTL 20030228)
> (XEN) ACPI: FACS D762F100, 0040
> (XEN) ACPI: SPCR D762F140, 0050 (r1 HP     SPCRRBSU        1        162E)
> (XEN) ACPI: MCFG D762F1C0, 003C (r1 HP     ProLiant        1             0)
> (XEN) ACPI: HPET D762F200, 0038 (r1 HP     ProLiant        2        162E)
> (XEN) ACPI: FFFF D762F240, 0064 (r2 HP     ProLiant        2        162E)
> (XEN) ACPI: SPMI D762F2C0, 0040 (r5 HP     ProLiant        1        162E)
> (XEN) ACPI: ERST D762F300, 01D0 (r1 HP     ProLiant        1        162E)
> (XEN) ACPI: APIC D762F500, 015E (r1 HP     ProLiant        2             0)
> (XEN) ACPI: SRAT D762F680, 0570 (r1 HP     Proliant        1        162E)
> (XEN) ACPI: FFFF D762FC00, 0176 (r1 HP     ProLiant        1        162E)
> (XEN) ACPI: BERT D762FD80, 0030 (r1 HP     ProLiant        1        162E)
> (XEN) ACPI: HEST D762FDC0, 00BC (r1 HP     ProLiant        1        162E)
> (XEN) ACPI: DMAR D762FE80, 0146 (r1 HP     ProLiant        1        162E)
> (XEN) ACPI: SSDT D7632400, 0125 (r3     HP  CRSPCI0        2   HP        1)
> (XEN) ACPI: SSDT D7632540, 01CF (r3     HP  riser1a        2 INTL 20061109)
> (XEN) ACPI: SSDT D7632740, 03BB (r1     HP      pcc        1 INTL 20090625)
> (XEN) ACPI: SSDT D7632B00, 0377 (r1     HP     pmab        1 INTL 20090625)
> (XEN) ACPI: SSDT D7632E80, 2094 (r1  INTEL PPM RCM         1 INTL 20061109)

... this demonstrates that ACPI is available, and I very much
hope your system isn't as screwed as there not being a MADT
available despite all the other ACPI tables being present.

> (XEN) IOAPIC[0]: apic_id 8, version 32, address 0xfec00000, GSI 0-23
> (XEN) IOAPIC[1]: apic_id 0, version 32, address 0xfec80000, GSI 24-47

FAOD - these two messages do not indicate presence of absence
of MADT.

> -# cpuid -r
> CPU 0:
> CPU 0:
>    0x00000000 0x00: eax=0x0000000b ebx=0x756e6547 ecx=0x6c65746e
> edx=0x49656e69
>    0x00000001 0x00: eax=0x000206c2 ebx=0x00200800 ecx=0x029ee3ff
> edx=0xbfebfbff

The HTT bit is 1 here (and EBX[23:16] is 0x20).

>[...]
>    0x00000004 0x00: eax=0x3c004121 ebx=0x01c0003f ecx=0x0000003f
> edx=0x00000000

EAX[31:26]=0x0f

i.e. 4 siblings as per the "old" detection method.

>[...]
>    0x0000000b 0x00: eax=0x00000001 ebx=0x00000002 ecx=0x00000100
> edx=0x00000000

EBX here tells us that the thread part of the APIC ID is two bits. This
makes us record "up to 4 threads per core", independent of the HTT flag
(which, as per above, is set anyway, and would have produced the
same result).

I wonder what exactly the BIOS does in order to report "Hyperthreading
is disabled".

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.