diff options
author | Tim Deegan <Tim.Deegan@citrix.com> | 2011-05-26 12:37:47 +0100 |
---|---|---|
committer | Tim Deegan <Tim.Deegan@citrix.com> | 2011-05-26 12:37:47 +0100 |
commit | 093e1d2484fc46ec73e527c03af79664218045df (patch) | |
tree | 4ac0109f7f6d91c8c24a62bfdd20dc44e5370e9d /xen/include/asm-x86 | |
parent | de4bf084c8dc232a629e436ccd0ce989da8c470e (diff) | |
download | xen-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/asm-x86')
-rw-r--r-- | xen/include/asm-x86/acpi.h | 1 | ||||
-rw-r--r-- | xen/include/asm-x86/debugger.h | 5 | ||||
-rw-r--r-- | xen/include/asm-x86/hap.h | 2 | ||||
-rw-r--r-- | xen/include/asm-x86/hpet.h | 2 | ||||
-rw-r--r-- | xen/include/asm-x86/hvm/hvm.h | 5 | ||||
-rw-r--r-- | xen/include/asm-x86/hypercall.h | 5 | ||||
-rw-r--r-- | xen/include/asm-x86/io.h | 4 | ||||
-rw-r--r-- | xen/include/asm-x86/io_apic.h | 5 | ||||
-rw-r--r-- | xen/include/asm-x86/irq.h | 3 | ||||
-rw-r--r-- | xen/include/asm-x86/numa.h | 1 | ||||
-rw-r--r-- | xen/include/asm-x86/p2m.h | 25 | ||||
-rw-r--r-- | xen/include/asm-x86/processor.h | 1 | ||||
-rw-r--r-- | xen/include/asm-x86/setup.h | 4 | ||||
-rw-r--r-- | xen/include/asm-x86/shadow.h | 3 | ||||
-rw-r--r-- | xen/include/asm-x86/x86_64/uaccess.h | 13 |
15 files changed, 79 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 |