[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YwadM2Y3FCMutSpt@google.com>
Date: Wed, 24 Aug 2022 21:50:43 +0000
From: Sean Christopherson <seanjc@...gle.com>
To: Maxim Levitsky <mlevitsk@...hat.com>
Cc: kvm@...r.kernel.org, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
linux-kernel@...r.kernel.org, Wanpeng Li <wanpengli@...cent.com>,
Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
Jim Mattson <jmattson@...gle.com>,
Kees Cook <keescook@...omium.org>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>, Joerg Roedel <joro@...tes.org>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Paolo Bonzini <pbonzini@...hat.com>
Subject: Re: [PATCH v3 04/13] KVM: x86: emulator: update the emulation mode
after rsm
On Wed, Aug 03, 2022, Maxim Levitsky wrote:
Please make the changelog standalone, even though it means restating the shortlog
in most cases. When viewing git commits, the shortlog+changelog are bundled
fairly close together, but when viewing patches in a mail client, e.g. when doing
initial review, the shortlog is in the subject which may be far away or even
completely hidden.
> This ensures that RIP will be correctly written back,
> because the RSM instruction can switch the CPU mode from
> 32 bit (or less) to 64 bit.
Wrap closer to ~75 chars.
>
> This fixes a guest crash in case the #SMI is received
> while the guest runs a code from an address > 32 bit.
>
> Signed-off-by: Maxim Levitsky <mlevitsk@...hat.com>
> ---
> arch/x86/kvm/emulate.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> index bc70caf403c2b4..5e91b26cc1d8aa 100644
> --- a/arch/x86/kvm/emulate.c
> +++ b/arch/x86/kvm/emulate.c
> @@ -2666,6 +2666,11 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)
> if (ret != X86EMUL_CONTINUE)
> goto emulate_shutdown;
>
> +
Unnecessary newline.
> + ret = emulator_recalc_and_set_mode(ctxt);
> + if (ret != X86EMUL_CONTINUE)
> + goto emulate_shutdown;
> +
> /*
> * Note, the ctxt->ops callbacks are responsible for handling side
> * effects when writing MSRs and CRs, e.g. MMU context resets, CPUID
> --
> 2.26.3
>
Powered by blists - more mailing lists