[lkml]   [2019]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] KVM: arm/arm64: vgic-its: Fix restoration of unmapped collections
Hi Zenghui,

On 2019-12-13 10:53, Zenghui Yu wrote:
> Hi Eric,
> On 2019/12/13 17:42, Eric Auger wrote:
>> Saving/restoring an unmapped collection is a valid scenario. For
>> example this happens if a MAPTI command was sent, featuring an
>> unmapped collection. At the moment the CTE fails to be restored.
>> Only compare against the number of online vcpus if the rdist
>> base is set.
> Have you actually seen a problem and this patch fixed it? To be
> honest,
> I'm surprised to find that we can map a LPI to an unmapped collection
> ;)
> (and prevent it to be delivered to vcpu with an
> error, until someone had actually mapped the collection).
> After a quick glance of spec (MAPTI), just as you said, this is
> valid.

Yes, this is one of the (many) odd bits in the architecture. And there
a bizarre wording in the MAPC description when V=0:

"Behavior is unpredictable if there are interrupts that are mapped to
specified collection, with the restriction that further translation
from that device are ignored."

It is really odd that:

- it is unpredictable to unmap the collection with mapped interrupts,
but mapping interrupts to an unmapped collection is fine

- the notion of "interrupts from that device" doesn't match any of the
MAPC parameters

Do you hate the GIC already? ;-)

> If Marc has no objection to this fix, please add
> Reviewed-by: Zenghui Yu <>

Thanks for that, I've applied it to the patch and will push out
the update as soon as is reachable again.

Jazz is not dead. It just smells funny...

 \ /
  Last update: 2019-12-13 12:29    [W:0.130 / U:1.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site