mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
On solaris mlock requires a page aligned address and mlock doesn't ensure the pages won't minor page fault. Signed-off-by: Mark Johnson <mark.johnson@sun.com>
46 lines
1.0 KiB
C
46 lines
1.0 KiB
C
/******************************************************************************
|
|
* xc_acm.c
|
|
*
|
|
* Copyright (C) 2005, 2006 IBM Corporation, R Sailer
|
|
*
|
|
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
|
|
* Use is subject to license terms.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License as
|
|
* published by the Free Software Foundation, version 2 of the
|
|
* License.
|
|
*/
|
|
|
|
#include "xc_private.h"
|
|
|
|
|
|
int xc_acm_op(int xc_handle, int cmd, void *arg, size_t arg_size)
|
|
{
|
|
int ret = -1;
|
|
DECLARE_HYPERCALL;
|
|
|
|
hypercall.op = __HYPERVISOR_acm_op;
|
|
hypercall.arg[0] = cmd;
|
|
hypercall.arg[1] = (unsigned long) arg;
|
|
|
|
if (lock_pages(arg, arg_size) != 0) {
|
|
PERROR("xc_acm_op: arg lock failed");
|
|
goto out;
|
|
}
|
|
ret = do_xen_hypercall(xc_handle, &hypercall);
|
|
unlock_pages(arg, arg_size);
|
|
out:
|
|
return ret;
|
|
}
|
|
|
|
/*
|
|
* Local variables:
|
|
* mode: C
|
|
* c-set-style: "BSD"
|
|
* c-basic-offset: 4
|
|
* tab-width: 4
|
|
* indent-tabs-mode: nil
|
|
* End:
|
|
*/
|