rebase patches on top of Ubuntu-4.15.0-73.82
(generated with debian/scripts/import-upstream-tag) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
81ff40a1f6
commit
32c96a9e46
@ -55,10 +55,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|||||||
2 files changed, 110 insertions(+)
|
2 files changed, 110 insertions(+)
|
||||||
|
|
||||||
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
|
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
|
||||||
index 144c46d28f88..3597591d4c0a 100644
|
index 0c517aab6b2f..58ec5cfc71ce 100644
|
||||||
--- a/Documentation/admin-guide/kernel-parameters.txt
|
--- a/Documentation/admin-guide/kernel-parameters.txt
|
||||||
+++ b/Documentation/admin-guide/kernel-parameters.txt
|
+++ b/Documentation/admin-guide/kernel-parameters.txt
|
||||||
@@ -3163,6 +3163,15 @@
|
@@ -3165,6 +3165,15 @@
|
||||||
Also, it enforces the PCI Local Bus spec
|
Also, it enforces the PCI Local Bus spec
|
||||||
rule that those bits should be 0 in system reset
|
rule that those bits should be 0 in system reset
|
||||||
events (useful for kexec/kdump cases).
|
events (useful for kexec/kdump cases).
|
||||||
|
@ -29,7 +29,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|||||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
|
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
|
||||||
index 99550f4bd159..ef8f00a30d62 100644
|
index 7de0c9562b70..209cec7efef4 100644
|
||||||
--- a/fs/ocfs2/aops.c
|
--- a/fs/ocfs2/aops.c
|
||||||
+++ b/fs/ocfs2/aops.c
|
+++ b/fs/ocfs2/aops.c
|
||||||
@@ -797,6 +797,7 @@ struct ocfs2_write_ctxt {
|
@@ -797,6 +797,7 @@ struct ocfs2_write_ctxt {
|
||||||
@ -48,7 +48,7 @@ index 99550f4bd159..ef8f00a30d62 100644
|
|||||||
new = NULL;
|
new = NULL;
|
||||||
unlock:
|
unlock:
|
||||||
spin_unlock(&oi->ip_lock);
|
spin_unlock(&oi->ip_lock);
|
||||||
@@ -2256,7 +2258,7 @@ static int ocfs2_dio_wr_get_block(struct inode *inode, sector_t iblock,
|
@@ -2277,7 +2279,7 @@ static int ocfs2_dio_wr_get_block(struct inode *inode, sector_t iblock,
|
||||||
ue->ue_phys = desc->c_phys;
|
ue->ue_phys = desc->c_phys;
|
||||||
|
|
||||||
list_splice_tail_init(&wc->w_unwritten_list, &dwc->dw_zero_list);
|
list_splice_tail_init(&wc->w_unwritten_list, &dwc->dw_zero_list);
|
||||||
|
@ -350,10 +350,10 @@ index 27b75cf32cfa..250bcacdf9e9 100644
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
|
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
|
||||||
index ef8f00a30d62..cab26aa30f63 100644
|
index 209cec7efef4..1cf7ac84b70b 100644
|
||||||
--- a/fs/ocfs2/aops.c
|
--- a/fs/ocfs2/aops.c
|
||||||
+++ b/fs/ocfs2/aops.c
|
+++ b/fs/ocfs2/aops.c
|
||||||
@@ -2332,6 +2332,12 @@ static int ocfs2_dio_end_io_write(struct inode *inode,
|
@@ -2353,6 +2353,12 @@ static int ocfs2_dio_end_io_write(struct inode *inode,
|
||||||
|
|
||||||
ocfs2_init_dinode_extent_tree(&et, INODE_CACHE(inode), di_bh);
|
ocfs2_init_dinode_extent_tree(&et, INODE_CACHE(inode), di_bh);
|
||||||
|
|
||||||
|
@ -33,10 +33,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|||||||
4 files changed, 15 insertions(+), 28 deletions(-)
|
4 files changed, 15 insertions(+), 28 deletions(-)
|
||||||
|
|
||||||
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
|
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
|
||||||
index fdd8d2451a6d..69c8ea5dd428 100644
|
index fbaae82d3025..521f8d0632fb 100644
|
||||||
--- a/arch/x86/kvm/vmx.c
|
--- a/arch/x86/kvm/vmx.c
|
||||||
+++ b/arch/x86/kvm/vmx.c
|
+++ b/arch/x86/kvm/vmx.c
|
||||||
@@ -10001,10 +10001,8 @@ static void vmx_switch_vmcs(struct kvm_vcpu *vcpu, struct loaded_vmcs *vmcs)
|
@@ -10015,10 +10015,8 @@ static void vmx_switch_vmcs(struct kvm_vcpu *vcpu, struct loaded_vmcs *vmcs)
|
||||||
static void vmx_free_vcpu_nested(struct kvm_vcpu *vcpu)
|
static void vmx_free_vcpu_nested(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
struct vcpu_vmx *vmx = to_vmx(vcpu);
|
struct vcpu_vmx *vmx = to_vmx(vcpu);
|
||||||
@ -49,10 +49,10 @@ index fdd8d2451a6d..69c8ea5dd428 100644
|
|||||||
free_nested(vmx);
|
free_nested(vmx);
|
||||||
vcpu_put(vcpu);
|
vcpu_put(vcpu);
|
||||||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
|
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
|
||||||
index 81eddf386cd3..92dd28e8550e 100644
|
index 012bfad459ed..e42319badda3 100644
|
||||||
--- a/arch/x86/kvm/x86.c
|
--- a/arch/x86/kvm/x86.c
|
||||||
+++ b/arch/x86/kvm/x86.c
|
+++ b/arch/x86/kvm/x86.c
|
||||||
@@ -8038,17 +8038,13 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm,
|
@@ -8037,17 +8037,13 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm,
|
||||||
|
|
||||||
int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
|
int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
@ -72,7 +72,7 @@ index 81eddf386cd3..92dd28e8550e 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu)
|
void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu)
|
||||||
@@ -8058,13 +8054,15 @@ void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu)
|
@@ -8057,13 +8053,15 @@ void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu)
|
||||||
|
|
||||||
kvm_hv_vcpu_postcreate(vcpu);
|
kvm_hv_vcpu_postcreate(vcpu);
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ index 81eddf386cd3..92dd28e8550e 100644
|
|||||||
|
|
||||||
if (!kvmclock_periodic_sync)
|
if (!kvmclock_periodic_sync)
|
||||||
return;
|
return;
|
||||||
@@ -8075,11 +8073,9 @@ void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu)
|
@@ -8074,11 +8072,9 @@ void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu)
|
||||||
|
|
||||||
void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu)
|
void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
@ -102,7 +102,7 @@ index 81eddf386cd3..92dd28e8550e 100644
|
|||||||
kvm_mmu_unload(vcpu);
|
kvm_mmu_unload(vcpu);
|
||||||
vcpu_put(vcpu);
|
vcpu_put(vcpu);
|
||||||
|
|
||||||
@@ -8459,9 +8455,7 @@ int kvm_arch_post_init_vm(struct kvm *kvm)
|
@@ -8458,9 +8454,7 @@ int kvm_arch_post_init_vm(struct kvm *kvm)
|
||||||
|
|
||||||
static void kvm_unload_vcpu_mmu(struct kvm_vcpu *vcpu)
|
static void kvm_unload_vcpu_mmu(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
|
@ -19,10 +19,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
|
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
|
||||||
index 92dd28e8550e..157e28dbd0ed 100644
|
index e42319badda3..4292026a10aa 100644
|
||||||
--- a/arch/x86/kvm/x86.c
|
--- a/arch/x86/kvm/x86.c
|
||||||
+++ b/arch/x86/kvm/x86.c
|
+++ b/arch/x86/kvm/x86.c
|
||||||
@@ -8039,6 +8039,7 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm,
|
@@ -8038,6 +8038,7 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm,
|
||||||
int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
|
int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
vcpu->arch.arch_capabilities = kvm_get_arch_capabilities();
|
vcpu->arch.arch_capabilities = kvm_get_arch_capabilities();
|
||||||
@ -30,7 +30,7 @@ index 92dd28e8550e..157e28dbd0ed 100644
|
|||||||
kvm_vcpu_mtrr_init(vcpu);
|
kvm_vcpu_mtrr_init(vcpu);
|
||||||
vcpu_load(vcpu);
|
vcpu_load(vcpu);
|
||||||
kvm_vcpu_reset(vcpu, false);
|
kvm_vcpu_reset(vcpu, false);
|
||||||
@@ -8140,7 +8141,6 @@ void kvm_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event)
|
@@ -8139,7 +8140,6 @@ void kvm_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event)
|
||||||
kvm_pmu_reset(vcpu);
|
kvm_pmu_reset(vcpu);
|
||||||
vcpu->arch.smbase = 0x30000;
|
vcpu->arch.smbase = 0x30000;
|
||||||
|
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|
||||||
Date: Mon, 11 Nov 2019 15:22:38 +0100
|
|
||||||
Subject: [PATCH] Revert "KVM: x86: Manually calculate reserved bits when
|
|
||||||
loading PDPTRS"
|
|
||||||
|
|
||||||
breaks Linux guest if the host uses very old Intel CPUs
|
|
||||||
|
|
||||||
This reverts commit c5d574d63996442c80e886c60278a790230f4d2b.
|
|
||||||
|
|
||||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|
||||||
---
|
|
||||||
arch/x86/kvm/x86.c | 11 +++--------
|
|
||||||
1 file changed, 3 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
|
|
||||||
index 157e28dbd0ed..f7cd415fe37e 100644
|
|
||||||
--- a/arch/x86/kvm/x86.c
|
|
||||||
+++ b/arch/x86/kvm/x86.c
|
|
||||||
@@ -567,14 +567,8 @@ static int kvm_read_nested_guest_page(struct kvm_vcpu *vcpu, gfn_t gfn,
|
|
||||||
data, offset, len, access);
|
|
||||||
}
|
|
||||||
|
|
||||||
-static inline u64 pdptr_rsvd_bits(struct kvm_vcpu *vcpu)
|
|
||||||
-{
|
|
||||||
- return rsvd_bits(cpuid_maxphyaddr(vcpu), 63) | rsvd_bits(5, 8) |
|
|
||||||
- rsvd_bits(1, 2);
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
/*
|
|
||||||
- * Load the pae pdptrs. Return 1 if they are all valid, 0 otherwise.
|
|
||||||
+ * Load the pae pdptrs. Return true is they are all valid.
|
|
||||||
*/
|
|
||||||
int load_pdptrs(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, unsigned long cr3)
|
|
||||||
{
|
|
||||||
@@ -593,7 +587,8 @@ int load_pdptrs(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, unsigned long cr3)
|
|
||||||
}
|
|
||||||
for (i = 0; i < ARRAY_SIZE(pdpte); ++i) {
|
|
||||||
if ((pdpte[i] & PT_PRESENT_MASK) &&
|
|
||||||
- (pdpte[i] & pdptr_rsvd_bits(vcpu))) {
|
|
||||||
+ (pdpte[i] &
|
|
||||||
+ vcpu->arch.mmu.guest_rsvd_check.rsvd_bits_mask[0][2])) {
|
|
||||||
ret = 0;
|
|
||||||
goto out;
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user