[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH for 4.9 and older] x86: don't enable XPTI on idle domain



While the involved code (in pv_domain_initialise()) sits behind an
!is_idle_domain() check already, we need to add one here.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
The further backport to 4.8 and older is going to look quite a bit
different; a one-liner looks to suffice there.

--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -714,20 +714,15 @@ int arch_domain_create(struct domain *d,
         if ( (rc = hvm_domain_initialise(d)) != 0 )
             goto fail;
     }
-    else
+    else if ( !is_idle_domain(d) )
     {
         static const struct arch_csw pv_csw = {
             .from = paravirt_ctxt_switch_from,
             .to   = paravirt_ctxt_switch_to,
             .tail = continue_nonidle_domain,
         };
-        static const struct arch_csw idle_csw = {
-            .from = paravirt_ctxt_switch_from,
-            .to   = paravirt_ctxt_switch_to,
-            .tail = continue_idle_domain,
-        };
 
-        d->arch.ctxt_switch = is_idle_domain(d) ? &idle_csw : &pv_csw;
+        d->arch.ctxt_switch = &pv_csw;
 
         /* 64-bit PV guest by default. */
         d->arch.is_32bit_pv = d->arch.has_32bit_shinfo = 0;
@@ -758,6 +753,16 @@ int arch_domain_create(struct domain *d,
                 break;
             }
     }
+    else
+    {
+        static const struct arch_csw idle_csw = {
+            .from = paravirt_ctxt_switch_from,
+            .to   = paravirt_ctxt_switch_to,
+            .tail = continue_idle_domain,
+        };
+
+        d->arch.ctxt_switch = &idle_csw;
+    }
 
     /* initialize default tsc behavior in case tools don't */
     tsc_set_info(d, TSC_MODE_DEFAULT, 0UL, 0, 0);





_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.