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] Machine hangs when doing pass-through of all the USB dev

To: Tom Rotenberg <tom.rotenberg@xxxxxxxxx>
Subject: Re: [Xen-devel] Machine hangs when doing pass-through of all the USB devices on a Lenovo T400 - With xen-unstable
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Mon, 27 Jul 2009 21:59:02 +1000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 27 Jul 2009 04:59:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <8686c3cd0907260746y1232c2c2of9634ef1760e37d2@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: <8686c3cd0907260746y1232c2c2of9634ef1760e37d2@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
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.  This was already half-implemented, and I
wonder if this missing piece is causing problems.

Index: ioemu-remote/hw/pass-through.c
===================================================================
--- ioemu-remote.orig/hw/pass-through.c 2009-07-27 21:42:12.000000000 +1000
+++ ioemu-remote/hw/pass-through.c      2009-07-27 21:47:34.000000000 +1000
@@ -2617,13 +2617,7 @@ static uint32_t pt_status_reg_init(struc
 static uint32_t pt_irqpin_reg_init(struct pt_dev *ptdev,
         struct pt_reg_info_tbl *reg, uint32_t real_offset)
 {
-    int reg_field = 0;
-
-    /* set Interrupt Pin register to use INTA# if it has */
-    if (ptdev->dev.config[real_offset])
-        reg_field = 0x01;
-
-    return reg_field;
+    return ptdev->dev.config[real_offset];
 }
 
 /* initialize BAR */

2) Always use INTA everywhere. This should revert things to
   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)
  */
 static uint8_t pci_read_intx(struct pt_dev *ptdev)
 {
-    uint8_t r_val = pci_read_byte(ptdev->pci_dev, PCI_INTERRUPT_PIN);
-
-    PT_LOG("intx=%i\n", r_val);
-    if (r_val < 1 || r_val > 4)
-    {
-        PT_LOG("Interrupt pin read from hardware is out of range: "
-               "value=%i, acceptable range is 1 - 4\n", r_val);
-        r_val = 0;
-    }
-    else
-    {
-        r_val -= 1;
-    }
-
-    return r_val;
+    return 0;
 }
 
 /*


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