Re: [PATCH] KVM: PPC: Add generic single register ioctls

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

 




Am 09.01.2012 um 21:12 schrieb Scott Wood <scottwood@xxxxxxxxxxxxx>:

> On 01/09/2012 02:11 PM, Alexander Graf wrote:
>> 
>> 
>> Am 09.01.2012 um 20:07 schrieb Scott Wood <scottwood@xxxxxxxxxxxxx>:
>> 
>>> On 01/06/2012 06:52 PM, Alexander Graf wrote:
>>>> 
>>>> 
>>>> On 06.01.2012, at 20:32, Scott Wood <scottwood@xxxxxxxxxxxxx> wrote:
>>>> 
>>>>> On 01/05/2012 10:15 PM, Alexander Graf wrote:
>>>>> 
>>>>>> +/*
>>>>>> + * Architecture specific registers are to be defined in arch headers and
>>>>>> + * ORed with the arch identifier.
>>>>>> + */
>>>>>> +#define KVM_REG_PPC        0x1000000000000000ULL
>>>>>> +#define KVM_REG_X86        0x2000000000000000ULL
>>>>>> +#define KVM_REG_IA64        0x3000000000000000ULL
>>>>>> +#define KVM_REG_ARM        0x4000000000000000ULL
>>>>>> +#define KVM_REG_S390        0x5000000000000000ULL
>>>>>> +
>>>>>> +#define KVM_REG_SIZE_SHIFT    52
>>>>>> +#define KVM_REG_SIZE_MASK    0x00f0000000000000ULL
>>>>>> +#define KVM_REG_SIZE_U8        0x0000000000000000ULL
>>>>>> +#define KVM_REG_SIZE_U16    0x0010000000000000ULL
>>>>>> +#define KVM_REG_SIZE_U32    0x0020000000000000ULL
>>>>>> +#define KVM_REG_SIZE_U64    0x0030000000000000ULL
>>>>>> +#define KVM_REG_SIZE_U128    0x0040000000000000ULL
>>>>>> +#define KVM_REG_SIZE_U256    0x0050000000000000ULL
>>>>>> +#define KVM_REG_SIZE_U512    0x0060000000000000ULL
>>>>>> +#define KVM_REG_SIZE_U1024    0x0070000000000000ULL
>>>>> 
>>>>> Why not just encode directly as number of bytes?
>>>> 
>>>> Because this is 1 << n bytes :)
>>> 
>>> Some registers may not be a power-of-2 number of bytes (e.g. x86 segment
>>> descriptors), and we've got plenty of space to spare in the id.
>> 
>> If they're not a power of 2, we can still bmp it to the next power of 2 size, no?
> 
> Yes, that's what I meant by it not being a huge deal and documenting
> whether the padding is on the right or the left.  Just seems a little
> more awkward than necessary, given that we have room to encode it as a
> plain linear size.

Well I thought it makes things easier, since variable types are usually in a power of 2 :). But I'm certainly not attached to it.

Alex

> 
> -Scott
> 
--
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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux