~ubuntu-branches/ubuntu/utopic/xen/utopic

« back to all changes in this revision

Viewing changes to xen/include/xen/domain.h

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2010-05-06 15:47:38 UTC
  • mto: (1.3.1) (15.1.1 sid) (4.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20100506154738-agoz0rlafrh1fnq7
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#ifndef __XEN_DOMAIN_H__
 
3
#define __XEN_DOMAIN_H__
 
4
 
 
5
#include <public/xen.h>
 
6
 
 
7
typedef union {
 
8
    struct vcpu_guest_context *nat;
 
9
    struct compat_vcpu_guest_context *cmp;
 
10
} vcpu_guest_context_u __attribute__((__transparent_union__));
 
11
 
 
12
struct vcpu *alloc_vcpu(
 
13
    struct domain *d, unsigned int vcpu_id, unsigned int cpu_id);
 
14
int boot_vcpu(
 
15
    struct domain *d, int vcpuid, vcpu_guest_context_u ctxt);
 
16
struct vcpu *alloc_idle_vcpu(unsigned int cpu_id);
 
17
struct vcpu *alloc_dom0_vcpu0(void);
 
18
void vcpu_reset(struct vcpu *v);
 
19
 
 
20
struct xen_domctl_getdomaininfo;
 
21
void getdomaininfo(struct domain *d, struct xen_domctl_getdomaininfo *info);
 
22
 
 
23
/*
 
24
 * Arch-specifics.
 
25
 */
 
26
 
 
27
/* Allocate/free a domain structure. */
 
28
struct domain *alloc_domain_struct(void);
 
29
void free_domain_struct(struct domain *d);
 
30
 
 
31
/* Allocate/free a VCPU structure. */
 
32
struct vcpu *alloc_vcpu_struct(void);
 
33
void free_vcpu_struct(struct vcpu *v);
 
34
 
 
35
/*
 
36
 * Initialise/destroy arch-specific details of a VCPU.
 
37
 *  - vcpu_initialise() is called after the basic generic fields of the
 
38
 *    VCPU structure are initialised. Many operations can be applied to the
 
39
 *    VCPU at this point (e.g., vcpu_pause()).
 
40
 *  - vcpu_destroy() is called only if vcpu_initialise() previously succeeded.
 
41
 */
 
42
int  vcpu_initialise(struct vcpu *v);
 
43
void vcpu_destroy(struct vcpu *v);
 
44
 
 
45
int arch_domain_create(struct domain *d, unsigned int domcr_flags);
 
46
 
 
47
void arch_domain_destroy(struct domain *d);
 
48
 
 
49
int arch_set_info_guest(struct vcpu *, vcpu_guest_context_u);
 
50
void arch_get_info_guest(struct vcpu *, vcpu_guest_context_u);
 
51
 
 
52
int domain_relinquish_resources(struct domain *d);
 
53
 
 
54
void dump_pageframe_info(struct domain *d);
 
55
 
 
56
void arch_dump_vcpu_info(struct vcpu *v);
 
57
 
 
58
void arch_dump_domain_info(struct domain *d);
 
59
 
 
60
void arch_vcpu_reset(struct vcpu *v);
 
61
 
 
62
bool_t domctl_lock_acquire(void);
 
63
void domctl_lock_release(void);
 
64
 
 
65
extern unsigned int xen_processor_pmbits;
 
66
 
 
67
#endif /* __XEN_DOMAIN_H__ */