[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 6/9] xen/multicall: Rework arch multicall handling



On 03/08/16 16:02, Jan Beulich wrote:
>>>> On 18.07.16 at 11:51, <andrew.cooper3@xxxxxxxxxx> wrote:
>> --- a/xen/arch/x86/hypercall.c
>> +++ b/xen/arch/x86/hypercall.c
>> @@ -338,6 +338,34 @@ long pv_hypercall(struct cpu_user_regs *regs)
>>      return ret;
>>  }
>>  
>> +void arch_do_multicall_call(struct mc_state *state)
>> +{
>> +    if ( !is_pv_32bit_vcpu(current) )
>> +    {
>> +        struct multicall_entry *call = &state->call;
>> +
>> +        if ( (call->op < NR_hypercalls) && hypercall_table[call->op] )
>> +            call->result = hypercall_table[call->op](
>> +                call->args[0], call->args[1], call->args[2],
>> +                call->args[3], call->args[4], call->args[5]);
>> +        else
>> +            call->result = -ENOSYS;
>> +    }
>> +#ifdef CONFIG_COMPAT
>> +    else
>> +    {
>> +        struct compat_multicall_entry *call = &state->compat_call;
>> +
>> +        if ( (call->op < NR_hypercalls) && compat_hypercall_table[call->op] 
>> )
> Why two distinct checks here when pv_hypercall() does just one
> outside the if/else? With them folded (or if there is a good reason),
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
> with one more remark:

multicall_entry and compat_multicall_entry are different.  call->op
lives at the same point in the union, but the field is a different width.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.