Compare commits
18 Commits
master
...
pve-kernel
Author | SHA1 | Date | |
---|---|---|---|
|
b6d9526601 | ||
|
ee7f5b50ad | ||
|
b9b2d45ed0 | ||
|
7b833ea615 | ||
|
b1cf66bce1 | ||
|
584fbee1dd | ||
|
7481faa0a8 | ||
|
97cd39f070 | ||
|
81b7cb8a78 | ||
|
03505c4ba3 | ||
|
f665e167a1 | ||
|
4d749645ab | ||
|
929ba8531f | ||
|
87f2b5c56d | ||
|
46396362f1 | ||
|
7622a48de8 | ||
|
33060f2711 | ||
|
9e34f3e811 |
4
Makefile
4
Makefile
@ -4,9 +4,9 @@ KERNEL_MIN=0
|
||||
KERNEL_PATCHLEVEL=21
|
||||
# increment KREL if the ABI changes (abicheck target in debian/rules)
|
||||
# rebuild packages with new KREL and run 'make abiupdate'
|
||||
KREL=3
|
||||
KREL=5
|
||||
|
||||
PKGREL=7
|
||||
PKGREL=10
|
||||
|
||||
KERNEL_MAJMIN=$(KERNEL_MAJ).$(KERNEL_MIN)
|
||||
KERNEL_VER=$(KERNEL_MAJMIN).$(KERNEL_PATCHLEVEL)
|
||||
|
6
README
6
README
@ -3,7 +3,7 @@ KERNEL SOURCE:
|
||||
|
||||
We currently use the Ubuntu kernel sources, available from:
|
||||
|
||||
http://kernel.ubuntu.com/git/ubuntu/ubuntu-bionic.git/
|
||||
http://kernel.ubuntu.com/git/ubuntu/ubuntu-disco.git/
|
||||
|
||||
Ubuntu will maintain those kernels till:
|
||||
|
||||
@ -13,10 +13,6 @@ Ubuntu will maintain those kernels till:
|
||||
Additional/Updated Modules:
|
||||
---------------------------
|
||||
|
||||
- include latest e1000e driver from intel/sourceforge
|
||||
|
||||
- include latest igb driver from intel/sourceforge
|
||||
|
||||
- include native OpenZFS filesystem kernel modules for Linux
|
||||
|
||||
* https://github.com/zfsonlinux/
|
||||
|
File diff suppressed because it is too large
Load Diff
26
debian/changelog
vendored
26
debian/changelog
vendored
@ -1,3 +1,29 @@
|
||||
pve-kernel (5.0.21-10) pve pmg; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.0.0-35.38
|
||||
|
||||
* bump ABI to 5.0.21-5
|
||||
|
||||
* avoid bouds error message about PC Speaker module being already registered
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 13 Nov 2019 08:27:10 +0100
|
||||
|
||||
pve-kernel (5.0.21-9) pve pmg; urgency=medium
|
||||
|
||||
* fix #2458: fix issues with Linux KVM guest on old Intel CPUs
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Mon, 11 Nov 2019 14:12:37 +0100
|
||||
|
||||
pve-kernel (5.0.21-8) pve pmg; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.0.0-33.35
|
||||
|
||||
* bump ABI to 5.0.21-4
|
||||
|
||||
* update ZFS FPU/SIMD implementation to upstream proposal
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 23 Oct 2019 17:49:13 +0200
|
||||
|
||||
pve-kernel (5.0.21-7) pve pmg; urgency=medium
|
||||
|
||||
* update ZFS to 0.8.2
|
||||
|
2
debian/rules
vendored
2
debian/rules
vendored
@ -27,6 +27,7 @@ PVE_CONFIG_OPTS= \
|
||||
-m CONFIG_CEPH_FS \
|
||||
-m CONFIG_BLK_DEV_NBD \
|
||||
-m CONFIG_BLK_DEV_RBD \
|
||||
-d CONFIG_SND_PCSP \
|
||||
-m CONFIG_BCACHE \
|
||||
-m CONFIG_JFS_FS \
|
||||
-m CONFIG_HFS_FS \
|
||||
@ -37,6 +38,7 @@ PVE_CONFIG_OPTS= \
|
||||
-e CONFIG_BLK_DEV_SR \
|
||||
-e CONFIG_BLK_DEV_DM \
|
||||
-e CONFIG_BLK_DEV_NVME \
|
||||
-e CONFIG_NLS_ISO8859_1 \
|
||||
-d CONFIG_INPUT_EVBUG \
|
||||
-d CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND \
|
||||
-e CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE \
|
||||
|
@ -925,8 +925,11 @@ nvidia/gp102/gr/sw_ctx.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp102/gr/sw_method_init.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp102/gr/sw_nonctx.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp102/nvdec/scrubber.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp102/sec2/desc-1.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp102/sec2/desc.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp102/sec2/image-1.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp102/sec2/image.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp102/sec2/sig-1.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp102/sec2/sig.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp104/acr/bl.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp104/acr/ucode_load.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
@ -945,8 +948,11 @@ nvidia/gp104/gr/sw_ctx.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp104/gr/sw_method_init.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp104/gr/sw_nonctx.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp104/nvdec/scrubber.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp104/sec2/desc-1.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp104/sec2/desc.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp104/sec2/image-1.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp104/sec2/image.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp104/sec2/sig-1.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp104/sec2/sig.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp106/acr/bl.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp106/acr/ucode_load.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
@ -965,8 +971,11 @@ nvidia/gp106/gr/sw_ctx.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp106/gr/sw_method_init.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp106/gr/sw_nonctx.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp106/nvdec/scrubber.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp106/sec2/desc-1.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp106/sec2/desc.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp106/sec2/image-1.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp106/sec2/image.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp106/sec2/sig-1.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp106/sec2/sig.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp107/acr/bl.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp107/acr/ucode_load.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
@ -985,8 +994,11 @@ nvidia/gp107/gr/sw_ctx.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp107/gr/sw_method_init.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp107/gr/sw_nonctx.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp107/nvdec/scrubber.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp107/sec2/desc-1.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp107/sec2/desc.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp107/sec2/image-1.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp107/sec2/image.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp107/sec2/sig-1.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp107/sec2/sig.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp108/acr/bl.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
nvidia/gp108/acr/ucode_load.bin kernel/drivers/gpu/drm/nouveau/nouveau.ko
|
||||
|
@ -1,37 +0,0 @@
|
||||
diff --git a/src/netdev.c b/src/netdev.c
|
||||
index 73b0f9a..aef1bc2 100644
|
||||
--- a/src/netdev.c
|
||||
+++ b/src/netdev.c
|
||||
@@ -6724,19 +6724,12 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu)
|
||||
int max_frame = new_mtu + VLAN_ETH_HLEN + ETH_FCS_LEN;
|
||||
|
||||
/* Jumbo frame support */
|
||||
- if ((max_frame > (VLAN_ETH_FRAME_LEN + ETH_FCS_LEN)) &&
|
||||
+ if ((new_mtu > ETH_DATA_LEN) &&
|
||||
!(adapter->flags & FLAG_HAS_JUMBO_FRAMES)) {
|
||||
e_err("Jumbo Frames not supported.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- /* Supported frame sizes */
|
||||
- if ((new_mtu < (VLAN_ETH_ZLEN + ETH_FCS_LEN)) ||
|
||||
- (max_frame > adapter->max_hw_frame_size)) {
|
||||
- e_err("Unsupported MTU setting\n");
|
||||
- return -EINVAL;
|
||||
- }
|
||||
-
|
||||
/* Jumbo frame workaround on 82579 and newer requires CRC be stripped */
|
||||
if ((adapter->hw.mac.type >= e1000_pch2lan) &&
|
||||
!(adapter->flags2 & FLAG2_CRC_STRIPPING) &&
|
||||
@@ -8262,6 +8255,11 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
#endif /* HAVE_NETDEV_VLAN_FEATURES */
|
||||
}
|
||||
|
||||
+ /* MTU range: 68 - max_hw_frame_size */
|
||||
+ netdev->min_mtu = ETH_MIN_MTU;
|
||||
+ netdev->max_mtu = adapter->max_hw_frame_size -
|
||||
+ (VLAN_ETH_HLEN + ETH_FCS_LEN);
|
||||
+
|
||||
if (e1000e_enable_mng_pass_thru(&adapter->hw))
|
||||
adapter->flags |= FLAG_MNG_PT_ENABLED;
|
||||
|
@ -1,53 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
Date: Tue, 5 Jun 2018 11:16:29 +0200
|
||||
Subject: [PATCH] port to new internal kernel timer API
|
||||
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
diff --git a/src/netdev.c b/src/netdev.c
|
||||
--- a/src/netdev.c
|
||||
+++ b/src/netdev.c
|
||||
@@ -5389,9 +5389,10 @@
|
||||
* Need to wait a few seconds after link up to get diagnostic information from
|
||||
* the phy
|
||||
**/
|
||||
-static void e1000_update_phy_info(unsigned long data)
|
||||
+static void e1000_update_phy_info(struct timer_list *t)
|
||||
{
|
||||
- struct e1000_adapter *adapter = (struct e1000_adapter *)data;
|
||||
+ struct e1000_adapter *adapter;
|
||||
+ adapter = from_timer(adapter, t, phy_info_timer);
|
||||
|
||||
if (test_bit(__E1000_DOWN, &adapter->state))
|
||||
return;
|
||||
@@ -5774,9 +5775,10 @@
|
||||
* e1000_watchdog - Timer Call-back
|
||||
* @data: pointer to adapter cast into an unsigned long
|
||||
**/
|
||||
-static void e1000_watchdog(unsigned long data)
|
||||
+static void e1000_watchdog(struct timer_list *t)
|
||||
{
|
||||
- struct e1000_adapter *adapter = (struct e1000_adapter *)data;
|
||||
+ struct e1000_adapter *adapter;
|
||||
+ adapter = from_timer(adapter, t, watchdog_timer);
|
||||
|
||||
/* Do the rest outside of interrupt context */
|
||||
schedule_work(&adapter->watchdog_task);
|
||||
@@ -8348,13 +8348,9 @@
|
||||
goto err_eeprom;
|
||||
}
|
||||
|
||||
- init_timer(&adapter->watchdog_timer);
|
||||
- adapter->watchdog_timer.function = e1000_watchdog;
|
||||
- adapter->watchdog_timer.data = (unsigned long)adapter;
|
||||
-
|
||||
- init_timer(&adapter->phy_info_timer);
|
||||
- adapter->phy_info_timer.function = e1000_update_phy_info;
|
||||
- adapter->phy_info_timer.data = (unsigned long)adapter;
|
||||
+ timer_setup(&adapter->watchdog_timer, e1000_watchdog, 0);
|
||||
+
|
||||
+ timer_setup(&adapter->phy_info_timer, e1000_update_phy_info, 0);
|
||||
|
||||
INIT_WORK(&adapter->reset_task, e1000_reset_task);
|
||||
INIT_WORK(&adapter->watchdog_task, e1000_watchdog_task);
|
@ -1,15 +0,0 @@
|
||||
diff --git a/src/igb_main.c.orig b/src/igb_main.c
|
||||
index 3ee1ec7..c8adf04 100644
|
||||
--- a/src/igb_main.c.orig
|
||||
+++ b/src/igb_main.c
|
||||
@@ -5888,10 +5888,8 @@ static int igb_change_mtu(struct net_dev
|
||||
while (test_and_set_bit(__IGB_RESETTING, &adapter->state))
|
||||
usleep_range(1000, 2000);
|
||||
|
||||
-#ifndef HAVE_NETDEVICE_MIN_MAX_MTU
|
||||
/* igb_down has a dependency on max_frame_size */
|
||||
adapter->max_frame_size = max_frame;
|
||||
-#endif
|
||||
|
||||
if (netif_running(netdev))
|
||||
igb_down(adapter);
|
@ -1,18 +0,0 @@
|
||||
diff --git a/src/Makefile.orig b/src/Makefile
|
||||
index 8e962f7..50bcdcc 100644
|
||||
--- a/src/Makefile.orig
|
||||
+++ b/src/Makefile
|
||||
@@ -123,6 +123,13 @@ ifeq (,$(CC))
|
||||
$(error Compiler not found)
|
||||
endif
|
||||
|
||||
+# workaround for GCC6's default PIE
|
||||
+ifeq ($(CC),gcc)
|
||||
+ PIE_TEST = [ -z "`$(CC) -fno-PIE -no-pie -x c -c /dev/null -o /dev/null 2>&1`" ]
|
||||
+ PIE_FLAGS := $(shell $(PIE_TEST) && echo '-fno-PIE -no-pie')
|
||||
+ EXTRA_CFLAGS += $(PIE_FLAGS)
|
||||
+endif
|
||||
+
|
||||
# we need to know what platform the driver is being built on
|
||||
# some additional features are only built on Intel platforms
|
||||
ARCH := $(shell uname -m | sed 's/i.86/i386/')
|
@ -55,10 +55,10 @@ 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 3dda6833f586..241de26a2f17 100644
|
||||
index 988d3f3ad29d..cd1a1bddb997 100644
|
||||
--- a/Documentation/admin-guide/kernel-parameters.txt
|
||||
+++ b/Documentation/admin-guide/kernel-parameters.txt
|
||||
@@ -3287,6 +3287,15 @@
|
||||
@@ -3312,6 +3312,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,7 +75,7 @@ index 3dda6833f586..241de26a2f17 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 66eac47bbdd6..315e170523d8 100644
|
||||
index e2479ccedc91..4981d0ec7960 100644
|
||||
--- a/drivers/pci/quirks.c
|
||||
+++ b/drivers/pci/quirks.c
|
||||
@@ -194,6 +194,106 @@ static int __init pci_apply_final_quirks(void)
|
||||
|
@ -13,10 +13,10 @@ 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 f48f911d4663..5d906fc47e98 100644
|
||||
index 6f50cf5b9ef5..a3d541f23204 100644
|
||||
--- a/virt/kvm/kvm_main.c
|
||||
+++ b/virt/kvm/kvm_main.c
|
||||
@@ -77,7 +77,7 @@ module_param(halt_poll_ns, uint, 0644);
|
||||
@@ -78,7 +78,7 @@ module_param(halt_poll_ns, uint, 0644);
|
||||
EXPORT_SYMBOL_GPL(halt_poll_ns);
|
||||
|
||||
/* Default doubles per-vcpu halt_poll_ns. */
|
||||
|
@ -18,7 +18,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
|
||||
index fb467d310c99..3759f52b5966 100644
|
||||
index 2bb8fa904b9f..835edf9b2954 100644
|
||||
--- a/arch/x86/kvm/vmx/vmx.c
|
||||
+++ b/arch/x86/kvm/vmx/vmx.c
|
||||
@@ -106,7 +106,7 @@ module_param(enable_apicv, bool, S_IRUGO);
|
||||
|
105
patches/kernel/0008-KVM-x86-introduce-is_pae_paging.patch
Normal file
105
patches/kernel/0008-KVM-x86-introduce-is_pae_paging.patch
Normal file
@ -0,0 +1,105 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Date: Thu, 6 Jun 2019 18:52:44 +0200
|
||||
Subject: [PATCH] KVM: x86: introduce is_pae_paging
|
||||
|
||||
Checking for 32-bit PAE is quite common around code that fiddles with
|
||||
the PDPTRs. Add a function to compress all checks into a single
|
||||
invocation.
|
||||
|
||||
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
|
||||
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
||||
(cherry picked from commit bf03d4f9334728bf7c8ffc7de787df48abd6340e)
|
||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
---
|
||||
arch/x86/kvm/vmx/nested.c | 3 +--
|
||||
arch/x86/kvm/vmx/vmx.c | 4 ++--
|
||||
arch/x86/kvm/x86.c | 8 ++++----
|
||||
arch/x86/kvm/x86.h | 5 +++++
|
||||
4 files changed, 12 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
|
||||
index d7c52e748966..7bb5801b5e11 100644
|
||||
--- a/arch/x86/kvm/vmx/nested.c
|
||||
+++ b/arch/x86/kvm/vmx/nested.c
|
||||
@@ -944,8 +944,7 @@ static int nested_vmx_load_cr3(struct kvm_vcpu *vcpu, unsigned long cr3, bool ne
|
||||
* If PAE paging and EPT are both on, CR3 is not used by the CPU and
|
||||
* must not be dereferenced.
|
||||
*/
|
||||
- if (!is_long_mode(vcpu) && is_pae(vcpu) && is_paging(vcpu) &&
|
||||
- !nested_ept) {
|
||||
+ if (is_pae_paging(vcpu) && !nested_ept) {
|
||||
if (!load_pdptrs(vcpu, vcpu->arch.walk_mmu, cr3)) {
|
||||
*entry_failure_code = ENTRY_FAIL_PDPTE;
|
||||
return 1;
|
||||
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
|
||||
index 835edf9b2954..86c5ab3728ac 100644
|
||||
--- a/arch/x86/kvm/vmx/vmx.c
|
||||
+++ b/arch/x86/kvm/vmx/vmx.c
|
||||
@@ -2729,7 +2729,7 @@ static void ept_load_pdptrs(struct kvm_vcpu *vcpu)
|
||||
(unsigned long *)&vcpu->arch.regs_dirty))
|
||||
return;
|
||||
|
||||
- if (is_paging(vcpu) && is_pae(vcpu) && !is_long_mode(vcpu)) {
|
||||
+ if (is_pae_paging(vcpu)) {
|
||||
vmcs_write64(GUEST_PDPTR0, mmu->pdptrs[0]);
|
||||
vmcs_write64(GUEST_PDPTR1, mmu->pdptrs[1]);
|
||||
vmcs_write64(GUEST_PDPTR2, mmu->pdptrs[2]);
|
||||
@@ -2741,7 +2741,7 @@ void ept_save_pdptrs(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
struct kvm_mmu *mmu = vcpu->arch.walk_mmu;
|
||||
|
||||
- if (is_paging(vcpu) && is_pae(vcpu) && !is_long_mode(vcpu)) {
|
||||
+ if (is_pae_paging(vcpu)) {
|
||||
mmu->pdptrs[0] = vmcs_read64(GUEST_PDPTR0);
|
||||
mmu->pdptrs[1] = vmcs_read64(GUEST_PDPTR1);
|
||||
mmu->pdptrs[2] = vmcs_read64(GUEST_PDPTR2);
|
||||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
|
||||
index eed14def2a6b..c69f12af5c01 100644
|
||||
--- a/arch/x86/kvm/x86.c
|
||||
+++ b/arch/x86/kvm/x86.c
|
||||
@@ -725,7 +725,7 @@ bool pdptrs_changed(struct kvm_vcpu *vcpu)
|
||||
gfn_t gfn;
|
||||
int r;
|
||||
|
||||
- if (is_long_mode(vcpu) || !is_pae(vcpu) || !is_paging(vcpu))
|
||||
+ if (!is_pae_paging(vcpu))
|
||||
return false;
|
||||
|
||||
if (!test_bit(VCPU_EXREG_PDPTR,
|
||||
@@ -968,8 +968,8 @@ int kvm_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3)
|
||||
if (is_long_mode(vcpu) &&
|
||||
(cr3 & rsvd_bits(cpuid_maxphyaddr(vcpu), 63)))
|
||||
return 1;
|
||||
- else if (is_pae(vcpu) && is_paging(vcpu) &&
|
||||
- !load_pdptrs(vcpu, vcpu->arch.walk_mmu, cr3))
|
||||
+ else if (is_pae_paging(vcpu) &&
|
||||
+ !load_pdptrs(vcpu, vcpu->arch.walk_mmu, cr3))
|
||||
return 1;
|
||||
|
||||
kvm_mmu_new_cr3(vcpu, cr3, skip_tlb_flush);
|
||||
@@ -8590,7 +8590,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) && is_paging(vcpu)) {
|
||||
+ if (is_pae_paging(vcpu)) {
|
||||
load_pdptrs(vcpu, vcpu->arch.walk_mmu, kvm_read_cr3(vcpu));
|
||||
mmu_reset_needed = 1;
|
||||
}
|
||||
diff --git a/arch/x86/kvm/x86.h b/arch/x86/kvm/x86.h
|
||||
index 7e89ed889707..03de3f3c830c 100644
|
||||
--- a/arch/x86/kvm/x86.h
|
||||
+++ b/arch/x86/kvm/x86.h
|
||||
@@ -139,6 +139,11 @@ static inline int is_paging(struct kvm_vcpu *vcpu)
|
||||
return likely(kvm_read_cr0_bits(vcpu, X86_CR0_PG));
|
||||
}
|
||||
|
||||
+static inline bool is_pae_paging(struct kvm_vcpu *vcpu)
|
||||
+{
|
||||
+ return !is_long_mode(vcpu) && is_pae(vcpu) && is_paging(vcpu);
|
||||
+}
|
||||
+
|
||||
static inline u32 bit(int bitno)
|
||||
{
|
||||
return 1 << (bitno & 31);
|
@ -1 +1 @@
|
||||
Subproject commit 5d5a6b36e94909962297fae609bff487de3cc43a
|
||||
Subproject commit 0ecf5e1a9897c6ed6d105f3d9332b8a1ae918a66
|
@ -1 +1 @@
|
||||
Subproject commit 97bcaf4bef7552eeb3c48bdfad0c85b7800ee690
|
||||
Subproject commit a18306641a7fe863e323b5f1d92377cc8b7f9bed
|
Loading…
Reference in New Issue
Block a user