From patchwork Fri Mar 27 08:48:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wanpeng Li X-Patchwork-Id: 6104291 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7CC5EBF90F for ; Fri, 27 Mar 2015 09:07:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ADCEA203DB for ; Fri, 27 Mar 2015 09:07:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 735DD203F7 for ; Fri, 27 Mar 2015 09:07:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932142AbbC0JHK (ORCPT ); Fri, 27 Mar 2015 05:07:10 -0400 Received: from mga09.intel.com ([134.134.136.24]:6417 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752724AbbC0JHI (ORCPT ); Fri, 27 Mar 2015 05:07:08 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 27 Mar 2015 02:07:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,477,1422950400"; d="scan'208";a="705004313" Received: from kernel.bj.intel.com ([10.238.154.97]) by orsmga002.jf.intel.com with ESMTP; 27 Mar 2015 02:07:04 -0700 From: Wanpeng Li To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Alex Williamson , Paolo Bonzini , Wanpeng Li Subject: [PATCH] kvm: vfio: fix fail to set error notification Date: Fri, 27 Mar 2015 16:48:43 +0800 Message-Id: <1427446123-11203-1-git-send-email-wanpeng.li@linux.intel.com> X-Mailer: git-send-email 1.9.1 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP After commit 6140a8f56238 ("vfio-pci: Add device request interface") merged, there is error dump when run guest as below: qemu-system-x86_64 -enable-kvm -m 2G -smp 2 -net none /root/cathy/rhel6u5.qcow -device vfio-pci,host=03:10.5 qemu-system-x86_64: -device vfio-pci,host=03:10.5: vfio: Failed to set up error notification This is caused by missing one break, this patch fix it. Reported-and-tested-by: Liu Rongrong Signed-off-by: Wanpeng Li --- drivers/vfio/pci/vfio_pci_intrs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c index f88bfdf..d1b6845 100644 --- a/drivers/vfio/pci/vfio_pci_intrs.c +++ b/drivers/vfio/pci/vfio_pci_intrs.c @@ -868,6 +868,7 @@ int vfio_pci_set_irqs_ioctl(struct vfio_pci_device *vdev, uint32_t flags, func = vfio_pci_set_err_trigger; break; } + break; case VFIO_PCI_REQ_IRQ_INDEX: switch (flags & VFIO_IRQ_SET_ACTION_TYPE_MASK) { case VFIO_IRQ_SET_ACTION_TRIGGER: