From patchwork Wed Jun 8 13:24: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: 9164609 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 CB280604DB for ; Wed, 8 Jun 2016 13:27:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB13D28047 for ; Wed, 8 Jun 2016 13:27:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD6A5281F9; Wed, 8 Jun 2016 13:27:14 +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 9833F28047 for ; Wed, 8 Jun 2016 13:27:13 +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 1bAdTd-0003i5-RJ; Wed, 08 Jun 2016 13:24:57 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAdTc-0003hy-Ly for xen-devel@lists.xenproject.org; Wed, 08 Jun 2016 13:24:56 +0000 Received: from [193.109.254.147] by server-6.bemta-14.messagelabs.com id 6D/E1-31829-7AC18575; Wed, 08 Jun 2016 13:24:55 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrHIsWRWlGSWpSXmKPExsXS6fjDS3e5TES 4Qf9DPovvWyYzOTB6HP5whSWAMYo1My8pvyKBNWPdwitsBS/5K359eczawLidp4uRg0NIIE+i f4ISiMkrYCfxZUZwFyMnh4SAocS++avYQGwWAVWJCadeMoHYbALqEm3PtrOClIsIGEicO5oEY jIL6EtsW8cCUiEsEC7RsegtC8RAQYm/O4RBwsxAsw9OXcQ8gZFrFkJmFpIMhK0l8fDXLRYIW1 ti2cLXzLPA5ktLLP/HARG2lXj5+T4zqhIQ20Niy482tgWMHKsYNYpTi8pSi3QNTfWSijLTM0p yEzNzdA0NTfRyU4uLE9NTcxKTivWS83M3MQLDrp6BgXEH49/TnocYJTmYlER5Fd3Dw4X4kvJT KjMSizPii0pzUosPMWpwcAhs27X6AqMUS15+XqqSBO9U6YhwIcGi1PTUirTMHGBkwJRKcPAoi fB+lwJK8xYXJOYWZ6ZDpE4xKkqJ884F6RMASWSU5sG1waLxEqOslDAvIwMDgxBPQWpRbmYJqv wrRnEORiVh3v0gU3gy80rgpr8CWswEtHj5kXCQxSWJCCmpBsb0EN+U9BN7dxzuEef5/e97fJB gwYGXd8XnKmxkDrM8c+roFu2flTm3bB9/ffjg0PKzXgVVTotXF5zZ8Mkv9IL9fYXpuQd2JvS+ POLg4Tz36M/eI1zbHWIcWM6VbpVdc+nrGwkfoTldPtYGvGslHQx4ws5viVI6z8H6/u2WWw/WJ aftrBFf7t+ixFKckWioxVxUnAgAZV73CsECAAA= X-Env-Sender: JBeulich@suse.com X-Msg-Ref: server-6.tower-27.messagelabs.com!1465392292!46597217!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.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 58051 invoked from network); 8 Jun 2016 13:24:54 -0000 Received: from prv-mh.provo.novell.com (HELO prv-mh.provo.novell.com) (137.65.248.74) by server-6.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 8 Jun 2016 13:24:54 -0000 Received: from INET-PRV-MTA by prv-mh.provo.novell.com with Novell_GroupWise; Wed, 08 Jun 2016 07:24:52 -0600 Message-Id: <575838C202000078000F3146@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.0 Date: Wed, 08 Jun 2016 07:24:50 -0600 From: "Jan Beulich" To: "xen-devel" Mime-Version: 1.0 Cc: Andrew Cooper Subject: [Xen-devel] [PATCH] x86/PV: drop pointless conditional from pv_cpuid()'s state leaf logic 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-Virus-Scanned: ClamAV using ClamSMTP In the control/hardware domain case without it we simply re-read the same value that was put into b near the top of the function. Signed-off-by: Jan Beulich x86/PV: drop pointless conditional from pv_cpuid()'s state leaf logic In the control/hardware domain case without it we simply re-read the same value that was put into b near the top of the function. Signed-off-by: Jan Beulich --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -1119,8 +1119,7 @@ void pv_cpuid(struct cpu_user_regs *regs * domain policy. It varies with enabled xstate, and the correct * xcr0 is in context. */ - if ( !is_control_domain(currd) && !is_hardware_domain(currd) ) - cpuid_count(leaf, subleaf, &tmp, &b, &tmp, &tmp); + cpuid_count(leaf, subleaf, &tmp, &b, &tmp, &tmp); break; } Reviewed-by: Andrew Cooper --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -1119,8 +1119,7 @@ void pv_cpuid(struct cpu_user_regs *regs * domain policy. It varies with enabled xstate, and the correct * xcr0 is in context. */ - if ( !is_control_domain(currd) && !is_hardware_domain(currd) ) - cpuid_count(leaf, subleaf, &tmp, &b, &tmp, &tmp); + cpuid_count(leaf, subleaf, &tmp, &b, &tmp, &tmp); break; }