ia64/xen-unstable

view xen/include/xen/domain.h @ 19800:78962f85c562

IOMMU: Add two generic functions to vendor neutral interface

Add 2 generic functions into the vendor neutral iommu interface, The
reason is that from changeset 19732, there is only one global flag
"iommu_enabled" that controls iommu enablement for both vtd and amd
systems, so we need different code paths for vtd and amd iommu systems
if this flag has been turned on. Also, the early checking of
"iommu_enabled" in iommu_setup() is removed to prevent iommu
functionalities from been disabled on amd systems.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 19 08:41:50 2009 +0100 (2009-06-19)
parents 2f9e1348aa98
children
line source
2 #ifndef __XEN_DOMAIN_H__
3 #define __XEN_DOMAIN_H__
5 #include <public/xen.h>
7 typedef union {
8 struct vcpu_guest_context *nat;
9 struct compat_vcpu_guest_context *cmp;
10 } vcpu_guest_context_u __attribute__((__transparent_union__));
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);
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 extern unsigned int xen_processor_pmbits;
67 #endif /* __XEN_DOMAIN_H__ */