aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include
diff options
context:
space:
mode:
authorTim Deegan <Tim.Deegan@citrix.com>2011-05-26 12:37:47 +0100
committerTim Deegan <Tim.Deegan@citrix.com>2011-05-26 12:37:47 +0100
commit093e1d2484fc46ec73e527c03af79664218045df (patch)
tree4ac0109f7f6d91c8c24a62bfdd20dc44e5370e9d /xen/include
parentde4bf084c8dc232a629e436ccd0ce989da8c470e (diff)
downloadxen-093e1d2484fc46ec73e527c03af79664218045df.tar.gz
xen-093e1d2484fc46ec73e527c03af79664218045df.tar.bz2
xen-093e1d2484fc46ec73e527c03af79664218045df.zip
xen: remove extern function declarations from C files.
Move all extern declarations into appropriate header files. This also fixes up a few places where the caller and the definition had different signatures. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Diffstat (limited to 'xen/include')
-rw-r--r--xen/include/asm-x86/acpi.h1
-rw-r--r--xen/include/asm-x86/debugger.h5
-rw-r--r--xen/include/asm-x86/hap.h2
-rw-r--r--xen/include/asm-x86/hpet.h2
-rw-r--r--xen/include/asm-x86/hvm/hvm.h5
-rw-r--r--xen/include/asm-x86/hypercall.h5
-rw-r--r--xen/include/asm-x86/io.h4
-rw-r--r--xen/include/asm-x86/io_apic.h5
-rw-r--r--xen/include/asm-x86/irq.h3
-rw-r--r--xen/include/asm-x86/numa.h1
-rw-r--r--xen/include/asm-x86/p2m.h25
-rw-r--r--xen/include/asm-x86/processor.h1
-rw-r--r--xen/include/asm-x86/setup.h4
-rw-r--r--xen/include/asm-x86/shadow.h3
-rw-r--r--xen/include/asm-x86/x86_64/uaccess.h13
-rw-r--r--xen/include/xen/cpuidle.h2
-rw-r--r--xen/include/xen/kexec.h6
-rw-r--r--xen/include/xen/pci.h1
-rw-r--r--xen/include/xen/perfc.h4
-rw-r--r--xen/include/xen/pmstat.h1
-rw-r--r--xen/include/xen/sched.h6
-rw-r--r--xen/include/xen/spinlock.h4
-rw-r--r--xen/include/xsm/xsm.h3
23 files changed, 106 insertions, 0 deletions
diff --git a/xen/include/asm-x86/acpi.h b/xen/include/asm-x86/acpi.h
index 356af443ec..41322e2610 100644
--- a/xen/include/asm-x86/acpi.h
+++ b/xen/include/asm-x86/acpi.h
@@ -150,6 +150,7 @@ void acpi_mmcfg_init(void);
extern uint32_t system_reset_counter;
void hvm_acpi_power_button(struct domain *d);
+void hvm_acpi_sleep_button(struct domain *d);
/* suspend/resume */
void save_rest_processor_state(void);
diff --git a/xen/include/asm-x86/debugger.h b/xen/include/asm-x86/debugger.h
index 9fea5d64e8..e47935f631 100644
--- a/xen/include/asm-x86/debugger.h
+++ b/xen/include/asm-x86/debugger.h
@@ -77,4 +77,9 @@ static inline int debugger_trap_entry(
return 0;
}
+typedef unsigned long dbgva_t;
+typedef unsigned char dbgbyte_t;
+extern int dbg_rw_mem(dbgva_t addr, dbgbyte_t *buf, int len,
+ domid_t domid, int toaddr, uint64_t pgd3);
+
#endif /* __X86_DEBUGGER_H__ */
diff --git a/xen/include/asm-x86/hap.h b/xen/include/asm-x86/hap.h
index 6183049695..4d01f1b5d9 100644
--- a/xen/include/asm-x86/hap.h
+++ b/xen/include/asm-x86/hap.h
@@ -97,6 +97,8 @@ int hap_track_dirty_vram(struct domain *d,
unsigned long nr,
XEN_GUEST_HANDLE_64(uint8) dirty_bitmap);
+extern const struct paging_mode *hap_paging_get_mode(struct vcpu *);
+
#endif /* XEN_HAP_H */
/*
diff --git a/xen/include/asm-x86/hpet.h b/xen/include/asm-x86/hpet.h
index 702fd016f1..550958cf29 100644
--- a/xen/include/asm-x86/hpet.h
+++ b/xen/include/asm-x86/hpet.h
@@ -74,4 +74,6 @@ void hpet_broadcast_exit(void);
int hpet_broadcast_is_available(void);
void hpet_disable_legacy_broadcast(void);
+extern void (*pv_rtc_handler)(unsigned int port, uint8_t value);
+
#endif /* __X86_HPET_H__ */
diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h
index 1e5f7ec5fc..3ce78d7578 100644
--- a/xen/include/asm-x86/hvm/hvm.h
+++ b/xen/include/asm-x86/hvm/hvm.h
@@ -174,6 +174,10 @@ struct hvm_function_table {
extern struct hvm_function_table hvm_funcs;
extern bool_t hvm_enabled;
extern bool_t cpu_has_lmsl;
+extern s8 hvm_port80_allowed;
+
+extern struct hvm_function_table *start_svm(void);
+extern struct hvm_function_table *start_vmx(void);
int hvm_domain_initialise(struct domain *d);
void hvm_domain_relinquish_resources(struct domain *d);
@@ -195,6 +199,7 @@ void hvm_init_guest_time(struct domain *d);
void hvm_set_guest_time(struct vcpu *v, u64 guest_time);
u64 hvm_get_guest_time(struct vcpu *v);
+int vmsi_deliver(struct domain *d, int pirq);
int hvm_girq_dest_2_vcpu_id(struct domain *d, uint8_t dest, uint8_t dest_mode);
#define hvm_paging_enabled(v) \
diff --git a/xen/include/asm-x86/hypercall.h b/xen/include/asm-x86/hypercall.h
index a6615e895e..cb9fb331ea 100644
--- a/xen/include/asm-x86/hypercall.h
+++ b/xen/include/asm-x86/hypercall.h
@@ -101,6 +101,11 @@ arch_do_domctl(
struct xen_domctl *domctl,
XEN_GUEST_HANDLE(xen_domctl_t) u_domctl);
+extern long
+arch_do_sysctl(
+ struct xen_sysctl *op,
+ XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl);
+
extern int
do_kexec(
unsigned long op, unsigned arg1, XEN_GUEST_HANDLE(void) uarg);
diff --git a/xen/include/asm-x86/io.h b/xen/include/asm-x86/io.h
index 7179a9ee75..2e4d62046a 100644
--- a/xen/include/asm-x86/io.h
+++ b/xen/include/asm-x86/io.h
@@ -52,4 +52,8 @@ __OUT(l,,int)
extern void (*pv_post_outb_hook)(unsigned int port, u8 value);
+/* Function pointer used to handle platform specific I/O port emulation. */
+extern void (*ioemul_handle_quirk)(
+ u8 opcode, char *io_emul_stub, struct cpu_user_regs *regs);
+
#endif
diff --git a/xen/include/asm-x86/io_apic.h b/xen/include/asm-x86/io_apic.h
index 02c4b71f53..4bbbbe79d3 100644
--- a/xen/include/asm-x86/io_apic.h
+++ b/xen/include/asm-x86/io_apic.h
@@ -198,6 +198,8 @@ extern void init_ioapic_mappings(void);
extern void ioapic_suspend(void);
extern void ioapic_resume(void);
+extern void dump_ioapic_irq_info(void);
+
extern struct IO_APIC_route_entry **alloc_ioapic_entries(void);
extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries);
extern int save_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries);
@@ -215,4 +217,7 @@ extern int free_irq_vector(int vector);
unsigned highest_gsi(void);
+int ioapic_guest_read( unsigned long physbase, unsigned int reg, u32 *pval);
+int ioapic_guest_write(unsigned long physbase, unsigned int reg, u32 pval);
+
#endif
diff --git a/xen/include/asm-x86/irq.h b/xen/include/asm-x86/irq.h
index 2e8322a05e..5399cb55c4 100644
--- a/xen/include/asm-x86/irq.h
+++ b/xen/include/asm-x86/irq.h
@@ -116,6 +116,9 @@ int map_domain_emuirq_pirq(struct domain *d, int pirq, int irq);
int unmap_domain_pirq_emuirq(struct domain *d, int pirq);
int hvm_domain_use_pirq(struct domain *d, int irq);
+/* A cpu has been removed from cpu_online_mask. Re-set irq affinities. */
+void fixup_irqs(void);
+
int init_irq_data(void);
void clear_irq_vector(int irq);
diff --git a/xen/include/asm-x86/numa.h b/xen/include/asm-x86/numa.h
index abe7468446..07d31bb249 100644
--- a/xen/include/asm-x86/numa.h
+++ b/xen/include/asm-x86/numa.h
@@ -83,5 +83,6 @@ extern int valid_numa_range(u64 start, u64 end, int node);
#endif
void srat_parse_regions(u64 addr);
+extern int __node_distance(int a, int b);
#endif
diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h
index f097a35ef3..0bf9545ac7 100644
--- a/xen/include/asm-x86/p2m.h
+++ b/xen/include/asm-x86/p2m.h
@@ -666,6 +666,31 @@ static inline int p2m_gfn_check_limit(
int set_p2m_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
unsigned int page_order, p2m_type_t p2mt, p2m_access_t p2ma);
+/* Set up function pointers for PT implementation: only for use by p2m code */
+extern void p2m_pt_init(struct p2m_domain *p2m);
+
+/* Debugging and auditing of the P2M code? */
+#define P2M_AUDIT 0
+#define P2M_DEBUGGING 0
+
+#if P2M_AUDIT
+extern void audit_p2m(struct p2m_domain *p2m, int strict_m2p);
+#else
+# define audit_p2m(_p2m, _m2p) do { (void)(_p2m),(_m2p); } while (0)
+#endif /* P2M_AUDIT */
+
+/* Printouts */
+#define P2M_PRINTK(_f, _a...) \
+ debugtrace_printk("p2m: %s(): " _f, __func__, ##_a)
+#define P2M_ERROR(_f, _a...) \
+ printk("pg error: %s(): " _f, __func__, ##_a)
+#if P2M_DEBUGGING
+#define P2M_DEBUG(_f, _a...) \
+ debugtrace_printk("p2mdebug: %s(): " _f, __func__, ##_a)
+#else
+#define P2M_DEBUG(_f, _a...) do { (void)(_f); } while(0)
+#endif
+
#endif /* _XEN_P2M_H */
/*
diff --git a/xen/include/asm-x86/processor.h b/xen/include/asm-x86/processor.h
index f9fbf39d62..7272dfa058 100644
--- a/xen/include/asm-x86/processor.h
+++ b/xen/include/asm-x86/processor.h
@@ -580,6 +580,7 @@ DECLARE_TRAP_HANDLER(machine_check);
DECLARE_TRAP_HANDLER(alignment_check);
DECLARE_TRAP_HANDLER(spurious_interrupt_bug);
#undef DECLARE_TRAP_HANDLER
+extern asmlinkage int hypercall(void);
int cpuid_hypervisor_leaves( uint32_t idx, uint32_t sub_idx,
uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx);
diff --git a/xen/include/asm-x86/setup.h b/xen/include/asm-x86/setup.h
index 9f1ef7c0b2..f7d6345eab 100644
--- a/xen/include/asm-x86/setup.h
+++ b/xen/include/asm-x86/setup.h
@@ -2,6 +2,7 @@
#define __X86_SETUP_H_
#include <xen/multiboot.h>
+#include <public/version.h>
extern bool_t early_boot;
extern unsigned long xenheap_initial_phys_start;
@@ -38,4 +39,7 @@ int construct_dom0(
unsigned long initial_images_nrpages(void);
void discard_initial_images(void);
+int xen_in_range(unsigned long mfn);
+void arch_get_xen_caps(xen_capabilities_info_t *info);
+
#endif
diff --git a/xen/include/asm-x86/shadow.h b/xen/include/asm-x86/shadow.h
index e7dc66cf09..88a8cd2da3 100644
--- a/xen/include/asm-x86/shadow.h
+++ b/xen/include/asm-x86/shadow.h
@@ -115,6 +115,9 @@ static inline void shadow_remove_all_shadows(struct vcpu *v, mfn_t gmfn)
sh_remove_shadows(v, gmfn, 0 /* Be thorough */, 1 /* Must succeed */);
}
+/* Discard _all_ mappings from the domain's shadows. */
+void shadow_blow_tables_per_domain(struct domain *d);
+
#endif /* _XEN_SHADOW_H */
/*
diff --git a/xen/include/asm-x86/x86_64/uaccess.h b/xen/include/asm-x86/x86_64/uaccess.h
index e35ce28e03..475bea216e 100644
--- a/xen/include/asm-x86/x86_64/uaccess.h
+++ b/xen/include/asm-x86/x86_64/uaccess.h
@@ -14,6 +14,19 @@ void free_compat_arg_xlat(struct vcpu *v);
((__off + (unsigned long)(size)) <= COMPAT_ARG_XLAT_SIZE); \
})
+#define xlat_page_start ((unsigned long)COMPAT_ARG_XLAT_VIRT_BASE)
+#define xlat_page_size COMPAT_ARG_XLAT_SIZE
+#define xlat_page_left_size(xlat_page_current) \
+ (xlat_page_start + xlat_page_size - xlat_page_current)
+
+#define xlat_malloc_init(xlat_page_current) do { \
+ xlat_page_current = xlat_page_start; \
+} while (0)
+
+extern void *xlat_malloc(unsigned long *xlat_page_current, size_t size);
+
+#define xlat_malloc_array(_p, _t, _c) ((_t *) xlat_malloc(&_p, sizeof(_t) * _c))
+
/*
* Valid if in +ve half of 48-bit address space, or above Xen-reserved area.
* This is also valid for range checks (addr, addr+size). As long as the
diff --git a/xen/include/xen/cpuidle.h b/xen/include/xen/cpuidle.h
index bbdadb4ac4..5285063696 100644
--- a/xen/include/xen/cpuidle.h
+++ b/xen/include/xen/cpuidle.h
@@ -95,4 +95,6 @@ extern void cpuidle_wakeup_mwait(cpumask_t *mask);
#define CPUIDLE_DRIVER_STATE_START 1
+extern void menu_get_trace_data(u32 *expected, u32 *pred);
+
#endif /* _XEN_CPUIDLE_H */
diff --git a/xen/include/xen/kexec.h b/xen/include/xen/kexec.h
index 9b51004c38..26df1ac9ac 100644
--- a/xen/include/xen/kexec.h
+++ b/xen/include/xen/kexec.h
@@ -34,6 +34,12 @@ void kexec_crash_save_cpu(void);
crash_xen_info_t *kexec_crash_save_info(void);
void machine_crash_shutdown(void);
int machine_kexec_get(xen_kexec_range_t *range);
+int machine_kexec_get_xen(xen_kexec_range_t *range);
+
+void compat_machine_kexec(unsigned long rnk,
+ unsigned long indirection_page,
+ unsigned long *page_list,
+ unsigned long start_address);
/* vmcoreinfo stuff */
#define VMCOREINFO_BYTES (4096)
diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h
index 40c9847335..79082d1721 100644
--- a/xen/include/xen/pci.h
+++ b/xen/include/xen/pci.h
@@ -119,6 +119,7 @@ int pci_find_ext_capability(int seg, int bus, int devfn, int cap);
int msixtbl_pt_register(struct domain *d, int pirq, uint64_t gtable);
void msixtbl_pt_unregister(struct domain *d, int pirq);
+void msixtbl_pt_cleanup(struct domain *d);
void pci_enable_acs(struct pci_dev *pdev);
#endif /* __XEN_PCI_H__ */
diff --git a/xen/include/xen/perfc.h b/xen/include/xen/perfc.h
index 59353a34d4..6cb0cd1739 100644
--- a/xen/include/xen/perfc.h
+++ b/xen/include/xen/perfc.h
@@ -95,6 +95,10 @@ DECLARE_PER_CPU(perfc_t[NUM_PERFCOUNTERS], perfcounters);
struct xen_sysctl_perfc_op;
int perfc_control(struct xen_sysctl_perfc_op *);
+
+extern void perfc_printall(unsigned char key);
+extern void perfc_reset(unsigned char key);
+
#else /* PERF_COUNTERS */
diff --git a/xen/include/xen/pmstat.h b/xen/include/xen/pmstat.h
index 979af239c7..266bc16d86 100644
--- a/xen/include/xen/pmstat.h
+++ b/xen/include/xen/pmstat.h
@@ -5,6 +5,7 @@
#include <public/platform.h> /* for struct xen_processor_power */
#include <public/sysctl.h> /* for struct pm_cx_stat */
+int set_px_pminfo(uint32_t cpu, struct xen_processor_performance *perf);
long set_cx_pminfo(uint32_t cpu, struct xen_processor_power *power);
uint32_t pmstat_get_cx_nr(uint32_t cpuid);
int pmstat_get_cx_stat(uint32_t cpuid, struct pm_cx_stat *stat);
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 7b546d77b9..e3eab706a3 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -534,6 +534,9 @@ void continue_running(
struct vcpu *same);
void startup_cpu_idle_loop(void);
+extern void (*pm_idle) (void);
+extern void (*dead_idle) (void);
+
/*
* Creates a continuation to resume the current hypercall. The caller should
@@ -653,6 +656,9 @@ void cpupool_put(struct cpupool *pool);
int cpupool_add_domain(struct domain *d, int poolid);
void cpupool_rm_domain(struct domain *d);
int cpupool_do_sysctl(struct xen_sysctl_cpupool_op *op);
+void schedule_dump(struct cpupool *c);
+extern void dump_runq(unsigned char key);
+
#define num_cpupool_cpus(c) (cpus_weight((c)->cpu_valid))
#endif /* __SCHED_H__ */
diff --git a/xen/include/xen/spinlock.h b/xen/include/xen/spinlock.h
index dd1550ca58..6400c2b616 100644
--- a/xen/include/xen/spinlock.h
+++ b/xen/include/xen/spinlock.h
@@ -98,6 +98,10 @@ void _lock_profile_deregister_struct(int32_t, struct lock_profile_qhead *);
#define lock_profile_deregister_struct(type, ptr) \
_lock_profile_deregister_struct(type, &((ptr)->profile_head))
+extern int spinlock_profile_control(xen_sysctl_lockprof_op_t *pc);
+extern void spinlock_profile_printall(unsigned char key);
+extern void spinlock_profile_reset(unsigned char key);
+
#else
struct lock_profile { };
diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h
index 7539cc7d7b..512c070c81 100644
--- a/xen/include/xsm/xsm.h
+++ b/xen/include/xsm/xsm.h
@@ -636,4 +636,7 @@ static inline int xsm_vcpuextstate(struct domain *d, uint32_t cmd)
}
#endif /* CONFIG_X86 */
+extern struct xsm_operations dummy_xsm_ops;
+extern void xsm_fixup_ops(struct xsm_operations *ops);
+
#endif /* __XSM_H */