Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm


[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux