s390/uv: export uv_pin_shared for direct usage
Export the uv_pin_shared function so that it can be called from other modules that carry a GPL-compatible license. Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Signed-off-by: Tony Krowiak <akrowiak@linux.ibm.com> Tested-by: Viktor Mihajlovski <mihajlov@linux.ibm.com> Link: https://lore.kernel.org/r/20230815184333.6554-11-akrowiak@linux.ibm.com Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
This commit is contained in:
parent
7847a19b5b
commit
cf3fa16a6f
@ -463,6 +463,7 @@ static inline int is_prot_virt_host(void)
|
||||
return prot_virt_host;
|
||||
}
|
||||
|
||||
int uv_pin_shared(unsigned long paddr);
|
||||
int gmap_make_secure(struct gmap *gmap, unsigned long gaddr, void *uvcb);
|
||||
int gmap_destroy_page(struct gmap *gmap, unsigned long gaddr);
|
||||
int uv_destroy_owned_page(unsigned long paddr);
|
||||
@ -475,6 +476,11 @@ void setup_uv(void);
|
||||
#define is_prot_virt_host() 0
|
||||
static inline void setup_uv(void) {}
|
||||
|
||||
static inline int uv_pin_shared(unsigned long paddr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int uv_destroy_owned_page(unsigned long paddr)
|
||||
{
|
||||
return 0;
|
||||
|
@ -88,7 +88,7 @@ fail:
|
||||
* Requests the Ultravisor to pin the page in the shared state. This will
|
||||
* cause an intercept when the guest attempts to unshare the pinned page.
|
||||
*/
|
||||
static int uv_pin_shared(unsigned long paddr)
|
||||
int uv_pin_shared(unsigned long paddr)
|
||||
{
|
||||
struct uv_cb_cfs uvcb = {
|
||||
.header.cmd = UVC_CMD_PIN_PAGE_SHARED,
|
||||
@ -100,6 +100,7 @@ static int uv_pin_shared(unsigned long paddr)
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(uv_pin_shared);
|
||||
|
||||
/*
|
||||
* Requests the Ultravisor to destroy a guest page and make it
|
||||
|
Loading…
x
Reference in New Issue
Block a user