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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230302011148.GA2069594@ls.amr.corp.intel.com>
Date:   Wed, 1 Mar 2023 17:11:48 -0800
From:   Isaku Yamahata <isaku.yamahata@...il.com>
To:     Chenyi Qiang <chenyi.qiang@...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>, erdemaktas@...gle.com,
        Sean Christopherson <seanjc@...gle.com>,
        Sagi Shahar <sagis@...gle.com>,
        David Matlack <dmatlack@...gle.com>,
        Kai Huang <kai.huang@...el.com>,
        Zhi Wang <zhi.wang.linux@...il.com>,
        Sean Christopherson <sean.j.christopherson@...el.com>
Subject: Re: [PATCH v12 013/106] KVM: TDX: create/destroy VM structure

On Wed, Mar 01, 2023 at 03:24:49PM +0800,
Chenyi Qiang <chenyi.qiang@...el.com> wrote:

> >  		return -EINVAL;
> >  	}
> >  
> > +	max_pkgs = topology_max_packages();
> > +	tdx_mng_key_config_lock = kcalloc(max_pkgs, sizeof(*tdx_mng_key_config_lock),
> > +				   GFP_KERNEL);
> > +	if (!tdx_mng_key_config_lock)
> > +		return -ENOMEM;
> > +	for (i = 0; i < max_pkgs; i++)
> > +		mutex_init(&tdx_mng_key_config_lock[i]);
> > +
> >  	/* TDX requires VMX. */
> >  	r = vmxon_all();
> >  	if (!r)
> > @@ -168,3 +600,9 @@ int __init tdx_hardware_setup(struct kvm_x86_ops *x86_ops)
> >  
> >  	return r;
> >  }
> > +
> > +void tdx_hardware_unsetup(void)
> > +{
> 
> To align with tdx_hardware_setup(), add some check like:
> 
> if (!enable_ept || !enable_tdx)
> 	return;
> 

Oh yes, thanks for catching it.
-- 
Isaku Yamahata <isaku.yamahata@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ