From patchwork Thu Apr 28 09:32:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 8967371 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 259909F441 for ; Thu, 28 Apr 2016 09:35:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 57A3420109 for ; Thu, 28 Apr 2016 09:35:04 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id B31E420219 for ; Thu, 28 Apr 2016 09:34:59 +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 1aviJY-0003Q1-33; Thu, 28 Apr 2016 09:32:52 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aviJW-0003Pt-PX for xen-devel@lists.xenproject.org; Thu, 28 Apr 2016 09:32:50 +0000 Received: from [193.109.254.147] by server-9.bemta-14.messagelabs.com id A2/0D-02960-2C8D1275; Thu, 28 Apr 2016 09:32:50 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrFIsWRWlGSWpSXmKPExsXS6fjDS/fgDcV wg19fpS2+b5nM5MDocfjDFZYAxijWzLyk/IoE1oydR5cwFezmq1j0bTprA+Nl7i5GTg4hgTyJ zg8r2UFsXgE7iVP/9jKC2BIChhL75q9iA7FZBFQlVrzYygpiswmoS7Q92w5kc3CICBhInDuaB BJmFvCTWHWgBaxVWMBK4vL0w6wQ4+0kJrXeYgQp5xSwl1j9hBfE5BUQlPi7Qxii005i/p1HjB MYeWYhZGYhyUDYWhIPf91igbC1JZYtfM0MUs4sIC2x/B8HhOkoMfGBAaoKENtHovXzf+YFjBy rGNWLU4vKUot0TfWSijLTM0pyEzNzdA0NTfRyU4uLE9NTcxKTivWS83M3MQLDlAEIdjCuW+x8 iFGSg0lJlLfrkGK4EF9SfkplRmJxRnxRaU5q8SFGGQ4OJQleLmDYCwkWpaanVqRl5gAjBiYtw cGjJMJ78jpQmre4IDG3ODMdInWKUVFKnPciSEIAJJFRmgfXBovSS4yyUsK8jECHCPEUpBblZp agyr9iFOdgVBLmPQcyhSczrwRu+iugxUxAiwU2gS0uSURISTUw3v60derfd1o9v3yyL83hlP5 2xHyT+sk5E9JmHyt8fFtqmmvRTv2KuOIHGv2X5zDOmTt3X5axHsPqh7fVztsmCGwV+HPuxhzu yjKxSRrf3k3ayFH/Ud8/6yi/Q5Og/ZvYrIenDNO2bl08c+mfeW8/ZxqkHlnvkBjTsGkZH4saZ 5ufjkMqd0qPhRJLcUaioRZzUXEiAMWm7VDNAgAA X-Env-Sender: JBeulich@suse.com X-Msg-Ref: server-11.tower-27.messagelabs.com!1461835967!29712624!1 X-Originating-IP: [137.65.248.74] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 30975 invoked from network); 28 Apr 2016 09:32:48 -0000 Received: from prv-mh.provo.novell.com (HELO prv-mh.provo.novell.com) (137.65.248.74) by server-11.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 28 Apr 2016 09:32:48 -0000 Received: from INET-PRV-MTA by prv-mh.provo.novell.com with Novell_GroupWise; Thu, 28 Apr 2016 03:32:46 -0600 Message-Id: <5721F4E202000078000E6AC7@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.0 Date: Thu, 28 Apr 2016 03:32:50 -0600 From: "Jan Beulich" To: "xen-devel" References: <5721F23302000078000E6AA4@prv-mh.provo.novell.com> In-Reply-To: <5721F23302000078000E6AA4@prv-mh.provo.novell.com> Mime-Version: 1.0 Cc: Paul Durrant , Wei Liu Subject: [Xen-devel] [PATCH 1/2] x86/HVM: fix emulation re-issue check 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: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 ?: has lower precedence than !=, hence parentheses are required here. Signed-off-by: Jan Beulich x86/HVM: fix emulation re-issue check ?: has lower precedence than !=, hence parentheses are required here. Signed-off-by: Jan Beulich --- a/xen/arch/x86/hvm/emulate.c +++ b/xen/arch/x86/hvm/emulate.c @@ -134,7 +134,7 @@ static int hvmemul_do_io( p = vio->io_req; /* Verify the emulation request has been correctly re-issued */ - if ( (p.type != is_mmio ? IOREQ_TYPE_COPY : IOREQ_TYPE_PIO) || + if ( (p.type != (is_mmio ? IOREQ_TYPE_COPY : IOREQ_TYPE_PIO)) || (p.addr != addr) || (p.size != size) || (p.count != *reps) || Reviewed-by: Andrew Cooper --- a/xen/arch/x86/hvm/emulate.c +++ b/xen/arch/x86/hvm/emulate.c @@ -134,7 +134,7 @@ static int hvmemul_do_io( p = vio->io_req; /* Verify the emulation request has been correctly re-issued */ - if ( (p.type != is_mmio ? IOREQ_TYPE_COPY : IOREQ_TYPE_PIO) || + if ( (p.type != (is_mmio ? IOREQ_TYPE_COPY : IOREQ_TYPE_PIO)) || (p.addr != addr) || (p.size != size) || (p.count != *reps) ||