|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Deprecating HVM_PARAM_PAE_ENABLED
On 10/07/18 09:51, Jan Beulich wrote:
>>>> On 09.07.18 at 18:54, <andrew.cooper3@xxxxxxxxxx> wrote:
>> The parameter was introduced in e661d66f51 (2006) and used in Xen, but
>> removed from the hypervisor in c/s 5f14a87ce (2008) when CPUID
>> calculations where moved from the hypervisor into libxc.
>>
>> However, the field has always been propagated in the migration stream.
>> AFAICT, the only use for the HVM_PARAM is as a function parameter to
>> xc_cpuid_apply_policy(), which is a very very expensive way of passing a
>> function parameter!
>>
>> Another curiosity is that HVM and PVH guests treat the toplevel xl.cfg
>> pae boolean differently. HVM honour the request, while PVH blindly
>> ignores it and sets it to true. There is nothing wrong (in principle)
>> with a PVH non-PAE guest, so the boolean should be honoured IMO.
>>
>> A separate usability niggle is that there is no interlink between the
>> toplevel pae boolean and passing some custom cpuid= configuration. The
>> latter appears to take priority but only due to the order in which libxl
>> processes the data.
>>
>> Does anyone see any reason to keep HVM_PARAM_PAE_ENABLED around?
> Fundamentally - no. What is the plan to communicate the guest config
> "pae=" value from libxl to libxc then?
This is very pre-release atm (and I believe, a little out of date, but
it does illustrate the point):
diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
index 92ec0c6..61832ee 100644
--- a/tools/libxc/include/xenctrl.h
+++ b/tools/libxc/include/xenctrl.h
@@ -1838,6 +1838,47 @@ int xc_cpuid_apply_policy(xc_interface *xch,
uint32_t domid,
uint32_t *featureset,
unsigned int nr_features);
+/*
+ * Combined CPUID and MSR policy interface. The internal representation is
+ * opaque but can be serialised to an x86 architectural representation.
+ */
+typedef struct xc_cpu_policy xc_cpu_policy_t;
+
+/* Create and free a xc_cpu_policy object. */
+xc_cpu_policy_t *xc_cpu_policy_init(void);
+void xc_cpu_policy_free(xc_cpu_policy_t *policy);
+
+/* Retrieve a system policy, or get/set a domains policy. */
+int xc_cpu_policy_get_system(xc_interface *xch, unsigned int idx,
+ xc_cpu_policy_t *policy);
+int xc_cpu_policy_get_domain(xc_interface *xch, uint32_t domid,
+ xc_cpu_policy_t *policy);
+int xc_cpu_policy_set_domain(xc_interface *xch, uint32_t domid,
+ const xc_cpu_policy_t *policy);
+
+/* Manipulate a policy via architectural representations. */
+int xc_cpu_policy_max_sizes(size_t *nr_cpuid, size_t *nr_msrs);
+int xc_cpu_policy_serialise(const xc_cpu_policy_t *policy,
+ xen_cpuid_leaf_t *leaves, size_t *nr_leaves,
+ xen_msr_entry_t *msrs, size_t *nr_msrs);
+int xc_cpu_policy_get_cpuid(const xc_cpu_policy_t *policy,
+ unsigned int leaf, unsigned int subleaf,
+ xen_cpuid_leaf_t *out);
+int xc_cpu_policy_get_msr(const xc_cpu_policy_t *policy,
+ unsigned int msr, xen_msr_entry_t *out);
+int xc_cpu_policy_update_cpuid(xc_cpu_policy_t *policy,
+ const xen_cpuid_leaf_t *leaves,
+ size_t nr_leaves);
+int xc_cpu_policy_update_msrs(xc_cpu_policy_t *policy,
+ const xen_msr_entry_t *msrs, size_t nr_msrs);
+
+/* Compatibility calculations. */
+bool xc_cpu_policy_is_compatible(const xc_cpu_policy_t *p1,
+ const xc_cpu_policy_t *p2);
+void xc_cpu_policy_calc_compatible(const xc_cpu_policy_t *p1,
+ const xc_cpu_policy_t *p2,
+ xc_cpu_policy_t *out);
+
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);
This is the current proposed interface for the users of libxc to
interact with the policy infrastructure.
In particular, xc_cpu_policy_{get,update}_cpuid() is intended for libxl
to use to process the cpuid=[] configuration, which operates on a single
leaf at any one time. Implementing the toplevel pae boolean in terms of
cpuid=["pae"] is trivial to arrange.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |