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>
26 XenHypercallHvmGetParam (
30 xen_hvm_param_t Parameter
;
33 Parameter
.domid
= DOMID_SELF
;
34 Parameter
.index
= Index
;
35 Error
= XenHypercall2 (__HYPERVISOR_hvm_op
,
36 HVMOP_get_param
, (INTN
) &Parameter
);
39 "XenHypercall: Error %Ld trying to get HVM parameter %d\n",
40 (INT64
)Error
, Index
));
43 return Parameter
.value
;
48 XenHypercallMemoryOp (
50 IN OUT VOID
*Arguments
53 return XenHypercall2 (__HYPERVISOR_memory_op
,
54 Operation
, (INTN
) Arguments
);
59 XenHypercallEventChannelOp (
61 IN OUT VOID
*Arguments
64 return XenHypercall2 (__HYPERVISOR_event_channel_op
,
65 Operation
, (INTN
) Arguments
);