debuggers.hg

view xen/include/xen/domain.h @ 22906:700ac6445812

Now add KDB to the non-kdb tree
author Mukesh Rathor
date Thu Feb 03 15:42:41 2011 -0800 (2011-02-03)
parents abc9f8e809e5
children
line source
2 #ifndef __XEN_DOMAIN_H__
3 #define __XEN_DOMAIN_H__
5 #include <public/xen.h>
6 #include <asm/domain.h>
8 typedef union {
9 struct vcpu_guest_context *nat;
10 struct compat_vcpu_guest_context *cmp;
11 } vcpu_guest_context_u __attribute__((__transparent_union__));
13 struct vcpu *alloc_vcpu(
14 struct domain *d, unsigned int vcpu_id, unsigned int cpu_id);
15 int boot_vcpu(
16 struct domain *d, int vcpuid, vcpu_guest_context_u ctxt);
17 struct vcpu *alloc_dom0_vcpu0(void);
18 void vcpu_reset(struct vcpu *v);
20 struct xen_domctl_getdomaininfo;
21 void getdomaininfo(struct domain *d, struct xen_domctl_getdomaininfo *info);
23 /*
24 * Arch-specifics.
25 */
27 /* Allocate/free a domain structure. */
28 struct domain *alloc_domain_struct(void);
29 void free_domain_struct(struct domain *d);
31 /* Allocate/free a VCPU structure. */
32 struct vcpu *alloc_vcpu_struct(void);
33 void free_vcpu_struct(struct vcpu *v);
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);
45 int arch_domain_create(struct domain *d, unsigned int domcr_flags);
47 void arch_domain_destroy(struct domain *d);
49 int arch_set_info_guest(struct vcpu *, vcpu_guest_context_u);
50 void arch_get_info_guest(struct vcpu *, vcpu_guest_context_u);
52 int domain_relinquish_resources(struct domain *d);
54 void dump_pageframe_info(struct domain *d);
56 void arch_dump_vcpu_info(struct vcpu *v);
58 void arch_dump_domain_info(struct domain *d);
60 void arch_vcpu_reset(struct vcpu *v);
62 bool_t domctl_lock_acquire(void);
63 void domctl_lock_release(void);
65 /*
66 * Continue the current hypercall via func(data) on specified cpu.
67 * If this function returns 0 then the function is guaranteed to run at some
68 * point in the future. If this function returns an error code then the
69 * function has not been and will not be executed.
70 */
71 int continue_hypercall_on_cpu(
72 unsigned int cpu, long (*func)(void *data), void *data);
74 extern unsigned int xen_processor_pmbits;
76 #endif /* __XEN_DOMAIN_H__ */