From: "Michael S. Tsirkin" <mst@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: Anthony PERARD <anthony.perard@citrix.com>,
Sander Eikelenboom <linux@eikelenboom.it>,
Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [Qemu-devel] Commit 9e047b982452c633882b486682966c1d97097015 (piix4: add acpi pci hotplug support) seems to break Xen pci-passthrough
Date: Tue, 4 Feb 2014 17:49:57 +0200 [thread overview]
Message-ID: <20140204154957.GE8617@redhat.com> (raw)
In-Reply-To: <20140204163024.2042e8d3@thinkpad>
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@eikelenboom.it> 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@redhat.com>
> > >> 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@redhat.com>
> > >>
> > >>
> > >> 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
prev parent reply other threads:[~2014-02-04 18:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-03 23:46 [Qemu-devel] Commit 9e047b982452c633882b486682966c1d97097015 (piix4: add acpi pci hotplug support) seems to break Xen pci-passthrough Sander Eikelenboom
2014-02-04 14:32 ` Michael S. Tsirkin
2014-02-04 15:07 ` Sander Eikelenboom
2014-02-04 15:16 ` Igor Mammedov
2014-02-04 15:30 ` Igor Mammedov
2014-02-04 15:49 ` Michael S. Tsirkin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140204154957.GE8617@redhat.com \
--to=mst@redhat.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=anthony.perard@citrix.com \
--cc=imammedo@redhat.com \
--cc=linux@eikelenboom.it \
--cc=qemu-devel@nongnu.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).