From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWrjz-0003pe-BP for qemu-devel@nongnu.org; Mon, 08 Aug 2016 17:05:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bWrjv-0005qW-6u for qemu-devel@nongnu.org; Mon, 08 Aug 2016 17:05:42 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:64370 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWrju-0005qQ-Uq for qemu-devel@nongnu.org; Mon, 08 Aug 2016 17:05:39 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u78Kxk0Q024516 for ; Mon, 8 Aug 2016 17:05:38 -0400 Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) by mx0b-001b2d01.pphosted.com with ESMTP id 24n9h0bvxk-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 08 Aug 2016 17:05:38 -0400 Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 8 Aug 2016 15:05:37 -0600 From: Michael Roth Date: Mon, 8 Aug 2016 16:03:49 -0500 In-Reply-To: <1470690267-31454-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1470690267-31454-1-git-send-email-mdroth@linux.vnet.ibm.com> Message-Id: <1470690267-31454-19-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 18/56] vfio: Fix broken EEH List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Gavin Shan , David Gibson From: Gavin Shan vfio_eeh_container_op() is the backend that communicates with host kernel to support EEH functionality in QEMU. However, the functon should return the value from host kernel instead of 0 unconditionally. dwg: Specifically the problem occurs for the handful of EEH sub-operations which can return a non-zero, non-error result. Signed-off-by: Gavin Shan Acked-by: Alex Williamson [dwg: clarification to commit message] Signed-off-by: David Gibson (cherry picked from commit d917e88d85a147a99f38a62a4f95cac21e366d51) Signed-off-by: Michael Roth --- hw/vfio/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index f27db36..e1927a5 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -1147,7 +1147,7 @@ static int vfio_eeh_container_op(VFIOContainer *container, uint32_t op) return -errno; } - return 0; + return ret; } static VFIOContainer *vfio_eeh_as_container(AddressSpace *as) -- 1.9.1