Skip to contentSkip to conversation

qemu-xen: pass-through: Allow slots 1e and 1f to be used

PATCH In review Simon Horman 2 participants 3 messages Mar 31, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-xen: pass-through: Allow slots 1e and 1f to be used

This fixes an oversight in my recent patch "Allow any unused PCI device to be used for pass-through" whereby attempts to use slots 1e and 1f for pass-through would silently fail.

* This affects both static and manual selection of slots
* This affects both hot-plug and static pass-through

---

Please consider for inclusion in 3.4

hw/piix4acpi.c +2 -2
Index: ioemu-remote/hw/piix4acpi.c
===================================================================
@@ -320,9 +320,9 @@ static void php_slots_init(void)
     }
 
     /* ACPI PCI hotplug controller */
-    register_ioport_read(ACPI_PHP_IO_ADDR, NR_PCI_DEV, 1,
+    register_ioport_read(ACPI_PHP_IO_ADDR, NR_PCI_DEV + 2, 1,
                          acpi_php_readb, &php_slots);
-    register_ioport_write(ACPI_PHP_IO_ADDR, NR_PCI_DEV, 1,
+    register_ioport_write(ACPI_PHP_IO_ADDR, NR_PCI_DEV + 2, 1,
                           acpi_php_writeb, &php_slots);
     register_savevm("pcislots", 0, 1, pcislots_save, pcislots_load,
                     &php_slots);
#1 lore raw
Quoted 21 lines · Simon Horman

This fixes an oversight in my recent patch "Allow any unused PCI device to be used for pass-through" whereby attempts to use slots 1e and 1f for pass-through would silently fail.

* This affects both static and manual selection of slots
* This affects both hot-plug and static pass-through

---

Please consider for inclusion in 3.4

Index: ioemu-remote/hw/piix4acpi.c
===================================================================
--- ioemu-remote.orig/hw/piix4acpi.c 2009-03-31 18:21:29.000000000
+1100 +++ ioemu-remote/hw/piix4acpi.c 2009-03-31 18:22:23.000000000
+1100 @@ -320,9 +320,9 @@ static void php_slots_init(void)

     }

     /* ACPI PCI hotplug controller */

hw/piix4acpi.c static void php_slots_init(void) · line 328

Quoted 8 lines
hw/piix4acpi.c +2 -2
-    register_ioport_read(ACPI_PHP_IO_ADDR, NR_PCI_DEV, 1,
+    register_ioport_read(ACPI_PHP_IO_ADDR, NR_PCI_DEV + 2, 1,
                          acpi_php_readb, &php_slots);
-    register_ioport_write(ACPI_PHP_IO_ADDR, NR_PCI_DEV, 1,
+    register_ioport_write(ACPI_PHP_IO_ADDR, NR_PCI_DEV + 2, 1,
                           acpi_php_writeb, &php_slots);
     register_savevm("pcislots", 0, 1, pcislots_save, pcislots_load,
                     &php_slots);

Hi Simon,
Please send another patch to reserve the IO range in DSDT. You may have a look at changeset 18951 as a reference. :-)

Thanks!

-- Dexuan

#2 lore raw
Quoted 31 lines · Dexuan
Quoted 21 lines · Simon Horman

This fixes an oversight in my recent patch "Allow any unused PCI device to be used for pass-through" whereby attempts to use slots 1e and 1f for pass-through would silently fail.

* This affects both static and manual selection of slots
* This affects both hot-plug and static pass-through

---

Please consider for inclusion in 3.4

Index: ioemu-remote/hw/piix4acpi.c
===================================================================
--- ioemu-remote.orig/hw/piix4acpi.c 2009-03-31 18:21:29.000000000
+1100 +++ ioemu-remote/hw/piix4acpi.c 2009-03-31 18:22:23.000000000
+1100 @@ -320,9 +320,9 @@ static void php_slots_init(void)

     }

     /* ACPI PCI hotplug controller */

hw/piix4acpi.c static void php_slots_init(void) · line 328

Quoted 8 lines
hw/piix4acpi.c +2 -2
-    register_ioport_read(ACPI_PHP_IO_ADDR, NR_PCI_DEV, 1,
+    register_ioport_read(ACPI_PHP_IO_ADDR, NR_PCI_DEV + 2, 1,
                          acpi_php_readb, &php_slots);
-    register_ioport_write(ACPI_PHP_IO_ADDR, NR_PCI_DEV, 1,
+    register_ioport_write(ACPI_PHP_IO_ADDR, NR_PCI_DEV + 2, 1,
                           acpi_php_writeb, &php_slots);
     register_savevm("pcislots", 0, 1, pcislots_save, pcislots_load,
                     &php_slots);
Quoted 3 lines

Hi Simon,
Please send another patch to reserve the IO range in DSDT. You may have a look at changeset 18951 as a reference. :-)

Hi Dexuan,

Thanks for pointing that out. I will send another patch shortly.

Signature · 3 lines
Simon Horman
  VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
  H: www.vergenet.net/~horms/             W: www.valinux.co.jp/en