[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ywa5K3qVO0kDfTW9@google.com>
Date: Wed, 24 Aug 2022 23:50:03 +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 13/13] KVM: x86: emulator/smm: preserve interrupt
shadow in SMRAM
On Wed, Aug 03, 2022, Maxim Levitsky wrote:
> @@ -518,7 +519,8 @@ struct kvm_smram_state_32 {
> u32 reserved1[62];
> u32 smbase;
> u32 smm_revision;
> - u32 reserved2[5];
> + u32 reserved2[4];
> + u32 int_shadow; /* KVM extension */
Looking at this with fresh(er) eyes, I agree with Jim: KVM shouldn't add its own
fields in SMRAM. There's no need to use vmcb/vmcs memory either, just add fields
in kvm_vcpu_arch to save/restore the state across SMI/RSM, and then borrow VMX's
approach of supporting migration by adding flags to do out-of-band migration,
e.g. KVM_STATE_NESTED_SMM_STI_BLOCKING and KVM_STATE_NESTED_SMM_MOV_SS_BLOCKING.
/* SMM state that's not saved in SMRAM. */
struct {
struct {
u8 interruptibility;
} smm;
} nested;
That'd finally give us an excuse to move nested_run_pending to common code too :-)
Powered by blists - more mailing lists