lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 11 Nov 2021 16:29:01 +0800
From:   Xiaoyao Li <xiaoyao.li@...el.com>
To:     Paolo Bonzini <pbonzini@...hat.com>,
        Sean Christopherson <seanjc@...gle.com>
Cc:     "Yamahata, Isaku" <isaku.yamahata@...el.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H . Peter Anvin" <hpa@...or.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Joerg Roedel <joro@...tes.org>,
        "erdemaktas@...gle.com" <erdemaktas@...gle.com>,
        Connor Kuehl <ckuehl@...hat.com>,
        "x86@...nel.org" <x86@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "isaku.yamahata@...il.com" <isaku.yamahata@...il.com>
Subject: Re: [RFC PATCH v2 22/69] KVM: x86: Add vm_type to differentiate
 legacy VMs from protected VMs

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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ