On 10 July 2018 at 16:27, Christoffer Dall <christoffer.dall@xxxxxxx> wrote: > Unless someone objects, I'll try to come up with a v3 that asks > userspace to confirm it wants writable groups. Ideally I'd like for > this to happen automatically if userspace writes an IIDR with revision 2 > and above, but that may result in either > > (1) imposing ordering on the restore sequence from userspace; > userspace must write IIDR before IGROUPR if it wants non-default > groups, > (2) terrible sequence of locking and resetting everything if IIDR > hasn't been written before time of first executing a VCPU, or > (3) an additional bookkeeping flag in the critical path for GICv2 > which ignores the group unless userspace wrote IIDR. > > Out of the three, I think (3) is the least desirable because it > precludes the guest from programming its own groups. I'll have a look > at how (2) looks, because it hides everything, and finally we can fall > back to (1) and document it clearly. There are already some ordering restrictions on the restore sequence for the GICv3, I think (eg there's a comment in QEMU about having to restore GICR_PROPBASER/PENDBASER before GICR_CTLR), so (1) isn't the end of the world... thanks -- PMM