* [PATCH v5 12/20] genirq: Document vcpu_info usage for percpu_devid interrupts [not found] <1509093281-15225-1-git-send-email-cdall@linaro.org> @ 2017-10-27 8:34 ` Christoffer Dall 2017-10-29 15:22 ` [tip:irq/core] " tip-bot for Christoffer Dall 0 siblings, 1 reply; 2+ messages in thread From: Christoffer Dall @ 2017-10-27 8:34 UTC (permalink / raw) To: kvmarm, linux-arm-kernel Cc: Marc Zyngier, Eric Auger, kvm, Catalin Marinas, Will Deacon, Christoffer Dall, linux-kernel, Thomas Gleixner It is currently unclear how to set the VCPU affinity for a percpu_devid interrupt , since the Linux irq_data structure describes the state for multiple interrupts, one for each physical CPU on the system. Since each such interrupt can be associated with different VCPUs or none at all, associating a single VCPU state with such an interrupt does not capture the necessary semantics. The implementers of irq_set_affinity are the Intel and AMD IOMMUs, and the ARM GIC irqchip. The Intel and AMD callers do not appear to use percpu_devid interrupts, and the ARM GIC implementation only checks the pointer against NULL vs. non-NULL. Therefore, simply update the function documentation to explain the expected use in the context of percpu_devid interrupts, allowing future changes or additions to irqchip implementers to do the right thing. This documents the use of the vcpu_info parameter for percpu_devid interrupts when setting the VCPU affinity for the virtual timer interrupt in KVM/ARM. Cc: linux-kernel@vger.kernel.org Cc: Thomas Gleixner <tglx@linutronix.de> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <cdall@linaro.org> --- kernel/irq/manage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index d00132b..38ec7a8 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -381,7 +381,8 @@ int irq_select_affinity_usr(unsigned int irq) /** * irq_set_vcpu_affinity - Set vcpu affinity for the interrupt * @irq: interrupt number to set affinity - * @vcpu_info: vCPU specific data + * @vcpu_info: vCPU specific data or pointer to a percpu array of vCPU + * specific data for percpu_devid interrupts * * This function uses the vCPU specific data to set the vCPU * affinity for an irq. The vCPU specific data is passed from -- 2.7.4 ^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:irq/core] genirq: Document vcpu_info usage for percpu_devid interrupts 2017-10-27 8:34 ` [PATCH v5 12/20] genirq: Document vcpu_info usage for percpu_devid interrupts Christoffer Dall @ 2017-10-29 15:22 ` tip-bot for Christoffer Dall 0 siblings, 0 replies; 2+ messages in thread From: tip-bot for Christoffer Dall @ 2017-10-29 15:22 UTC (permalink / raw) To: linux-tip-commits Cc: tglx, eric.auger, catalin.marinas, hpa, cdall, marc.zyngier, mingo, will.deacon, linux-kernel Commit-ID: 250a53d6fcd86012935d1cf71eb2e3d6e88c412c Gitweb: https://git.kernel.org/tip/250a53d6fcd86012935d1cf71eb2e3d6e88c412c Author: Christoffer Dall <cdall@linaro.org> AuthorDate: Fri, 27 Oct 2017 10:34:33 +0200 Committer: Thomas Gleixner <tglx@linutronix.de> CommitDate: Sun, 29 Oct 2017 16:18:37 +0100 genirq: Document vcpu_info usage for percpu_devid interrupts It is currently unclear how to set the VCPU affinity for a percpu_devid interrupt , since the Linux irq_data structure describes the state for multiple interrupts, one for each physical CPU on the system. Since each such interrupt can be associated with different VCPUs or none at all, associating a single VCPU state with such an interrupt does not capture the necessary semantics. The implementers of irq_set_affinity are the Intel and AMD IOMMUs, and the ARM GIC irqchip. The Intel and AMD callers do not appear to use percpu_devid interrupts, and the ARM GIC implementation only checks the pointer against NULL vs. non-NULL. Therefore, simply update the function documentation to explain the expected use in the context of percpu_devid interrupts, allowing future changes or additions to irqchip implementers to do the right thing. Signed-off-by: Christoffer Dall <cdall@linaro.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Cc: kvm@vger.kernel.org Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Eric Auger <eric.auger@redhat.com> Cc: kvmarm@lists.cs.columbia.edu Cc: linux-arm-kernel@lists.infradead.org Link: https://lkml.kernel.org/r/1509093281-15225-13-git-send-email-cdall@linaro.org --- kernel/irq/manage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index e667912..c65f282 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -381,7 +381,8 @@ int irq_select_affinity_usr(unsigned int irq) /** * irq_set_vcpu_affinity - Set vcpu affinity for the interrupt * @irq: interrupt number to set affinity - * @vcpu_info: vCPU specific data + * @vcpu_info: vCPU specific data or pointer to a percpu array of vCPU + * specific data for percpu_devid interrupts * * This function uses the vCPU specific data to set the vCPU * affinity for an irq. The vCPU specific data is passed from ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-29 15:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1509093281-15225-1-git-send-email-cdall@linaro.org>
2017-10-27 8:34 ` [PATCH v5 12/20] genirq: Document vcpu_info usage for percpu_devid interrupts Christoffer Dall
2017-10-29 15:22 ` [tip:irq/core] " tip-bot for Christoffer Dall
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
Powered by JetHome