xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* About VT-d on ASUS P6T
@ 2010-05-11  9:59 Felix Kuperjans
  0 siblings, 0 replies; 5+ messages in thread
From: Felix Kuperjans @ 2010-05-11  9:59 UTC (permalink / raw)
  To: xen-devel

Hi,

as I posted on xen-users, I've successfully used pci passtrough on an
ASUS P6T mainboard which is known to have really buggy RMRR tables.

I needed the iommu=passtrough and iommu_inclusive_mapping=1 command line
options, combined with a little change to the RMRR parsing code:

dmar.c:

@@ -559,8 +558,7 @@
             dprintk(XENLOG_WARNING VTDPREFIX,
                 "  The RMRR (%"PRIx64", %"PRIx64") is incorrect!\n",
                 rmrru->base_address, rmrru->end_address);
-            xfree(rmrru);
-            ret = -EFAULT;
+            acpi_register_rmrr_unit(rmrru);
         }
         else
         {

This way, the condition that causes the error printed above, does not
lead to an abortion of VT-d code, but instead registers the RMRR unit as
if it was correct.
VT-d is working properly afterwards and I've tested some devices
successfully.

Probably, you would prefer to choose the action based on some command
line option (like iommu_inclusive_mapping=1) instead of ignoring this
error by default.

Regards,
Felix

^ permalink raw reply	[flat|nested] 5+ messages in thread

* About VT-d on ASUS P6T
@ 2010-05-11 10:09 Felix Kuperjans
  2010-05-12  1:54 ` Han, Weidong
  0 siblings, 1 reply; 5+ messages in thread
From: Felix Kuperjans @ 2010-05-11 10:09 UTC (permalink / raw)
  To: xen-devel

Hi,

as I posted on xen-users, I've successfully used pci passtrough on an ASUS P6T mainboard which is known to have really buggy RMRR tables.

I needed the iommu=passtrough and iommu_inclusive_mapping=1 command line options, combined with a little change to the RMRR parsing code:

dmar.c:

@@ -559,8 +558,7 @@
             dprintk(XENLOG_WARNING VTDPREFIX,
                 "  The RMRR (%"PRIx64", %"PRIx64") is incorrect!\n",
                 rmrru->base_address, rmrru->end_address);
-            xfree(rmrru);
-            ret = -EFAULT;
+            acpi_register_rmrr_unit(rmrru);
         }
         else
         {

This way, the condition that causes the error printed above, does not lead to an abortion of VT-d code, but instead registers the RMRR unit as if it was correct.
VT-d is working properly afterwards and I've tested some devices successfully.

Probably, you would prefer to choose the action based on some command line option (like iommu_inclusive_mapping=1) instead of ignoring this error by default.

Regards,
Felix

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: About VT-d on ASUS P6T
  2010-05-11 10:09 Felix Kuperjans
@ 2010-05-12  1:54 ` Han, Weidong
  2010-05-12  8:57   ` Felix Kuperjans
  0 siblings, 1 reply; 5+ messages in thread
From: Han, Weidong @ 2010-05-12  1:54 UTC (permalink / raw)
  To: Felix Kuperjans, xen-devel@lists.xensource.com

Your code changes just let xen not disable VT-d, but actually "iommu=passthrough" avoids problems of incorrect RMRR. This option makes dom0 not use VT-d, therefore incorrect RMRR won't be used by device. But if you assign the device whose RMRR incorrect to guest, it still causes problems. 

Regards,
Weidong

-----Original Message-----
From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Felix Kuperjans
Sent: Tuesday, May 11, 2010 6:09 PM
To: xen-devel@lists.xensource.com
Subject: [Xen-devel] About VT-d on ASUS P6T

Hi,

as I posted on xen-users, I've successfully used pci passtrough on an ASUS P6T mainboard which is known to have really buggy RMRR tables.

I needed the iommu=passtrough and iommu_inclusive_mapping=1 command line options, combined with a little change to the RMRR parsing code:

dmar.c:

@@ -559,8 +558,7 @@
             dprintk(XENLOG_WARNING VTDPREFIX,
                 "  The RMRR (%"PRIx64", %"PRIx64") is incorrect!\n",
                 rmrru->base_address, rmrru->end_address);
-            xfree(rmrru);
-            ret = -EFAULT;
+            acpi_register_rmrr_unit(rmrru);
         }
         else
         {

This way, the condition that causes the error printed above, does not lead to an abortion of VT-d code, but instead registers the RMRR unit as if it was correct.
VT-d is working properly afterwards and I've tested some devices successfully.

Probably, you would prefer to choose the action based on some command line option (like iommu_inclusive_mapping=1) instead of ignoring this error by default.

Regards,
Felix


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: About VT-d on ASUS P6T
  2010-05-12  1:54 ` Han, Weidong
@ 2010-05-12  8:57   ` Felix Kuperjans
  2010-05-12 10:11     ` Han, Weidong
  0 siblings, 1 reply; 5+ messages in thread
From: Felix Kuperjans @ 2010-05-12  8:57 UTC (permalink / raw)
  To: xen-devel

So there will be some devices that do not work while others work - can I
figure out which devices are affected by the incorrect RMRR?

In addition, only setting iommu=passtrough caused XEN to disable VT-d
completely, altough some devices actually can be passtroughed to the
domU perfectly.

Regards,
Felix

Am 12.05.2010 03:54, schrieb Han, Weidong:
> Your code changes just let xen not disable VT-d, but actually "iommu=passthrough" avoids problems of incorrect RMRR. This option makes dom0 not use VT-d, therefore incorrect RMRR won't be used by device. But if you assign the device whose RMRR incorrect to guest, it still causes problems. 
>
> Regards,
> Weidong
>
> -----Original Message-----
> From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Felix Kuperjans
> Sent: Tuesday, May 11, 2010 6:09 PM
> To: xen-devel@lists.xensource.com
> Subject: [Xen-devel] About VT-d on ASUS P6T
>
> Hi,
>
> as I posted on xen-users, I've successfully used pci passtrough on an ASUS P6T mainboard which is known to have really buggy RMRR tables.
>
> I needed the iommu=passtrough and iommu_inclusive_mapping=1 command line options, combined with a little change to the RMRR parsing code:
>
> dmar.c:
>
> @@ -559,8 +558,7 @@
>              dprintk(XENLOG_WARNING VTDPREFIX,
>                  "  The RMRR (%"PRIx64", %"PRIx64") is incorrect!\n",
>                  rmrru->base_address, rmrru->end_address);
> -            xfree(rmrru);
> -            ret = -EFAULT;
> +            acpi_register_rmrr_unit(rmrru);
>          }
>          else
>          {
>
> This way, the condition that causes the error printed above, does not lead to an abortion of VT-d code, but instead registers the RMRR unit as if it was correct.
> VT-d is working properly afterwards and I've tested some devices successfully.
>
> Probably, you would prefer to choose the action based on some command line option (like iommu_inclusive_mapping=1) instead of ignoring this error by default.
>
> Regards,
> Felix
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>   

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: About VT-d on ASUS P6T
  2010-05-12  8:57   ` Felix Kuperjans
@ 2010-05-12 10:11     ` Han, Weidong
  0 siblings, 0 replies; 5+ messages in thread
From: Han, Weidong @ 2010-05-12 10:11 UTC (permalink / raw)
  To: Felix Kuperjans, xen-devel@lists.xensource.com

>So there will be some devices that do not work while others work - can I
>figure out which devices are affected by the incorrect RMRR?

"iommu=verbose" will list all RMRRs and their relevant devices. 

>In addition, only setting iommu=passtrough caused XEN to disable VT-d
>completely, altough some devices actually can be passtroughed to the
>domU perfectly.

Yes, only setting iommu=passthrough causes Xen to disable VT-d, because acpi_parse_one_rmrr returns "-EFAULT" when a RMRR is incorrect. Indeed, incorrect RMRR only impacts its relevant device, but it requires setting iommu=passthrough, and also it causes problems when assign corresponding devices. It's an "obvious" issue of BIOS. There is not a clean way to handle this BIOS issue in Xen upstream. Of course, you can hack it by yourself to work for you. But I encourage you to report it to the vendor and get it fixed in BIOS.

Regards,
Weidong


Am 12.05.2010 03:54, schrieb Han, Weidong:
> Your code changes just let xen not disable VT-d, but actually "iommu=passthrough" avoids problems of incorrect RMRR. This option makes dom0 not use VT-d, therefore incorrect RMRR won't be used by device. But if you assign the device whose RMRR incorrect to guest, it still causes problems. 
>
> Regards,
> Weidong
>
> -----Original Message-----
> From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Felix Kuperjans
> Sent: Tuesday, May 11, 2010 6:09 PM
> To: xen-devel@lists.xensource.com
> Subject: [Xen-devel] About VT-d on ASUS P6T
>
> Hi,
>
> as I posted on xen-users, I've successfully used pci passtrough on an ASUS P6T mainboard which is known to have really buggy RMRR tables.
>
> I needed the iommu=passtrough and iommu_inclusive_mapping=1 command line options, combined with a little change to the RMRR parsing code:
>
> dmar.c:
>
> @@ -559,8 +558,7 @@
>              dprintk(XENLOG_WARNING VTDPREFIX,
>                  "  The RMRR (%"PRIx64", %"PRIx64") is incorrect!\n",
>                  rmrru->base_address, rmrru->end_address);
> -            xfree(rmrru);
> -            ret = -EFAULT;
> +            acpi_register_rmrr_unit(rmrru);
>          }
>          else
>          {
>
> This way, the condition that causes the error printed above, does not lead to an abortion of VT-d code, but instead registers the RMRR unit as if it was correct.
> VT-d is working properly afterwards and I've tested some devices successfully.
>
> Probably, you would prefer to choose the action based on some command line option (like iommu_inclusive_mapping=1) instead of ignoring this error by default.
>
> Regards,
> Felix
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>   

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-05-12 10:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-11  9:59 About VT-d on ASUS P6T Felix Kuperjans
  -- strict thread matches above, loose matches on Subject: below --
2010-05-11 10:09 Felix Kuperjans
2010-05-12  1:54 ` Han, Weidong
2010-05-12  8:57   ` Felix Kuperjans
2010-05-12 10:11     ` Han, Weidong

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).