On 3 July 2015 at 10:50, Marc Zyngier <marc.zyngier@xxxxxxx> wrote: > On 02/07/15 17:23, Christoffer Dall wrote: >> If we had a different *shared* device than the timer which is >> edge-triggered, don't we then also need to capture the physical >> distributor's pending state along with the state of the device unless we >> assume that upon restoring the state for the device count on the device >> to have another rising/falling edge to trigger the interrupt again? (I >> assume the line would always go high for a level-triggered interrupt in >> this case). > > I'd definitely assume that restoring the state of the device would make > it generate an interrupt. This has to be a property of the device, > otherwise it is not really shareable between vcpus. FWIW, QEMU's modelling approach to this is to say that devices do *not* generate interrupts on restore. If the device had previously generated an interrupt then this should be captured by the state of the interrupt controller (or whatever else it is connected to) and dealt with when the GIC state is restored. If you say that restoring the device state is supposed to generate an interrupt, you introduce an ordering requirement that the state of the interrupt controller is restored first and the device second (otherwise the incoming GIC state will overwrite the interrupt that the device just generated), which isn't ideal (especially since QEMU makes no guarantees about restore order between devices). thanks -- PMM _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm