Compare commits

...

18 Commits

Author SHA1 Message Date
Thomas Lamprecht
b6d9526601 update ABI file for 5.0.21-5-pve
(generated with debian/scripts/abi-generate)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-13 10:53:08 +01:00
Thomas Lamprecht
ee7f5b50ad bump version to 5.0.21-10
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-13 10:27:55 +01:00
Thomas Lamprecht
b9b2d45ed0 rebase patches on top of Ubuntu-5.0.0-35.38
(generated with debian/scripts/import-upstream-tag)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-13 10:05:37 +01:00
Thomas Lamprecht
7b833ea615 update sources to Ubuntu-5.0.0-35.38
(generated with debian/scripts/import-upstream-tag)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-13 10:05:37 +01:00
Thomas Lamprecht
b1cf66bce1 disable alsa snd pcspkr module
The PC speaker (beeper) can only be managed by one module, and there
are two which could do so. The very basic INPUT_PCSPKR, and the more
advanced SND_PCSP which allows it to be used as primitive ALSA
soundcard, which for Proxmox Server projects, and all modern
workstations is not much of use.

As they both were aliased to the "pcspkr" module name, and used the
same internal driver name (being a replacment of the other), one
would get the following error message when both are loaded:
"Error: Driver 'pcspkr' is already registered, aborting..."
in the kernel log. This happens as by default both are tried to get
loaded. We do not want the more complex ALSA one, so disable that.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
(cherry picked from commit b481f89770)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-12 15:45:32 +01:00
Thomas Lamprecht
584fbee1dd backport: KVM: x86: introduce is_pae_paging
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-12 13:33:39 +01:00
Thomas Lamprecht
7481faa0a8 update also Makefile version for bump to make lintian test this
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-11 15:36:45 +01:00
Thomas Lamprecht
97cd39f070 fix #2448: compile ISO8859-1 NLS as built-in
Allows to mount VFAT devices even if the currently running kernel was
removed before any VFAT, or other FS using the default Native
Language Support module was mounted during the current uptime.

This then could break updating the ESP partitions, which are mounted
with VFAT in a postrm triggered step - so at a time where the current
/lib/modules/... was already removed, and so the NLS could not get
loaded.

While there are a lot of different NLS, our kernel config has:
> CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"

So compile that module as built-in.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-11 14:13:08 +01:00
Thomas Lamprecht
81b7cb8a78 bump version to 5.0.21-9
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-11 14:13:08 +01:00
Thomas Lamprecht
03505c4ba3 revert: KVM: x86: Manually calculate reserved bits when loading PDPTRS
Problematic on old Intel CPUs:
https://forum.proxmox.com/threads/pve-kernel-5-0-21-4-pve-cause-debian-guests-to-reboot-loop-on-older-intel-cpus.59377/page-3#post-276413
https://bugzilla.kernel.org/show_bug.cgi?id=205441#c1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-11 11:15:47 +01:00
Thomas Lamprecht
f665e167a1 update ABI file for 5.0.21-4-pve
(generated with debian/scripts/abi-generate)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-23 19:04:29 +02:00
Thomas Lamprecht
4d749645ab update firmware list
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-23 19:04:29 +02:00
Thomas Lamprecht
929ba8531f bump version to 5.0.21-8
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-23 19:04:29 +02:00
Thomas Lamprecht
87f2b5c56d update ZFS submodule to 0.8.2-pve2, FPU/SIMD fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-23 19:04:29 +02:00
Thomas Lamprecht
46396362f1 rebase patches on top of Ubuntu-5.0.0-33.35
(generated with debian/scripts/import-upstream-tag)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-23 17:17:42 +02:00
Thomas Lamprecht
7622a48de8 update sources to Ubuntu-5.0.0-33.35
(generated with debian/scripts/import-upstream-tag)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-23 17:17:42 +02:00
Thomas Lamprecht
33060f2711 remove unused patches
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-02 17:01:50 +02:00
Thomas Lamprecht
9e34f3e811 update README
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-02 17:00:54 +02:00
16 changed files with 3903 additions and 3880 deletions

View File

@ -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
View File

@ -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
View File

@ -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
View File

@ -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 \

View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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/')

View File

@ -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)

View File

@ -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. */

View File

@ -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);

View 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