WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Xen

xen-devel

[Top] [All Lists]

Re: [Xen-devel] [PATCH] VT-d: improve RMRR validity checking

To: Weidong Han <weidong.han@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] VT-d: improve RMRR validity checking
From: Sander Eikelenboom <linux@xxxxxxxxxxxxxx>
Date: 2010年1月22日 10:19:01 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Kay, Allen M" <allen.m.kay@xxxxxxxxx>, "Cihula, Joseph" <joseph.cihula@xxxxxxxxx>, Noboru Iwamatsu <n_iwamatsu@xxxxxxxxxxxxxx>, "keir.fraser@xxxxxxxxxxxxx" <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: 2010年1月22日 01:19:27 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4B59660F.4000909@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Eikelenboom IT services
References: <C77E162B.6FE6%keir.fraser@xxxxxxxxxxxxx> <4B59098B.6000108@xxxxxxxxx> <4B590FA4.4000008@xxxxxxxxxxxxxx> <4B59132B.40607@xxxxxxxxx> <4B59188C.50901@xxxxxxxxxxxxxx> <4B59660F.4000909@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hello Weidong,
Wouldn't it be more clear to add an option to iommu= for this case ?
if iommu=on,..,..,security
With the security option specified:
 -it would be most strict in it's checks, since enforcing security with the 
iommu requires that as you have pointed out.
 -warn,fail or panic incase it can't enable all to enforce the security.
Without the security option specified (default)
 - it tries to work as with the security option specified
 - but incase of problems makes the assumption the iommu's main task is not 
security, but making as much of vt-d working to keep the passthrough 
functionality
 - it will only warn, that you will lose the security part, that it would 
be wise to let your bios be fixed, and not making it panic
 - and keep vt-d enabled
Regards,
Sander
Friday, January 22, 2010, 9:47:11 AM, you wrote:
> diff -r 207fba95a7d5 xen/drivers/passthrough/vtd/dmar.c
> --- a/xen/drivers/passthrough/vtd/dmar.c Fri Jan 22 13:12:45 2010 +0800
> +++ b/xen/drivers/passthrough/vtd/dmar.c Fri Jan 22 22:32:10 2010 +0800
> @@ -396,8 +396,49 @@ acpi_parse_one_drhd(struct acpi_dmar_ent
>
> if ( ret )
> xfree(dmaru);
> + else if ( force_iommu || dmaru->include_all )
> + acpi_register_drhd_unit(dmaru);
> else
> - acpi_register_drhd_unit(dmaru);
> + {
> + u8 b, d, f;
> + int i, invalid_cnt = 0;
> +
> + for ( i = 0; i < dmaru->scope.devices_cnt; i++ )
> + {
> + b = PCI_BUS(dmaru->scope.devices[i]);
> + d = PCI_SLOT(dmaru->scope.devices[i]);
> + f = PCI_FUNC(dmaru->scope.devices[i]);
> +
> + if ( pci_device_detect(b, d, f) == 0 )
> + {
> + dprintk(XENLOG_WARNING VTDPREFIX,
> + " Non-existent device (%x:%x.%x) is reported "
> + "in this DRHD's scope!\n", b, d, f);
> + invalid_cnt++;
> + }
> + }
> +
> + if ( invalid_cnt )
> + {
> + xfree(dmaru);
> + if ( invalid_cnt == dmaru->scope.devices_cnt )
> + {
> + dprintk(XENLOG_WARNING VTDPREFIX,
> + " Ignore the DRHD due to all devices under "
> + "its scope are not PCI discoverable!\n");
> + }
> + else
> + {
> + dprintk(XENLOG_WARNING VTDPREFIX,
> + " The DRHD is invalid due to some devices under "
> + "its scope are not PCI discoverable!\n");
> + ret = -EINVAL;
> + }
> + }
> + else
> + acpi_register_drhd_unit(dmaru);
> + }
> +
> return ret;
> }
>
-- 
Best regards,
 Sander mailto:linux@xxxxxxxxxxxxxx
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: [Xen-devel] Re: [Xen-users] pv_ops 2.6.31.6 restore/migration problem with 2.6.31.12 pv_ops domU , Pasi Kärkkäinen
Next by Date: RE: [Xen-devel] pre-reservation of memory for domain creation , Xu, Dongxiao
Previous by Thread: Re: [Xen-devel] [PATCH] VT-d: improve RMRR validity checking , Weidong Han
Next by Thread: Re: [Xen-devel] [PATCH] VT-d: improve RMRR validity checking , Weidong Han
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /