|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 1/2] restrict concept of pIRQ to x86
Hi Jan, On 11/07/2023 13:29, Jan Beulich wrote: On 10.07.2023 22:59, Julien Grall wrote:--- I'm not really certain about XEN_DOMCTL_irq_permission: With pIRQ-s not used, the prior pIRQ -> IRQ translation cannot have succeeded on Arm, so quite possibly the entire domctl is unused there? Yet then how is access to particular device IRQs being granted/revoked?(Leaving this in context, as it'll be relevant for the last comment you gave.) Sorry I missed this comment. > so quite possibly the entire domctl is unused there? You are right, the domctl permission is not used on Arm. > Yet then how is access to particular device IRQs being granted/revoked?At the moment, a device can only be attached at domain creation and detached when the domain is destroyed. Also, only the toolstack can map IRQs. So we don't need to worry for granting/revoking IRQs. --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -350,6 +350,8 @@ static int late_hwdom_init(struct domain #endif }+#ifdef CONFIG_HAS_PIRQ+ static unsigned int __read_mostly extra_hwdom_irqs; static unsigned int __read_mostly extra_domU_irqs = 32;@@ -364,6 +366,8 @@ static int __init cf_check parse_extra_g I was under the impression we wanted to limit the number of #ifdef in the common code. They didn't seem to be warrant here and, from a brief look, it didn't seem the option would be that "ugly". But I guess this is a matter of taste. @@ -1864,6 +1874,8 @@ long do_vm_assist(unsigned int cmd, unsi } #endif+#ifdef CONFIG_HAS_PIRQ+With this change and some others, we probably can remove alloc_pirq_struct() & co. I will have a look to send a clean-up patch after this goes in.Right, there's likely further cleanup possible. Right, it would not build. But does this check really matter even in the case where CONFIG_HAS_PIRQ=y? Looking at the code, it sounds like more an optimization/a way to return a different error code if there value is too high. For the domctl, it doesn't seem to be worth it, the more if we need to add #ifdef. With that, the rest of the domctl should mostly work for Arm. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |