lkml.org 
[lkml]   [2021]   [Nov]   [10]   [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 7/14/2021 4:39 AM, Sean Christopherson wrote:
> On Tue, Jul 06, 2021, Paolo Bonzini wrote:
>> On 03/07/21 00:04, isaku.yamahata@intel.com wrote:
>>> struct kvm_arch {
>>> + unsigned long vm_type;
>>
>> Also why not just int or u8?
>
> 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.

>
> I think kvm_x86_ops.is_vm_type_supported() should take the full size though.
>

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