linux/drivers/misc/vmw_balloon.c
/*
 * Notify the host about allocated page so that host can use it without
 * fear that guest will need it. Host may reject some pages, we need to
 * check the return value and maybe submit a different page.
 */
Notify the host about allocated page so that host can use it without
fear that guest will need it. Host may reject some pages, we need to
check the return value and maybe submit a different page.
Notify the host about allocated page so that host can use it without fear that guest will need it . Host may reject some pages we need to check the return value and maybe submit a different page .
static int vmballoon_send_lock_page(struct vmballoon *b, unsigned long pfn,
				unsigned int *hv_status, unsigned int *target)
{
	unsigned long status, dummy = 0;
	u32 pfn32;
	pfn32 = (u32)pfn;
	if (pfn32 != pfn)
		return -EINVAL;
	STATS_INC(b->stats.lock[false]);
	*hv_status = status = VMWARE_BALLOON_CMD(LOCK, pfn, dummy, *target);
	if (vmballoon_check_status(b, status))
		return 0;
	pr_debug("%s - ppn %lx, hv returns %ld\n", __func__, pfn, status);
	STATS_INC(b->stats.lock_fail[false]);
	return -EIO;
}
static int vmballoon_send_lock_page ( struct vmballoon * b , unsigned long pfn , unsigned int * hv_status , unsigned int * target ) { unsigned long status , dummy = 0 ; u32 pfn32 ; pfn32 = ( u32 ) pfn ; if ( pfn32 != pfn ) return - EINVAL ; STATS_INC ( b -> stats . lock [ false ] ) ; * hv_status = status = VMWARE_BALLOON_CMD ( LOCK , pfn , dummy , * target ) ; if ( vmballoon_check_status ( b , status ) ) return 0 ; pr_debug ( " \n " , __func__ , pfn , status ) ; STATS_INC ( b -> stats . lock_fail [ false ] ) ; return - EIO ; }
Notify the host about allocated page so that host can use it without
 fear that guest will need it.
Notify the host about allocated page so that host can use it without fear that guest will need it .