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

Re: [Xen-devel] IOMMU/AMD-Vi not working after XSA-36 with 970A-UD3



On Sat, May 4, 2013 at 6:20 AM, Marcus Osdoba
<marcus.osdoba@xxxxxxxxxxxxxx> wrote:
> Am 04.05.2013 02:09, schrieb Eric Shelton:
>
>> Did you try the xen boot option mentioned in XSA-36?
>>
>> iommu=amd-iommu-perdev-intremap
>>
>> Add it to the line in grub.conf for the hypervisor (e.g., "kernel
>> /boot/xen.gz dom0_mem=2048M iommu=1,no-amd-iommu-perdev-intremap")
>
> Hello Eric,
>
> Thanks for the hint. Unfortuantly this wasn't a solution as reported in [0].
> Even with the option "no-amd-iommu-perdev-intremap" the I/O virtualisation
> remains disabled (xm dmesg output see below).
>
> Regards,
> Marcus
>
> [0] http://lists.xen.org/archives/html/xen-devel/2013-03/msg01016.html
>
> (XEN) Xen version 4.1.4 (Debian 4.1.4-3) (waldi@xxxxxxxxxx) (gcc version
> 4.7.2 (Debian 4.7.2-5) ) Fri Apr 19 13:32:48 UTC 2013
> (XEN) Bootloader: GRUB 1.99-27+deb7u1
> (XEN) Command line: placeholder com1=115200,8n1 console=com1
> iommu=verbose,no-amd-iommu-perdev-intremap dom0_mem=768M
. . .
> (XEN) IOAPIC[0]: apic_id 8, version 33, address 0xfec00000, GSI 0-23
> (XEN) Enabling APIC mode:  Flat.  Using 1 I/O APICs
. . .
> (XEN) IVHD Error: Conflicting IO-APIC 0x8 entries
> (XEN) AMD-Vi: Error initialization
> (XEN) I/O virtualisation disabled
. . .

I have the same motherboard with I/O virtualization running.  You are
welcome to follow my path if you wish.  I detailed the issues with the
970A-UD3 motherboard in response to [1], so it should give you a clear
idea as to the defect and whether you consider what I am doing meets
your goals.  My view is that the particular misconfiguration with this
board, in which the ACPI IVRS table lists an unused northbridge
IOAPIC, is reasonably ignored as done in the below patch.

My xen boot line is as follows:
kernel /boot/xen.gz dom0_mem=2048M loglvl=all guest_loglvl=all
apic_verbosity=debug e820-verbose=1 iommu=debug,verbose

I have patched iommu_acpi.c as follows:
--- orig/xen/drivers/passthrough/amd/iommu_acpi.c 2013-05-04
21:18:18.148000000 -0400
+++ 
xen-unstable-3f28d0077788e7f8cd3ee25b023a4225d7e26e87/xen/drivers/passthrough/amd/iommu_acpi.c
2013-04-23 22:27:28.028000000 -0400
@@ -679,8 +679,9 @@
                                     special->handle);
                 else
                 {
-                    printk(XENLOG_ERR "IVHD Error: Conflicting
IO-APIC %#x entries\n",
+                    printk(XENLOG_ERR "ignored - IVHD Error:
Conflicting IO-APIC %#x entries\n",
                            special->handle);
+                    break;
                     if ( amd_iommu_perdev_intremap )
                         return 0;
                 }
@@ -702,12 +703,14 @@
             }
             break;
         }
+ /*
         if ( apic == nr_ioapics )
         {
             printk(XENLOG_ERR "IVHD Error: Invalid IO-APIC %#x\n",
                    special->handle);
             return 0;
         }
+ */
         break;
     case ACPI_IVHD_HPET:
         /* set device id of hpet */

xl dmesg reports the following:
(XEN) Xen version 4.3-unstable (root@) (gcc (Gentoo 4.6.3 p1.11,
pie-0.5.2) 4.6.3) debug=y Tue Apr 23 22:28:54 EDT 2013
(XEN) Latest ChangeSet: unavailable
(XEN) Bootloader: GNU GRUB 0.97
(XEN) Command line: dom0_mem=2048M loglvl=all guest_loglvl=all
apic_verbosity=debug e820-verbose=1 iommu=debug,verbose
. . .
(XEN) ACPI: IOAPIC (id[0x08] address[0xfec00000] gsi_base[0])
(XEN) IOAPIC[0]: apic_id 8, version 33, address 0xfec00000, GSI 0-23
. . .
(XEN) AMD-Vi: IVHD Device Entry: type 0x48 id 0 flags 0xd7
(XEN) AMD-Vi: IVHD Special: 0000:00:14.0 variety 0x1 handle 0x8
(XEN) AMD-Vi: IVHD Device Entry: type 0x48 id 0 flags 0xd7
(XEN) AMD-Vi: IVHD Special: 0000:00:14.0 variety 0x2 handle 0
(XEN) AMD-Vi: IVHD Device Entry: type 0x48 id 0 flags 0
(XEN) AMD-Vi: IVHD Special: 0000:00:00.1 variety 0x1 handle 0x8
(XEN) ignored - IVHD Error: Conflicting IO-APIC 0x8 entries
(XEN) AMD-Vi: IOMMU 0 Enabled.
(XEN) AMD-Vi: Enabling per-device vector maps
(XEN) I/O virtualisation enabled
(XEN)  - Dom0 mode: Relaxed
(XEN) Interrupt remapping enabled
. . .

Best of luck to you...

- Eric

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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