diff --git a/patches.suse/kvm-mmu-Don-t-read-PDPTEs-when-paging-is-not-enabled.patch b/patches.suse/kvm-mmu-Don-t-read-PDPTEs-when-paging-is-not-enabled.patch new file mode 100644 index 0000000..36fb92e --- /dev/null +++ b/patches.suse/kvm-mmu-Don-t-read-PDPTEs-when-paging-is-not-enabled.patch @@ -0,0 +1,42 @@ +Patch-mainline: v4.19-rc5 +Git-commit: d35b34a9a70edae7ef923f100e51b8b5ae9fe899 +References: git-fixes +From: Junaid Shahid +Date: Wed, 8 Aug 2018 17:45:24 -0700 +Subject: [PATCH] kvm: mmu: Don't read PDPTEs when paging is not enabled + +kvm should not attempt to read guest PDPTEs when CR0.PG = 0 and +CR4.PAE = 1. + +Signed-off-by: Junaid Shahid +Signed-off-by: Paolo Bonzini +Signed-off-by: Juergen Gross +--- + arch/x86/kvm/x86.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c +index 542f6315444d..5c870203737f 100644 +--- a/arch/x86/kvm/x86.c ++++ b/arch/x86/kvm/x86.c +@@ -628,7 +628,7 @@ bool pdptrs_changed(struct kvm_vcpu *vcpu) + gfn_t gfn; + int r; + +- if (is_long_mode(vcpu) || !is_pae(vcpu)) ++ if (is_long_mode(vcpu) || !is_pae(vcpu) || !is_paging(vcpu)) + return false; + + if (!test_bit(VCPU_EXREG_PDPTR, +@@ -8177,7 +8177,7 @@ static int __set_sregs(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs) + kvm_update_cpuid(vcpu); + + idx = srcu_read_lock(&vcpu->kvm->srcu); +- if (!is_long_mode(vcpu) && is_pae(vcpu)) { ++ if (!is_long_mode(vcpu) && is_pae(vcpu) && is_paging(vcpu)) { + load_pdptrs(vcpu, vcpu->arch.walk_mmu, kvm_read_cr3(vcpu)); + mmu_reset_needed = 1; + } +-- +2.35.3 + diff --git a/series.conf b/series.conf index ff9cf92..bb8d971 100644 --- a/series.conf +++ b/series.conf @@ -41087,6 +41087,7 @@ patches.suse/s390-sles15sp1-00-04-19-KVM-s390-Make-huge-pages-unavailable-in-ucontrol-VMs.patch patches.suse/KVM-PPC-Avoid-marking-DMA-mapped-pages-dirty-in-real.patch patches.suse/KVM-PPC-Book3S-HV-Don-t-use-compound_order-to-determ.patch + patches.suse/kvm-mmu-Don-t-read-PDPTEs-when-paging-is-not-enabled.patch patches.suse/msft-hv-1758-x86-hyper-v-rename-ipi_arg_-ex-non_ex-structures.patch patches.suse/pinctrl-cannonlake-Fix-gpio-base-for-GPP-E.patch patches.suse/pinctrl-intel-Do-pin-translation-in-other-GPIO-opera.patch