[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [Qemu-devel] Commit 9e047b982452c633882b486682966c1d97097015 (piix4: add acpi pci hotplug support) seems to break Xen pci-passthrough



On Tue, Feb 04, 2014 at 04:30:24PM +0100, Igor Mammedov wrote:
> On Tue, 4 Feb 2014 16:07:08 +0100
> Sander Eikelenboom <linux@xxxxxxxxxxxxxx> wrote:
> 
> > 
> > Tuesday, February 4, 2014, 3:32:19 PM, you wrote:
> > 
> > > On Tue, Feb 04, 2014 at 12:46:08AM +0100, Sander Eikelenboom wrote:
> > >> Grmbll my fat fingers hit the send shortcut too soon by accident ..
> > >> let's try again ..
> > >> 
> > >> Hi Michael,
> > >> 
> > >> A git bisect turned out that commit 
> > >> 9e047b982452c633882b486682966c1d97097015 breaks pci-passthrough on Xen.
> > >> 
> > >> commit 9e047b982452c633882b486682966c1d97097015
> > >> Author: Michael S. Tsirkin <mst@xxxxxxxxxx>
> > >> Date:   Mon Oct 14 18:01:20 2013 +0300
> > >> 
> > >>     piix4: add acpi pci hotplug support
> > >> 
> > >>     Add support for acpi pci hotplug using the
> > >>     new infrastructure.
> > >>     PIIX4 legacy interface is maintained as is for
> > >>     machine types 1.7 and older.
> > >> 
> > >>     Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
> > >> 
> > >> 
> > >> The error is not very verbose :
> > >> 
> > >> libxl: error: libxl_qmp.c:287:qmp_handle_error_response: received an 
> > >> error message from QMP server: Device initialization failed.
> > >> libxl: error: libxl_qmp.c:287:qmp_handle_error_response: received an 
> > >> error message from QMP server: Device initialization failed.
> > >> libxl: error: libxl_qmp.c:287:qmp_handle_error_response: received an 
> > >> error message from QMP server: Device initialization failed.
> > >> libxl: error: libxl_qmp.c:287:qmp_handle_error_response: received an 
> > >> error message from QMP server: Device initialization failed.
> > >> 
> > >> So it seems there is an issue with preserving the legacy interface.
> > 
> > 
> > > Which machine type is broken?
> > 
> > xenfv
> > 
> > > What's the command line used?
> > 
> > See below the output of the creation of the guest
> > 
> > Strange thing is:
> > char device redirected to /dev/pts/15 (label serial0)
> > vgabios-cirrus.bin: ROM id 101300b8 / PCI id 101300b8
> > efi-e1000.rom: ROM id 8086100e / PCI id 8086100e
> > VNC server running on `127.0.0.1:5900'
> > xen_platform: changed ro/rw state of ROM memory area. now is rw state.
> > [00:05.0] xen_pt_initfn: Assigning real physical device 06:01.0 to devfn 
> > 0x28
> > [00:05.0] xen_pt_register_regions: IO region 0 registered (size=0x00001000 
> > base_addr=0xfe0fd000 type: 0)
> > [00:05.0] xen_pt_pci_intx: intx=1
> > [00:05.0] xen_pt_initfn: Real physical device 06:01.0 registered 
> > successfully!
> > [00:05.0] xen_pt_pci_intx: intx=1
> > [00:05.0] xen_pt_initfn: Assigning real physical device 06:01.1 to devfn 
> > 0x28
> > [00:05.0] xen_pt_register_regions: IO region 0 registered (size=0x00001000 
> > base_addr=0xfe0fe000 type: 0)
> > [00:05.0] xen_pt_pci_intx: intx=2
> > [00:05.0] xen_pt_initfn: Real physical device 06:01.1 registered 
> > successfully!
> > [00:05.0] xen_pt_pci_intx: intx=2
> > [00:05.0] xen_pt_initfn: Assigning real physical device 06:01.2 to devfn 
> > 0x28
> > [00:05.0] xen_pt_register_regions: IO region 0 registered (size=0x00000100 
> > base_addr=0xfe0ffc00 type: 0)
> > [00:05.0] xen_pt_pci_intx: intx=3
> > [00:05.0] xen_pt_initfn: Real physical device 06:01.2 registered 
> > successfully!
> > [00:05.0] xen_pt_pci_intx: intx=3
> > [00:05.0] xen_pt_initfn: Assigning real physical device 08:00.0 to devfn 
> > 0x28
> > [00:05.0] xen_pt_register_regions: IO region 0 registered (size=0x00200000 
> > base_addr=0xfe200000 type: 0x4)
> > [00:05.0] xen_pt_pci_intx: intx=1
> > [00:05.0] xen_pt_initfn: Real physical device 08:00.0 registered 
> > successfully!
> > [00:05.0] xen_pt_pci_intx: intx=1
> > [00:05.0] xen_pt_msi_set_enable: disabling MSI.
> > 
> > It's does log succes for registering the pci devices .. however it returns 
> > by qmp that the device initialization failed.
> > And an lspci in the guest also doesn't show the devices.
> > 
> > > What's the value of has_acpi_build in hw/i386/pc_piix.c?
> > static bool has_acpi_build = true;
> > 
> > > What happens if you add
> > > -global PIIX4_PM.acpi-pci-hotplug-with-bridge-support=off
> > 
> > That makes it work again ...
> looks like missing bsel property,
> could you run qemu with following debug patch to make sure that it's the case:
> (run without -global PIIX4_PM.acpi-pci-hotplug-with-bridge-support=off)
> 
> diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c
> index 4345f5d..fc72cc9 100644
> --- a/hw/acpi/pcihp.c
> +++ b/hw/acpi/pcihp.c
> @@ -192,6 +192,7 @@ int acpi_pcihp_device_hotplug(AcpiPciHpState *s, PCIDevice
> *dev, {
>      int slot = PCI_SLOT(dev->devfn);
>      int bsel = acpi_pcihp_get_bsel(dev->bus);
> +    fprintf(stderr, "bsel: %d, bus: %s\n", bsel, dev->bus->qbus.name);
>      if (bsel < 0) {
>          return -1;
>      }

And if this is the issue, take a look at
acpi_set_pci_info: does find_i440fx fail
for Xen?

-- 
MST

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.