]> xenbits.xensource.com Git - xen.git/commitdiff
tools/libxc: Fix HVM_PARAM_PAE_ENABLED handling in xc_cpuid_apply_policy()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 20 Dec 2019 15:26:00 +0000 (15:26 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 27 Dec 2019 14:10:53 +0000 (14:10 +0000)
Despite as suggested in c/s 685e922d6f3, not all HVM_PARAMs are handled
in the same way.  HVM_PARAM_PAE_ENABLED is a toolstack-only value, and
the xc_cpuid_apply_policy() used to be the only consumer.

Reinstate the old behaviour (mad as it is) to avoid regressions.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
tools/libxc/xc_cpuid_x86.c

index 519d6d8bd015dec38dcd82770b9b7f1b0e57414f..2540aa1e1c3070f85b4dc63fad4e39c864564e24 100644 (file)
@@ -579,6 +579,8 @@ int xc_cpuid_apply_policy(xc_interface *xch, uint32_t domid,
     }
     else
     {
+        uint64_t val;
+
         /*
          * Topology for HVM guests is entirely controlled by Xen.  For now, we
          * hardcode APIC_ID = vcpu_id * 2 to give the illusion of no SMT.
@@ -632,6 +634,16 @@ int xc_cpuid_apply_policy(xc_interface *xch, uint32_t domid,
             break;
         }
 
+        /*
+         * HVM_PARAM_PAE_ENABLED is a parameter to this function, stashed in
+         * Xen.  Nothing else has ever taken notice of the value.
+         */
+        rc = xc_hvm_param_get(xch, domid, HVM_PARAM_PAE_ENABLED, &val);
+        if ( rc )
+            goto out;
+
+        p->basic.pae = val;
+
         /*
          * These settings are necessary to cause earlier HVM_PARAM_NESTEDHVM /
          * XEN_DOMCTL_disable_migrate settings to be reflected correctly in