Commit cf3fa16a authored by Janosch Frank's avatar Janosch Frank Committed by Heiko Carstens
Browse files

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: default avatarJanosch Frank <frankja@linux.ibm.com>
Signed-off-by: default avatarTony Krowiak <akrowiak@linux.ibm.com>
Tested-by: default avatarViktor Mihajlovski <mihajlov@linux.ibm.com>
Link: https://lore.kernel.org/r/20230815184333.6554-11-akrowiak@linux.ibm.com


Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent 7847a19b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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;
+2 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ void __init setup_uv(void)
 * 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