Xen Test Framework
include
xen
vcpu.h
Go to the documentation of this file.
1
/*
2
* Xen public VCPU hypercall interface
3
*/
4
#ifndef XEN_PUBLIC_VCPU_H
5
#define XEN_PUBLIC_VCPU_H
6
7
#include "
xen.h
"
8
9
/*
10
* Prototype for this hypercall is:
11
* long vcpu_op(unsigned int cmd, unsigned int vcpuid, void *extra_args)
12
* @cmd == VCPUOP_??? (VCPU operation).
13
* @vcpuid == VCPU to operate on.
14
* @extra_args == Operation-specific extra arguments (NULL if none).
15
*/
16
17
/*
18
* Initialise a VCPU. Each VCPU can be initialised only once. A
19
* newly-initialised VCPU will not run until it is brought up by VCPUOP_up.
20
*
21
* @extra_arg == pointer to vcpu_guest_context structure containing initial
22
* state for the VCPU.
23
*/
24
#define VCPUOP_initialise 0
25
26
/*
27
* Bring up a VCPU. This makes the VCPU runnable. This operation will fail
28
* if the VCPU has not been initialised (VCPUOP_initialise).
29
*/
30
#define VCPUOP_up 1
31
32
/*
33
* Bring down a VCPU (i.e., make it non-runnable).
34
* There are a few caveats that callers should observe:
35
* 1. This operation may return, and VCPU_is_up may return false, before the
36
* VCPU stops running (i.e., the command is asynchronous). It is a good
37
* idea to ensure that the VCPU has entered a non-critical loop before
38
* bringing it down. Alternatively, this operation is guaranteed
39
* synchronous if invoked by the VCPU itself.
40
* 2. After a VCPU is initialised, there is currently no way to drop all its
41
* references to domain memory. Even a VCPU that is down still holds
42
* memory references via its pagetable base pointer and GDT. It is good
43
* practise to move a VCPU onto an 'idle' or default page table, LDT and
44
* GDT before bringing it down.
45
*/
46
#define VCPUOP_down 2
47
48
/* Returns 1 if the given VCPU is up. */
49
#define VCPUOP_is_up 3
50
51
#endif
/* XEN_PUBLIC_VCPU_H */
52
53
/*
54
* Local variables:
55
* mode: C
56
* c-file-style: "BSD"
57
* c-basic-offset: 4
58
* tab-width: 4
59
* indent-tabs-mode: nil
60
* End:
61
*/
xen.h
Generated by
1.9.4