From: Tom Rotenberg Subject: Re: Machine hangs when doing pass-through of all the USB devices on a Lenovo T400 - With xen-unstable Date: Mon, 27 Jul 2009 18:07:58 +0300 Message-ID: <8686c3cd0907270807j2ee0d25an61b2ba674e4f5432@mail.gmail.com> References: <8686c3cd0907260746y1232c2c2of9634ef1760e37d2@mail.gmail.com> <20090727115858.GA11917@verge.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20090727115858.GA11917@verge.net.au> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Simon Horman Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Simon, It looks like each one of your patches (when applied separately) solved the problem. However, it looks like the first patch caused it to work better (i didn't run real benchmarks tough). Will u post a fix for this issue? Tom On Mon, Jul 27, 2009 at 2:59 PM, Simon Horman wrote: > On Sun, Jul 26, 2009 at 05:46:22PM +0300, Tom Rotenberg wrote: >> Hi, >> >> Just to notify you all, i have tested the same scenario, on the latest >> xen-unstable, and i got the same result - the machine hangs. It looks >> like a major bug. >> Can someone please help me with this? > > Hi Tom, > > this is a bit of a stab in the dark, but could you try each > of the following patches _separately_ to see if they make any difference? > > 1) > > Allow virtual functions to use the legacy interrupt pin of the > corresponding physical device. =A0This was already half-implemented, and = I > wonder if this missing piece is causing problems. > > Index: ioemu-remote/hw/pass-through.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- ioemu-remote.orig/hw/pass-through.c 2009-07-27 21:42:12.000000000 +10= 00 > +++ ioemu-remote/hw/pass-through.c =A0 =A0 =A02009-07-27 21:47:34.0000000= 00 +1000 > @@ -2617,13 +2617,7 @@ static uint32_t pt_status_reg_init(struc > =A0static uint32_t pt_irqpin_reg_init(struct pt_dev *ptdev, > =A0 =A0 =A0 =A0 struct pt_reg_info_tbl *reg, uint32_t real_offset) > =A0{ > - =A0 =A0int reg_field =3D 0; > - > - =A0 =A0/* set Interrupt Pin register to use INTA# if it has */ > - =A0 =A0if (ptdev->dev.config[real_offset]) > - =A0 =A0 =A0 =A0reg_field =3D 0x01; > - > - =A0 =A0return reg_field; > + =A0 =A0return ptdev->dev.config[real_offset]; > =A0} > > =A0/* initialize BAR */ > > 2) Always use INTA everywhere. This should revert things to > =A0 they way they were before the multi-function changes. > > > diff --git a/hw/pass-through.c b/hw/pass-through.c > index f3d033b..cddfe5c 100644 > --- a/hw/pass-through.c > +++ b/hw/pass-through.c > @@ -4329,21 +4329,7 @@ int pt_init(PCIBus *e_bus) > =A0*/ > =A0static uint8_t pci_read_intx(struct pt_dev *ptdev) > =A0{ > - =A0 =A0uint8_t r_val =3D pci_read_byte(ptdev->pci_dev, PCI_INTERRUPT_PI= N); > - > - =A0 =A0PT_LOG("intx=3D%i\n", r_val); > - =A0 =A0if (r_val < 1 || r_val > 4) > - =A0 =A0{ > - =A0 =A0 =A0 =A0PT_LOG("Interrupt pin read from hardware is out of range= : " > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 "value=3D%i, acceptable range is 1 - 4\n", = r_val); > - =A0 =A0 =A0 =A0r_val =3D 0; > - =A0 =A0} > - =A0 =A0else > - =A0 =A0{ > - =A0 =A0 =A0 =A0r_val -=3D 1; > - =A0 =A0} > - > - =A0 =A0return r_val; > + =A0 =A0return 0; > =A0} > > =A0/* > >