[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/6] pci-assign: Add support for no-route
From: |
Anthony Liguori |
Subject: |
Re: [Qemu-devel] [PATCH 2/6] pci-assign: Add support for no-route |
Date: |
Tue, 02 Oct 2012 14:55:53 -0500 |
User-agent: |
Notmuch/0.13.2+93~ged93d79 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) |
Alex Williamson <address@hidden> writes:
> In the event that a pci-assign device is added to a chipset that
> hasn't yet implemented the INTx routing interface, exit gracefully
> instead of killing the VM. I'm sure we'll implement this for q35,
> but there's no reason for such a harsh response.
>
> Signed-off-by: Alex Williamson <address@hidden>
> ---
>
> hw/kvm/pci-assign.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/hw/kvm/pci-assign.c b/hw/kvm/pci-assign.c
> index 05b93d9..7ce0f37 100644
> --- a/hw/kvm/pci-assign.c
> +++ b/hw/kvm/pci-assign.c
> @@ -887,6 +887,12 @@ static int assign_intx(AssignedDevice *dev)
>
> intx_route = pci_device_route_intx_to_irq(&dev->dev, dev->intpin);
> assert(intx_route.mode != PCI_INTX_INVERTED);
> + if (intx_route.mode == PCI_INTX_NOROUTE) {
> + error_report("pci-assign: chipset provides no INTx routing "
> + "information, but device supports INTx interrupt
> mode.\n");
> + pci_device_set_intx_routing_notifier(&dev->dev, NULL);
> + return -ENOTSUP;
> + }
Please don't use error_report() in new code. Propagate an Error object
using error_setg() and friends.
Regards,
Anthony Liguori
>
> if (dev->intx_route.mode == intx_route.mode &&
> dev->intx_route.irq == intx_route.irq) {
[Qemu-devel] [PATCH 3/6] pci: Helper function for testing if an INTx route changed, Alex Williamson, 2012/10/02
[Qemu-devel] [PATCH 4/6] pci-assign: Use pci_intx_route_changed(), Alex Williamson, 2012/10/02
[Qemu-devel] [PATCH 5/6] msi: Add msi_get_message(), Alex Williamson, 2012/10/02
[Qemu-devel] [PATCH 6/6] pci-assign: Use msi_get_message(), Alex Williamson, 2012/10/02
Re: [Qemu-devel] [PATCH 0/6] Misc PCI cleanups, Alex Williamson, 2012/10/08