summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-05-20 09:40:09 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-05-20 09:40:09 +0200
commit9d5272f5e36155bcead69417fd12e98624e7faef (patch)
tree770af81c03932ad4e508a12cca6f83fbb3527689 /arch/x86/kvm/svm
parentrcuwait: avoid lockdep splats from rcuwait_active() (diff)
parentx86/kvm: Restrict ASYNC_PF to user space (diff)
downloadlinux-9d5272f5e36155bcead69417fd12e98624e7faef.tar.xz
linux-9d5272f5e36155bcead69417fd12e98624e7faef.zip
Merge tag 'noinstr-x86-kvm-2020-05-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into HEAD
Diffstat (limited to 'arch/x86/kvm/svm')
-rw-r--r--arch/x86/kvm/svm/sev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index cf912b4aaba8..89f7f3aebd31 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -345,7 +345,7 @@ static struct page **sev_pin_memory(struct kvm *kvm, unsigned long uaddr,
return NULL;
/* Pin the user virtual address. */
- npinned = get_user_pages_fast(uaddr, npages, FOLL_WRITE, pages);
+ npinned = get_user_pages_fast(uaddr, npages, write ? FOLL_WRITE : 0, pages);
if (npinned != npages) {
pr_err("SEV: Failure locking %lu pages.\n", npages);
goto err;