Re: [Xen-devel] [PATCH 04/10] x86/paravirt: use a single ops structure

2018-08-10 Thread Juergen Gross
On 10/08/18 14:06, Jan Beulich wrote:
 On 10.08.18 at 13:52,  wrote:
>> --- a/arch/x86/hyperv/mmu.c
>> +++ b/arch/x86/hyperv/mmu.c
>> @@ -228,9 +228,9 @@ void hyperv_setup_mmu_ops(void)
>>  
>>  if (!(ms_hyperv.hints & HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED)) {
>>  pr_info("Using hypercall for remote TLB flush\n");
>> -pv_mmu_ops.flush_tlb_others = hyperv_flush_tlb_others;
>> +pv_ops.pv_mmu_ops.flush_tlb_others = hyperv_flush_tlb_others;
> 
> Taking just this as example, why not
> 
>   pv_ops.mmu.flush_tlb_others = hyperv_flush_tlb_others;
> 
> ? Both pv_ and _ops are redundant on the field names.

Good idea.


Juergen
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [Xen-devel] [PATCH 04/10] x86/paravirt: use a single ops structure

2018-08-10 Thread Jan Beulich
>>> On 10.08.18 at 13:52,  wrote:
> --- a/arch/x86/hyperv/mmu.c
> +++ b/arch/x86/hyperv/mmu.c
> @@ -228,9 +228,9 @@ void hyperv_setup_mmu_ops(void)
>  
>   if (!(ms_hyperv.hints & HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED)) {
>   pr_info("Using hypercall for remote TLB flush\n");
> - pv_mmu_ops.flush_tlb_others = hyperv_flush_tlb_others;
> + pv_ops.pv_mmu_ops.flush_tlb_others = hyperv_flush_tlb_others;

Taking just this as example, why not

pv_ops.mmu.flush_tlb_others = hyperv_flush_tlb_others;

? Both pv_ and _ops are redundant on the field names.

Jan


___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization