diff mbox series

KVM: X86: Fix compile error in svm/sev.c

Message ID 20200419073047.14413-1-tianjia.zhang@linux.alibaba.com (mailing list archive)
State Not Applicable
Headers show
Series KVM: X86: Fix compile error in svm/sev.c | expand

Commit Message

tianjia.zhang April 19, 2020, 7:30 a.m. UTC
The compiler reported the following compilation errors:

arch/x86/kvm/svm/sev.c: In function ‘sev_pin_memory’:
arch/x86/kvm/svm/sev.c:361:3: error: implicit declaration of function
‘release_pages’ [-Werror=implicit-function-declaration]
   release_pages(pages, npinned);
   ^~~~~~~~~~~~~

The reason is that the 'pagemap.h' header file is not included.

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
---
 arch/x86/kvm/svm/sev.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Xiaoyao Li April 19, 2020, 8:24 a.m. UTC | #1
On 4/19/2020 3:30 PM, Tianjia Zhang wrote:
> The compiler reported the following compilation errors:
> 
> arch/x86/kvm/svm/sev.c: In function ‘sev_pin_memory’:
> arch/x86/kvm/svm/sev.c:361:3: error: implicit declaration of function
> ‘release_pages’ [-Werror=implicit-function-declaration]
>     release_pages(pages, npinned);
>     ^~~~~~~~~~~~~
> 
> The reason is that the 'pagemap.h' header file is not included.
> 

FYI.

Boris has sent the Patch:
https://lkml.kernel.org/r/20200411160927.27954-1-bp@alien8.de

and it's already in kvm master/queue branch
tianjia.zhang April 20, 2020, 7:14 a.m. UTC | #2
On 2020/4/19 16:24, Xiaoyao Li wrote:
> On 4/19/2020 3:30 PM, Tianjia Zhang wrote:
>> The compiler reported the following compilation errors:
>>
>> arch/x86/kvm/svm/sev.c: In function ‘sev_pin_memory’:
>> arch/x86/kvm/svm/sev.c:361:3: error: implicit declaration of function
>> ‘release_pages’ [-Werror=implicit-function-declaration]
>>     release_pages(pages, npinned);
>>     ^~~~~~~~~~~~~
>>
>> The reason is that the 'pagemap.h' header file is not included.
>>
> 
> FYI.
> 
> Boris has sent the Patch:
> https://lkml.kernel.org/r/20200411160927.27954-1-bp@alien8.de
> 
> and it's already in kvm master/queue branch
> 
> 

This is the same fix, please ignore this patch.

Thanks and best,
Tianjia
diff mbox series

Patch

diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index 0e3fc311d7da..3ef99e87c1db 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -13,6 +13,7 @@ 
 #include <linux/highmem.h>
 #include <linux/psp-sev.h>
 #include <linux/swap.h>
+#include <linux/pagemap.h>
 
 #include "x86.h"
 #include "svm.h"