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

[Xen-devel] Re: Xen 3.4 multi-function pass-through tree, isn't working.

To: Tom Rotenberg <tom.rotenberg@xxxxxxxxx>
Subject: [Xen-devel] Re: Xen 3.4 multi-function pass-through tree, isn't working...
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Tue, 21 Jul 2009 13:23:02 +1000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 20 Jul 2009 20:23:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <8686c3cd0907200511h68ae5ea8ia5a833cd40b12c08@xxxxxxxxxxxxxx>
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: <8686c3cd0907200403w2a05cf1lfaf25dc8d7eb1821@xxxxxxxxxxxxxx> <20090720120459.GA31891@xxxxxxxxxxxx> <8686c3cd0907200511h68ae5ea8ia5a833cd40b12c08@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
On Mon, Jul 20, 2009 at 03:11:29PM +0300, Tom Rotenberg wrote:
> This setup worked with the plain xen 3.4 tree.
> No custom stuff in /etc/xen/hvm.
> 
> I took a look at the bug, and wrote a workaround for it. Take a look,
> and tell if it's ok:
> 
> diff -r 776ab1bec020 tools/python/xen/xend/server/pciif.py
> --- a/tools/python/xen/xend/server/pciif.py     Sun Jul 19 11:53:11 2009 -0400
> +++ b/tools/python/xen/xend/server/pciif.py     Mon Jul 20 08:17:34 2009 -0400
> @@ -499,7 +499,13 @@
>          num_devs = int(self.readBackend(devid, 'num_devs'))
>          new_num_devs = 0
>          for i in range(num_devs):
> -            state = int(self.readBackend(devid, 'state-%i' % i))
> +            try:
> +                state = int(self.readBackend(devid, 'state-%i' % i))
> +            except:
> +                state = xenbusState['Unknown']
> +
>              if state == xenbusState['Closing']:
>                  # Detach I/O resources.
>                  pci_dev = parse_pci_name(self.readBackend(devid, 'dev-%i' % 
> i))
> 
> What do u think this bug is caused from?

Hi Tom,

your work around seems entirely reasonable, but I am still puzzled at
how your system gets into this state. I'm having no luck reproducing it
here.

I have the following passed to the dom0 kernel at boot:

root=/dev/mapper/sam-root_x86_64 console=ttyS0 loglevel=8 ro 
pciback.hide=(01:00.0)(01:00.1)(00:1b.0)(00:1a.0)(00:1a.1)(00:1a.7)(00:1d.0)(00:1d.1)(00:1d.2)(00:1d.7)(07:b.0)(07:04.0)
 reassign_resources reassigndev=00:1d.7

And I'm starting a domU with all USB devices passed-through using:

xm create -c /home/horms/hvm xen_platform_pci=0 pci='00:1a.0' pci='00:1a.1' 
pci='00:1a.7' pci='00:1d.0' pci='00:1d.1' pci='00:1d.2' pci='00:1d.7'

To test multi-function pass-through I also tried:

xm create -c /home/horms/hvm xen_platform_pci=0 pci='00:1a.*' pci='00:1d.*'

/home/horms/hvm is as follows:

import os, re
arch = os.uname()[4]
if re.search('64', arch):
    arch_libdir = 'lib64'
else:
    arch_libdir = 'lib'
kernel = "/usr/lib/xen/boot/hvmloader"
builder='hvm'
memory = 128
name = "debian"
disk = [ 'file:/home/horms/projects/xen/media/debian-unstable.disk,hda,w' ]
boot='c'
device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm'
sdl=0
opengl=0
vnc=1
vnclisten="0.0.0.0"
vncunused=1
nographic=0
stdvga=0
serial='pty'

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