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: <k6wja36wxzcgyef255vl7rds56hfs25gvueqo7xoyhget2suz2@vvio2nz6zjo5>
Date: Fri, 6 Feb 2026 16:04:57 +0000
From: Yosry Ahmed <yosry.ahmed@...ux.dev>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 21/26] KVM: SVM: Rename vmcb->virt_ext to
 vmcb->misc_ctl2

On Thu, Feb 05, 2026 at 05:31:01PM -0800, Sean Christopherson wrote:
> On Thu, Jan 15, 2026, Yosry Ahmed wrote:
> > @@ -244,6 +241,8 @@ struct __attribute__ ((__packed__)) vmcb_control_area {
> >  #define SVM_MISC_CTL_SEV_ENABLE		BIT(1)
> >  #define SVM_MISC_CTL_SEV_ES_ENABLE	BIT(2)
> >  
> > +#define SVM_MISC_CTL2_LBR_CTL_ENABLE		BIT_ULL(0)
> > +#define SVM_MISC_CTL2_V_VMLOAD_VMSAVE_ENABLE	BIT_ULL(1)
> 
> Since you're changing names anyways, What do you think about shortening things
> a bit, and using the more standard syle of <scope>_<action>_<flag>?  E.g.
> 
>   #define SVM_MISC2_ENABLE_LBR_VIRTUALIZATION	BIT_ULL(0)
>   #define SVM_MISC2_ENABLE_V_VMLOAD_VMSAVE	BIT_ULL(1)

SVM_MISC2_ENABLE_LBR_VIRTUALIZATION is actually longer, how about
SVM_MISC2_ENABLE_V_LBR? Shorter and more consistent with
SVM_MISC2_ENABLE_V_VMLOAD_VMSAVE.

> 
> Yeah, it diverges from many of the other bits in here, but frankly the names in
> this file are *awful*.
> 
> Actually, maybe that would prompt me to send a cleanup, because the fact that we
> have this set of flags is beyond ridiculous (I geniunely don't remember what
> V_GIF_MASK tracks, off the top of my head).  And in isolation, I can't remember
> iof V_IRQ_MASK is an enable flag or a "IRQs are masked" flagged.
> 
> #define V_IRQ_MASK
> #define V_INTR_MASKING_MASK
> #define V_GIF_MASK
> #define V_GIF_ENABLE_MASK

Yeah I had to open the APM a few times while looking at them before to
figure out which is which :')

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ