On 9 July 2018 at 09:42, Marc Zyngier <marc.zyngier@xxxxxxx> wrote: > I don't really get why QEMU doesn't try to restore GICD_IIDR, while it > is definitely trying to restore RO sysregs (and that's how we detect > incompatibilities). Accident of design, mostly. From QEMU's point of view, GICD_IIDR is part of the GIC device, which we save and restore as a separate thing from the CPU. The GIC device was written in what for QEMU is a more 'traditional' style, where QEMU assumes it knows all the registers that might have state and saves and restores them all (and doesn't bother to do anything with constant registers). The CPU sysregs are done in a completely different style[*], where we let the kernel be the source of truth for what sysregs exist; as a side effect of that we end up trying to save and restore constant sysregs, since QEMU doesn't know they're constant. [*] there's an argument that in retrospect this was a mistake; still, it is what we have and trying to upend it now would be a huge pain. thanks -- PMM