On 30/03/2023 11:00 am, Jan Beulich wrote: > On 29.03.2023 22:51, Andrew Cooper wrote: >> @@ -573,7 +574,6 @@ int arch_vcpu_create(struct vcpu *v) >> /* Idle domain */ >> v->arch.cr3 = __pa(idle_pg_table); >> rc = 0; >> - v->arch.msrs = ZERO_BLOCK_PTR; /* Catch stray misuses */ >> } > Is this intentional? It's a vCPU pointer here, not a domain one.
Ah, no. And it answers one of my TODO notes that I hadn't got to yet (of why MSRs was different to CPUID in this case). It looks like it got caught in my `arch.msrs` rework. I'll drop this hunk. > >> --- a/xen/arch/x86/domctl.c >> +++ b/xen/arch/x86/domctl.c >> @@ -40,11 +40,11 @@ >> static int update_domain_cpu_policy(struct domain *d, >> xen_domctl_cpu_policy_t *xdpc) >> { >> - struct old_cpu_policy new = {}; >> + struct cpu_policy *new; >> struct cpu_policy *sys = is_pv_domain(d) >> ? (IS_ENABLED(CONFIG_PV) ? &pv_max_cpu_policy : NULL) >> : (IS_ENABLED(CONFIG_HVM) ? &hvm_max_cpu_policy : NULL); >> - struct old_cpu_policy old_sys = { sys, sys }; >> + struct old_cpu_policy old_sys = { sys, sys }, old_new; > Interesting name, but as long as it's transitional only, that's of course > fine. Yeah... it was the best I could come up with. It does get removed in patch 8. ~Andrew