Peter Maydell <peter.maydell@xxxxxxxxxx> writes: > On 3 December 2012 10:36, Dong Aisheng <b29396@xxxxxxxxxxxxx> wrote: >> and via current ONE_REG interface we do not know which CPU >> is performing the register access, so the banked registers are not >> suppported well, > > Actually you do, because it's a vcpu ioctl. That does raise a > different question, though. ONE_REG is currently aimed as a vcpu > ioctl for CPU state save/restore -- how does it need to change > to handle device state save/restore where the device is not per-cpu? Good question. I'd prefer to stretch the existing interface, than create an identical one for non-per-cpu resources, but I could be swayed if there were many other cases. The simplest method is to give it a new type and mirror the non-per-cpu regs on all vcpus. Then a completely naive implementation save/restore will Just Work, with redundant data. Or we could pick a CPU, but that means your discovery logic becomes more complex unless you know which CPU it is (lowest number?). Cheers, Rusty. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html