From: Greg Kroah-Hartman Date: Wed, 26 Feb 2020 18:22:49 +0000 (+0100) Subject: 4.19-stable patches X-Git-Tag: v4.4.215~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=43ccb36de6313cf94f78f94416fd1cfbc566bd53;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: kvm-nvmx-don-t-emulate-instructions-in-guest-mode.patch kvm-x86-don-t-notify-userspace-ioapic-on-edge-triggered-interrupt-eoi.patch --- diff --git a/queue-4.19/kvm-nvmx-don-t-emulate-instructions-in-guest-mode.patch b/queue-4.19/kvm-nvmx-don-t-emulate-instructions-in-guest-mode.patch new file mode 100644 index 00000000000..a33be49409d --- /dev/null +++ b/queue-4.19/kvm-nvmx-don-t-emulate-instructions-in-guest-mode.patch @@ -0,0 +1,34 @@ +From 07721feee46b4b248402133228235318199b05ec Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini +Date: Tue, 4 Feb 2020 15:26:29 -0800 +Subject: KVM: nVMX: Don't emulate instructions in guest mode + +From: Paolo Bonzini + +commit 07721feee46b4b248402133228235318199b05ec upstream. + +vmx_check_intercept is not yet fully implemented. To avoid emulating +instructions disallowed by the L1 hypervisor, refuse to emulate +instructions by default. + +Cc: stable@vger.kernel.org +[Made commit, added commit msg - Oliver] +Signed-off-by: Oliver Upton +Signed-off-by: Paolo Bonzini +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kvm/vmx.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/kvm/vmx.c ++++ b/arch/x86/kvm/vmx.c +@@ -13694,7 +13694,7 @@ static int vmx_check_intercept(struct kv + } + + /* TODO: check more intercepts... */ +- return X86EMUL_CONTINUE; ++ return X86EMUL_UNHANDLEABLE; + } + + #ifdef CONFIG_X86_64 diff --git a/queue-4.19/kvm-x86-don-t-notify-userspace-ioapic-on-edge-triggered-interrupt-eoi.patch b/queue-4.19/kvm-x86-don-t-notify-userspace-ioapic-on-edge-triggered-interrupt-eoi.patch new file mode 100644 index 00000000000..cdd5d8406ce --- /dev/null +++ b/queue-4.19/kvm-x86-don-t-notify-userspace-ioapic-on-edge-triggered-interrupt-eoi.patch @@ -0,0 +1,38 @@ +From 7455a8327674e1a7c9a1f5dd1b0743ab6713f6d1 Mon Sep 17 00:00:00 2001 +From: Miaohe Lin +Date: Fri, 14 Feb 2020 10:32:38 +0800 +Subject: KVM: x86: don't notify userspace IOAPIC on edge-triggered interrupt EOI + +From: Miaohe Lin + +commit 7455a8327674e1a7c9a1f5dd1b0743ab6713f6d1 upstream. + +Commit 13db77347db1 ("KVM: x86: don't notify userspace IOAPIC on edge +EOI") said, edge-triggered interrupts don't set a bit in TMR, which means +that IOAPIC isn't notified on EOI. And var level indicates level-triggered +interrupt. +But commit 3159d36ad799 ("KVM: x86: use generic function for MSI parsing") +replace var level with irq.level by mistake. Fix it by changing irq.level +to irq.trig_mode. + +Cc: stable@vger.kernel.org +Fixes: 3159d36ad799 ("KVM: x86: use generic function for MSI parsing") +Signed-off-by: Miaohe Lin +Signed-off-by: Paolo Bonzini +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kvm/irq_comm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/kvm/irq_comm.c ++++ b/arch/x86/kvm/irq_comm.c +@@ -427,7 +427,7 @@ void kvm_scan_ioapic_routes(struct kvm_v + + kvm_set_msi_irq(vcpu->kvm, entry, &irq); + +- if (irq.level && kvm_apic_match_dest(vcpu, NULL, 0, ++ if (irq.trig_mode && kvm_apic_match_dest(vcpu, NULL, 0, + irq.dest_id, irq.dest_mode)) + __set_bit(irq.vector, ioapic_handled_vectors); + } diff --git a/queue-4.19/series b/queue-4.19/series index 9ac415da24b..aca69c2707b 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -49,3 +49,5 @@ genirq-irqdomain-make-sure-all-irq-domain-flags-are-distinct.patch mm-vmscan.c-don-t-round-up-scan-size-for-online-memory-cgroup.patch drm-amdgpu-soc15-fix-xclk-for-raven.patch xhci-apply-xhci_pme_stuck_quirk-to-intel-comet-lake-platforms.patch +kvm-nvmx-don-t-emulate-instructions-in-guest-mode.patch +kvm-x86-don-t-notify-userspace-ioapic-on-edge-triggered-interrupt-eoi.patch