int xc_cpuid_apply_policy(xc_interface *xch,
uint32_t domid,
const uint32_t *featureset,
- unsigned int nr_features);
+ unsigned int nr_features, bool pae);
int xc_mca_op(xc_interface *xch, struct xen_mc *mc);
int xc_mca_op_inject_v2(xc_interface *xch, unsigned int flags,
xc_cpumap_t cpumap, unsigned int nr_cpus);
}
int xc_cpuid_apply_policy(xc_interface *xch, uint32_t domid,
- const uint32_t *featureset, unsigned int nr_features)
+ const uint32_t *featureset, unsigned int nr_features,
+ bool pae)
{
int rc;
xc_dominfo_t di;
}
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.
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;
+ p->basic.pae = pae;
/*
* These settings are necessary to cause earlier HVM_PARAM_NESTEDHVM /
libxl_cpuid_policy_list cpuid = info->cpuid;
int i;
char *cpuid_res[4];
+ bool pae = true;
+
+ /*
+ * For PV guests, PAE is Xen-controlled (it is the 'p' that differentiates
+ * the xen-3.0-x86_32 and xen-3.0-x86_32p ABIs). It is mandatory as Xen
+ * is 64bit only these days.
+ *
+ * For PVH guests, there is no top-level PAE control in the domain config,
+ * so is treated as always available.
+ *
+ * HVM guests get a top-level choice of whether PAE is available.
+ */
+ if (info->type == LIBXL_DOMAIN_TYPE_HVM)
+ pae = libxl_defbool_val(info->u.hvm.pae);
- xc_cpuid_apply_policy(ctx->xch, domid, NULL, 0);
+ xc_cpuid_apply_policy(ctx->xch, domid, NULL, 0, pae);
if (!cpuid)
return;