]> xenbits.xensource.com Git - qemu-xen-unstable.git/commitdiff
passthrough: Use physical INTX for virtual PCI functions
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 4 Aug 2009 14:25:30 +0000 (15:25 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 4 Aug 2009 14:25:30 +0000 (15:25 +0100)
Allow virtual functions to use the legacy interrupt pin of the
corresponding physical device.  This is already half-implemented
by the code that uses pci_read_intx() in pass-through.c. This fills
in a missing piece.

An alternate solution is to reverse the previously applied pci_read_intx()
code and revert to always using INTA. However, that seems likely to lead to
excessive sharing of interrupt pins when multi-function pass-through is
used.

Tested-by: Tom Rotenberg <tom.rotenberg@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
hw/pass-through.c

index f3d033b95773ab71363050c395d0a08625486746..fcc1bb62a6540b49ee2a07a54b280f2417ca09a7 100644 (file)
@@ -2617,13 +2617,7 @@ static uint32_t pt_status_reg_init(struct pt_dev *ptdev,
 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 */