[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABgObfYQQZooYrsUnc8SSUbpiYQyZKGzDN2JutB-a5mJWWcr7w@mail.gmail.com>
Date: Fri, 9 Feb 2024 23:03:53 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Michal Wilczynski <michal.wilczynski@...el.com>,
Yunhong Jiang <yunhong.jiang@...ux.intel.com>, mlevitsk@...hat.com, tglx@...utronix.de,
mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com, x86@...nel.org,
hpa@...or.com, kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
dedekind1@...il.com, yuan.yao@...el.com, Zheyu Ma <zheyuma97@...il.com>
Subject: Re: [PATCH v2] KVM: x86: nSVM/nVMX: Fix handling triple fault on RSM instruction
On Fri, Feb 9, 2024 at 4:05 PM Sean Christopherson <seanjc@...gle.com> wrote:
> > If they are needed, it's fine. In my opinion a new callback is easier
> > to handle and understand than new state.
>
> Yeah, we ripped out post_leave_smm() because its sole usage at the time was buggy,
> and having a callback without a purpose would just be dead code.
[...]
> : But due to nested_run_pending being (unnecessarily) buried in vendor structs, it
> : might actually be easier to do a cleaner fix. E.g. add yet another flag to track
> : that a hardware VM-Enter needs to be completed in order to complete instruction
> : emulation.
>
> I didn't mean add a flag to the emulator to muck with nested_run_pending, I meant
> add a flag to kvm_vcpu_arch to be a superset of nested_run_pending. E.g. as a
> first step, something like the below. And then as follow up, see if it's doable
> to propagate nested_run_pending => insn_emulation_needs_vmenter so that the
> nested_run_pending checks in {svm,vmx}_{interrupt,nmi,smi}_allowed() can be
> dropped.
That seems a lot more complicated... What do you think of the patches
I posted (the one that works and the wish-it-could-be-like-that one
that folds triple faults into check_nested_events).
Paolo
Powered by blists - more mailing lists