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]
Date:   Sun, 13 Mar 2022 14:55:43 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     isaku.yamahata@...el.com, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     isaku.yamahata@...il.com, Jim Mattson <jmattson@...gle.com>,
        erdemaktas@...gle.com, Connor Kuehl <ckuehl@...hat.com>,
        Sean Christopherson <seanjc@...gle.com>
Subject: Re: [RFC PATCH v5 006/104] KVM: TDX: Add placeholders for TDX VM/vcpu
 structure

On 3/4/22 20:48, isaku.yamahata@...el.com wrote:
> +void __init tdx_pre_kvm_init(unsigned int *vcpu_size,
> +			unsigned int *vcpu_align, unsigned int *vm_size)
> +{
> +	*vcpu_size = sizeof(struct vcpu_tdx);
> +	*vcpu_align = __alignof__(struct vcpu_tdx);
> +
> +	if (sizeof(struct kvm_tdx) > *vm_size)
> +		*vm_size = sizeof(struct kvm_tdx);
> +}

No need for this function, I would just do

	vcpu_size = max(sizeof vcpu_vmx, sizeof vcpu_tdx);
	vcpu_align = max(...);
	vt_x86_ops.vm_size = max(...);

in vt_init.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ