On 5 September 2012 07:48, Rusty Russell <rusty@xxxxxxxxxxxxxxx> wrote: > Peter Maydell <peter.maydell@xxxxxxxxxx> writes: >> >> This is a problem because it means userspace needs to know the >> size of each register, and the kernel doesn't provide any way >> to determine the size. This defeats the idea that userspace should >> be able to migrate kernel register state without having to know >> the semantics of all the registers involved. > > It's there. There are bits in the id which indicate the size: > And my patches added a helper: > > #define KVM_REG_SIZE(id) \ > (1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT)) Ah, right, I hadn't realised that was in the exposed-to-userspace bit of the code. >> I could live with "always read/write 64 bits". I definitely don't >> want to have to deal with matching up register widths to accesses >> in userspace, please. > > I changed my mind about the old scheme when I realized we have to deal > with 128-bit FPU registers. Mmm, ARM might not have any awkward size registers but there's x86 weirdisms to consider for a generic ABI I guess. -- PMM -- 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