xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
To: "Ferdinand Nölscher" <ferdinand@outlook.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Jan Beulich <JBeulich@suse.com>,
	xen-devel@lists.xen.org
Subject: Re: AMD IOMMU disabled - No Perdev Intremap
Date: Mon, 7 Oct 2013 19:08:08 -0500	[thread overview]
Message-ID: <52534CE8.2020402@amd.com> (raw)
In-Reply-To: <BLU0-SMTP207CD48D43DC1B953A673ABA5120@phx.gbl>


[-- Attachment #1.1: Type: text/plain, Size: 8296 bytes --]

On 10/6/2013 1:14 PM, Ferdinand Nölscher wrote:
> On 10/06/2013 04:40 PM, Andrew Cooper wrote:
>> 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;
>>
>>
>>
> I applied your patch, this is the related output:
>
> (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) **DEBUG: apic = 2, nr_ioapics = 2, ioapic_cmdline = 0
> (XEN) AMD-Vi: Error initialization
> (XEN) I/O virtualisation disabled
> (XEN) ENABLING IO-APIC IRQs
> (XEN)  -> Using new ACK method
>
> kind regards
>
Could you pleasealso provide the output from "acpidump" utility or from
/sys/firmware/acpi/tables/IVRS
/sys/firmware/acpi/tables/APIC
/sys/firmware/acpi/tables/HPET

What optiondid you specify for xen.gz?
Also, are you running from the latest code? Jan and I have been working 
on the patch and just recently add more changes.

Thank you,

Suravee

[-- Attachment #1.2: Type: text/html, Size: 10384 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

      reply	other threads:[~2013-10-08  0:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-06 11:36 AMD IOMMU disabled - No Perdev Intremap Ferdinand Nölscher
2013-10-06 12:10 ` Sander Eikelenboom
2013-10-06 12:56   ` Ferdinand Nölscher
2013-10-06 12:58     ` Andrew Cooper
2013-10-06 13:09       ` Ferdinand Nölscher
2013-10-06 14:38         ` Sander Eikelenboom
2013-10-06 14:45           ` Andrew Cooper
2013-10-06 14:59             ` Sander Eikelenboom
2013-10-06 17:28           ` Ferdinand Nölscher
2013-10-06 17:45             ` Sander Eikelenboom
2013-10-06 17:57               ` Ferdinand Nölscher
2013-10-06 18:03                 ` Sander Eikelenboom
2013-10-08 16:39                   ` Ferdinand Nölscher
2013-10-08 16:44                     ` Sander Eikelenboom
2013-10-07  7:33             ` Jan Beulich
2013-10-06 14:40         ` Andrew Cooper
2013-10-06 18:14           ` Ferdinand Nölscher
2013-10-08  0:08             ` Suravee Suthikulpanit [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52534CE8.2020402@amd.com \
    --to=suravee.suthikulpanit@amd.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ferdinand@outlook.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).