diff mbox

x86/PV: drop pointless conditional from pv_cpuid()'s state leaf logic

Message ID 575838C202000078000F3146@prv-mh.provo.novell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Beulich June 8, 2016, 1:24 p.m. UTC
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>
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;
         }

Comments

Andrew Cooper June 9, 2016, 11:34 a.m. UTC | #1
On 08/06/16 14:24, Jan Beulich wrote:
> 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>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
diff mbox

Patch

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