Christoph Hellwig
88dca4ca5a
mm: remove the pgprot argument to __vmalloc
...
The pgprot argument to __vmalloc is always PAGE_KERNEL now, so remove it.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Reviewed-by: Michael Kelley <mikelley@microsoft.com > [hyperv]
Acked-by: Gao Xiang <xiang@kernel.org > [erofs]
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Acked-by: Wei Liu <wei.liu@kernel.org >
Cc: Christian Borntraeger <borntraeger@de.ibm.com >
Cc: Christophe Leroy <christophe.leroy@c-s.fr >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: David Airlie <airlied@linux.ie >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Johannes Weiner <hannes@cmpxchg.org >
Cc: "K. Y. Srinivasan" <kys@microsoft.com >
Cc: Laura Abbott <labbott@redhat.com >
Cc: Mark Rutland <mark.rutland@arm.com >
Cc: Minchan Kim <minchan@kernel.org >
Cc: Nitin Gupta <ngupta@vflare.org >
Cc: Robin Murphy <robin.murphy@arm.com >
Cc: Sakari Ailus <sakari.ailus@linux.intel.com >
Cc: Stephen Hemminger <sthemmin@microsoft.com >
Cc: Sumit Semwal <sumit.semwal@linaro.org >
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org >
Cc: Catalin Marinas <catalin.marinas@arm.com >
Cc: Heiko Carstens <heiko.carstens@de.ibm.com >
Cc: Paul Mackerras <paulus@ozlabs.org >
Cc: Vasily Gorbik <gor@linux.ibm.com >
Cc: Will Deacon <will@kernel.org >
Link: http://lkml.kernel.org/r/20200414131348.444715-22-hch@lst.de
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2020-06-02 10:59:11 -07:00
Janakarajan Natarajan
996ed22c7a
arch/x86/kvm/svm/sev.c: change flag passed to GUP fast in sev_pin_memory()
...
When trying to lock read-only pages, sev_pin_memory() fails because
FOLL_WRITE is used as the flag for get_user_pages_fast().
Commit 73b0140bf0
("mm/gup: change GUP fast to use flags rather than a
write 'bool'") updated the get_user_pages_fast() call sites to use
flags, but incorrectly updated the call in sev_pin_memory(). As the
original coding of this call was correct, revert the change made by that
commit.
Fixes: 73b0140bf0
("mm/gup: change GUP fast to use flags rather than a write 'bool'")
Signed-off-by: Janakarajan Natarajan <Janakarajan.Natarajan@amd.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Reviewed-by: Ira Weiny <ira.weiny@intel.com >
Cc: Paolo Bonzini <pbonzini@redhat.com >
Cc: Sean Christopherson <sean.j.christopherson@intel.com >
Cc: Vitaly Kuznetsov <vkuznets@redhat.com >
Cc: Wanpeng Li <wanpengli@tencent.com >
Cc: Jim Mattson <jmattson@google.com >
Cc: Joerg Roedel <joro@8bytes.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: Borislav Petkov <bp@alien8.de >
Cc: "H . Peter Anvin" <hpa@zytor.com >
Cc: Mike Marshall <hubcap@omnibond.com >
Cc: Brijesh Singh <brijesh.singh@amd.com >
Link: http://lkml.kernel.org/r/20200423152419.87202-1-Janakarajan.Natarajan@amd.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2020-05-07 19:27:20 -07:00
Borislav Petkov
b2bce0a589
KVM: SVM: Fix build error due to missing release_pages() include
...
Fix:
arch/x86/kvm/svm/sev.c: In function ‘sev_pin_memory’:
arch/x86/kvm/svm/sev.c:360:3: error: implicit declaration of function ‘release_pages’;\
did you mean ‘reclaim_pages’? [-Werror=implicit-function-declaration]
360 | release_pages(pages, npinned);
| ^~~~~~~~~~~~~
| reclaim_pages
because svm.c includes pagemap.h but the carved out sev.c needs it too.
Triggered by a randconfig build.
Fixes: eaf78265a4
("KVM: SVM: Move SEV code to separate file")
Signed-off-by: Borislav Petkov <bp@suse.de >
Message-Id: <20200411160927.27954-1-bp@alien8.de >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-04-15 12:08:37 -04:00
Paolo Bonzini
9ef1530c0c
KVM: SVM: fix compilation with modular PSP and non-modular KVM
...
Use svm_sev_enabled() in order to cull all calls to PSP code. Otherwise,
compilation fails with undefined symbols if the PSP device driver is compiled
as a module and KVM is not.
Reported-by: Uros Bizjak <ubizjak@gmail.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-04-14 04:21:15 -04:00
Joerg Roedel
eaf78265a4
KVM: SVM: Move SEV code to separate file
...
Move the SEV specific parts of svm.c into the new sev.c file.
Signed-off-by: Joerg Roedel <jroedel@suse.de >
Message-Id: <20200324094154.32352-5-joro@8bytes.org >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-04-03 10:53:56 -04:00