Commit f7777e00 authored by Ram Pai's avatar Ram Pai Committed by Michael Ellerman

powerpc/pseries/svm: Add helpers for UV_SHARE_PAGE and UV_UNSHARE_PAGE

These functions are used when the guest wants to grant the hypervisor
access to certain pages.
Signed-off-by: default avatarRam Pai <linuxram@us.ibm.com>
Signed-off-by: default avatarThiago Jung Bauermann <bauerman@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190820021326.6884-6-bauerman@linux.ibm.com
parent 6a9c930b
...@@ -26,5 +26,7 @@ ...@@ -26,5 +26,7 @@
#define UV_WRITE_PATE 0xF104 #define UV_WRITE_PATE 0xF104
#define UV_RETURN 0xF11C #define UV_RETURN 0xF11C
#define UV_ESM 0xF110 #define UV_ESM 0xF110
#define UV_SHARE_PAGE 0xF130
#define UV_UNSHARE_PAGE 0xF134
#endif /* _ASM_POWERPC_ULTRAVISOR_API_H */ #endif /* _ASM_POWERPC_ULTRAVISOR_API_H */
...@@ -31,4 +31,14 @@ static inline int uv_register_pate(u64 lpid, u64 dw0, u64 dw1) ...@@ -31,4 +31,14 @@ static inline int uv_register_pate(u64 lpid, u64 dw0, u64 dw1)
return ucall_norets(UV_WRITE_PATE, lpid, dw0, dw1); return ucall_norets(UV_WRITE_PATE, lpid, dw0, dw1);
} }
static inline int uv_share_page(u64 pfn, u64 npages)
{
return ucall_norets(UV_SHARE_PAGE, pfn, npages);
}
static inline int uv_unshare_page(u64 pfn, u64 npages)
{
return ucall_norets(UV_UNSHARE_PAGE, pfn, npages);
}
#endif /* _ASM_POWERPC_ULTRAVISOR_H */ #endif /* _ASM_POWERPC_ULTRAVISOR_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment