2 Functions to make Xen hypercalls.
4 Copyright (C) 2014, Citrix Ltd.
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 #include <IndustryStandard/Xen/hvm/params.h>
19 #include <IndustryStandard/Xen/memory.h>
21 #include <Library/DebugLib.h>
22 #include <Library/XenHypercallLib.h>
25 XenHypercallHvmGetParam (
29 xen_hvm_param_t Parameter
;
32 Parameter
.domid
= DOMID_SELF
;
33 Parameter
.index
= Index
;
34 Error
= XenHypercall2 (__HYPERVISOR_hvm_op
,
35 HVMOP_get_param
, (INTN
) &Parameter
);
38 "XenHypercall: Error %Ld trying to get HVM parameter %d\n",
39 (INT64
)Error
, Index
));
42 return Parameter
.value
;
46 XenHypercallMemoryOp (
48 IN OUT VOID
*Arguments
51 return XenHypercall2 (__HYPERVISOR_memory_op
,
52 Operation
, (INTN
) Arguments
);
56 XenHypercallEventChannelOp (
58 IN OUT VOID
*Arguments
61 return XenHypercall2 (__HYPERVISOR_event_channel_op
,
62 Operation
, (INTN
) Arguments
);