[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH for-4.16] x86/cpuid: prevent shrinking migrated policies max leaves
On 10/11/2021 17:40, Roger Pau Monne wrote: > diff --git a/tools/libs/guest/xg_cpuid_x86.c b/tools/libs/guest/xg_cpuid_x86.c > index 198892ebdf..3ffd5f683b 100644 > --- a/tools/libs/guest/xg_cpuid_x86.c > +++ b/tools/libs/guest/xg_cpuid_x86.c > @@ -638,6 +638,13 @@ int xc_cpuid_apply_policy(xc_interface *xch, uint32_t > domid, bool restore, > } > } > > + /* > + * Do not try to shrink the policy if restoring, as that could cause > + * guest visible changes in the maximum leaf fields. > + */ > + if ( !restore ) > + x86_cpuid_policy_shrink_max_leaves(p); Nothing in xc_cpuid_apply_policy() changes any of the max leaves, so this is dead logic. xc_cpuid_xend_policy() can in principle change max leaves, but that logic is all horribly broken and I don't recommend touching it. I'd just drop this hunk entirely, and retain the deletion in the hypervisor. ~Andrew
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |