On 09/01/17 15:04, Jan Beulich wrote: >>>> On 09.01.17 at 12:03, <andrew.coop...@citrix.com> wrote: >> @@ -215,6 +218,39 @@ const uint32_t * __init lookup_deep_deps(uint32_t >> feature) >> return NULL; >> } >> >> +void guest_cpuid(const struct vcpu *v, uint32_t leaf, >> + uint32_t subleaf, struct cpuid_leaf *res) >> +{ >> + const struct vcpu *curr = current; >> + const struct domain *d = v->domain; >> + >> + *res = EMPTY_LEAF; >> + >> + /* {hvm,pv}_cpuid() have this expectation. */ >> + ASSERT(v == curr); > You don't appear to use curr other than here, so I'd prefer if you > eliminated the local variable.
Further uses are added in future changesets. > >> --- a/xen/arch/x86/hvm/vmx/vmx.c >> +++ b/xen/arch/x86/hvm/vmx/vmx.c >> @@ -2361,8 +2361,9 @@ static void vmx_fpu_dirty_intercept(void) >> >> static int vmx_do_cpuid(struct cpu_user_regs *regs) >> { >> - unsigned int eax, ebx, ecx, edx; >> - unsigned int leaf, subleaf; >> + struct vcpu *curr = current; >> + unsigned int leaf = regs->_eax, subleaf = regs->_ecx; > According to "Consistently use uint32_t" I'd have expected this to > now be uint32_t too. Will fix. > > In any event > Reviewed-by: Jan Beulich <jbeul...@suse.com> Thanks. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel