From 3f100f489c5f68fa528524955bc99275ce859aed Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Thu, 7 Oct 2021 17:10:49 -0400 Subject: [PATCH] Drop kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch Signed-off-by: Sasha Levin --- ...ptrs_from_userspace-when-exiting-smm.patch | 44 ------------------- queue-4.14/series | 1 - ...ptrs_from_userspace-when-exiting-smm.patch | 44 ------------------- queue-4.19/series | 1 - ...ptrs_from_userspace-when-exiting-smm.patch | 44 ------------------- queue-4.9/series | 1 - ...ptrs_from_userspace-when-exiting-smm.patch | 44 ------------------- queue-5.10/series | 1 - ...ptrs_from_userspace-when-exiting-smm.patch | 44 ------------------- queue-5.4/series | 1 - 10 files changed, 225 deletions(-) delete mode 100644 queue-4.14/kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch delete mode 100644 queue-4.19/kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch delete mode 100644 queue-4.9/kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch delete mode 100644 queue-5.10/kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch delete mode 100644 queue-5.4/kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch diff --git a/queue-4.14/kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch b/queue-4.14/kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch deleted file mode 100644 index 6f840fe19d9..00000000000 --- a/queue-4.14/kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 7dd8799f87b954a13c90bb3addc31b8cee566913 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 13 Sep 2021 17:09:50 +0300 -Subject: KVM: x86: reset pdptrs_from_userspace when exiting smm - -From: Maxim Levitsky - -[ Upstream commit 37687c403a641f251cb2ef2e7830b88aa0647ba9 ] - -When exiting SMM, pdpts are loaded again from the guest memory. - -This fixes a theoretical bug, when exit from SMM triggers entry to the -nested guest which re-uses some of the migration -code which uses this flag as a workaround for a legacy userspace. - -Signed-off-by: Maxim Levitsky -Message-Id: <20210913140954.165665-4-mlevitsk@redhat.com> -Signed-off-by: Paolo Bonzini -Signed-off-by: Sasha Levin ---- - arch/x86/kvm/x86.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c -index 0690155f42b2..fb65f98ea5ac 100644 ---- a/arch/x86/kvm/x86.c -+++ b/arch/x86/kvm/x86.c -@@ -5809,6 +5809,13 @@ static void kvm_smm_changed(struct kvm_vcpu *vcpu) - - /* Process a latched INIT or SMI, if any. */ - kvm_make_request(KVM_REQ_EVENT, vcpu); -+ -+ /* -+ * Even if KVM_SET_SREGS2 loaded PDPTRs out of band, -+ * on SMM exit we still need to reload them from -+ * guest memory -+ */ -+ vcpu->arch.pdptrs_from_userspace = false; - } - - kvm_mmu_reset_context(vcpu); --- -2.33.0 - diff --git a/queue-4.14/series b/queue-4.14/series index 60a31969b1a..b74d6e46ddb 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -7,4 +7,3 @@ usb-testusb-fix-for-showing-the-connection-speed.patch usb-dwc2-check-return-value-after-calling-platform_g.patch scsi-ses-retry-failed-send-receive-diagnostic-comman.patch kvm-do-not-shrink-halt_poll_ns-below-grow_start.patch -kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch diff --git a/queue-4.19/kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch b/queue-4.19/kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch deleted file mode 100644 index 62acf1752bc..00000000000 --- a/queue-4.19/kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch +++ /dev/null @@ -1,44 +0,0 @@ -From f7e0fec9141a7ddee4befbef59252aa8f1269971 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 13 Sep 2021 17:09:50 +0300 -Subject: KVM: x86: reset pdptrs_from_userspace when exiting smm - -From: Maxim Levitsky - -[ Upstream commit 37687c403a641f251cb2ef2e7830b88aa0647ba9 ] - -When exiting SMM, pdpts are loaded again from the guest memory. - -This fixes a theoretical bug, when exit from SMM triggers entry to the -nested guest which re-uses some of the migration -code which uses this flag as a workaround for a legacy userspace. - -Signed-off-by: Maxim Levitsky -Message-Id: <20210913140954.165665-4-mlevitsk@redhat.com> -Signed-off-by: Paolo Bonzini -Signed-off-by: Sasha Levin ---- - arch/x86/kvm/x86.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c -index 417abc9ba1ad..8ea5260ac1f7 100644 ---- a/arch/x86/kvm/x86.c -+++ b/arch/x86/kvm/x86.c -@@ -6184,6 +6184,13 @@ static void kvm_smm_changed(struct kvm_vcpu *vcpu) - - /* Process a latched INIT or SMI, if any. */ - kvm_make_request(KVM_REQ_EVENT, vcpu); -+ -+ /* -+ * Even if KVM_SET_SREGS2 loaded PDPTRs out of band, -+ * on SMM exit we still need to reload them from -+ * guest memory -+ */ -+ vcpu->arch.pdptrs_from_userspace = false; - } - - kvm_mmu_reset_context(vcpu); --- -2.33.0 - diff --git a/queue-4.19/series b/queue-4.19/series index d397adf4c3e..c0dd397a210 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -9,4 +9,3 @@ selftests-be-sure-to-make-khdr-before-other-targets.patch scsi-ses-retry-failed-send-receive-diagnostic-comman.patch tools-vm-page-types-remove-dependency-on-opt_file-fo.patch kvm-do-not-shrink-halt_poll_ns-below-grow_start.patch -kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch diff --git a/queue-4.9/kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch b/queue-4.9/kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch deleted file mode 100644 index 2627ecff48e..00000000000 --- a/queue-4.9/kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 9428b22b910d06cd002694669382d32fc4a24ba5 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 13 Sep 2021 17:09:50 +0300 -Subject: KVM: x86: reset pdptrs_from_userspace when exiting smm - -From: Maxim Levitsky - -[ Upstream commit 37687c403a641f251cb2ef2e7830b88aa0647ba9 ] - -When exiting SMM, pdpts are loaded again from the guest memory. - -This fixes a theoretical bug, when exit from SMM triggers entry to the -nested guest which re-uses some of the migration -code which uses this flag as a workaround for a legacy userspace. - -Signed-off-by: Maxim Levitsky -Message-Id: <20210913140954.165665-4-mlevitsk@redhat.com> -Signed-off-by: Paolo Bonzini -Signed-off-by: Sasha Levin ---- - arch/x86/kvm/x86.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c -index c0f7e746722d..821fd7e73708 100644 ---- a/arch/x86/kvm/x86.c -+++ b/arch/x86/kvm/x86.c -@@ -5695,6 +5695,13 @@ static void kvm_smm_changed(struct kvm_vcpu *vcpu) - - /* Process a latched INIT or SMI, if any. */ - kvm_make_request(KVM_REQ_EVENT, vcpu); -+ -+ /* -+ * Even if KVM_SET_SREGS2 loaded PDPTRs out of band, -+ * on SMM exit we still need to reload them from -+ * guest memory -+ */ -+ vcpu->arch.pdptrs_from_userspace = false; - } - - kvm_mmu_reset_context(vcpu); --- -2.33.0 - diff --git a/queue-4.9/series b/queue-4.9/series index 2d4a0d8c88b..e945995f4d2 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -6,4 +6,3 @@ ext2-fix-sleeping-in-atomic-bugs-on-error.patch scsi-sd-free-scsi_disk-device-via-put_device.patch usb-testusb-fix-for-showing-the-connection-speed.patch kvm-do-not-shrink-halt_poll_ns-below-grow_start.patch -kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch diff --git a/queue-5.10/kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch b/queue-5.10/kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch deleted file mode 100644 index ec1ea2d281b..00000000000 --- a/queue-5.10/kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 3d48006c3a41e35d90275e364d8757092df564d5 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 13 Sep 2021 17:09:50 +0300 -Subject: KVM: x86: reset pdptrs_from_userspace when exiting smm - -From: Maxim Levitsky - -[ Upstream commit 37687c403a641f251cb2ef2e7830b88aa0647ba9 ] - -When exiting SMM, pdpts are loaded again from the guest memory. - -This fixes a theoretical bug, when exit from SMM triggers entry to the -nested guest which re-uses some of the migration -code which uses this flag as a workaround for a legacy userspace. - -Signed-off-by: Maxim Levitsky -Message-Id: <20210913140954.165665-4-mlevitsk@redhat.com> -Signed-off-by: Paolo Bonzini -Signed-off-by: Sasha Levin ---- - arch/x86/kvm/x86.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c -index d65da3b5837b..9c031d256028 100644 ---- a/arch/x86/kvm/x86.c -+++ b/arch/x86/kvm/x86.c -@@ -7221,6 +7221,13 @@ static void kvm_smm_changed(struct kvm_vcpu *vcpu) - - /* Process a latched INIT or SMI, if any. */ - kvm_make_request(KVM_REQ_EVENT, vcpu); -+ -+ /* -+ * Even if KVM_SET_SREGS2 loaded PDPTRs out of band, -+ * on SMM exit we still need to reload them from -+ * guest memory -+ */ -+ vcpu->arch.pdptrs_from_userspace = false; - } - - kvm_mmu_reset_context(vcpu); --- -2.33.0 - diff --git a/queue-5.10/series b/queue-5.10/series index a7d3d56b79d..924a039715d 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -23,6 +23,5 @@ smb3-correct-smb3-acl-security-descriptor.patch tools-vm-page-types-remove-dependency-on-opt_file-fo.patch selftests-kvm-align-smccc-call-with-the-spec-in-stea.patch kvm-do-not-shrink-halt_poll_ns-below-grow_start.patch -kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch kvm-x86-add-amd-pmu-msrs-to-msrs_to_save_all.patch kvm-x86-nsvm-restore-int_vector-in-svm_clear_vintr.patch diff --git a/queue-5.4/kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch b/queue-5.4/kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch deleted file mode 100644 index 4ede6bb5129..00000000000 --- a/queue-5.4/kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch +++ /dev/null @@ -1,44 +0,0 @@ -From a2676eced8f71a928d34cdbcbc0de8326f42801a Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 13 Sep 2021 17:09:50 +0300 -Subject: KVM: x86: reset pdptrs_from_userspace when exiting smm - -From: Maxim Levitsky - -[ Upstream commit 37687c403a641f251cb2ef2e7830b88aa0647ba9 ] - -When exiting SMM, pdpts are loaded again from the guest memory. - -This fixes a theoretical bug, when exit from SMM triggers entry to the -nested guest which re-uses some of the migration -code which uses this flag as a workaround for a legacy userspace. - -Signed-off-by: Maxim Levitsky -Message-Id: <20210913140954.165665-4-mlevitsk@redhat.com> -Signed-off-by: Paolo Bonzini -Signed-off-by: Sasha Levin ---- - arch/x86/kvm/x86.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c -index f1a0eebdcf64..eed058529e4b 100644 ---- a/arch/x86/kvm/x86.c -+++ b/arch/x86/kvm/x86.c -@@ -6596,6 +6596,13 @@ static void kvm_smm_changed(struct kvm_vcpu *vcpu) - - /* Process a latched INIT or SMI, if any. */ - kvm_make_request(KVM_REQ_EVENT, vcpu); -+ -+ /* -+ * Even if KVM_SET_SREGS2 loaded PDPTRs out of band, -+ * on SMM exit we still need to reload them from -+ * guest memory -+ */ -+ vcpu->arch.pdptrs_from_userspace = false; - } - - kvm_mmu_reset_context(vcpu); --- -2.33.0 - diff --git a/queue-5.4/series b/queue-5.4/series index 2e9be79068e..d18270beaff 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -10,5 +10,4 @@ selftests-kvm-fix-get_warnings_count-ignoring-fscanf.patch scsi-ses-retry-failed-send-receive-diagnostic-comman.patch tools-vm-page-types-remove-dependency-on-opt_file-fo.patch kvm-do-not-shrink-halt_poll_ns-below-grow_start.patch -kvm-x86-reset-pdptrs_from_userspace-when-exiting-smm.patch kvm-x86-add-amd-pmu-msrs-to-msrs_to_save_all.patch -- 2.47.3