[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251114164038.GDaRdbhpoLbiq02vDu@fat_crate.local>
Date: Fri, 14 Nov 2025 17:40:38 +0100
From: Borislav Petkov <bp@...en8.de>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Josh Poimboeuf <jpoimboe@...nel.org>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org,
Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
Brendan Jackman <jackmanb@...gle.com>
Subject: Re: [PATCH v5 1/9] KVM: VMX: Use on-stack copy of @flags in
__vmx_vcpu_run()
On Thu, Nov 13, 2025 at 03:37:38PM -0800, Sean Christopherson wrote:
> Suggested-by: Borislav Petkov <bp@...en8.de>
Bah, I didn't suggest that - that's all your effort :)
> Signed-off-by: Sean Christopherson <seanjc@...gle.com>
> ---
> arch/x86/kvm/vmx/run_flags.h | 10 +++-------
> arch/x86/kvm/vmx/vmenter.S | 13 ++++---------
> 2 files changed, 7 insertions(+), 16 deletions(-)
...
> @@ -173,8 +167,9 @@ SYM_FUNC_START(__vmx_vcpu_run)
> /* Clobbers EFLAGS.ZF */
> CLEAR_CPU_BUFFERS
>
> - /* Check EFLAGS.CF from the VMX_RUN_VMRESUME bit test above. */
> - jnc .Lvmlaunch
> + /* Check @flags to see if vmlaunch or vmresume is needed. */
VMRESUME/VMLAUNCH in caps, like the rest of the file. We like our x86 insns in
all caps. :)
> + testl $VMX_RUN_VMRESUME, WORD_SIZE(%_ASM_SP)
> + jz .Lvmlaunch
>
> /*
> * After a successful VMRESUME/VMLAUNCH, control flow "magically"
> --
But yeah, AFAIU this code, that's a nice cleanup.
Acked-by: Borislav Petkov (AMD) <bp@...en8.de>
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists