From: <gregkh@linuxfoundation.org>
To: pbonzini@redhat.com, gregkh@linuxfoundation.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "Revert "KVM: x86: apply guest MTRR virtualization on host reserved pages"" has been added to the 4.2-stable tree
Date: Tue, 13 Oct 2015 11:21:47 -0700 [thread overview]
Message-ID: <144476050798206@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
Revert "KVM: x86: apply guest MTRR virtualization on host reserved pages"
to the 4.2-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
revert-kvm-x86-apply-guest-mtrr-virtualization-on-host-reserved-pages.patch
and it can be found in the queue-4.2 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 606decd67049217684e3cb5a54104d51ddd4ef35 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Thu, 1 Oct 2015 13:12:47 +0200
Subject: Revert "KVM: x86: apply guest MTRR virtualization on host reserved pages"
From: Paolo Bonzini <pbonzini@redhat.com>
commit 606decd67049217684e3cb5a54104d51ddd4ef35 upstream.
This reverts commit fd717f11015f673487ffc826e59b2bad69d20fe5.
It was reported to cause Machine Check Exceptions (bug 104091).
Reported-by: harn-solo@gmx.de
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/kvm/svm.c | 7 +++++--
arch/x86/kvm/vmx.c | 11 ++++++++---
2 files changed, 13 insertions(+), 5 deletions(-)
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1166,11 +1166,14 @@ static u64 svm_get_mt_mask(struct kvm_vc
u8 mtrr;
/*
- * 1. MMIO: trust guest MTRR, so same as item 3.
+ * 1. MMIO: always map as UC
* 2. No passthrough: always map as WB, and force guest PAT to WB as well
* 3. Passthrough: can't guarantee the result, try to trust guest.
*/
- if (!is_mmio && !kvm_arch_has_assigned_device(vcpu->kvm))
+ if (is_mmio)
+ return _PAGE_NOCACHE;
+
+ if (!kvm_arch_has_assigned_device(vcpu->kvm))
return 0;
mtrr = kvm_mtrr_get_guest_memory_type(vcpu, gfn);
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -8634,17 +8634,22 @@ static u64 vmx_get_mt_mask(struct kvm_vc
u64 ipat = 0;
/* For VT-d and EPT combination
- * 1. MMIO: guest may want to apply WC, trust it.
+ * 1. MMIO: always map as UC
* 2. EPT with VT-d:
* a. VT-d without snooping control feature: can't guarantee the
- * result, try to trust guest. So the same as item 1.
+ * result, try to trust guest.
* b. VT-d with snooping control feature: snooping control feature of
* VT-d engine can guarantee the cache correctness. Just set it
* to WB to keep consistent with host. So the same as item 3.
* 3. EPT without VT-d: always map as WB and set IPAT=1 to keep
* consistent with host MTRR
*/
- if (!is_mmio && !kvm_arch_has_noncoherent_dma(vcpu->kvm)) {
+ if (is_mmio) {
+ cache = MTRR_TYPE_UNCACHABLE;
+ goto exit;
+ }
+
+ if (!kvm_arch_has_noncoherent_dma(vcpu->kvm)) {
ipat = VMX_EPT_IPAT_BIT;
cache = MTRR_TYPE_WRBACK;
goto exit;
Patches currently in stable-queue which might be from pbonzini@redhat.com are
queue-4.2/kvm-fix-double-free-for-fast-mmio-eventfd.patch
queue-4.2/kvm-fix-zero-length-mmio-searching.patch
queue-4.2/revert-kvm-x86-apply-guest-mtrr-virtualization-on-host-reserved-pages.patch
queue-4.2/kvm-vmx-fix-vpid-is-0000h-in-non-root-operation.patch
queue-4.2/revert-kvm-svm-use-npt-page-attributes.patch
queue-4.2/revert-kvm-svm-sync-g_pat-with-guest-written-pat-value.patch
queue-4.2/kvm-factor-out-core-eventfd-assign-deassign-logic.patch
queue-4.2/kvm-x86-trap-amd-msrs-for-the-tseg-base-and-mask.patch
queue-4.2/kvm-svm-reset-mmu-on-vcpu-reset.patch
queue-4.2/kvm-don-t-try-to-register-to-kvm_fast_mmio_bus-for-non-mmio-eventfd.patch
reply other threads:[~2015-10-13 18:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=144476050798206@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=pbonzini@redhat.com \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.