From patchwork Sat Dec 10 17:59:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sander Eikelenboom X-Patchwork-Id: 9469391 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 49502607EE for ; Sat, 10 Dec 2016 18:02:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3167D27F94 for ; Sat, 10 Dec 2016 18:02:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1534D27F89; Sat, 10 Dec 2016 18:02:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DC0C727F89 for ; Sat, 10 Dec 2016 18:02:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFlvq-000319-63; Sat, 10 Dec 2016 17:59:34 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFlvo-000313-MO for xen-devel@lists.xen.org; Sat, 10 Dec 2016 17:59:32 +0000 Received: from [85.158.143.35] by server-4.bemta-6.messagelabs.com id 64/C0-28568-3824C485; Sat, 10 Dec 2016 17:59:31 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrHLMWRWlGSWpSXmKPExsUSXel4XbfZySf CYP91UYslHxezODB6HN39mymAMYo1My8pvyKBNePE7mMsBRPZK+7sb2JpYGxk62Lk4hASmMwk cfB8D0sXIycHm4C+xIv2tWwgtoiAtMS1z5cZQYqYBToZJRbdOsUIkhAWiJBYs2Y1M4jNIqAq8 ebPdLA4r4CLRMvW22BxCQE5ifPHfzJPYORYwMiwilG9OLWoLLVI10QvqSgzPaMkNzEzR9fQwE wvN7W4ODE9NScxqVgvOT93EyPQLwxAsIOx+7L/IUZJDiYlUd5iJq8IIb6k/JTKjMTijPii0pz U4kOMMhwcShK8Bo4+EUKCRanpqRVpmTnAAIFJS3DwKInwGoKkeYsLEnOLM9MhUqcYdTkOvF/x lEmIJS8/L1VKnNcCpEgApCijNA9uBCxYLzHKSgnzMgIdJcRTkFqUm1mCKv+KUZyDUQmoAmQKT 2ZeCdymV0BHMAEd8XyfN8gRJYkIKakGxkWfp9jM+nh/o+/2XNHXAvM4OQr3fdxTZZMcb276K9 +R5dj2Nx7iO3f7SUXHFrovtGc67vzYPXd25eNr++RNjYz4egp0vvWvOD758e7A/UsvOEX9z+x +Pv3E3ySxG1Kb/l/1XiF5wdmVMbv2f1OTzcPSE3IPf9Tn3Pri2v36ds+Kk5kNYsF/SpRYijMS DbWYi4oTATgB+CZRAgAA X-Env-Sender: linux@eikelenboom.it X-Msg-Ref: server-3.tower-21.messagelabs.com!1481392771!47022980!1 X-Originating-IP: [91.121.65.215] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.1.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 50747 invoked from network); 10 Dec 2016 17:59:31 -0000 Received: from server.eikelenboom.it (HELO server.eikelenboom.it) (91.121.65.215) by server-3.tower-21.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 10 Dec 2016 17:59:31 -0000 Received: from 133-74-ftth.on.nl ([88.159.74.133]:34704 helo=serveerstertje.dyndns.org) by server.eikelenboom.it with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA256:128) (Exim 4.87) (envelope-from ) id 1cFlvw-000H6D-At; Sat, 10 Dec 2016 18:59:40 +0100 From: Sander Eikelenboom To: xen-devel@lists.xen.org Date: Sat, 10 Dec 2016 18:59:08 +0100 Message-Id: <1481392748-26814-1-git-send-email-linux@eikelenboom.it> X-Mailer: git-send-email 2.1.4 Cc: Sander Eikelenboom , Wei Liu , =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= Subject: [Xen-devel] [PATCH] Fix errornous negation for isstubdom, which breaks HVM pci-passthrough. X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Commit 20b75251d9721d9c050a973c02baac396c794ade introduced an errornous negation which gave the isstubdom bool the opposite semantics, causing the subsequent code to take the wrong code path. Signed-off-by: Sander Eikelenboom Acked-by: Wei Liu --- tools/libxl/libxl_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c index 3b707f3..8395352 100644 --- a/tools/libxl/libxl_pci.c +++ b/tools/libxl/libxl_pci.c @@ -1001,7 +1001,7 @@ static int do_pci_add(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcidev, i int irq, i, rc, hvm = 0; uint32_t flag = XEN_DOMCTL_DEV_RDM_RELAXED; uint32_t domainid = domid; - bool isstubdom = !libxl_is_stubdom(ctx, domid, &domainid); + bool isstubdom = libxl_is_stubdom(ctx, domid, &domainid); if (type == LIBXL_DOMAIN_TYPE_INVALID) return ERROR_FAIL;