]> git.proxmox.com Git - pve-kernel.git/commitdiff
rebase patches on top of Ubuntu-5.19.0-16.16
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 6 Sep 2022 05:41:22 +0000 (07:41 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 7 Sep 2022 13:10:23 +0000 (15:10 +0200)
(generated with debian/scripts/import-upstream-tag)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 files changed:
patches/kernel/0003-pci-Enable-overrides-for-missing-ACS-capabilities-4..patch
patches/kernel/0004-kvm-disable-default-dynamic-halt-polling-growth.patch
patches/kernel/0005-net-core-downgrade-unregister_netdevice-refcount-lea.patch
patches/kernel/0009-KVM-x86-emulator-em_sysexit-should-update-ctxt-mode.patch
patches/kernel/0010-KVM-x86-emulator-introduce-emulator_recalc_and_set_m.patch
patches/kernel/0011-KVM-x86-emulator-update-the-emulation-mode-after-rsm.patch
patches/kernel/0012-KVM-x86-emulator-update-the-emulation-mode-after-CR0.patch
patches/kernel/0013-KVM-x86-emulator-smm-add-structs-for-KVM-s-smram-lay.patch
patches/kernel/0014-KVM-x86-emulator-smm-use-smram-structs-in-the-common.patch
patches/kernel/0015-KVM-x86-emulator-smm-use-smram-struct-for-32-bit-smr.patch
patches/kernel/0016-KVM-x86-emulator-smm-use-smram-struct-for-64-bit-smr.patch
patches/kernel/0017-KVM-x86-SVM-use-smram-structs.patch
patches/kernel/0018-KVM-x86-SVM-don-t-save-SVM-state-to-SMRAM-when-VM-is.patch
patches/kernel/0019-KVM-x86-emulator-smm-preserve-interrupt-shadow-in-SM.patch
patches/kernel/0020-net-mlx5-Adjust-log_max_qp-to-be-18-at-most.patch [deleted file]
patches/kernel/0021-KVM-x86-revalidate-steal-time-cache-if-MSR-value-cha.patch [deleted file]
patches/kernel/0022-KVM-x86-do-not-report-preemption-if-the-steal-time-c.patch [deleted file]

index 90fda68b71490df99c47b762a97ce487a99d2157..235c6a3bee89d928a582f8eafdbc530ed9c035c8 100644 (file)
@@ -55,7 +55,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
  2 files changed, 111 insertions(+)
 
 diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
-index f47bfb27e3f2..6ec68ee888c3 100644
+index d4666e7c1843..47e8508a296e 100644
 --- a/Documentation/admin-guide/kernel-parameters.txt
 +++ b/Documentation/admin-guide/kernel-parameters.txt
 @@ -4094,6 +4094,15 @@
@@ -75,7 +75,7 @@ index f47bfb27e3f2..6ec68ee888c3 100644
                                Safety option to keep boot IRQs enabled. This
                                should never be necessary.
 diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
-index 19b8b31621cc..d6c49cb41eb0 100644
+index acf45f1f7264..7ab01acebf99 100644
 --- a/drivers/pci/quirks.c
 +++ b/drivers/pci/quirks.c
 @@ -194,6 +194,106 @@ static int __init pci_apply_final_quirks(void)
index 5f9ade8458d03f40eec5f6ccb0e99f3c44d84ac9..2f2b6d664bfe1b12f2a8944e2e3135371c5977f7 100644 (file)
@@ -13,7 +13,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
-index a49df8988cd6..d115df9c1397 100644
+index c56861ed0e38..3ba11c5e7acd 100644
 --- a/virt/kvm/kvm_main.c
 +++ b/virt/kvm/kvm_main.c
 @@ -79,7 +79,7 @@ module_param(halt_poll_ns, uint, 0644);
index 976a104b8e24e61c9e2c14f23f8e3a7d8998dc38..bc5ad8a78a13f085a811e14b91ad40bd6dc7744b 100644 (file)
@@ -10,12 +10,12 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/net/core/dev.c b/net/core/dev.c
-index 30a1603a7225..5eac3227f9cc 100644
+index ecaeb3ef8e5c..81f117f43bbe 100644
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -10267,7 +10267,7 @@ static struct net_device *netdev_wait_allrefs_any(struct list_head *list)
+@@ -10268,7 +10268,7 @@ static struct net_device *netdev_wait_allrefs_any(struct list_head *list)
                if (time_after(jiffies, warning_time +
-                              netdev_unregister_timeout_secs * HZ)) {
+                              READ_ONCE(netdev_unregister_timeout_secs) * HZ)) {
                        list_for_each_entry(dev, list, todo_list) {
 -                              pr_emerg("unregister_netdevice: waiting for %s to become free. Usage count = %d\n",
 +                              pr_err("unregister_netdevice: waiting for %s to become free. Usage count = %d\n",
index 329757d283a4b29f9d09914a56bf569d40ed254a..b3c4a8d7aa0733fb908e6ab71bfd5005b62e142e 100644 (file)
@@ -18,7 +18,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
  1 file changed, 1 insertion(+)
 
 diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
-index f8382abe22ff..13181819d52c 100644
+index 09fa8a94807b..d888223ef820 100644
 --- a/arch/x86/kvm/emulate.c
 +++ b/arch/x86/kvm/emulate.c
 @@ -2876,6 +2876,7 @@ static int em_sysexit(struct x86_emulate_ctxt *ctxt)
index 94d6af02b7f0329bfe253fd22786f232947c5c15..9af47ddd353b3f1a3bff02c9f628abf5107d3086 100644 (file)
@@ -21,10 +21,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
  1 file changed, 57 insertions(+), 28 deletions(-)
 
 diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
-index 13181819d52c..9411046e9ee0 100644
+index d888223ef820..529b9e052564 100644
 --- a/arch/x86/kvm/emulate.c
 +++ b/arch/x86/kvm/emulate.c
-@@ -793,8 +793,7 @@ static int linearize(struct x86_emulate_ctxt *ctxt,
+@@ -794,8 +794,7 @@ static int linearize(struct x86_emulate_ctxt *ctxt,
                           ctxt->mode, linear);
  }
  
@@ -34,7 +34,7 @@ index 13181819d52c..9411046e9ee0 100644
  {
        ulong linear;
        int rc;
-@@ -804,41 +803,71 @@ static inline int assign_eip(struct x86_emulate_ctxt *ctxt, ulong dst,
+@@ -805,41 +804,71 @@ static inline int assign_eip(struct x86_emulate_ctxt *ctxt, ulong dst,
  
        if (ctxt->op_bytes != sizeof(unsigned long))
                addr.ea = dst & ((1UL << (ctxt->op_bytes << 3)) - 1);
index dbdd16dba60f161c2359ac506de4bcf71918bbef..eae66bf49016cd5652036827c74b160d072b5681 100644 (file)
@@ -17,7 +17,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
  1 file changed, 5 insertions(+)
 
 diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
-index 9411046e9ee0..c646a37a8831 100644
+index 529b9e052564..f5451283abef 100644
 --- a/arch/x86/kvm/emulate.c
 +++ b/arch/x86/kvm/emulate.c
 @@ -2654,6 +2654,11 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)
index 7feea6f4f81f2e6d515c3a283c413eaeaa9ffde1..3de01d6e16c5bf37419e5a9537031bbeadff2c25 100644 (file)
@@ -19,7 +19,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
  1 file changed, 13 insertions(+), 1 deletion(-)
 
 diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
-index c646a37a8831..508316b9f195 100644
+index f5451283abef..854bd04d9320 100644
 --- a/arch/x86/kvm/emulate.c
 +++ b/arch/x86/kvm/emulate.c
 @@ -3646,11 +3646,23 @@ static int em_movbe(struct x86_emulate_ctxt *ctxt)
index 7d15d6ee2127e68b545798fb5a7872ce29c045aa..0b3f08be59cb893d4642d7f07494531efee7d281 100644 (file)
@@ -17,7 +17,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
  3 files changed, 225 insertions(+)
 
 diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
-index 508316b9f195..b16353468b61 100644
+index 854bd04d9320..cb8a1e540110 100644
 --- a/arch/x86/kvm/emulate.c
 +++ b/arch/x86/kvm/emulate.c
 @@ -5851,3 +5851,9 @@ bool emulator_can_use_gpa(struct x86_emulate_ctxt *ctxt)
@@ -267,10 +267,10 @@ index 8dff25d267b7..0eb13204bbc2 100644
  #if defined(CONFIG_X86_32)
  #define X86EMUL_MODE_HOST X86EMUL_MODE_PROT32
 diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
-index c48fed8ac5b1..1b6f92546f3d 100644
+index 380d187e735d..51f1cd3f1db6 100644
 --- a/arch/x86/kvm/x86.c
 +++ b/arch/x86/kvm/x86.c
-@@ -13119,6 +13119,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_vmgexit_msr_protocol_exit);
+@@ -13130,6 +13130,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_vmgexit_msr_protocol_exit);
  static int __init kvm_x86_init(void)
  {
        kvm_mmu_x86_module_init();
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;
index 9a0472538016bee1fc221b27f9f176b14c886855..6061e50e046190ecd9b28b81fcb940a615ed01b0 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
  2 files changed, 60 insertions(+), 96 deletions(-)
 
 diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
-index 05c4d9dfbced..47bb09f02304 100644
+index e29ae05e395b..70815bf6b4d2 100644
 --- a/arch/x86/kvm/emulate.c
 +++ b/arch/x86/kvm/emulate.c
 @@ -2359,25 +2359,17 @@ static void rsm_set_desc_flags(struct desc_struct *desc, u32 flags)
@@ -145,10 +145,10 @@ index 05c4d9dfbced..47bb09f02304 100644
        if (ret != X86EMUL_CONTINUE)
                goto emulate_shutdown;
 diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
-index e48e7b7b8dde..eb029c131d0d 100644
+index 5cd86c42c72c..61bd788c1d65 100644
 --- a/arch/x86/kvm/x86.c
 +++ b/arch/x86/kvm/x86.c
-@@ -9618,22 +9618,18 @@ static u32 enter_smm_get_segment_flags(struct kvm_segment *seg)
+@@ -9629,22 +9629,18 @@ static u32 enter_smm_get_segment_flags(struct kvm_segment *seg)
        return flags;
  }
  
@@ -179,7 +179,7 @@ index e48e7b7b8dde..eb029c131d0d 100644
  }
  
  #ifdef CONFIG_X86_64
-@@ -9654,54 +9650,47 @@ static void enter_smm_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n)
+@@ -9665,54 +9661,47 @@ static void enter_smm_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n)
  }
  #endif
  
@@ -257,7 +257,7 @@ index e48e7b7b8dde..eb029c131d0d 100644
  }
  
  #ifdef CONFIG_X86_64
-@@ -9772,7 +9761,7 @@ static void enter_smm(struct kvm_vcpu *vcpu)
+@@ -9783,7 +9772,7 @@ static void enter_smm(struct kvm_vcpu *vcpu)
                enter_smm_save_state_64(vcpu, (char *)&smram);
        else
  #endif
index 60ce973541b116f8663cdfdd62556f992577471f..c1e4ca23082d24c1e0d41b9b35178191018d3859 100644 (file)
@@ -16,7 +16,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
  2 files changed, 62 insertions(+), 101 deletions(-)
 
 diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
-index 47bb09f02304..265535d167a5 100644
+index 70815bf6b4d2..38f25ab83590 100644
 --- a/arch/x86/kvm/emulate.c
 +++ b/arch/x86/kvm/emulate.c
 @@ -2373,24 +2373,16 @@ static void rsm_load_seg_32(struct x86_emulate_ctxt *ctxt,
@@ -154,10 +154,10 @@ index 47bb09f02304..265535d167a5 100644
  #endif
                ret = rsm_load_state_32(ctxt, &smram.smram32);
 diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
-index eb029c131d0d..0cd48992f619 100644
+index 61bd788c1d65..45d8dad82ba2 100644
 --- a/arch/x86/kvm/x86.c
 +++ b/arch/x86/kvm/x86.c
-@@ -9633,20 +9633,17 @@ static void enter_smm_save_seg_32(struct kvm_vcpu *vcpu,
+@@ -9644,20 +9644,17 @@ static void enter_smm_save_seg_32(struct kvm_vcpu *vcpu,
  }
  
  #ifdef CONFIG_X86_64
@@ -185,7 +185,7 @@ index eb029c131d0d..0cd48992f619 100644
  }
  #endif
  
-@@ -9694,57 +9691,51 @@ static void enter_smm_save_state_32(struct kvm_vcpu *vcpu, struct kvm_smram_stat
+@@ -9705,57 +9702,51 @@ static void enter_smm_save_state_32(struct kvm_vcpu *vcpu, struct kvm_smram_stat
  }
  
  #ifdef CONFIG_X86_64
@@ -268,7 +268,7 @@ index eb029c131d0d..0cd48992f619 100644
  }
  #endif
  
-@@ -9758,7 +9749,7 @@ static void enter_smm(struct kvm_vcpu *vcpu)
+@@ -9769,7 +9760,7 @@ static void enter_smm(struct kvm_vcpu *vcpu)
        memset(smram.bytes, 0, sizeof(smram.bytes));
  #ifdef CONFIG_X86_64
        if (guest_cpuid_has(vcpu, X86_FEATURE_LM))
index 184c4d6b0890350105b78ce124bed061273d751d..f48fe6f731858c1a1244ea75319b35708a5ff630 100644 (file)
@@ -17,10 +17,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
  2 files changed, 6 insertions(+), 21 deletions(-)
 
 diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
-index 65e05d56602f..33c14d167de2 100644
+index 528df4b330ea..75878f2dbb26 100644
 --- a/arch/x86/include/asm/kvm_host.h
 +++ b/arch/x86/include/asm/kvm_host.h
-@@ -2042,12 +2042,6 @@ static inline int kvm_cpu_get_apicid(int mps_cpu)
+@@ -2043,12 +2043,6 @@ static inline int kvm_cpu_get_apicid(int mps_cpu)
  #endif
  }
  
@@ -34,10 +34,10 @@ index 65e05d56602f..33c14d167de2 100644
  
  int memslot_rmap_alloc(struct kvm_memory_slot *slot, unsigned long npages);
 diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
-index 68c9a771b457..23ad430207c5 100644
+index f7f58c4cf341..20f90c596d6a 100644
 --- a/arch/x86/kvm/svm/svm.c
 +++ b/arch/x86/kvm/svm/svm.c
-@@ -4305,15 +4305,11 @@ static int svm_enter_smm(struct kvm_vcpu *vcpu, union kvm_smram *smram)
+@@ -4314,15 +4314,11 @@ static int svm_enter_smm(struct kvm_vcpu *vcpu, union kvm_smram *smram)
        struct kvm_host_map map_save;
        int ret;
  
@@ -55,7 +55,7 @@ index 68c9a771b457..23ad430207c5 100644
  
        svm->vmcb->save.rax = vcpu->arch.regs[VCPU_REGS_RAX];
        svm->vmcb->save.rsp = vcpu->arch.regs[VCPU_REGS_RSP];
-@@ -4352,28 +4348,23 @@ static int svm_leave_smm(struct kvm_vcpu *vcpu, const union kvm_smram *smram)
+@@ -4361,28 +4357,23 @@ static int svm_leave_smm(struct kvm_vcpu *vcpu, const union kvm_smram *smram)
  {
        struct vcpu_svm *svm = to_svm(vcpu);
        struct kvm_host_map map, map_save;
@@ -87,7 +87,7 @@ index 68c9a771b457..23ad430207c5 100644
                return 1;
  
        ret = 1;
-@@ -4399,7 +4390,7 @@ static int svm_leave_smm(struct kvm_vcpu *vcpu, const union kvm_smram *smram)
+@@ -4408,7 +4399,7 @@ static int svm_leave_smm(struct kvm_vcpu *vcpu, const union kvm_smram *smram)
        vmcb12 = map.hva;
        nested_copy_vmcb_control_to_cache(svm, &vmcb12->control);
        nested_copy_vmcb_save_to_cache(svm, &vmcb12->save);
index b0300b525c1498c2bb268fad03a12c146a629702..589ba2c7ce0cb8377cd58fa1148a0085e46b1dbb 100644 (file)
@@ -19,10 +19,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
  1 file changed, 9 insertions(+)
 
 diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
-index 23ad430207c5..69ebe1dca33d 100644
+index 20f90c596d6a..c816783737b0 100644
 --- a/arch/x86/kvm/svm/svm.c
 +++ b/arch/x86/kvm/svm/svm.c
-@@ -4308,6 +4308,15 @@ static int svm_enter_smm(struct kvm_vcpu *vcpu, union kvm_smram *smram)
+@@ -4317,6 +4317,15 @@ static int svm_enter_smm(struct kvm_vcpu *vcpu, union kvm_smram *smram)
        if (!is_guest_mode(vcpu))
                return 0;
  
index 1ca1174fcd0934360c621e5dd61ddc43677798bc..35416348617322477355651a1bd8cd3a4a135951 100644 (file)
@@ -30,7 +30,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
  3 files changed, 32 insertions(+), 7 deletions(-)
 
 diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
-index 265535d167a5..3fb0518121db 100644
+index 38f25ab83590..97a706032e20 100644
 --- a/arch/x86/kvm/emulate.c
 +++ b/arch/x86/kvm/emulate.c
 @@ -2435,7 +2435,7 @@ static int rsm_load_state_32(struct x86_emulate_ctxt *ctxt,
@@ -128,10 +128,10 @@ index 04ac0cef8b57..d5707b3f254c 100644
        __CHECK_SMRAM64_OFFSET(auto_hlt_restart,        0xFEC9);
        __CHECK_SMRAM64_OFFSET(reserved2,               0xFECA);
 diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
-index 0cd48992f619..424ea7ce3a96 100644
+index 45d8dad82ba2..1d2b9ef40aa3 100644
 --- a/arch/x86/kvm/x86.c
 +++ b/arch/x86/kvm/x86.c
-@@ -7840,6 +7840,11 @@ static void emulator_set_nmi_mask(struct x86_emulate_ctxt *ctxt, bool masked)
+@@ -7851,6 +7851,11 @@ static void emulator_set_nmi_mask(struct x86_emulate_ctxt *ctxt, bool masked)
        static_call(kvm_x86_set_nmi_mask)(emul_to_vcpu(ctxt), masked);
  }
  
@@ -143,7 +143,7 @@ index 0cd48992f619..424ea7ce3a96 100644
  static unsigned emulator_get_hflags(struct x86_emulate_ctxt *ctxt)
  {
        return emul_to_vcpu(ctxt)->arch.hflags;
-@@ -7911,6 +7916,7 @@ static const struct x86_emulate_ops emulate_ops = {
+@@ -7922,6 +7927,7 @@ static const struct x86_emulate_ops emulate_ops = {
        .guest_has_fxsr      = emulator_guest_has_fxsr,
        .guest_has_rdpid     = emulator_guest_has_rdpid,
        .set_nmi_mask        = emulator_set_nmi_mask,
@@ -151,7 +151,7 @@ index 0cd48992f619..424ea7ce3a96 100644
        .get_hflags          = emulator_get_hflags,
        .exiting_smm         = emulator_exiting_smm,
        .leave_smm           = emulator_leave_smm,
-@@ -9688,6 +9694,8 @@ static void enter_smm_save_state_32(struct kvm_vcpu *vcpu, struct kvm_smram_stat
+@@ -9699,6 +9705,8 @@ static void enter_smm_save_state_32(struct kvm_vcpu *vcpu, struct kvm_smram_stat
        smram->cr4 = kvm_read_cr4(vcpu);
        smram->smm_revision = 0x00020000;
        smram->smbase = vcpu->arch.smbase;
@@ -160,7 +160,7 @@ index 0cd48992f619..424ea7ce3a96 100644
  }
  
  #ifdef CONFIG_X86_64
-@@ -9736,6 +9744,8 @@ static void enter_smm_save_state_64(struct kvm_vcpu *vcpu, struct kvm_smram_stat
+@@ -9747,6 +9755,8 @@ static void enter_smm_save_state_64(struct kvm_vcpu *vcpu, struct kvm_smram_stat
        enter_smm_save_seg_64(vcpu, &smram->ds, VCPU_SREG_DS);
        enter_smm_save_seg_64(vcpu, &smram->fs, VCPU_SREG_FS);
        enter_smm_save_seg_64(vcpu, &smram->gs, VCPU_SREG_GS);
@@ -169,7 +169,7 @@ index 0cd48992f619..424ea7ce3a96 100644
  }
  #endif
  
-@@ -9772,6 +9782,8 @@ static void enter_smm(struct kvm_vcpu *vcpu)
+@@ -9783,6 +9793,8 @@ static void enter_smm(struct kvm_vcpu *vcpu)
        kvm_set_rflags(vcpu, X86_EFLAGS_FIXED);
        kvm_rip_write(vcpu, 0x8000);
  
diff --git a/patches/kernel/0020-net-mlx5-Adjust-log_max_qp-to-be-18-at-most.patch b/patches/kernel/0020-net-mlx5-Adjust-log_max_qp-to-be-18-at-most.patch
deleted file mode 100644 (file)
index 38dca6f..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Maher Sanalla <msanalla@nvidia.com>
-Date: Sun, 24 Jul 2022 11:28:21 +0300
-Subject: [PATCH] net/mlx5: Adjust log_max_qp to be 18 at most
-
-[ Upstream commit a6e9085d791f8306084fd5bc44dd3fdd4e1ac27b ]
-
-The cited commit limited log_max_qp to be 17 due to FW capabilities.
-Recently, it turned out that there are old FW versions that supported
-more than 17, so the cited commit caused a degradation.
-
-Thus, set the maximum log_max_qp back to 18 as it was before the
-cited commit.
-
-Fixes: 7f839965b2d7 ("net/mlx5: Update log_max_qp value to be 17 at most")
-Signed-off-by: Maher Sanalla <msanalla@nvidia.com>
-Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
-Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
-Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
----
- drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
-index c9b4e50a593e..95f26624b57c 100644
---- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
-+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
-@@ -524,7 +524,7 @@ static int handle_hca_cap(struct mlx5_core_dev *dev, void *set_ctx)
-       /* Check log_max_qp from HCA caps to set in current profile */
-       if (prof->log_max_qp == LOG_MAX_SUPPORTED_QPS) {
--              prof->log_max_qp = min_t(u8, 17, MLX5_CAP_GEN_MAX(dev, log_max_qp));
-+              prof->log_max_qp = min_t(u8, 18, MLX5_CAP_GEN_MAX(dev, log_max_qp));
-       } else if (MLX5_CAP_GEN_MAX(dev, log_max_qp) < prof->log_max_qp) {
-               mlx5_core_warn(dev, "log_max_qp value in current profile is %d, changing it to HCA capability limit (%d)\n",
-                              prof->log_max_qp,
diff --git a/patches/kernel/0021-KVM-x86-revalidate-steal-time-cache-if-MSR-value-cha.patch b/patches/kernel/0021-KVM-x86-revalidate-steal-time-cache-if-MSR-value-cha.patch
deleted file mode 100644 (file)
index bcc611e..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Paolo Bonzini <pbonzini@redhat.com>
-Date: Thu, 4 Aug 2022 15:28:32 +0200
-Subject: [PATCH] KVM: x86: revalidate steal time cache if MSR value changes
-
-commit 901d3765fa804ce42812f1d5b1f3de2dfbb26723 upstream.
-
-Commit 7e2175ebd695 ("KVM: x86: Fix recording of guest steal time
-/ preempted status", 2021-11-11) open coded the previous call to
-kvm_map_gfn, but in doing so it dropped the comparison between the cached
-guest physical address and the one in the MSR.  This cause an incorrect
-cache hit if the guest modifies the steal time address while the memslots
-remain the same.  This can happen with kexec, in which case the steal
-time data is written at the address used by the old kernel instead of
-the old one.
-
-While at it, rename the variable from gfn to gpa since it is a plain
-physical address and not a right-shifted one.
-
-Reported-by: Dave Young <ruyang@redhat.com>
-Reported-by: Xiaoying Yan  <yiyan@redhat.com>
-Analyzed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-Cc: David Woodhouse <dwmw@amazon.co.uk>
-Cc: stable@vger.kernel.org
-Fixes: 7e2175ebd695 ("KVM: x86: Fix recording of guest steal time / preempted status")
-Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
----
- arch/x86/kvm/x86.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
-index 424ea7ce3a96..12b6dde48d03 100644
---- a/arch/x86/kvm/x86.c
-+++ b/arch/x86/kvm/x86.c
-@@ -3380,6 +3380,7 @@ static void record_steal_time(struct kvm_vcpu *vcpu)
-       struct gfn_to_hva_cache *ghc = &vcpu->arch.st.cache;
-       struct kvm_steal_time __user *st;
-       struct kvm_memslots *slots;
-+      gpa_t gpa = vcpu->arch.st.msr_val & KVM_STEAL_VALID_BITS;
-       u64 steal;
-       u32 version;
-@@ -3397,13 +3398,12 @@ static void record_steal_time(struct kvm_vcpu *vcpu)
-       slots = kvm_memslots(vcpu->kvm);
-       if (unlikely(slots->generation != ghc->generation ||
-+                   gpa != ghc->gpa ||
-                    kvm_is_error_hva(ghc->hva) || !ghc->memslot)) {
--              gfn_t gfn = vcpu->arch.st.msr_val & KVM_STEAL_VALID_BITS;
--
-               /* We rely on the fact that it fits in a single page. */
-               BUILD_BUG_ON((sizeof(*st) - 1) & KVM_STEAL_VALID_BITS);
--              if (kvm_gfn_to_hva_cache_init(vcpu->kvm, ghc, gfn, sizeof(*st)) ||
-+              if (kvm_gfn_to_hva_cache_init(vcpu->kvm, ghc, gpa, sizeof(*st)) ||
-                   kvm_is_error_hva(ghc->hva) || !ghc->memslot)
-                       return;
-       }
diff --git a/patches/kernel/0022-KVM-x86-do-not-report-preemption-if-the-steal-time-c.patch b/patches/kernel/0022-KVM-x86-do-not-report-preemption-if-the-steal-time-c.patch
deleted file mode 100644 (file)
index 7343a43..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Paolo Bonzini <pbonzini@redhat.com>
-Date: Thu, 4 Aug 2022 15:28:32 +0200
-Subject: [PATCH] KVM: x86: do not report preemption if the steal time cache is
- stale
-
-commit c3c28d24d910a746b02f496d190e0e8c6560224b upstream.
-
-Commit 7e2175ebd695 ("KVM: x86: Fix recording of guest steal time
-/ preempted status", 2021-11-11) open coded the previous call to
-kvm_map_gfn, but in doing so it dropped the comparison between the cached
-guest physical address and the one in the MSR.  This cause an incorrect
-cache hit if the guest modifies the steal time address while the memslots
-remain the same.  This can happen with kexec, in which case the preempted
-bit is written at the address used by the old kernel instead of
-the old one.
-
-Cc: David Woodhouse <dwmw@amazon.co.uk>
-Cc: stable@vger.kernel.org
-Fixes: 7e2175ebd695 ("KVM: x86: Fix recording of guest steal time / preempted status")
-Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
----
- arch/x86/kvm/x86.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
-index 12b6dde48d03..d915dc8a964a 100644
---- a/arch/x86/kvm/x86.c
-+++ b/arch/x86/kvm/x86.c
-@@ -4629,6 +4629,7 @@ static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu)
-       struct kvm_steal_time __user *st;
-       struct kvm_memslots *slots;
-       static const u8 preempted = KVM_VCPU_PREEMPTED;
-+      gpa_t gpa = vcpu->arch.st.msr_val & KVM_STEAL_VALID_BITS;
-       /*
-        * The vCPU can be marked preempted if and only if the VM-Exit was on
-@@ -4656,6 +4657,7 @@ static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu)
-       slots = kvm_memslots(vcpu->kvm);
-       if (unlikely(slots->generation != ghc->generation ||
-+                   gpa != ghc->gpa ||
-                    kvm_is_error_hva(ghc->hva) || !ghc->memslot))
-               return;