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

Re: [Xen-devel] AMD IOMMU disabled - No Perdev Intremap



On 06/10/2013 14:09, Ferdinand Nölscher wrote:
> On 10/06/2013 02:58 PM, Andrew Cooper wrote:
>> On 06/10/2013 13:56, Ferdinand Nölscher wrote:
>>> Hi Sander,
>>>
>>> Thanks for your reply.
>>>
>>> On 10/06/2013 02:10 PM, Sander Eikelenboom wrote:
>>>> Sunday, October 6, 2013, 1:36:33 PM, you wrote:
>>>>
>>>>> Hi!
>>>>>> From other people posting to this list, I know that there has
>>>>>> been a
>>>>> bug related to the issue described in Xen Security Advisory 36
>>>>> that disables iommu for some AMD users like me.
>>>> What motherboard do you have ?
>>> I have an ASUS M5A99X EVO Rev 1.01
>>>
>>>
>>>> It depends if it's the north or southbridge ioapic but try using
>>>> the new xen boot parameter: (add it to the xen.gz line in grub)
>>>>
>>>> ivrs_ioapic[0]=00:14.0
>>>>
>>>> or
>>>>
>>>> ivrs_ioapic[0]=00:00.1
>>> I tried both, it still fails to enable i/o virtualisation.
>> Can you post a full xl dmesg, booting with iommu=debug,verbose as well?
>>
>> ~Andrew
>>
>>
> Hi Andrew,
> This is what I got:

<snip>

>
> (XEN) AMD-Vi: Found MSI capability block at 0x54
> (XEN) AMD-Vi: ACPI Table:
> (XEN) AMD-Vi:  Signature IVRS
> (XEN) AMD-Vi:  Length 0xd8
> (XEN) AMD-Vi:  Revision 0x1
> (XEN) AMD-Vi:  CheckSum 0x22
> (XEN) AMD-Vi:  OEM_Id AMD
> (XEN) AMD-Vi:  OEM_Table_Id RD890S
> (XEN) AMD-Vi:  OEM_Revision 0x202031
> (XEN) AMD-Vi:  Creator_Id AMD
> (XEN) AMD-Vi:  Creator_Revision 0
> (XEN) AMD-Vi: IVRS Block: type 0x10 flags 0x3e len 0xa8 id 0x2
> (XEN) AMD-Vi: IVHD Device Entry: type 0x3 id 0 flags 0
> (XEN) AMD-Vi:  Dev_Id Range: 0 -> 0x2
> (XEN) AMD-Vi: IVHD Device Entry: type 0x2 id 0x10 flags 0
> (XEN) AMD-Vi: IVHD Device Entry: type 0x3 id 0x100 flags 0
> (XEN) AMD-Vi:  Dev_Id Range: 0x100 -> 0x101
> (XEN) AMD-Vi: IVHD Device Entry: type 0x2 id 0x20 flags 0
> (XEN) AMD-Vi: IVHD Device Entry: type 0x2 id 0x200 flags 0
> (XEN) AMD-Vi: IVHD Device Entry: type 0x2 id 0x28 flags 0
> (XEN) AMD-Vi: IVHD Device Entry: type 0x2 id 0x300 flags 0
> (XEN) AMD-Vi: IVHD Device Entry: type 0x2 id 0x30 flags 0
> (XEN) AMD-Vi: IVHD Device Entry: type 0x2 id 0x400 flags 0
> (XEN) AMD-Vi: IVHD Device Entry: type 0x2 id 0x38 flags 0
> (XEN) AMD-Vi: IVHD Device Entry: type 0x2 id 0x500 flags 0
> (XEN) AMD-Vi: IVHD Device Entry: type 0x2 id 0x50 flags 0
> (XEN) AMD-Vi: IVHD Device Entry: type 0x2 id 0x600 flags 0
> (XEN) AMD-Vi: IVHD Device Entry: type 0x2 id 0x88 flags 0
> (XEN) AMD-Vi: IVHD Device Entry: type 0x3 id 0x90 flags 0
> (XEN) AMD-Vi:  Dev_Id Range: 0x90 -> 0x92
> (XEN) AMD-Vi: IVHD Device Entry: type 0x3 id 0x98 flags 0
> (XEN) AMD-Vi:  Dev_Id Range: 0x98 -> 0x9a
> (XEN) AMD-Vi: IVHD Device Entry: type 0x2 id 0xa0 flags 0xd7
> (XEN) AMD-Vi: IVHD Device Entry: type 0x2 id 0xa2 flags 0
> (XEN) AMD-Vi: IVHD Device Entry: type 0x2 id 0xa3 flags 0
> (XEN) AMD-Vi: IVHD Device Entry: type 0x2 id 0xa4 flags 0
> (XEN) AMD-Vi: IVHD Device Entry: type 0x43 id 0x700 flags 0
> (XEN) AMD-Vi:  Dev_Id Range: 0x700 -> 0x7ff alias 0xa4
> (XEN) AMD-Vi: IVHD Device Entry: type 0x2 id 0xa5 flags 0
> (XEN) AMD-Vi: IVHD Device Entry: type 0x3 id 0xb0 flags 0
> (XEN) AMD-Vi:  Dev_Id Range: 0xb0 -> 0xb2
> (XEN) AMD-Vi: IVHD Device Entry: type 0x48 id 0 flags 0xd7
> (XEN) AMD-Vi: IVHD Special: 0000:00:14.0 variety 0x1 handle 0
> (XEN) IVHD Error: Invalid IO-APIC 0
> (XEN) AMD-Vi: Error initialization
> (XEN) I/O virtualisation disabled
> (XEN) ENABLING IO-APIC IRQs
> (XEN)  -> Using new ACK method

Ok - my gut feeling is that this is a bug with the new command line
override code.  There is certainly not enough debug printing to work out
exactly what is going on, and at a glance of the other information in
the log, the state looks reasonable.  (cc'ing Jan and Suravee as the
authors)

Could you try running with this patch (compile tested only) and seeing
what it says?

~Andrew

8<------
diff --git a/xen/drivers/passthrough/amd/iommu_acpi.c
b/xen/drivers/passthrough/amd/iommu_acpi.c
index fca2037..66755fa 100644
--- a/xen/drivers/passthrough/amd/iommu_acpi.c
+++ b/xen/drivers/passthrough/amd/iommu_acpi.c
@@ -25,6 +25,7 @@
 #include <asm/io_apic.h>
 #include <asm/amd-iommu.h>
 #include <asm/hvm/svm/amd-iommu-proto.h>
+#include <xen/keyhandler.h>

 /* Some helper structures, particularly to deal with ranges. */

@@ -785,6 +786,11 @@ static u16 __init parse_ivhd_device_special(
         {
             printk(XENLOG_ERR "IVHD Error: Invalid IO-APIC %#x\n",
                    special->handle);
+            bitmap_scnprintf(keyhandler_scratch,
sizeof(keyhandler_scratch),
+                             ioapic_cmdline,
+                             BITS_TO_LONGS(ARRAY_SIZE(ioapic_sbdf)) );
+            printk("**DEBUG: apic = %d, nr_ioapics = %d, ioapic_cmdline
= %s\n",
+                   apic, nr_ioapics, keyhandler_scratch);
             return 0;
         }
         break;


_______________________________________________
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®.