[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ybkeysfj85Ej9W03@hirez.programming.kicks-ass.net>
Date: Tue, 14 Dec 2021 23:46:34 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Sean Christopherson <seanjc@...gle.com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, jpoimboe@...hat.com,
mark.rutland@....com, dvyukov@...gle.com, pbonzini@...hat.com,
mbenes@...e.cz
Subject: Re: [PATCH v2 16/23] x86,vmx: Provide asm-goto-output vmread
On Tue, Dec 14, 2021 at 06:44:48PM +0000, Sean Christopherson wrote:
> This needs to route through a noinline vmread_error(), the intent is that KVM only
> does WARN once for all VMREAD failures, whereas having this inline will WARN once
> on each unique vmcs_read*().
Oh, fair enough.
> And at that point, we might as well hide the asm
> trampoline too. The amount of ifdeffery gets a bit gross, but in for a penny in
> for a pound?
>
> And like the other VMX instruction, I assume it's safe to annotate the failure
> path as instrumentation safe.
>
> So this?
Yep, think so.
> ---
> arch/x86/kvm/vmx/vmenter.S | 2 ++
> arch/x86/kvm/vmx/vmx.c | 7 +++++++
> arch/x86/kvm/vmx/vmx_ops.h | 31 +++++++++++++++++++++++++++++++
> 3 files changed, 40 insertions(+)
>
> diff --git a/arch/x86/kvm/vmx/vmenter.S b/arch/x86/kvm/vmx/vmenter.S
> index 3a6461694fc2..d8a7a0a69ec1 100644
> --- a/arch/x86/kvm/vmx/vmenter.S
> +++ b/arch/x86/kvm/vmx/vmenter.S
> @@ -238,6 +238,7 @@ SYM_FUNC_END(__vmx_vcpu_run)
>
> .section .text, "ax"
>
> +#ifdef CONFIG_CC_HAS_ASM_GOTO_OUTPUT
#ifndef ?
> /**
> * vmread_error_trampoline - Trampoline from inline asm to vmread_error()
> * @field: VMCS field encoding that failed
Powered by blists - more mailing lists