1 /* 2 * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. 3 * 4 */ 5 6 #ifndef __XEN_VIRTUAL_REGION_H__ 7 #define __XEN_VIRTUAL_REGION_H__ 8 9 #include <xen/list.h> 10 #include <xen/symbols.h> 11 12 struct virtual_region 13 { 14 struct list_head list; 15 const void *start; /* Virtual address start. */ 16 const void *end; /* Virtual address end. */ 17 18 /* If this is NULL the default lookup mechanism is used. */ 19 symbols_lookup_t *symbols_lookup; 20 21 struct { 22 const struct bug_frame *bugs; /* The pointer to array of bug frames. */ 23 size_t n_bugs; /* The number of them. */ 24 } frame[BUGFRAME_NR]; 25 26 const struct exception_table_entry *ex; 27 const struct exception_table_entry *ex_end; 28 }; 29 30 const struct virtual_region *find_text_region(unsigned long addr); 31 void setup_virtual_regions(const struct exception_table_entry *start, 32 const struct exception_table_entry *end); 33 void unregister_init_virtual_region(void); 34 void register_virtual_region(struct virtual_region *r); 35 void unregister_virtual_region(struct virtual_region *r); 36 void reset_virtual_region_perms(void); 37 38 #endif /* __XEN_VIRTUAL_REGION_H__ */ 39 40 /* 41 * Local variables: 42 * mode: C 43 * c-file-style: "BSD" 44 * c-basic-offset: 4 45 * tab-width: 4 46 * indent-tabs-mode: nil 47 * End: 48 */ 49