From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: [PATCH] x86/PV: drop pointless conditional from pv_cpuid()'s state leaf logic Date: Wed, 08 Jun 2016 07:24:50 -0600 Message-ID: <575838C202000078000F3146@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartC9FFCBB2.1__=" Return-path: 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 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: xen-devel Cc: Andrew Cooper List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartC9FFCBB2.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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; } =20 --=__PartC9FFCBB2.1__= Content-Type: text/plain; name="x86-PV-CPUID-drop-cond.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-PV-CPUID-drop-cond.patch" x86/PV: drop pointless conditional from pv_cpuid()'s state leaf logic=0A=0A= In the control/hardware domain case without it we simply re-read the=0Asame= value that was put into b near the top of the function.=0A=0ASigned-off-by= : Jan Beulich =0A=0A--- a/xen/arch/x86/traps.c=0A+++ = b/xen/arch/x86/traps.c=0A@@ -1119,8 +1119,7 @@ void pv_cpuid(struct = cpu_user_regs *regs=0A * domain policy. It varies with = enabled xstate, and the correct=0A * xcr0 is in context.=0A = */=0A- if ( !is_control_domain(currd) && !is_hardware= _domain(currd) )=0A- cpuid_count(leaf, subleaf, &tmp, &b, = &tmp, &tmp);=0A+ cpuid_count(leaf, subleaf, &tmp, &b, &tmp, = &tmp);=0A break;=0A }=0A =0A --=__PartC9FFCBB2.1__= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --=__PartC9FFCBB2.1__=--