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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220726235757.GF1379820@ls.amr.corp.intel.com>
Date:   Tue, 26 Jul 2022 16:57:57 -0700
From:   Isaku Yamahata <isaku.yamahata@...il.com>
To:     Kai Huang <kai.huang@...el.com>
Cc:     isaku.yamahata@...el.com, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, isaku.yamahata@...il.com,
        Paolo Bonzini <pbonzini@...hat.com>,
        Chao Gao <chao.gao@...el.com>,
        Sean Christopherson <seanjc@...gle.com>,
        Suzuki K Poulose <suzuki.poulose@....com>,
        Anup Patel <anup@...infault.org>,
        Claudio Imbrenda <imbrenda@...ux.ibm.com>
Subject: Re: [PATCH v7 002/102] Partially revert "KVM: Pass kvm_init()'s
 opaque param to additional arch funcs"

On Wed, Jul 13, 2022 at 01:55:46PM +1200,
Kai Huang <kai.huang@...el.com> wrote:

> On Mon, 2022-06-27 at 14:52 -0700, isaku.yamahata@...el.com wrote:
> > From: Chao Gao <chao.gao@...el.com>
> > 
> > This partially reverts commit b99040853738 ("KVM: Pass kvm_init()'s opaque
> > param to additional arch funcs") remove opaque from
> > kvm_arch_check_processor_compat because no one uses this opaque now.
> > Address conflicts for ARM (due to file movement) and manually handle RISC-V
> > which comes after the commit.
> > 
> > And changes about kvm_arch_hardware_setup() in original commit are still
> > needed so they are not reverted.
> 
> I tried to dig the history to find out why we are doing this.
> 
> IMHO it's better to give a reason why you need to revert the opaque.  I guess no
> one uses this opaque now doesn't mean we need to remove it?
> 
> Perhaps you should mention this is a preparation to
> hardware_enable_all()/hardware_disable_all() during module loading time. 
> Instead of extending hardware_enable_all()/hardware_disable_all() to take the
> opaque and pass to kvm_arch_check_process_compat(), just remove the opaque.
> 
> Or perhaps just merge this patch to next one?


Here is the updated commit message.

    Partially revert "KVM: Pass kvm_init()'s opaque param to additional arch funcs"
    
    This partially reverts commit b99040853738 ("KVM: Pass kvm_init()'s opaque
    param to additional arch funcs") remove opaque from
    kvm_arch_check_processor_compat because no one uses this opaque now.
    Address conflicts for ARM (due to file movement) and manually handle RISC-V
    which comes after the commit.  The change about kvm_arch_hardware_setup()
    in original commit are still needed so they are not reverted.
    
    The current implementation enables hardware (e.g. enable VMX on all CPUs),
    arch-specific initialization for VM creation, and disables hardware (in
    x86, disable VMX on all CPUs) for last VM destruction.
    
    TDX requires its initialization on loading KVM module with VMX enabled on
    all available CPUs. It needs to enable/disable hardware on module
    initialization.  To reuse the same logic, one way is to pass around the
    unused opaque argument, another way is to remove the unused opaque
    argument.  This patch is a preparation for the latter by removing the
    argument.


-- 
Isaku Yamahata <isaku.yamahata@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ