lkml.org 
[lkml]   [2022]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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 :-)

\
 
 \ /
  Last update: 2022-08-25 01:51    [W:0.186 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site