From: <gregkh@linuxfoundation.org>
To: rkrcmar@redhat.com, gregkh@linuxfoundation.org,
pbonzini@redhat.com, wanpeng.li@linux.intel.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "KVM: use slowpath for cross page cached accesses" has been added to the 3.10-stable tree
Date: Sat, 02 May 2015 14:28:43 +0200 [thread overview]
Message-ID: <14305697232234@kroah.com> (raw)
In-Reply-To: <20150408121648.GA3519@potion.brq.redhat.com>
This is a note to let you know that I've just added the patch titled
KVM: use slowpath for cross page cached accesses
to the 3.10-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:
kvm-use-slowpath-for-cross-page-cached-accesses.patch
and it can be found in the queue-3.10 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 ca3f0874723fad81d0c701b63ae3a17a408d5f25 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= <rkrcmar@redhat.com>
Date: Wed, 8 Apr 2015 14:16:48 +0200
Subject: KVM: use slowpath for cross page cached accesses
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= <rkrcmar@redhat.com>
commit ca3f0874723fad81d0c701b63ae3a17a408d5f25 upstream.
kvm_write_guest_cached() does not mark all written pages as dirty and
code comments in kvm_gfn_to_hva_cache_init() talk about NULL memslot
with cross page accesses. Fix all the easy way.
The check is '<= 1' to have the same result for 'len = 0' cache anywhere
in the page. (nr_pages_needed is 0 on page boundary.)
Fixes: 8f964525a121 ("KVM: Allow cross page reads and writes from cached translations.")
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Message-Id: <20150408121648.GA3519@potion.brq.redhat.com>
Reviewed-by: Wanpeng Li <wanpeng.li@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
virt/kvm/kvm_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1549,8 +1549,8 @@ int kvm_gfn_to_hva_cache_init(struct kvm
ghc->generation = slots->generation;
ghc->len = len;
ghc->memslot = gfn_to_memslot(kvm, start_gfn);
- ghc->hva = gfn_to_hva_many(ghc->memslot, start_gfn, &nr_pages_avail);
- if (!kvm_is_error_hva(ghc->hva) && nr_pages_avail >= nr_pages_needed) {
+ ghc->hva = gfn_to_hva_many(ghc->memslot, start_gfn, NULL);
+ if (!kvm_is_error_hva(ghc->hva) && nr_pages_needed <= 1) {
ghc->hva += offset;
} else {
/*
Patches currently in stable-queue which might be from rkrcmar@redhat.com are
queue-3.10/kvm-use-slowpath-for-cross-page-cached-accesses.patch
next prev parent reply other threads:[~2015-05-02 12:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-07 20:34 [PATCH] KVM: dirty all pages in kvm_write_guest_cached() Radim Krčmář
2015-04-08 8:49 ` Paolo Bonzini
2015-04-08 9:26 ` Radim Krčmář
2015-04-08 10:43 ` Paolo Bonzini
2015-04-08 12:16 ` [PATCH] KVM: use slowpath for cross page cached accesses Radim Krčmář
2015-04-08 12:23 ` Paolo Bonzini
2015-04-09 0:18 ` Wanpeng Li
2015-05-02 12:23 ` Patch "KVM: use slowpath for cross page cached accesses" has been added to the 4.0-stable tree gregkh
2015-05-02 12:25 ` Patch "KVM: use slowpath for cross page cached accesses" has been added to the 3.19-stable tree gregkh
2015-05-02 12:28 ` gregkh [this message]
2015-05-02 12:29 ` Patch "KVM: use slowpath for cross page cached accesses" has been added to the 3.14-stable tree gregkh
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=14305697232234@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=wanpeng.li@linux.intel.com \
/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.