lkml.org 
[lkml]   [2017]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 10/10] irqchip/gic-v4: Make the doorbells managed affinity interrupts
On Tue, 10 Oct 2017, Marc Zyngier wrote:
> int its_alloc_vcpu_irqs(struct its_vm *vm)
> {
> int vpe_base_irq, i;
>
> + vm->affinity_masks = kzalloc(vm->nr_vpes * sizeof(*vm->affinity_masks),
> + GFP_KERNEL);
> + if (!vm->affinity_masks)
> + goto err;
> +
> + for (i = 0; i < vm->nr_vpes; i++) {
> + if (!alloc_cpumask_var(&vm->affinity_masks[i], GFP_KERNEL))
> + goto err;
> +
> + cpumask_copy(vm->affinity_masks[i], cpu_possible_mask);

That looks a bit like abuse of managed interrupts as you don't use any of
the managing parts, i.e. the managed shutdown/startup on cpu hotplug.

You can prevent user space from fiddling with the affinities by flagging
these interrupts with IRQ_NO_BALANCING.

Thanks,

tglx




\
 
 \ /
  Last update: 2017-10-12 11:24    [W:0.077 / U:0.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site