[coreboot] VT-d on Pixel 2015 (samus)

fowlslegs at riseup.net fowlslegs at riseup.net
Sat Aug 15 05:30:40 CET 2015


On 2015-08-13 23:36, fowlslegs at riseup.net wrote:
> On 2015-07-26 07:58, ron minnich wrote:
>> There are so many bits, so little time. I have utterly forgotten how 
>> vt-d
>> gets enabled.
>> 
>> Anyway, there's two bits and a lock bit. coreboot very deliberately 
>> does
>> nothing with any of them -- this was a design decision a few years ago 
>> --
>> and it leaves them in a state that you can control them. So the 
>> 'enable
>> vt-x' part is easy and kvm will do it for you when you load the 
>> module, or
>> you can do it with the wrmsr command (for each core! -- if you only do 
>> one
>> core it will go badly).

I will include a few other emails in this one. The first I sent to Ron 
Minnich only when I meant to 'reply all' to the mailing list, and the 
rest are excerpted from a conversation on the Xen-devel mailing list.


#%&#%&#&% Sent just to Ron, reply to quoted text above #%&#%&#%&

If you saw my comments about VT-x in my conversation with John Lewis, 
VT-x has been working correctly while running Xen via the Qubes 
distribution. VT-x was being activated, I assume, by Xen, since you say 
Coreboot modifies none of these bits.

I tried quite a few search engine queries to try to find the MSR for 
VT-d (assuming it exists) without any luck. So, I found that on 
mail-archive.com you can search through the archive history of this 
mailing list (which, btw is a great future the on-site archives lack, 
and to whomever it would concern maybe you should consider adding this 
feature or otherwise linking to mail-archive.com).

It seems IOMMU support for Intel was first added by this commit: 
http://review.coreboot.org/#/c/1654/. I decided to see if any of this 
code is still present in firmware-samus-6300.b, and it turns out it can 
in fact still be found at /src/arch/x86/boot/acpi.c. There is little if 
any modification to it. I don't really have any clue what the code 
itself is doing, so beyond this I'm lost.

Noah


#%&#%&#%& Excerpted from Xen-devel mailing list (3 partial messages) 
#%&#%&#%& (1)

On the VT-d troubleshooting page, I was informed to shoot you all a 
message if Xen had to deactivate my VT-d due to errors in my BIOS (in 
this case Coreboot). I am running John Lewis' Coreboot ROM for the 
Chromebook Pixel 2 (samus) w/ the i7-5600U processor and Xen 4.4.2 on 
Qubes. I downloaded and cracked open (for lack of better words) John 
Lewis's Coreboot image (which is a modified version of the one in the 
Google repos) and found that src/arch/x86/acpi.c had the same section 
added by the http://review.coreboot.org/#/c/1654/ commit written by 
Patrick Georgi a few years back that is supposed to provide ACPI DMAR 
tables. The problem might just be the code is out of date for modern 
processors or maybe it has just not been tested against many CPUs.

It does appear that there has been changes to this acpi.c file in the 
Coreboot master branch, which makes me wonder if building against that 
would fix my problems. Realistically though, I have barely any 
experience or knowledge with Coreboot hacking and I'm assuming there is 
a web of dependencies that I couldn't figure out without possibly months 
of research, trial, and error.


&%#&%#&%# (2)

Please reboot and use "iommu=verbose,debug" on the Xen command line,
which will offer more information.

~Andrew

&%#&%#&%# (3)


I was already passing iommu=verbose, but not debug as well. Here is the 
new log

  Xen 4.4.2-6.fc20
(XEN) Xen version 4.4.2 (user@) (gcc (GCC) 4.8.3 20140911 (Red Hat 
4.8.3-7)) debug=n Thu Jul 23 20:12:15 UTC 2015
(XEN) Latest ChangeSet:
(XEN) Bootloader: GRUB 2.00
(XEN) Command line: placeholder console=none dom0_mem=min:1024M 
iommu=verbose,debug
(XEN) Video information:
(XEN)  VGA is text mode 80x25, font 8x16
(XEN) Disc information:
(XEN)  Found 2 MBR signatures
(XEN)  Found 2 EDD information structures
(XEN) Xen-e820 RAM map:
(XEN)  0000000000000000 - 000000000009fc00 (usable)
(XEN)  000000000009fc00 - 00000000000a0000 (reserved)
(XEN)  00000000000f0000 - 0000000000100000 (reserved)
(XEN)  0000000000100000 - 000000007ce27000 (usable)
(XEN)  000000007ce27000 - 0000000080000000 (reserved)
(XEN)  00000000f0000000 - 00000000f4000000 (reserved)
(XEN)  00000000fed10000 - 00000000fed1a000 (reserved)
(XEN)  00000000fed40000 - 00000000fed45000 (reserved)
(XEN)  00000000fed80000 - 00000000fed85000 (reserved)
(XEN)  0000000100000000 - 000000047f000000 (usable)
(XEN) ACPI: RSDP 000F2760, 0024 (r2 CORE  )
(XEN) ACPI: XSDT 7CF440E0, 004C (r1 CORE   COREBOOT        0 CORE        
0)
(XEN) ACPI: FACP 7CF48970, 00F4 (r5 CORE   COREBOOT        0 CORE        
1)
(XEN) ACPI: DSDT 7CF44250, 4720 (r2 COREv4 COREBOOT 20110725 INTL 
20130117)
(XEN) ACPI: FACS 7CF44210, 0040
(XEN) ACPI: HPET 7CF48A70, 0038 (r1 CORE   COREBOOT        0 CORE        
0)
(XEN) ACPI: APIC 7CF48AB0, 006C (r1 CORE   COREBOOT        0 CORE        
0)
(XEN) ACPI: MCFG 7CF48B20, 003C (r1 CORE   COREBOOT        0 CORE        
0)
(XEN) ACPI: SSDT 7CF49BC0, 0FF8 (r2 CORE   COREBOOT       2A CORE       
2A)
(XEN) System RAM: 16317MB (16709400kB)
(XEN) Domain heap initialised
(XEN) Processor #0 7:13 APIC version 21
(XEN) Processor #1 7:13 APIC version 21
(XEN) Processor #3 7:13 APIC version 21
(XEN) Processor #2 7:13 APIC version 21
(XEN) IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-39
(XEN) Enabling APIC mode:  Flat.  Using 1 I/O APICs
(XEN) Not enabling x2APIC: depends on iommu_supports_eim.
(XEN) Using scheduler: SMP Credit Scheduler (credit)
(XEN) Detected 2394.503 MHz processor.
(XEN) Initing memory sharing.
(XEN) xstate_init: using cntxt_size: 0x340 and states: 0x7
(XEN) I/O virtualisation disabled
(XEN) Enabled directed EOI with ioapic_ack_old on!
(XEN) ENABLING IO-APIC IRQs
(XEN)  -> Using old ACK method
(XEN) Platform timer is 14.318MHz HPET
(XEN) Allocated console ring of 16 KiB.
(XEN) VMX: Supported advanced features:
(XEN)  - APIC MMIO access virtualisation
(XEN)  - APIC TPR shadow
(XEN)  - Extended Page Tables (EPT)
(XEN)  - Virtual-Processor Identifiers (VPID)
(XEN)  - Virtual NMI
(XEN)  - MSR direct-access bitmap
(XEN)  - Unrestricted Guest
(XEN) HVM: ASIDs enabled.
(XEN) HVM: VMX enabled
(XEN) HVM: Hardware Assisted Paging (HAP) detected
(XEN) HVM: HAP page sizes: 4kB, 2MB, 1GB
(XEN) Brought up 4 CPUs
(XEN) *** LOADING DOMAIN 0 ***
(XEN)  Xen  kernel: 64-bit, lsb, compat32
(XEN)  Dom0 kernel: 64-bit, PAE, lsb, paddr 0x1000000 -> 0x204d000
(XEN) PHYSICAL MEMORY ARRANGEMENT:
(XEN)  Dom0 alloc.:   0000000468000000->0000000470000000 (4056562 pages 
to be allocated)
(XEN)  Init. ramdisk: 000000047cb6a000->000000047f000000
(XEN) VIRTUAL MEMORY ARRANGEMENT:
(XEN)  Loaded kernel: ffffffff81000000->ffffffff8204d000
(XEN)  Init. ramdisk: 0000000000000000->0000000000000000
(XEN)  Phys-Mach map: ffffffff8204d000->ffffffff83f92440
(XEN)  Start info:    ffffffff83f93000->ffffffff83f934b4
(XEN)  Page tables:   ffffffff83f94000->ffffffff83fb9000
(XEN)  Boot stack:    ffffffff83fb9000->ffffffff83fba000
(XEN)  TOTAL:         ffffffff80000000->ffffffff84400000
(XEN)  ENTRY ADDRESS: ffffffff81d3f1f0
(XEN) Dom0 has maximum 4 VCPUs
(XEN) Scrubbing Free RAM: .done.
(XEN) Initial low memory virq threshold set at 0x4000 pages.
(XEN) Std. Loglevel: Errors and warnings
(XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings)
(XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch 
input to Xen)
(XEN) Freed 272kB init memory.
(XEN) traps.c:2524:d0 Domain attempted WRMSR 00000000c0000081 from 
0xe023e00800000000 to 0x0023001000000000.
(XEN) traps.c:2524:d0 Domain attempted WRMSR 00000000c0000082 from 
0xffff82d0802b3000 to 0xffffffff817634d0.
(XEN) traps.c:2524:d0 Domain attempted WRMSR 00000000c0000083 from 
0xffff82d0802b3080 to 0xffffffff817658e0.
(XEN) traps.c:2524:d0 Domain attempted WRMSR 0000000000000174 from 
0x000000000000e008 to 0x0000000000000010.
(XEN) traps.c:2524:d0 Domain attempted WRMSR 0000000000000175 from 
0xffff82d0802b7fc0 to 0x0000000000000000.
(XEN) traps.c:2524:d0 Domain attempted WRMSR 0000000000000176 from 
0xffff82d08021aff0 to 0xffffffff81765bf0.
(XEN) traps.c:2524:d0 Domain attempted WRMSR 00000000c0000083 from 
0xffff82d0802b3080 to 0xffffffff81765e30.
(XEN) traps.c:2524:d0 Domain attempted WRMSR 00000000c0000084 from 
0x0000000000034700 to 0x0000000000047700.
(XEN) traps.c:2524:d0 Domain attempted WRMSR 00000000c0000081 from 
0xe023e00800000000 to 0x0023001000000000.
(XEN) traps.c:2524:d0 Domain attempted WRMSR 00000000c0000082 from 
0xffff830473323000 to 0xffffffff817634d0.
(XEN) Disabling non-boot CPUs ...
(XEN) Broke affinity for irq 8
(XEN) Broke affinity for irq 41
(XEN) Broke affinity for irq 1
(XEN) Broke affinity for irq 6
(XEN) Broke affinity for irq 7
(XEN) Broke affinity for irq 10
(XEN) Broke affinity for irq 42
(XEN) Entering ACPI S3 state.
(XEN) mce_intel.c:725: MCA Capability: BCAST 1 SER 1 CMCI 1 firstbank 0 
extended MCE MSR 0
(XEN) CPU0 CMCI LVT vector (0xf1) already installed
(XEN) Finishing wakeup from ACPI S3 state.
(XEN) Enabling non-boot CPUs  ...
(XEN) printk: 26 messages suppressed.
(XEN) traps.c:2524:d0 Domain attempted WRMSR 00000000c0000081 from 
0xe023e00800000000 to 0x0023001000000000.
(XEN) traps.c:2524:d0 Domain attempted WRMSR 00000000c0000082 from 
0xffff830473323000 to 0xffffffff817634d0.
(XEN) traps.c:2524:d0 Domain attempted WRMSR 00000000c0000083 from 
0xffff830473323080 to 0xffffffff817658e0.
(XEN) traps.c:2524:d0 Domain attempted WRMSR 0000000000000174 from 
0x000000000000e008 to 0x0000000000000010.
(XEN) traps.c:2524:d0 Domain attempted WRMSR 0000000000000175 from 
0xffff830473327fc0 to 0x0000000000000000.
(XEN) traps.c:2524:d0 Domain attempted WRMSR 0000000000000176 from 
0xffff82d08021aff0 to 0xffffffff81765bf0.
(XEN) traps.c:2524:d0 Domain attempted WRMSR 00000000c0000083 from 
0xffff830473323080 to 0xffffffff81765e30.
(XEN) traps.c:2524:d0 Domain attempted WRMSR 00000000c0000084 from 
0x0000000000034700 to 0x0000000000047700.
(XEN) traps.c:2524:d0 Domain attempted WRMSR 00000000c0000081 from 
0xe023e00800000000 to 0x0023001000000000.
(XEN) traps.c:2524:d0 Domain attempted WRMSR 00000000c0000082 from 
0xffff82d0802b3000 to 0xffffffff817634d0.
(XEN) Disabling non-boot CPUs ...
(XEN) Broke affinity for irq 1
(XEN) Broke affinity for irq 10
(XEN) Broke affinity for irq 41
(XEN) Broke affinity for irq 42
(XEN) Entering ACPI S3 state.
(XEN) mce_intel.c:725: MCA Capability: BCAST 1 SER 1 CMCI 1 firstbank 0 
extended MCE MSR 0
(XEN) CPU0 CMCI LVT vector (0xf1) already installed
(XEN) Finishing wakeup from ACPI S3 state.
(XEN) Enabling non-boot CPUs  ...

#%&#%&#%&#%&#%&#%&

Thanks,
Noah



More information about the coreboot mailing list