We want to merge struct cpuid_policy and struct msr_policy together, and the
result wants to be called struct cpu_policy.
The current struct cpu_policy, being a pair of pointers, isn't terribly
useful. Rename the type to struct old_cpu_policy, but it will disappear
entirely once the merge is complete.
No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
(cherry picked from commit
c2ec94c370f211d73f336ccfbdb32499f1b05f82)
for ( size_t i = 0; i < ARRAY_SIZE(tests); ++i )
{
struct test *t = &tests[i];
- struct cpu_policy sys = {
+ struct old_cpu_policy sys = {
&t->host_cpuid,
&t->host_msr,
}, new = {
for ( size_t i = 0; i < ARRAY_SIZE(tests); ++i )
{
struct test *t = &tests[i];
- struct cpu_policy sys = {
+ struct old_cpu_policy sys = {
&t->host_cpuid,
&t->host_msr,
}, new = {
static int update_domain_cpu_policy(struct domain *d,
xen_domctl_cpu_policy_t *xdpc)
{
- struct cpu_policy new = {};
- const struct cpu_policy *sys = is_pv_domain(d)
+ struct old_cpu_policy new = {};
+ const struct old_cpu_policy *sys = is_pv_domain(d)
? &system_policies[XEN_SYSCTL_cpu_policy_pv_max]
: &system_policies[XEN_SYSCTL_cpu_policy_hvm_max];
struct cpu_policy_errors err = INIT_CPU_POLICY_ERRORS;
#include <asm/psr.h>
#include <asm/cpuid.h>
-const struct cpu_policy system_policies[6] = {
+const struct old_cpu_policy system_policies[6] = {
[ XEN_SYSCTL_cpu_policy_raw ] = {
&raw_cpuid_policy,
&raw_msr_policy,
case XEN_SYSCTL_get_cpu_policy:
{
- const struct cpu_policy *policy;
+ const struct old_cpu_policy *policy;
/* Reserved field set, or bad policy index? */
if ( sysctl->u.cpu_policy._rsvd ||
pv_max_cpuid_policy, pv_def_cpuid_policy,
hvm_max_cpuid_policy, hvm_def_cpuid_policy;
-extern const struct cpu_policy system_policies[];
+extern const struct old_cpu_policy system_policies[];
/* Check that all previously present features are still available. */
bool recheck_cpu_features(unsigned int cpu);
#include <xen/lib/x86/cpuid.h>
#include <xen/lib/x86/msr.h>
-struct cpu_policy
+struct old_cpu_policy
{
struct cpuid_policy *cpuid;
struct msr_policy *msr;
* incompatibility is detected, the optional err pointer may identify the
* problematic leaf/subleaf and/or MSR.
*/
-int x86_cpu_policies_are_compatible(const struct cpu_policy *host,
- const struct cpu_policy *guest,
+int x86_cpu_policies_are_compatible(const struct old_cpu_policy *host,
+ const struct old_cpu_policy *guest,
struct cpu_policy_errors *err);
#endif /* !XEN_LIB_X86_POLICIES_H */
#include <xen/lib/x86/cpu-policy.h>
-int x86_cpu_policies_are_compatible(const struct cpu_policy *host,
- const struct cpu_policy *guest,
+int x86_cpu_policies_are_compatible(const struct old_cpu_policy *host,
+ const struct old_cpu_policy *guest,
struct cpu_policy_errors *err)
{
struct cpu_policy_errors e = INIT_CPU_POLICY_ERRORS;