[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aYVEVRV-ASogp5dF@google.com>
Date: Thu, 5 Feb 2026 17:31:01 -0800
From: Sean Christopherson <seanjc@...gle.com>
To: Yosry Ahmed <yosry.ahmed@...ux.dev>
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, 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)
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
Powered by blists - more mailing lists