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 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] Xen 4.0.0-rc7 problem/hang with vt-d DMAR parsing

To: Jan Beulich <JBeulich@xxxxxxxxxx>, "pasik@xxxxxx" <pasik@xxxxxx>
Subject: RE: [Xen-devel] Xen 4.0.0-rc7 problem/hang with vt-d DMAR parsing
From: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
Date: Wed, 24 Mar 2010 16:54:09 +0800
Accept-language: zh-CN, en-US
Acceptlanguage: zh-CN, en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Han, Weidong" <weidong.han@xxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Wed, 24 Mar 2010 01:54:59 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4BA9DA400200007800036ABB@xxxxxxxxxxxxxxxxxx>
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>
References: <20100323193748.GW1878@xxxxxxxxxxx> <C7CECCF9.E36E%keir.fraser@xxxxxxxxxxxxx> <20100323200515.GZ1878@xxxxxxxxxxx> <ED3036A092A28F4C91B0B4360DD128EABE03D6BC@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4BA9DA400200007800036ABB@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcrLK2lsh3vM0zLwRHyqJyR3zqVLkAAAq8Xw
Thread-topic: [Xen-devel] Xen 4.0.0-rc7 problem/hang with vt-d DMAR parsing
Jan Beulich wrote:
>>>> "Cui, Dexuan" <dexuan.cui@xxxxxxxxx> 24.03.10 02:52 >>>
>> Pasi K?rkk?inen wrote:
>>> Hmm.. wondering if the patch Jan just sent will help with that.
>>> Sounds like it might help :)
>> I guess Jan's patch helps here in a very interesting way:
> 
> I think reference was to a patch I sent yesterday, which I don't think
> would help here (as the box would have to crash for it to help).
I think the reference is changeset 21039 (VT-d: reduce default verbosity).

>> I suspect your BIOS doesn't construct the DMAR properly, e.g., in
>> acpi_parse_dmar(),  entry_header->length is always 0, so xen'll hang
>> in the while loop and continue printing the "dmaru->address = 0"
>> message when iommu=verbose.   
> 
> Surely entry_header->length == 0 (or really
> entry_header->length < sizeof(struct acpi_table_XXX)) should be
> considered invalid, and hence get checked for? Linux at least has
> a check against zero here...
I think Weidong is making a patch for this.

> 
>> Without verbose message outputing, the loop runs even faster and in
>> acpi_parse_one_drhd(),  xmalloc(struct acpi_drhd_unit) would NULL in
>> a short period of time and hence VT-d is got disabled... :-)  
> 
> Why would you expect xmalloc() to fail soon? This is only to be
> expected on a 32-bit system (which I doubt this one is).
I guess here acpi_parse_dmar() becomes something like this
while (1)
{
   acpi_parse_one_drhd()
}
and acpi_parse_one_drhd() and acpi_parse_dev_scope(), the xmalloc-ed memory is 
not xfree-ed and hence leaked, so after "Xen takes  long time (25-30 seconds) 
to check for VT-d stuff, and then in the end IO virtualization gets disabled 
with 'Failed to parse ACPI DMAR' message -- I guess after "25-30 seconds" the 
xmalloc would return NULL here.

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

<Prev in Thread] Current Thread [Next in Thread>