xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/PV: drop pointless conditional from pv_cpuid()'s state leaf logic
@ 2016-06-08 13:24 Jan Beulich
  2016-06-09 11:34 ` Andrew Cooper
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2016-06-08 13:24 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper

[-- Attachment #1: Type: text/plain, Size: 690 bytes --]

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 <jbeulich@suse.com>

--- 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;
         }
 




[-- Attachment #2: x86-PV-CPUID-drop-cond.patch --]
[-- Type: text/plain, Size: 757 bytes --]

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 <jbeulich@suse.com>

--- 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;
         }
 

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-09 11:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-08 13:24 [PATCH] x86/PV: drop pointless conditional from pv_cpuid()'s state leaf logic Jan Beulich
2016-06-09 11:34 ` Andrew Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).