Re: [Qemu-devel] [PATCH v7 16/27] cputlb: add tlb_flush_by_mmuidx async routines

2017-01-25 Thread Alex Bennée
Richard Henderson writes: > On 01/24/2017 12:31 PM, Alex Bennée wrote: >>> Why don't we just pass in this bitmap in the first place? It's much better >>> than having to use varargs in tlb_flush_by_mmuidx... >> >> We could. By not messing with the API it leaves the door open to having >> other n

Re: [Qemu-devel] [PATCH v7 16/27] cputlb: add tlb_flush_by_mmuidx async routines

2017-01-24 Thread Richard Henderson
On 01/24/2017 12:31 PM, Alex Bennée wrote: >> Why don't we just pass in this bitmap in the first place? It's much better >> than having to use varargs in tlb_flush_by_mmuidx... > > We could. By not messing with the API it leaves the door open to having > other non-MTTCG architectures that have lo

Re: [Qemu-devel] [PATCH v7 16/27] cputlb: add tlb_flush_by_mmuidx async routines

2017-01-24 Thread Alex Bennée
Richard Henderson writes: > On 01/19/2017 09:04 AM, Alex Bennée wrote: >> +/* Helper function to slurp va_args list into a bitmap >> + */ >> +static inline unsigned long make_mmu_index_bitmap(va_list args) >> +{ >> +unsigned long bitmap = 0; >> +int mmu_index = va_arg(args, int); >> + >>

Re: [Qemu-devel] [PATCH v7 16/27] cputlb: add tlb_flush_by_mmuidx async routines

2017-01-23 Thread Richard Henderson
On 01/19/2017 09:04 AM, Alex Bennée wrote: > +/* Helper function to slurp va_args list into a bitmap > + */ > +static inline unsigned long make_mmu_index_bitmap(va_list args) > +{ > +unsigned long bitmap = 0; > +int mmu_index = va_arg(args, int); > + > +/* An empty va_list would be a ba

[Qemu-devel] [PATCH v7 16/27] cputlb: add tlb_flush_by_mmuidx async routines

2017-01-19 Thread Alex Bennée
This converts the remaining TLB flush routines to use async work when detecting a cross-vCPU flush. The only minor complication is having to serialise the var_list of MMU indexes into a form that can be punted to an asynchronous job. The pending_tlb_flush field on QOM's CPU structure also becomes