[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Xen PCI passthrough: fix passthrough failure wh
From: |
Zhao, Yan Y |
Subject: |
Re: [Qemu-devel] [PATCH] Xen PCI passthrough: fix passthrough failure when irq map failure |
Date: |
Thu, 18 Oct 2018 08:22:41 +0000 |
Hi
The background for this patch is that: for some pci device, even it's
PCI_INTERRUPT_PIN is not 0, it actually does not support INTx mode, so we
should just report error, disable INTx mode and continue the passthrough.
However, the commit 5a11d0f7 regards this as error condition and let qemu quit
passthrough, which is too rigorous.
Error message is below:
libxl: error: libxl_qmp.c:287:qmp_handle_error_response: Domain 2:received an
error message from QMP server: Mapping machine irq 0 to pirq -1 failed:
Operation not permitted
libxl: error: libxl_pci.c:1306:libxl__add_pcidevs: Domain
2:libxl_device_pci_add failed: -3
libxl: error: libxl_create.c:1458:domcreate_attach_devices: Domain 2:unable to
add pci devices
libxl: error: libxl_domain.c:1003:libxl__destroy_domid: Domain 2:Non-existant
domain
libxl: error: libxl_domain.c:962:domain_destroy_callback: Domain 2:Unable to
destroy guest
libxl: error: libxl_domain.c:889:domain_destroy_cb: Domain 2:Destruction of
domain failed
After partially revert 5a11d0f7, the device can be passed through into domU and
running quite well using msi mode.
> -----Original Message-----
> From: Zhao, Yan Y
> Sent: Tuesday, October 16, 2018 10:15 AM
> To: address@hidden; address@hidden;
> address@hidden; address@hidden
> Cc: Zhao, Yan Y <address@hidden>
> Subject: [PATCH] Xen PCI passthrough: fix passthrough failure when irq map
> failure
>
> Commit 5a11d0f7 mistakenly converted a log message into an error condition
> when irq map is failed for the pci device being passed through. Revert that
> part
> of the commit.
>
> Signed-off-by: Zhao Yan <address@hidden>
> ---
> hw/xen/xen_pt.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index e5a6eff44f..840fd0f748
> 100644
> --- a/hw/xen/xen_pt.c
> +++ b/hw/xen/xen_pt.c
> @@ -849,7 +849,7 @@ static void xen_pt_realize(PCIDevice *d, Error **errp)
> machine_irq = s->real_device.irq;
> rc = xc_physdev_map_pirq(xen_xc, xen_domid, machine_irq, &pirq);
> if (rc < 0) {
> - error_setg_errno(errp, errno, "Mapping machine irq %u to"
> + XEN_PT_ERR(d, "Mapping machine irq %u to"
> " pirq %i failed", machine_irq, pirq);
>
> /* Disable PCI intx assertion (turn on bit10 of devctl) */ @@ -871,7
> +871,7
> @@ static void xen_pt_realize(PCIDevice *d, Error **errp)
> PCI_SLOT(d->devfn),
> e_intx);
> if (rc < 0) {
> - error_setg_errno(errp, errno, "Binding of interrupt %u failed",
> + XEN_PT_ERR(d, "Binding of interrupt %u failed",
> e_intx);
>
> /* Disable PCI intx assertion (turn on bit10 of devctl) */
> --
> 2.17.1