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]
Message-ID: <400a69c2c01a230b8aedf684056bdb21eea13261.camel@intel.com>
Date: Tue, 29 Apr 2025 17:25:40 +0000
From: "Verma, Vishal L" <vishal.l.verma@...el.com>
To: "Gao, Chao" <chao.gao@...el.com>
CC: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>, "kvm@...r.kernel.org"
	<kvm@...r.kernel.org>, "pbonzini@...hat.com" <pbonzini@...hat.com>,
	"seanjc@...gle.com" <seanjc@...gle.com>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "binbin.wu@...xu.intel.com"
	<binbin.wu@...xu.intel.com>
Subject: Re: [PATCH v2 2/4] KVM: VMX: Move apicv_pre_state_restore to
 posted_intr.c

On Tue, 2025-04-29 at 16:17 +0800, Chao Gao wrote:
> On Tue, Mar 18, 2025 at 12:35:07AM -0600, Vishal Verma wrote:
> > In preparation for a cleanup of the x86_ops struct for TDX, which turns
> > several of the ops definitions to macros, move the
> > vt_apicv_pre_state_restore() helper into posted_intr.c.
> 
> This doesn't explain how the movement is related to that cleanup.
> 
> how about:
> 
> In preparation for a cleanup of the kvm_x86_ops struct for TDX, all vt_*
> functions are expected to act as glue functions that route to either tdx_*
> or vmx_* based on the VM type. Specifically, the pattern is:
> 
> vt_abc:
>     if (is_td())
>         return tdx_abc();
>     return vmx_abc();
> 
> But vt_apicv_pre_state_restore() does not follow this pattern. To
> facilitate that cleanup, rename and move vt_apicv_pre_state_restore() into
> posted_intr.c.

Hi Chao,

Thanks for the suggestion, I've added this for the next revision.

> 
> > 
> > Based on a patch by Sean Christopherson <seanjc@...gle.com>
> 
> You can consider adding his Suggested-by.

Done.

> 
> > -static void vt_apicv_pre_state_restore(struct kvm_vcpu *vcpu)
> > -{
> > -	struct pi_desc *pi = vcpu_to_pi_desc(vcpu);
> 
> With this removal, vcpu_to_pi_desc() is only used within posted_intr.c. no
> need to expose it.

Good find, done.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ