From patchwork Tue Oct 2 19:21:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 188638 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6377A2C00A0 for ; Wed, 3 Oct 2012 05:22:29 +1000 (EST) Received: from localhost ([::1]:57368 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJ831-0005hm-FN for incoming@patchwork.ozlabs.org; Tue, 02 Oct 2012 15:22:27 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJ82V-0004VQ-DF for qemu-devel@nongnu.org; Tue, 02 Oct 2012 15:21:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJ82P-00027N-K1 for qemu-devel@nongnu.org; Tue, 02 Oct 2012 15:21:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41216) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJ82P-00027F-BT for qemu-devel@nongnu.org; Tue, 02 Oct 2012 15:21:49 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q92JLmf6006845 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 2 Oct 2012 15:21:48 -0400 Received: from bling.home (ovpn-113-153.phx2.redhat.com [10.3.113.153]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q92JLmbu004230; Tue, 2 Oct 2012 15:21:48 -0400 From: Alex Williamson To: mst@redhat.com, qemu-devel@nongnu.org Date: Tue, 02 Oct 2012 13:21:48 -0600 Message-ID: <20121002192147.31100.41594.stgit@bling.home> In-Reply-To: <20121002191609.31100.77382.stgit@bling.home> References: <20121002191609.31100.77382.stgit@bling.home> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: jan.kiszka@siemens.com, alex.williamson@redhat.com Subject: [Qemu-devel] [PATCH 2/6] pci-assign: Add support for no-route X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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; + } if (dev->intx_route.mode == intx_route.mode && dev->intx_route.irq == intx_route.irq) {