]> git.proxmox.com Git - pve-kernel.git/blobdiff - patches/kernel/0014-KVM-x86-emulator-smm-use-smram-structs-in-the-common.patch
rebase patches on top of Ubuntu-5.19.0-16.16
[pve-kernel.git] / patches / kernel / 0014-KVM-x86-emulator-smm-use-smram-structs-in-the-common.patch
index ff6692d06e358b4411af1fe1e2af1d844dfb7334..aa12b92685649abb22bb9d9a9670ea5443099302 100644 (file)
@@ -17,7 +17,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
  6 files changed, 28 insertions(+), 20 deletions(-)
 
 diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
-index 9217bd6cf0d1..65e05d56602f 100644
+index 4c0e812f2f04..528df4b330ea 100644
 --- a/arch/x86/include/asm/kvm_host.h
 +++ b/arch/x86/include/asm/kvm_host.h
 @@ -202,6 +202,7 @@ typedef enum exit_fastpath_completion fastpath_t;
@@ -28,7 +28,7 @@ index 9217bd6cf0d1..65e05d56602f 100644
  enum x86_intercept;
  enum x86_intercept_stage;
  
-@@ -1550,8 +1551,8 @@ struct kvm_x86_ops {
+@@ -1551,8 +1552,8 @@ struct kvm_x86_ops {
        void (*setup_mce)(struct kvm_vcpu *vcpu);
  
        int (*smi_allowed)(struct kvm_vcpu *vcpu, bool for_injection);
@@ -40,7 +40,7 @@ index 9217bd6cf0d1..65e05d56602f 100644
  
        int (*mem_enc_ioctl)(struct kvm *kvm, void __user *argp);
 diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
-index b16353468b61..05c4d9dfbced 100644
+index cb8a1e540110..e29ae05e395b 100644
 --- a/arch/x86/kvm/emulate.c
 +++ b/arch/x86/kvm/emulate.c
 @@ -2582,16 +2582,18 @@ static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt,
@@ -105,10 +105,10 @@ index 0eb13204bbc2..04ac0cef8b57 100644
        int (*set_xcr)(struct x86_emulate_ctxt *ctxt, u32 index, u64 xcr);
  };
 diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
-index 44bbf25dfeb9..68c9a771b457 100644
+index 92b30b4937fc..f7f58c4cf341 100644
 --- a/arch/x86/kvm/svm/svm.c
 +++ b/arch/x86/kvm/svm/svm.c
-@@ -4299,12 +4299,14 @@ static int svm_smi_allowed(struct kvm_vcpu *vcpu, bool for_injection)
+@@ -4308,12 +4308,14 @@ static int svm_smi_allowed(struct kvm_vcpu *vcpu, bool for_injection)
        return 1;
  }
  
@@ -124,7 +124,7 @@ index 44bbf25dfeb9..68c9a771b457 100644
        if (!is_guest_mode(vcpu))
                return 0;
  
-@@ -4346,7 +4348,7 @@ static int svm_enter_smm(struct kvm_vcpu *vcpu, char *smstate)
+@@ -4355,7 +4357,7 @@ static int svm_enter_smm(struct kvm_vcpu *vcpu, char *smstate)
        return 0;
  }
  
@@ -133,7 +133,7 @@ index 44bbf25dfeb9..68c9a771b457 100644
  {
        struct vcpu_svm *svm = to_svm(vcpu);
        struct kvm_host_map map, map_save;
-@@ -4354,6 +4356,8 @@ static int svm_leave_smm(struct kvm_vcpu *vcpu, const char *smstate)
+@@ -4363,6 +4365,8 @@ static int svm_leave_smm(struct kvm_vcpu *vcpu, const char *smstate)
        struct vmcb *vmcb12;
        int ret;
  
@@ -143,7 +143,7 @@ index 44bbf25dfeb9..68c9a771b457 100644
                return 0;
  
 diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
-index be7c19374fdd..26803e4d64c6 100644
+index 0aaea87a1459..1a4db7147f44 100644
 --- a/arch/x86/kvm/vmx/vmx.c
 +++ b/arch/x86/kvm/vmx/vmx.c
 @@ -7725,7 +7725,7 @@ static int vmx_smi_allowed(struct kvm_vcpu *vcpu, bool for_injection)
@@ -165,10 +165,10 @@ index be7c19374fdd..26803e4d64c6 100644
        struct vcpu_vmx *vmx = to_vmx(vcpu);
        int ret;
 diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
-index 1b6f92546f3d..e48e7b7b8dde 100644
+index 51f1cd3f1db6..5cd86c42c72c 100644
 --- a/arch/x86/kvm/x86.c
 +++ b/arch/x86/kvm/x86.c
-@@ -7853,9 +7853,9 @@ static void emulator_exiting_smm(struct x86_emulate_ctxt *ctxt)
+@@ -7864,9 +7864,9 @@ static void emulator_exiting_smm(struct x86_emulate_ctxt *ctxt)
  }
  
  static int emulator_leave_smm(struct x86_emulate_ctxt *ctxt,
@@ -180,7 +180,7 @@ index 1b6f92546f3d..e48e7b7b8dde 100644
  }
  
  static void emulator_triple_fault(struct x86_emulate_ctxt *ctxt)
-@@ -9764,25 +9764,25 @@ static void enter_smm(struct kvm_vcpu *vcpu)
+@@ -9775,25 +9775,25 @@ static void enter_smm(struct kvm_vcpu *vcpu)
        struct kvm_segment cs, ds;
        struct desc_ptr dt;
        unsigned long cr0;