|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 5/8] xen/arm/gic: Allow routing/removing interrupt to running VMs
Hi Henry, On 22/05/2024 02:22, Henry Wang wrote: On 5/22/2024 9:16 AM, Stefano Stabellini wrote:On Wed, 22 May 2024, Henry Wang wrote:Hi Julien, On 5/21/2024 8:30 PM, Julien Grall wrote:No I think you are correct, we have discussed this in the initial version ofHi, On 21/05/2024 05:35, Henry Wang wrote:diff --git a/xen/arch/arm/gic-vgic.c b/xen/arch/arm/gic-vgic.c index 56490dbc43..956c11ba13 100644 --- a/xen/arch/arm/gic-vgic.c +++ b/xen/arch/arm/gic-vgic.c @@ -439,24 +439,33 @@ int vgic_connect_hw_irq(struct domain *d, struct vcpu *v, unsigned int virq,/* We are taking to rank lock to prevent parallel connections. */vgic_lock_rank(v_target, rank, flags); + spin_lock(&v_target->arch.vgic.lock);I know this is what Stefano suggested, but v_target would point to the current affinity whereas the interrupt may be pending/active on the"previous" vCPU. So it is a little unclear whether v_target is the correctlock. Do you have more pointer to show this is correct?this patch. Sorry.I followed the way from that discussion to note down the vcpu ID and retrievehere, below is the diff, would this make sense to you? diff --git a/xen/arch/arm/gic-vgic.c b/xen/arch/arm/gic-vgic.c index 956c11ba13..134ed4e107 100644 --- a/xen/arch/arm/gic-vgic.c +++ b/xen/arch/arm/gic-vgic.c@@ -439,7 +439,7 @@ int vgic_connect_hw_irq(struct domain *d, struct vcpu *v, I think that would be ok. I have to admit, I am still a bit wary about allowing to remove interrupts when the domain is running. I am less concerned about the add part. Do you need the remove part now? If not, I would suggest to split in two so we can get the most of this series merged for 4.19 and continue to deal with the remove path in the background. I will answer here to the other reply:> I don't think so, if I am not mistaken, no LR will be allocated with other flags set. I wasn't necessarily thinking about the LR allocation. I was more thinking whether there are any flags that could still be set. IOW, will the vIRQ like new once vgic_connect_hw_irq() is succesful?Also, while looking at the flags, I noticed we clear _IRQ_INPROGRESS before vgic_connect_hw_irq(). Shouldn't we only clear *after*? This brings to another question. You don't special case a dying domain. If the domain is crashing, wouldn't this mean it wouldn't be possible to destroy it? Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |