From fa0c83e4322049be0266a882c2a6dc63bfd94af2 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 10 Jun 2024 16:55:23 +0200 Subject: [PATCH] rebase patches on top of Ubuntu-5.15.0-115.125 (generated with debian/scripts/import-upstream-tag) Signed-off-by: Thomas Lamprecht --- ...-accept-an-alternate-timestamp-strin.patch | 2 +- ...d-Debian-wireless-regdb-certificates.patch | 2 +- ...idge-keep-MAC-of-first-assigned-port.patch | 2 +- ...ides-for-missing-ACS-capabilities-4..patch | 10 ++++----- ...-default-dynamic-halt-polling-growth.patch | 2 +- ...de-unregister_netdevice-refcount-lea.patch | 2 +- ...sce-host-bridge-contiguous-apertures.patch | 2 +- ...I-Coalesce-host-bridge-contiguous-ap.patch | 2 +- ...rate-split-BTF-type-info-per-default.patch | 2 +- ...group-always-terminate-io.stat-lines.patch | 8 +++---- ...-Don-t-mark-as-busy-the-simple-frame.patch | 2 +- ...edrm-Request-memory-region-in-driver.patch | 2 +- ...lefb-Request-memory-region-in-driver.patch | 2 +- ...mount-option-to-toggle-trunking-disc.patch | 6 ++--- ...CI-device-IDs-for-family-19h-model-5.patch | 4 ++-- ...6-bug-introduce-ASSERT_STRUCT_OFFSET.patch | 4 ++-- ...-update-the-emulation-mode-after-rsm.patch | 2 +- ...-smm-add-structs-for-KVM-s-smram-lay.patch | 8 +++---- ...-smm-use-smram-structs-in-the-common.patch | 22 +++++++++---------- ...-smm-use-smram-struct-for-32-bit-smr.patch | 10 ++++----- ...-smm-use-smram-struct-for-64-bit-smr.patch | 10 ++++----- .../0022-KVM-x86-SVM-use-smram-structs.patch | 6 ++--- ...t-save-SVM-state-to-SMRAM-when-VM-is.patch | 2 +- ...-smm-preserve-interrupt-shadow-in-SM.patch | 16 +++++++------- 24 files changed, 65 insertions(+), 65 deletions(-) diff --git a/patches/kernel/0001-Make-mkcompile_h-accept-an-alternate-timestamp-strin.patch b/patches/kernel/0001-Make-mkcompile_h-accept-an-alternate-timestamp-strin.patch index ac8a404..84c3306 100644 --- a/patches/kernel/0001-Make-mkcompile_h-accept-an-alternate-timestamp-strin.patch +++ b/patches/kernel/0001-Make-mkcompile_h-accept-an-alternate-timestamp-strin.patch @@ -21,7 +21,7 @@ Signed-off-by: Thomas Lamprecht 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h -index 6a2a04d92f42f..6c9430ee1a09d 100755 +index 6a2a04d92f42..6c9430ee1a09 100755 --- a/scripts/mkcompile_h +++ b/scripts/mkcompile_h @@ -22,10 +22,14 @@ else diff --git a/patches/kernel/0002-wireless-Add-Debian-wireless-regdb-certificates.patch b/patches/kernel/0002-wireless-Add-Debian-wireless-regdb-certificates.patch index 3a353ba..4c0ac0f 100644 --- a/patches/kernel/0002-wireless-Add-Debian-wireless-regdb-certificates.patch +++ b/patches/kernel/0002-wireless-Add-Debian-wireless-regdb-certificates.patch @@ -19,7 +19,7 @@ Signed-off-by: Thomas Lamprecht diff --git a/net/wireless/certs/debian.hex b/net/wireless/certs/debian.hex new file mode 100644 -index 0000000000000..c5ab03f8c500d +index 000000000000..c5ab03f8c500 --- /dev/null +++ b/net/wireless/certs/debian.hex @@ -0,0 +1,1426 @@ diff --git a/patches/kernel/0003-bridge-keep-MAC-of-first-assigned-port.patch b/patches/kernel/0003-bridge-keep-MAC-of-first-assigned-port.patch index 9180282..1dfa2e3 100644 --- a/patches/kernel/0003-bridge-keep-MAC-of-first-assigned-port.patch +++ b/patches/kernel/0003-bridge-keep-MAC-of-first-assigned-port.patch @@ -19,7 +19,7 @@ Signed-off-by: Thomas Lamprecht 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c -index 3326dfced68ab..3f1604948ace3 100644 +index 3326dfced68a..3f1604948ace 100644 --- a/net/bridge/br_stp_if.c +++ b/net/bridge/br_stp_if.c @@ -268,10 +268,7 @@ bool br_stp_recalculate_bridge_id(struct net_bridge *br) diff --git a/patches/kernel/0004-pci-Enable-overrides-for-missing-ACS-capabilities-4..patch b/patches/kernel/0004-pci-Enable-overrides-for-missing-ACS-capabilities-4..patch index 0ea9314..bed00a3 100644 --- a/patches/kernel/0004-pci-Enable-overrides-for-missing-ACS-capabilities-4..patch +++ b/patches/kernel/0004-pci-Enable-overrides-for-missing-ACS-capabilities-4..patch @@ -55,10 +55,10 @@ Signed-off-by: Thomas Lamprecht 2 files changed, 111 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt -index 78e8b05a0779d..b8b993afc4794 100644 +index 6c1254a22225..91c091c0f2c9 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt -@@ -4013,6 +4013,15 @@ +@@ -4035,6 +4035,15 @@ Also, it enforces the PCI Local Bus spec rule that those bits should be 0 in system reset events (useful for kexec/kdump cases). @@ -75,10 +75,10 @@ index 78e8b05a0779d..b8b993afc4794 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 b6af4b535d50f..1072fe82ab466 100644 +index bc680bdcbbed..faa53ccc9b69 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c -@@ -193,6 +193,106 @@ static int __init pci_apply_final_quirks(void) +@@ -194,6 +194,106 @@ static int __init pci_apply_final_quirks(void) } fs_initcall_sync(pci_apply_final_quirks); @@ -185,7 +185,7 @@ index b6af4b535d50f..1072fe82ab466 100644 /* * Decoding should be disabled for a PCI device during BAR sizing to avoid * conflict. But doing so may cause problems on host bridge and perhaps other -@@ -4971,6 +5071,8 @@ static const struct pci_dev_acs_enabled { +@@ -4972,6 +5072,8 @@ static const struct pci_dev_acs_enabled { { PCI_VENDOR_ID_CAVIUM, 0xA060, pci_quirk_mf_endpoint_acs }, /* APM X-Gene */ { PCI_VENDOR_ID_AMCC, 0xE004, pci_quirk_xgene_acs }, diff --git a/patches/kernel/0005-kvm-disable-default-dynamic-halt-polling-growth.patch b/patches/kernel/0005-kvm-disable-default-dynamic-halt-polling-growth.patch index 993a57e..9ea37ef 100644 --- a/patches/kernel/0005-kvm-disable-default-dynamic-halt-polling-growth.patch +++ b/patches/kernel/0005-kvm-disable-default-dynamic-halt-polling-growth.patch @@ -13,7 +13,7 @@ Signed-off-by: Thomas Lamprecht 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c -index d11c581ce9b9a..0b0ce69793702 100644 +index d11c581ce9b9..0b0ce6979370 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -79,7 +79,7 @@ module_param(halt_poll_ns, uint, 0644); diff --git a/patches/kernel/0006-net-core-downgrade-unregister_netdevice-refcount-lea.patch b/patches/kernel/0006-net-core-downgrade-unregister_netdevice-refcount-lea.patch index ba488f8..f405700 100644 --- a/patches/kernel/0006-net-core-downgrade-unregister_netdevice-refcount-lea.patch +++ b/patches/kernel/0006-net-core-downgrade-unregister_netdevice-refcount-lea.patch @@ -10,7 +10,7 @@ Signed-off-by: Thomas Lamprecht 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/dev.c b/net/core/dev.c -index f80bc2ca888aa..6ca7a4b8a8f43 100644 +index f80bc2ca888a..6ca7a4b8a8f4 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -10562,7 +10562,7 @@ static void netdev_wait_allrefs(struct net_device *dev) diff --git a/patches/kernel/0007-Revert-PCI-Coalesce-host-bridge-contiguous-apertures.patch b/patches/kernel/0007-Revert-PCI-Coalesce-host-bridge-contiguous-apertures.patch index 63d30c1..fe35cea 100644 --- a/patches/kernel/0007-Revert-PCI-Coalesce-host-bridge-contiguous-apertures.patch +++ b/patches/kernel/0007-Revert-PCI-Coalesce-host-bridge-contiguous-apertures.patch @@ -19,7 +19,7 @@ Signed-off-by: Thomas Lamprecht 1 file changed, 4 insertions(+), 46 deletions(-) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c -index 103ee42f67177..6b73e9179111c 100644 +index 103ee42f6717..6b73e9179111 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -20,7 +20,6 @@ diff --git a/patches/kernel/0008-PCI-Reinstate-PCI-Coalesce-host-bridge-contiguous-ap.patch b/patches/kernel/0008-PCI-Reinstate-PCI-Coalesce-host-bridge-contiguous-ap.patch index c7c1fc2..ce1bc88 100644 --- a/patches/kernel/0008-PCI-Reinstate-PCI-Coalesce-host-bridge-contiguous-ap.patch +++ b/patches/kernel/0008-PCI-Reinstate-PCI-Coalesce-host-bridge-contiguous-ap.patch @@ -56,7 +56,7 @@ Signed-off-by: Thomas Lamprecht 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c -index 6b73e9179111c..50eef5b211f48 100644 +index 6b73e9179111..50eef5b211f4 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -883,11 +883,11 @@ static void pci_set_bus_msi_domain(struct pci_bus *bus) diff --git a/patches/kernel/0009-do-not-generate-split-BTF-type-info-per-default.patch b/patches/kernel/0009-do-not-generate-split-BTF-type-info-per-default.patch index 5415f63..78bbaac 100644 --- a/patches/kernel/0009-do-not-generate-split-BTF-type-info-per-default.patch +++ b/patches/kernel/0009-do-not-generate-split-BTF-type-info-per-default.patch @@ -14,7 +14,7 @@ Signed-off-by: Thomas Lamprecht 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug -index 64d6292cf6864..0eb9109db02ef 100644 +index 28faea9b5da6..9cfb8a026adb 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -331,7 +331,7 @@ config PAHOLE_HAS_SPLIT_BTF diff --git a/patches/kernel/0010-blk-cgroup-always-terminate-io.stat-lines.patch b/patches/kernel/0010-blk-cgroup-always-terminate-io.stat-lines.patch index 3977c19..ab4a280 100644 --- a/patches/kernel/0010-blk-cgroup-always-terminate-io.stat-lines.patch +++ b/patches/kernel/0010-blk-cgroup-always-terminate-io.stat-lines.patch @@ -22,7 +22,7 @@ Signed-off-by: Thomas Lamprecht 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c -index fd81a73708645..4677829e4ae30 100644 +index fd81a7370864..4677829e4ae3 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -900,7 +900,6 @@ static void blkcg_print_one_stat(struct blkcg_gq *blkg, struct seq_file *s) @@ -64,7 +64,7 @@ index fd81a73708645..4677829e4ae30 100644 static int blkcg_print_stat(struct seq_file *sf, void *v) diff --git a/block/blk-iocost.c b/block/blk-iocost.c -index 645a589edda82..b0846da38edad 100644 +index 645a589edda8..b0846da38eda 100644 --- a/block/blk-iocost.c +++ b/block/blk-iocost.c @@ -3028,13 +3028,13 @@ static void ioc_pd_free(struct blkg_policy_data *pd) @@ -92,7 +92,7 @@ index 645a589edda82..b0846da38edad 100644 static u64 ioc_weight_prfill(struct seq_file *sf, struct blkg_policy_data *pd, diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c -index bdef8395af6e7..a5f13743a2800 100644 +index bdef8395af6e..a5f13743a280 100644 --- a/block/blk-iolatency.c +++ b/block/blk-iolatency.c @@ -906,7 +906,7 @@ static int iolatency_print_limit(struct seq_file *sf, void *v) @@ -133,7 +133,7 @@ index bdef8395af6e7..a5f13743a2800 100644 static struct blkg_policy_data *iolatency_pd_alloc(gfp_t gfp, diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h -index bc5c04d711bbc..618359e3becab 100644 +index bc5c04d711bb..618359e3beca 100644 --- a/include/linux/blk-cgroup.h +++ b/include/linux/blk-cgroup.h @@ -153,7 +153,7 @@ typedef void (blkcg_pol_online_pd_fn)(struct blkg_policy_data *pd); diff --git a/patches/kernel/0011-drivers-firmware-Don-t-mark-as-busy-the-simple-frame.patch b/patches/kernel/0011-drivers-firmware-Don-t-mark-as-busy-the-simple-frame.patch index 082b9c5..17bd084 100644 --- a/patches/kernel/0011-drivers-firmware-Don-t-mark-as-busy-the-simple-frame.patch +++ b/patches/kernel/0011-drivers-firmware-Don-t-mark-as-busy-the-simple-frame.patch @@ -20,7 +20,7 @@ Signed-off-by: Thomas Lamprecht 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/sysfb_simplefb.c b/drivers/firmware/sysfb_simplefb.c -index fd4fa923088af..ca907f7e76c65 100644 +index fd4fa923088a..ca907f7e76c6 100644 --- a/drivers/firmware/sysfb_simplefb.c +++ b/drivers/firmware/sysfb_simplefb.c @@ -99,7 +99,7 @@ __init struct platform_device *sysfb_create_simplefb(const struct screen_info *s diff --git a/patches/kernel/0012-drm-simpledrm-Request-memory-region-in-driver.patch b/patches/kernel/0012-drm-simpledrm-Request-memory-region-in-driver.patch index bbdde70..7569cf8 100644 --- a/patches/kernel/0012-drm-simpledrm-Request-memory-region-in-driver.patch +++ b/patches/kernel/0012-drm-simpledrm-Request-memory-region-in-driver.patch @@ -19,7 +19,7 @@ Signed-off-by: Thomas Lamprecht 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c -index f3c2c173ca4b5..da58c0d0f44d8 100644 +index f3c2c173ca4b..da58c0d0f44d 100644 --- a/drivers/gpu/drm/tiny/simpledrm.c +++ b/drivers/gpu/drm/tiny/simpledrm.c @@ -525,21 +525,33 @@ static int simpledrm_device_init_mm(struct simpledrm_device *sdev) diff --git a/patches/kernel/0013-fbdev-simplefb-Request-memory-region-in-driver.patch b/patches/kernel/0013-fbdev-simplefb-Request-memory-region-in-driver.patch index d3edc4a..901628c 100644 --- a/patches/kernel/0013-fbdev-simplefb-Request-memory-region-in-driver.patch +++ b/patches/kernel/0013-fbdev-simplefb-Request-memory-region-in-driver.patch @@ -18,7 +18,7 @@ Signed-off-by: Thomas Lamprecht 1 file changed, 45 insertions(+), 20 deletions(-) diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c -index a2e3a46900252..8acfb12abfee6 100644 +index a2e3a4690025..8acfb12abfee 100644 --- a/drivers/video/fbdev/simplefb.c +++ b/drivers/video/fbdev/simplefb.c @@ -66,7 +66,21 @@ static int simplefb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, diff --git a/patches/kernel/0014-NFSv4.1-provide-mount-option-to-toggle-trunking-disc.patch b/patches/kernel/0014-NFSv4.1-provide-mount-option-to-toggle-trunking-disc.patch index 87e2618..2808134 100644 --- a/patches/kernel/0014-NFSv4.1-provide-mount-option-to-toggle-trunking-disc.patch +++ b/patches/kernel/0014-NFSv4.1-provide-mount-option-to-toggle-trunking-disc.patch @@ -21,7 +21,7 @@ Signed-off-by: Thomas Lamprecht 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/fs/nfs/client.c b/fs/nfs/client.c -index 090b16890e3d6..f303e96ce165b 100644 +index 090b16890e3d..f303e96ce165 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -861,7 +861,8 @@ int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, struct nfs @@ -35,7 +35,7 @@ index 090b16890e3d6..f303e96ce165b 100644 if (error < 0) return error; diff --git a/fs/nfs/fs_context.c b/fs/nfs/fs_context.c -index fb3cad38b1497..0166370f088e9 100644 +index fb3cad38b149..0166370f088e 100644 --- a/fs/nfs/fs_context.c +++ b/fs/nfs/fs_context.c @@ -79,6 +79,7 @@ enum nfs_param { @@ -68,7 +68,7 @@ index fb3cad38b1497..0166370f088e9 100644 if (result.negated) ctx->flags |= NFS_MOUNT_NOAC; diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h -index 5e065f16d061d..324bdd653ad48 100644 +index 5e065f16d061..324bdd653ad4 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h @@ -157,6 +157,7 @@ struct nfs_server { diff --git a/patches/kernel/0015-EDAC-amd64-Add-PCI-device-IDs-for-family-19h-model-5.patch b/patches/kernel/0015-EDAC-amd64-Add-PCI-device-IDs-for-family-19h-model-5.patch index a1f23e7..2563831 100644 --- a/patches/kernel/0015-EDAC-amd64-Add-PCI-device-IDs-for-family-19h-model-5.patch +++ b/patches/kernel/0015-EDAC-amd64-Add-PCI-device-IDs-for-family-19h-model-5.patch @@ -14,7 +14,7 @@ Signed-off-by: Thomas Lamprecht 2 files changed, 18 insertions(+) diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c -index c6c58f01067f4..f8ef2edf8abf2 100644 +index c6c58f01067f..f8ef2edf8abf 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -2660,6 +2660,16 @@ static struct amd64_family_type family_types[] = { @@ -47,7 +47,7 @@ index c6c58f01067f4..f8ef2edf8abf2 100644 fam_type = &family_types[F19_M10H_CPUS]; pvt->ops = &family_types[F19_M10H_CPUS].ops; diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h -index 650cab401e212..352bda9803f6c 100644 +index 650cab401e21..352bda9803f6 100644 --- a/drivers/edac/amd64_edac.h +++ b/drivers/edac/amd64_edac.h @@ -128,6 +128,8 @@ diff --git a/patches/kernel/0016-bug-introduce-ASSERT_STRUCT_OFFSET.patch b/patches/kernel/0016-bug-introduce-ASSERT_STRUCT_OFFSET.patch index cd8ca9d..00c4974 100644 --- a/patches/kernel/0016-bug-introduce-ASSERT_STRUCT_OFFSET.patch +++ b/patches/kernel/0016-bug-introduce-ASSERT_STRUCT_OFFSET.patch @@ -18,7 +18,7 @@ Signed-off-by: Thomas Lamprecht 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/vmx/vmcs12.h b/arch/x86/kvm/vmx/vmcs12.h -index 2a45f026ee11d..ba8617964982a 100644 +index 2a45f026ee11..ba8617964982 100644 --- a/arch/x86/kvm/vmx/vmcs12.h +++ b/arch/x86/kvm/vmx/vmcs12.h @@ -208,9 +208,8 @@ struct __packed vmcs12 { @@ -34,7 +34,7 @@ index 2a45f026ee11d..ba8617964982a 100644 static inline void vmx_check_vmcs12_offsets(void) { diff --git a/include/linux/build_bug.h b/include/linux/build_bug.h -index e3a0be2c90ad9..3aa3640f8c181 100644 +index e3a0be2c90ad..3aa3640f8c18 100644 --- a/include/linux/build_bug.h +++ b/include/linux/build_bug.h @@ -77,4 +77,13 @@ diff --git a/patches/kernel/0017-KVM-x86-emulator-update-the-emulation-mode-after-rsm.patch b/patches/kernel/0017-KVM-x86-emulator-update-the-emulation-mode-after-rsm.patch index 9b4e4e5..3b01dc9 100644 --- a/patches/kernel/0017-KVM-x86-emulator-update-the-emulation-mode-after-rsm.patch +++ b/patches/kernel/0017-KVM-x86-emulator-update-the-emulation-mode-after-rsm.patch @@ -17,7 +17,7 @@ Signed-off-by: Thomas Lamprecht 1 file changed, 5 insertions(+) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c -index 98b25a7af8ce8..0616ee9cd9778 100644 +index 98b25a7af8ce..0616ee9cd977 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2638,6 +2638,11 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt) diff --git a/patches/kernel/0018-KVM-x86-emulator-smm-add-structs-for-KVM-s-smram-lay.patch b/patches/kernel/0018-KVM-x86-emulator-smm-add-structs-for-KVM-s-smram-lay.patch index 0496af5..9c6c829 100644 --- a/patches/kernel/0018-KVM-x86-emulator-smm-add-structs-for-KVM-s-smram-lay.patch +++ b/patches/kernel/0018-KVM-x86-emulator-smm-add-structs-for-KVM-s-smram-lay.patch @@ -17,7 +17,7 @@ Signed-off-by: Thomas Lamprecht 3 files changed, 225 insertions(+) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c -index 0616ee9cd9778..6866f09a5b53a 100644 +index 0616ee9cd977..6866f09a5b53 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -5829,3 +5829,9 @@ bool emulator_can_use_gpa(struct x86_emulate_ctxt *ctxt) @@ -31,7 +31,7 @@ index 0616ee9cd9778..6866f09a5b53a 100644 + __check_smram64_offsets(); +} diff --git a/arch/x86/kvm/kvm_emulate.h b/arch/x86/kvm/kvm_emulate.h -index fb09cd22cb7f5..0b2bbcce321ab 100644 +index fb09cd22cb7f..0b2bbcce321a 100644 --- a/arch/x86/kvm/kvm_emulate.h +++ b/arch/x86/kvm/kvm_emulate.h @@ -13,6 +13,7 @@ @@ -267,10 +267,10 @@ index fb09cd22cb7f5..0b2bbcce321ab 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 460ceae33ce05..0bdf6de8ca432 100644 +index 7e817493667d..f62bce0a74f0 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c -@@ -12682,6 +12682,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_vmgexit_msr_protocol_exit); +@@ -12695,6 +12695,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_vmgexit_msr_protocol_exit); static int __init kvm_x86_init(void) { kvm_mmu_x86_module_init(); diff --git a/patches/kernel/0019-KVM-x86-emulator-smm-use-smram-structs-in-the-common.patch b/patches/kernel/0019-KVM-x86-emulator-smm-use-smram-structs-in-the-common.patch index a38e75d..e9b3d1d 100644 --- a/patches/kernel/0019-KVM-x86-emulator-smm-use-smram-structs-in-the-common.patch +++ b/patches/kernel/0019-KVM-x86-emulator-smm-use-smram-structs-in-the-common.patch @@ -17,7 +17,7 @@ Signed-off-by: Thomas Lamprecht 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 ba9fac12562a6..3c97449cd6528 100644 +index b2a98914a63c..4b1514a174b0 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -200,6 +200,7 @@ typedef enum exit_fastpath_completion fastpath_t; @@ -28,7 +28,7 @@ index ba9fac12562a6..3c97449cd6528 100644 enum x86_intercept; enum x86_intercept_stage; -@@ -1463,8 +1464,8 @@ struct kvm_x86_ops { +@@ -1464,8 +1465,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 ba9fac12562a6..3c97449cd6528 100644 int (*mem_enc_op)(struct kvm *kvm, void __user *argp); diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c -index 6866f09a5b53a..ae6f89b79ef29 100644 +index 6866f09a5b53..ae6f89b79ef2 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2566,16 +2566,18 @@ static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt, @@ -84,7 +84,7 @@ index 6866f09a5b53a..ae6f89b79ef29 100644 if (ret != X86EMUL_CONTINUE) goto emulate_shutdown; diff --git a/arch/x86/kvm/kvm_emulate.h b/arch/x86/kvm/kvm_emulate.h -index 0b2bbcce321ab..3b37b3e173791 100644 +index 0b2bbcce321a..3b37b3e17379 100644 --- a/arch/x86/kvm/kvm_emulate.h +++ b/arch/x86/kvm/kvm_emulate.h @@ -19,6 +19,7 @@ @@ -105,7 +105,7 @@ index 0b2bbcce321ab..3b37b3e173791 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 af33aafcb4104..76a35d939b9fc 100644 +index af33aafcb410..76a35d939b9f 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -4328,12 +4328,14 @@ static int svm_smi_allowed(struct kvm_vcpu *vcpu, bool for_injection) @@ -143,10 +143,10 @@ index af33aafcb4104..76a35d939b9fc 100644 return 0; diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c -index 0767790331654..95c9ae69fbe74 100644 +index ab7141c1def4..f844864b5763 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c -@@ -7648,7 +7648,7 @@ static int vmx_smi_allowed(struct kvm_vcpu *vcpu, bool for_injection) +@@ -7652,7 +7652,7 @@ static int vmx_smi_allowed(struct kvm_vcpu *vcpu, bool for_injection) return !is_smm(vcpu); } @@ -155,7 +155,7 @@ index 0767790331654..95c9ae69fbe74 100644 { struct vcpu_vmx *vmx = to_vmx(vcpu); -@@ -7662,7 +7662,7 @@ static int vmx_enter_smm(struct kvm_vcpu *vcpu, char *smstate) +@@ -7666,7 +7666,7 @@ static int vmx_enter_smm(struct kvm_vcpu *vcpu, char *smstate) return 0; } @@ -165,10 +165,10 @@ index 0767790331654..95c9ae69fbe74 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 0bdf6de8ca432..a539103a6fff7 100644 +index f62bce0a74f0..3d282bcce9ef 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c -@@ -7476,9 +7476,9 @@ static void emulator_exiting_smm(struct x86_emulate_ctxt *ctxt) +@@ -7489,9 +7489,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 0bdf6de8ca432..a539103a6fff7 100644 } static void emulator_triple_fault(struct x86_emulate_ctxt *ctxt) -@@ -9357,25 +9357,25 @@ static void enter_smm(struct kvm_vcpu *vcpu) +@@ -9370,25 +9370,25 @@ static void enter_smm(struct kvm_vcpu *vcpu) struct kvm_segment cs, ds; struct desc_ptr dt; unsigned long cr0; diff --git a/patches/kernel/0020-KVM-x86-emulator-smm-use-smram-struct-for-32-bit-smr.patch b/patches/kernel/0020-KVM-x86-emulator-smm-use-smram-struct-for-32-bit-smr.patch index 0a96767..263b92b 100644 --- a/patches/kernel/0020-KVM-x86-emulator-smm-use-smram-struct-for-32-bit-smr.patch +++ b/patches/kernel/0020-KVM-x86-emulator-smm-use-smram-struct-for-32-bit-smr.patch @@ -15,7 +15,7 @@ Signed-off-by: Thomas Lamprecht 2 files changed, 60 insertions(+), 96 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c -index ae6f89b79ef29..36c45c89563cf 100644 +index ae6f89b79ef2..36c45c89563c 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2343,25 +2343,17 @@ static void rsm_set_desc_flags(struct desc_struct *desc, u32 flags) @@ -145,10 +145,10 @@ index ae6f89b79ef29..36c45c89563cf 100644 if (ret != X86EMUL_CONTINUE) goto emulate_shutdown; diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c -index a539103a6fff7..d32da92bff499 100644 +index 3d282bcce9ef..c6b5c0543931 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c -@@ -9211,22 +9211,18 @@ static u32 enter_smm_get_segment_flags(struct kvm_segment *seg) +@@ -9224,22 +9224,18 @@ static u32 enter_smm_get_segment_flags(struct kvm_segment *seg) return flags; } @@ -179,7 +179,7 @@ index a539103a6fff7..d32da92bff499 100644 } #ifdef CONFIG_X86_64 -@@ -9247,54 +9243,47 @@ static void enter_smm_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n) +@@ -9260,54 +9256,47 @@ static void enter_smm_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n) } #endif @@ -257,7 +257,7 @@ index a539103a6fff7..d32da92bff499 100644 } #ifdef CONFIG_X86_64 -@@ -9365,7 +9354,7 @@ static void enter_smm(struct kvm_vcpu *vcpu) +@@ -9378,7 +9367,7 @@ static void enter_smm(struct kvm_vcpu *vcpu) enter_smm_save_state_64(vcpu, (char *)&smram); else #endif diff --git a/patches/kernel/0021-KVM-x86-emulator-smm-use-smram-struct-for-64-bit-smr.patch b/patches/kernel/0021-KVM-x86-emulator-smm-use-smram-struct-for-64-bit-smr.patch index 58cc363..0bba628 100644 --- a/patches/kernel/0021-KVM-x86-emulator-smm-use-smram-struct-for-64-bit-smr.patch +++ b/patches/kernel/0021-KVM-x86-emulator-smm-use-smram-struct-for-64-bit-smr.patch @@ -16,7 +16,7 @@ Signed-off-by: Thomas Lamprecht 2 files changed, 62 insertions(+), 101 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c -index 36c45c89563cf..eb2f5e43f6add 100644 +index 36c45c89563c..eb2f5e43f6ad 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2357,24 +2357,16 @@ static void rsm_load_seg_32(struct x86_emulate_ctxt *ctxt, @@ -154,10 +154,10 @@ index 36c45c89563cf..eb2f5e43f6add 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 d32da92bff499..3bd65844e80f3 100644 +index c6b5c0543931..f309248fa888 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c -@@ -9226,20 +9226,17 @@ static void enter_smm_save_seg_32(struct kvm_vcpu *vcpu, +@@ -9239,20 +9239,17 @@ static void enter_smm_save_seg_32(struct kvm_vcpu *vcpu, } #ifdef CONFIG_X86_64 @@ -185,7 +185,7 @@ index d32da92bff499..3bd65844e80f3 100644 } #endif -@@ -9287,57 +9284,51 @@ static void enter_smm_save_state_32(struct kvm_vcpu *vcpu, struct kvm_smram_stat +@@ -9300,57 +9297,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 d32da92bff499..3bd65844e80f3 100644 } #endif -@@ -9351,7 +9342,7 @@ static void enter_smm(struct kvm_vcpu *vcpu) +@@ -9364,7 +9355,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)) diff --git a/patches/kernel/0022-KVM-x86-SVM-use-smram-structs.patch b/patches/kernel/0022-KVM-x86-SVM-use-smram-structs.patch index c35d4fd..e5197dc 100644 --- a/patches/kernel/0022-KVM-x86-SVM-use-smram-structs.patch +++ b/patches/kernel/0022-KVM-x86-SVM-use-smram-structs.patch @@ -17,10 +17,10 @@ Signed-off-by: Thomas Lamprecht 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 3c97449cd6528..f71db6a29835e 100644 +index 4b1514a174b0..95d609e67dd0 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h -@@ -1935,12 +1935,6 @@ static inline int kvm_cpu_get_apicid(int mps_cpu) +@@ -1936,12 +1936,6 @@ static inline int kvm_cpu_get_apicid(int mps_cpu) #endif } @@ -34,7 +34,7 @@ index 3c97449cd6528..f71db6a29835e 100644 int alloc_all_memslots_rmaps(struct kvm *kvm); diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c -index 76a35d939b9fc..ba3861d5114b0 100644 +index 76a35d939b9f..ba3861d5114b 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -4334,15 +4334,11 @@ static int svm_enter_smm(struct kvm_vcpu *vcpu, union kvm_smram *smram) diff --git a/patches/kernel/0023-KVM-x86-SVM-don-t-save-SVM-state-to-SMRAM-when-VM-is.patch b/patches/kernel/0023-KVM-x86-SVM-don-t-save-SVM-state-to-SMRAM-when-VM-is.patch index 13d6f78..9adf72b 100644 --- a/patches/kernel/0023-KVM-x86-SVM-don-t-save-SVM-state-to-SMRAM-when-VM-is.patch +++ b/patches/kernel/0023-KVM-x86-SVM-don-t-save-SVM-state-to-SMRAM-when-VM-is.patch @@ -19,7 +19,7 @@ Signed-off-by: Thomas Lamprecht 1 file changed, 9 insertions(+) diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c -index ba3861d5114b0..ebbd2d3b4e532 100644 +index ba3861d5114b..ebbd2d3b4e53 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -4337,6 +4337,15 @@ static int svm_enter_smm(struct kvm_vcpu *vcpu, union kvm_smram *smram) diff --git a/patches/kernel/0024-KVM-x86-emulator-smm-preserve-interrupt-shadow-in-SM.patch b/patches/kernel/0024-KVM-x86-emulator-smm-preserve-interrupt-shadow-in-SM.patch index 4686d9b..fca5a9a 100644 --- a/patches/kernel/0024-KVM-x86-emulator-smm-preserve-interrupt-shadow-in-SM.patch +++ b/patches/kernel/0024-KVM-x86-emulator-smm-preserve-interrupt-shadow-in-SM.patch @@ -30,7 +30,7 @@ Signed-off-by: Thomas Lamprecht 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c -index eb2f5e43f6add..7f5710c34f4e3 100644 +index eb2f5e43f6ad..7f5710c34f4e 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2419,7 +2419,7 @@ static int rsm_load_state_32(struct x86_emulate_ctxt *ctxt, @@ -72,7 +72,7 @@ index eb2f5e43f6add..7f5710c34f4e3 100644 } #endif diff --git a/arch/x86/kvm/kvm_emulate.h b/arch/x86/kvm/kvm_emulate.h -index 3b37b3e173791..a64c190abf28f 100644 +index 3b37b3e17379..a64c190abf28 100644 --- a/arch/x86/kvm/kvm_emulate.h +++ b/arch/x86/kvm/kvm_emulate.h @@ -231,6 +231,7 @@ struct x86_emulate_ops { @@ -128,10 +128,10 @@ index 3b37b3e173791..a64c190abf28f 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 3bd65844e80f3..53fc4dcedd8f9 100644 +index f309248fa888..4ea0e8112c42 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c -@@ -7463,6 +7463,11 @@ static void emulator_set_nmi_mask(struct x86_emulate_ctxt *ctxt, bool masked) +@@ -7476,6 +7476,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 3bd65844e80f3..53fc4dcedd8f9 100644 static unsigned emulator_get_hflags(struct x86_emulate_ctxt *ctxt) { return emul_to_vcpu(ctxt)->arch.hflags; -@@ -7532,6 +7537,7 @@ static const struct x86_emulate_ops emulate_ops = { +@@ -7545,6 +7550,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 3bd65844e80f3..53fc4dcedd8f9 100644 .get_hflags = emulator_get_hflags, .exiting_smm = emulator_exiting_smm, .leave_smm = emulator_leave_smm, -@@ -9281,6 +9287,8 @@ static void enter_smm_save_state_32(struct kvm_vcpu *vcpu, struct kvm_smram_stat +@@ -9294,6 +9300,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 3bd65844e80f3..53fc4dcedd8f9 100644 } #ifdef CONFIG_X86_64 -@@ -9329,6 +9337,8 @@ static void enter_smm_save_state_64(struct kvm_vcpu *vcpu, struct kvm_smram_stat +@@ -9342,6 +9350,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 3bd65844e80f3..53fc4dcedd8f9 100644 } #endif -@@ -9365,6 +9375,8 @@ static void enter_smm(struct kvm_vcpu *vcpu) +@@ -9378,6 +9388,8 @@ static void enter_smm(struct kvm_vcpu *vcpu) kvm_set_rflags(vcpu, X86_EFLAGS_FIXED); kvm_rip_write(vcpu, 0x8000);