lkml.org 
[lkml]   [2021]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH v2 22/69] KVM: x86: Add vm_type to differentiate legacy VMs from protected VMs
From
On 11/11/2021 3:28 PM, Paolo Bonzini wrote:
> On 11/11/21 04:28, Xiaoyao Li wrote:
>>>
>>> Heh, because kvm_dev_ioctl_create_vm() takes an "unsigned long" for
>>> the type and
>>> it felt wrong to store it as something else.  Storing it as a smaller
>>> field should
>>> be fine, I highly doubt we'll get to 256 types anytime soon :-)
>>
>> It's the bit position. We can get only 8 types with u8 actually.
>
> Every architecture defines the meaning, and for x86 we can say it's not
> a bit position.

Sorry, I find I was wrong. The types are not bit position but value.

KVM_CAP_VM_TYPES reports the supported vm types using bitmap that bit n
represents type value n.

> Paolo
>

\
 
 \ /
  Last update: 2021-11-11 09:29    [W:0.486 / U:0.992 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site