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: Fri, 9 Oct 2009 10:36:07 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 09 Oct 2009 01:36:33 -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=IjSNHSr2mIfeZncxxQ23BkAUPCfcY6FwMHdO+HHuZ8M=; b=gIknoe7CgXm0+9W0ALS+aIUOr5hl5h2zUO2h0xOsgk+8Fs4mFCj9rtHhrrLlqIAgjD b6qX7MfxDsCSJYD4T3ZiHAxy2WZYJRKr+w7RdEdWonbl2bUCAvt52LrRRzp64J63I2Yr N+xNmGTo7QDgG6K7H+VsFQ8nI48DkuTJnNl44=
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=MUKexHmmh2ITazCDLOiTwEc5Lp5asX698t4nkZieY75qczVbXtYiNpQNdXe8Bnn+B0 ziETMjfNoARbC1PSmG7eBqRGntfyV1ls2n9jAozi2E5YMc7JSWO30v9uMMhIpEvRSCWg t/Rs5yFJB6c1jHJ4EQn3CoExDUuw9u05ACULE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20091008223642.GA8690@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: <8686c3cd0910070200r7f3c59d9o8964ea432372a6b2@xxxxxxxxxxxxxx> <20091007093840.GB18775@xxxxxxxxxxxx> <8686c3cd0910070256p77f58aeat23aea646aaf82b86@xxxxxxxxxxxxxx> <20091007120246.GA5088@xxxxxxxxxxxx> <8686c3cd0910070828v30b1838by29c592bfb18f27c1@xxxxxxxxxxxxxx> <8686c3cd0910070841t2dd45aebx2f8a047477807e41@xxxxxxxxxxxxxx> <20091007225211.GD2055@xxxxxxxxxxxx> <20091007234132.GE2055@xxxxxxxxxxxx> <8686c3cd0910080655lc74ac21o644d9c88cb6bddcb@xxxxxxxxxxxxxx> <20091008223642.GA8690@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Simon,

I think u missed something here... in the regular state, when u do:
xm create hvm pci='00:1b.0'

then the device is being assigned the 0x100 slot, which means - qemu
will auto-assign the slot.
In this case - the hot-remove works fine.

In the other method i tried, when i wanted to register the device on a
specific slot (00:1b.0), (in order to reproduce it - u can change
qemu to force the devfn to be 1b.0, as i sent in my first mail) - in
that case, the device is assigned the slot 00:1b.0, and i see in the
Windows device manager, that it got the virtual slot 00:1b.0
Now, when i try to hot-remove the device - it doesn't work.

Doesn't it reproduce to u? (with the patch i sent, for forcing devfn
to be 00:1b.0) ?

Tom

On Fri, Oct 9, 2009 at 12:36 AM, Simon Horman <horms@xxxxxxxxxxxx> wrote:
> Hi Tom,
>
> On Thu, Oct 08, 2009 at 03:55:21PM +0200, Tom Rotenberg wrote:
>> The qemu xen i tested today, (which aslo doesn't work), is:
>> --------------------------------------------------------------
>> commit a05958b6e32f1748ea70b1efca13394956c0698b
>> Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
>> Date:   Wed Oct 7 15:57:18 2009 +0100
>>
>>     block: Clean up after deleting BHs
>> --------------------------------------------------------------
>>
>> Here are the log results you wanted (without my change):
>>
>> dm-command: hot insert pass-through pci dev
>> insert_to_pci_devfn: bdf_slt="0000:00:1b.0@100"
>
> The 100 is the problem. If you are using slot 1b (and function 0)
> then it should be:
>
>        PCI_DEVFN(1b,0) = (1b << 3) + 0) = d8
>
> Slot values with bit 9 set (that is >= 0x100) are used to tell
> qemu-xen to choose a slot. Is your pass-through device showing
> up in the guest at all, for instance in some low virtual slot like 4?
>
> The 100 should be originating from parse_pci_name_extended() which
> is called by xm for hot-plug and xend for boot-time assignment.
> Instrumenting the callers of that function might help to shed some light
> on the problem.
>
> Lastly, could you post the syntax you are using to pass-through
> the device? Is possible that my tests aren't covering your case.
>
>

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