[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [XEN PATCH v3 07/11] xen: arm: vgic: allow delivery of PPIs to guests



Hi,

On 27/11/2019 18:48, Stefano Stabellini wrote:

Yes, I think that is a good suggestion. I take that you mean that in
vgic_disable_irqs for PPIs we would only clear GIC_IRQ_GUEST_ENABLED
then return basically, right?
Not really, I am only suggesting to remove the part

if ( desc != NULL )
   ...

I think we are saying the same thing

The function is doing a bit more, hence why I wasn't not sure :).

But this change alone is not enough. It would require some modification in the
rest of the vGIC (see my previous e-mail) and likely some investigation to
understand the implication of keeping the interrupt enabled from the HW (I am
a bit worry we may have backed this assumption into other part of the vGIC
:().

I can see that at least save_and_mask_hwppi and restore_hwppi would need
to be modified to account for the fact that GICD_ISENABLER would say "it
is enabled" but actually GIC_IRQ_GUEST_ENABLED is unset.
It depends how we decide to implement the two functions. We may want to decouple the GIC completely the GIC state from the vGIC state. For instance, you may still want to mask the interrupt regardless of the vGIC state when the vCPU is scheduled out. This would prevent a non-quiescent device to generate interrupt while we can't deal with them.

But as we seem to consider the device will be quiescent and also clear the pending bit, then I think we can completely avoid to mask/unmask the interrupt. This would save a couple of access to the GIC interface.

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.