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] Possible bug with pass-through hot-plug?

To: Simon Horman <horms@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Possible bug with pass-through hot-plug?
From: Tom Rotenberg <tom.rotenberg@xxxxxxxxx>
Date: Thu, 15 Oct 2009 11:38:39 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 15 Oct 2009 02:39:03 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=lZzh4YelPqMgQECZJOnge+GCUM5rxHp4h+XytXfwcSg=; b=qBDg5WWHXCvoT6TKLEEabLy99QjA7TE6yrd163/9lnsV4+XotdvYINr4wIO4WxLaeP BPUOfNCj1/83mGvrSCI28UulNL7WIA3JOCTtZmnF/C7VUVTXq0azXdmV0JEnptHDf39G 3oWMJMHqwGXeLIInTCXo7jv1x/WqdOdgLuVxs=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=TE09AG9X00axDZyM2PzXWyilaUQhx8v8M/oDEOQS2UZDuP2vxeIn3kcRBbq8MFUZgf oubeq/LmI8sWLG76E44NkwScQtpM2LTp0m9T1SzEqnQuGIeho5IDwEetBOQy0pTpQmI8 6dFTt/iawGVXbTaR+pc4F4ii6OrKKJsaZ8fUE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20091015093107.GA11293@xxxxxxxxxxxx>
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: <20091009114720.GA29353@xxxxxxxxxxxx> <20091009120927.GA31495@xxxxxxxxxxxx> <8686c3cd0910090729p7f7a1c2aq482bf9c70fab0910@xxxxxxxxxxxxxx> <20091010014127.GB22324@xxxxxxxxxxxx> <8686c3cd0910110257oa841842q2ed87f6b0f5b7a35@xxxxxxxxxxxxxx> <20091012223616.GC9072@xxxxxxxxxxxx> <8686c3cd0910130208k7b9b0feva576864c9d819737@xxxxxxxxxxxxxx> <20091013094345.GA16712@xxxxxxxxxxxx> <8686c3cd0910130252m6a57388cv8b4d5211a14a4998@xxxxxxxxxxxxxx> <20091015093107.GA11293@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Simon,

i'm glad you were able to re-produce it :)

About the bug, i suspect that the code in the virtual DSDT, which
"checks" which device was hot-plugged, is really not efficient, as it
needs to go over all sltos prior to the new assigned slot before
notifying the device. This means that if the slot number is 0x14, then
the 'if' clause in the dsdt, needs about 20*8=160 if statements before
it's notifying, and this what i think is causing the problem.
Especially, because the GPE interrupt is defined as level interrupt.

This bug can be fixed, using one of the followings:
1. Improve the code in the virtual DSDT (e.g.: doing some sort of
'binary-search' to see which device should be notified. This will
reduce the number of 'if' clause to evaluate from 160 to ~5)
2. Change the interrupt to edge interrupt, and see if it helps

What do u say?

Tom

On Thu, Oct 15, 2009 at 11:31 AM, Simon Horman <horms@xxxxxxxxxxxx> wrote:
> Hi Tom,
>
> I have been able to produce the following behaviour using a
> 32bit XP SP2 guest:
>
> 1. Attach to a low slot: xm ok, appears in device manager
> 2. Detach              : xm ok, disappears from device manager
>
> 3. Attach to a high slot: xm seems ok,
>                          but the device doesn't appear in device manager
> 4. Detach:                xm fails (time-out waiting for response from BIOS)
>
> Where a high slot seems to be 8 or greater.
>
> This seems to be in line with the problem that you were reporting.
> i
> Unfortunately at this stage I'm not sure exactly how to fix it
> but I suspect either:
>
> a) A problem the way XP is dealing with ACPI events or;
> b) More likely a deficiency in the virtual BIOS that xen is supplying.
>   In particular, the code in tools/firmware/hvmloader/acpi/dsdt.asl
>
>

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