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

Re: [Xen-users] Fwd: Enabling AMD-Vi IOMMU panics Xen



Probabily we missed this earlier, which seems to explains how they get the 
IOAPIC info:

http://ubuntuforums.org/showthread.php?t=2254677

Check the amd_iommu_dump=1 parameter using a standalone bare metal Linux (Don't 
boot Xen first, since it hides the ACPI IVRS Table from Dom0 if I recall 
correctly). You may want to test that fix first on a standalone Linux too, 
since the link covers the expected syntax and parameters. After that, you can 
try doing it with Xen with the parameters you mentioned.

Its very probable that you can easily get it working with the link info.



________________________________
> From: nospam@xxxxxxxx 
> To: joro@xxxxxxxxxx; suravee.suthikulpanit@xxxxxxx; xen-users@xxxxxxxxxxxxx 
> Date: Sat, 19 Mar 2016 17:16:15 +0000 
> Subject: [Xen-users] Fwd: Enabling AMD-Vi IOMMU panics Xen 
> 
> Fix: Send to Joerg Roedel's new email (no longer employed by AMD) and 
> also Xen's AMD-Vi maintainer 
> 
> ---------- Forwarded message ---------- 
> From: 小太 <nospam@xxxxxxxx> 
> Date: Sun, Mar 20, 2016 at 4:01 AM 
> Subject: Re: [Xen-users] Enabling AMD-Vi IOMMU panics Xen 
> To: Zir Blazer <zir_blazer@xxxxxxxxxxx<mailto:zir_blazer@xxxxxxxxxxx>> 
> Cc: "xen-users@xxxxxxxxxxxxx<mailto:xen-users@xxxxxxxxxxxxx>" 
> <xen-users@xxxxxxxxxxxxx<mailto:xen-users@xxxxxxxxxxxxx>>, 
> coreboot@xxxxxxxxxxxx<mailto:coreboot@xxxxxxxxxxxx>, 
> joerg.roedel@xxxxxxx<mailto:joerg.roedel@xxxxxxx> 
> 
> 
> On Sat, Mar 19, 2016 at 7:14 PM, Zir Blazer 
> <zir_blazer@xxxxxxxxxxx<mailto:zir_blazer@xxxxxxxxxxx>> wrote: 
> Fix: Added xen-users as CC. 
> 
> ________________________________ 
>> From: nospam@xxxxxxxx 
>> To: xen-users@xxxxxxxxxxxxx<mailto:xen-users@xxxxxxxxxxxxx> 
>> Date: Sat, 19 Mar 2016 07:30:40 +0000 
>> Subject: [Xen-users] Enabling AMD-Vi IOMMU panics Xen 
>> 
>> Note that the board "by default" doesn't support IOMMU, but since it 
>> runs coreboot, I compiled in some code that initialises the IOMMU (so 
>> if this bug seems to be caused by the BIOS, hopefully it can be fixed 
>> fairly quickly). 
>> 
>> Using that command line, the IOMMU does not get enabled due to some 
>> problems with the IVRS table (which seems to be generated by AMD's 
>> closed-source AGESA), which you can see in "apic_verbosity=debug.log" 
>> (attached). 
> 
> My answer will not really be very useful, but at least it may save you 
> some time... 
> 
> If there are issues with the ACPI IVRS Table, the issues are Firmware 
> side. I suppose that you could try contacting Coreboot developers and 
> asking them if they can give you a hand fixing it for a AMD Jaguar 
> platform. 
> 
> Curiously, cpuid reports the CPU as family 22 (16h) and model 48 (30h), 
> making it a Puma (Mullins) chip. 
> 
> 
> I don't specifically recall if Xen could, but the Linux Kernel itself 
> could workaround a broken ACPI IVRS Table since you had a Boot Loader 
> parameter that you could set to override the broken values of it with 
> your own provided values, check here: 
> 
> https://bbs.archlinux.org/viewtopic.php?id=163102<http://mandrillapp.com/track/click/30489254/bbs.archlinux.org?p=eyJzIjoib2R4Rm9YRTZvRVZxd3pTVGNnaVZHVFhDZ0RjIiwidiI6MSwicCI6IntcInVcIjozMDQ4OTI1NCxcInZcIjoxLFwidXJsXCI6XCJodHRwczpcXFwvXFxcL2Jicy5hcmNobGludXgub3JnXFxcL3ZpZXd0b3BpYy5waHA_aWQ9MTYzMTAyXCIsXCJpZFwiOlwiNGE2ZmI2NjNjMDdjNGQ3YWJlZTMxYjY1YTdkYjBjYjBcIixcInVybF9pZHNcIjpbXCIxM2I0ZGVmNTVlMzZhODA2M2ZkNzc0MDhiNmUwZWJmZmRhNTA2YWJmXCJdfSJ9>
>  
> 
> Basically, for the Linux Kernel, you could use something like iommu=1 
> ivrs_ioapic[6]=00:14.0 as boot parameter or so and get a working IOMMU 
> with a broken BIOS ACPI IVRS Table. However, this only works if you 
> were going to use the IOMMU for QEMU-KVM-VFIO Passthrough, not Xen, but 
> I think it could also do something similar to that. The problem is that 
> I don't know what the Xen parameters are (If they exist), or how you 
> are supposed to get the correct values to get it working. 
> If it is not possible to do something like that in Xen, your only 
> choice is fix it Firmware-side. 
> 
> To partially answer your question, Xen indeed has the ivrs_ioapic and 
> ivrs_hpet params too: 
> http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/drivers/passthrough/amd/iommu_acpi.c;h=79c1f8cd3e7d02e96ea9183b6a726b885500a05d;hb=HEAD#l638<http://mandrillapp.com/track/click/30489254/xenbits.xen.org?p=eyJzIjoiLUZiUFYyVWZndnV5MDdjaHdpdWE1cTNsNG9NIiwidiI6MSwicCI6IntcInVcIjozMDQ4OTI1NCxcInZcIjoxLFwidXJsXCI6XCJodHRwOlxcXC9cXFwveGVuYml0cy54ZW4ub3JnXFxcL2dpdHdlYlxcXC8_cD14ZW4uZ2l0O2E9YmxvYjtmPXhlblxcXC9kcml2ZXJzXFxcL3Bhc3N0aHJvdWdoXFxcL2FtZFxcXC9pb21tdV9hY3BpLmM7aD03OWMxZjhjZDNlN2QwMmU5NmVhOTE4M2I2YTcyNmI4ODU1MDBhMDVkO2hiPUhFQUQjbDYzOFwiLFwiaWRcIjpcIjRhNmZiNjYzYzA3YzRkN2FiZWUzMWI2NWE3ZGIwY2IwXCIsXCJ1cmxfaWRzXCI6W1wiYjAwZmZhY2Q4ZDUxNWQ1MzdhYmVkYTg5ZDBhMTUzYjA3YjVhYTFlMVwiXX0ifQ>
>  
> 
> That said, I have no idea how to find the device IDs for the IOAPICs. 
> According to 
> https://github.com/torvalds/linux/commit/c2ff5cf5294bcbd7fa50f7d860e90a66db7e5059<http://mandrillapp.com/track/click/30489254/github.com?p=eyJzIjoiR2lma0s2ZkZJanpnVHcxZ3BGWTFaVmptdi1VIiwidiI6MSwicCI6IntcInVcIjozMDQ4OTI1NCxcInZcIjoxLFwidXJsXCI6XCJodHRwczpcXFwvXFxcL2dpdGh1Yi5jb21cXFwvdG9ydmFsZHNcXFwvbGludXhcXFwvY29tbWl0XFxcL2MyZmY1Y2Y1Mjk0YmNiZDdmYTUwZjdkODYwZTkwYTY2ZGI3ZTUwNTlcIixcImlkXCI6XCI0YTZmYjY2M2MwN2M0ZDdhYmVlMzFiNjVhN2RiMGNiMFwiLFwidXJsX2lkc1wiOltcIjg3MWYyZjFmYWU4MzQ2ZTQzMjM0MDNlZjU4ZWUxNGExOWUxZDlhYjlcIl19In0>
>  
> (and 
> http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=06bbcaf48d09c18a41c482866941ddd5d2846b44<http://mandrillapp.com/track/click/30489254/xenbits.xen.org?p=eyJzIjoic1lJTTRWUW8ycjQtYmJJZmFhM1hpbjdJbkxzIiwidiI6MSwicCI6IntcInVcIjozMDQ4OTI1NCxcInZcIjoxLFwidXJsXCI6XCJodHRwOlxcXC9cXFwveGVuYml0cy54ZW4ub3JnXFxcL2dpdHdlYlxcXC8_cD14ZW4uZ2l0O2E9Y29tbWl0O2g9MDZiYmNhZjQ4ZDA5YzE4YTQxYzQ4Mjg2Njk0MWRkZDVkMjg0NmI0NFwiLFwiaWRcIjpcIjRhNmZiNjYzYzA3YzRkN2FiZWUzMWI2NWE3ZGIwY2IwXCIsXCJ1cmxfaWRzXCI6W1wiYjAwZmZhY2Q4ZDUxNWQ1MzdhYmVkYTg5ZDBhMTUzYjA3YjVhYTFlMVwiXX0ifQ>
>  
> for Xen), the southboard IOAPIC is always at 00:14.0 (I'm also curious 
> of where this information was sourced from - it doesn't seem to be in 
> either the IOMMU spec or BKDG), though I don't know whether it's IOAPIC 
> #4 or #5. 
> 
> According to 
> http://ubuntuforums.org/showthread.php?t=2254677<http://mandrillapp.com/track/click/30489254/ubuntuforums.org?p=eyJzIjoiYVpCa3hYaC10TVJuLWVFek9WNk43RUpyTmZjIiwidiI6MSwicCI6IntcInVcIjozMDQ4OTI1NCxcInZcIjoxLFwidXJsXCI6XCJodHRwOlxcXC9cXFwvdWJ1bnR1Zm9ydW1zLm9yZ1xcXC9zaG93dGhyZWFkLnBocD90PTIyNTQ2NzdcIixcImlkXCI6XCI0YTZmYjY2M2MwN2M0ZDdhYmVlMzFiNjVhN2RiMGNiMFwiLFwidXJsX2lkc1wiOltcIjk5YTBiYzNkYzQ5ZWY0NGRlMzJiNjZkZmQ5YmNkMjI1Y2RhOGRlODJcIl19In0>,
>  
> their (presumably northbridge) IOAPIC was at 00:00.1, though they don't 
> mention how they determined that either. 
> 00:00.1 doesn't show up under a lspci either, so I'm unsure if I have 
> that on my board, though AMD's IOMMU spec 
> (http://support.amd.com/TechDocs/48882_IOMMU.pdf<http://mandrillapp.com/track/click/30489254/support.amd.com?p=eyJzIjoiT3lKWHF3bVFxTEIzSTBlSlhObzVSU29LMHlVIiwidiI6MSwicCI6IntcInVcIjozMDQ4OTI1NCxcInZcIjoxLFwidXJsXCI6XCJodHRwOlxcXC9cXFwvc3VwcG9ydC5hbWQuY29tXFxcL1RlY2hEb2NzXFxcLzQ4ODgyX0lPTU1VLnBkZlwiLFwiaWRcIjpcIjRhNmZiNjYzYzA3YzRkN2FiZWUzMWI2NWE3ZGIwY2IwXCIsXCJ1cmxfaWRzXCI6W1wiZjgzMzYwMjAxY2Y5MGE2NDAyNGY0MGE4MTRmMGY5MDFlYTE0NDUxZlwiXX0ifQ>
>  
> page 260) claims they aren't normally enumerable. 
> 
> The lspci output on the board is as follows: 
> 00:00.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device 
> [1022:1566] 
> 00:00.2 IOMMU [0806]: Advanced Micro Devices, Inc. [AMD] Device [1022:1567] 
> 00:02.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device 
> [1022:156b] 
> 00:02.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 
> 16h Processor Functions 5:1 [1022:1439] 
> 00:02.3 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 
> 16h Processor Functions 5:1 [1022:1439] 
> 00:02.4 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 
> 16h Processor Functions 5:1 [1022:1439] 
> 00:08.0 Encryption controller [1080]: Advanced Micro Devices, Inc. 
> [AMD] Device [1022:1537] 
> 00:10.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH 
> USB XHCI Controller [1022:7814] (rev 11) 
> 00:11.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH 
> SATA Controller [IDE mode] [1022:7800] (rev 40) 
> 00:13.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH 
> USB EHCI Controller [1022:7808] (rev 39) 
> 00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus 
> Controller [1022:780b] (rev 42) 
> Subsystem: Advanced Micro Devices, Inc. [AMD] FCH SMBus 
> Controller [1022:780b] 
> Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- 
> ParErr- Stepping- SERR- FastB2B- DisINTx+ 
> Status: Cap- 66MHz+ UDF- FastB2B- ParErr- DEVSEL=medium 
>>TAbort- <TAbort- <MAbort->SERR- <PERR- INTx- 
> Kernel driver in use: piix4_smbus 
> Kernel modules: i2c_piix4 
> 00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC 
> Bridge [1022:780e] (rev 11) 
> 00:14.7 SD Host controller [0805]: Advanced Micro Devices, Inc. [AMD] 
> FCH SD Flash Controller [1022:7813] (rev 01) 
> 00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device 
> [1022:1580] 
> 00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device 
> [1022:1581] 
> 00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device 
> [1022:1582] 
> 00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device 
> [1022:1583] 
> 00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device 
> [1022:1584] 
> 00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device 
> [1022:1585] 
> 01:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit 
> Network Connection [8086:157b] (rev 03) 
> 02:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit 
> Network Connection [8086:157b] (rev 03) 
> 03:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit 
> Network Connection [8086:157b] (rev 03) 
> 
> If 00:14.0 is indeed one of the IOAPIC devices, I'm also curious on how 
> it relates to SMBus. 
> 
> I'm CC'ing coreboot and also Joerg Roedel, the author of the linux 
> commit, to see if they can help out. 
> 
> If we work out a process to properly identify the IOAPIC number to 
> device ID mappings, I'll try to properly document it somewhere and make 
> patches for Xen/coreboot/linux to use it. 
> 
> 
> _______________________________________________ Xen-users mailing list 
> Xen-users@xxxxxxxxxxxxx http://lists.xen.org/xen-users 
                                          
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

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