diff options
Diffstat (limited to 'xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor.h')
-rw-r--r-- | xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor.h b/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor.h index c120294bf7..8269718ec8 100644 --- a/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor.h +++ b/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor.h @@ -27,8 +27,8 @@ void do_hypervisor_callback(struct pt_regs *regs); /* arch/xeno/mm/hypervisor.c */ /* - * NB. ptr values should be fake-physical. 'vals' should be already - * fully adjusted (ie. for start_info.phys_base). + * NB. ptr values should be PHYSICAL, not MACHINE. 'vals' should be already + * be MACHINE addresses. */ extern unsigned int pt_update_queue_idx; @@ -77,7 +77,7 @@ extern page_update_debug_t update_debug_queue[]; update_debug_queue[pt_update_queue_idx].line = __LINE__; \ update_debug_queue[pt_update_queue_idx].file = __FILE__; \ printk("L1 %s %d: %08lx (%08lx -> %08lx)\n", __FILE__, __LINE__, \ - (_p)+start_info.phys_base, *(unsigned long *)__va(_p), \ + phys_to_machine(_p), *(unsigned long *)__va(_p), \ (unsigned long)(_v)); \ queue_l1_entry_update((_p),(_v)); \ }) @@ -87,7 +87,7 @@ extern page_update_debug_t update_debug_queue[]; update_debug_queue[pt_update_queue_idx].line = __LINE__; \ update_debug_queue[pt_update_queue_idx].file = __FILE__; \ printk("L2 %s %d: %08lx (%08lx -> %08lx)\n", __FILE__, __LINE__, \ - (_p)+start_info.phys_base, *(unsigned long *)__va(_p), \ + phys_to_machine(_p), *(unsigned long *)__va(_p), \ (unsigned long)(_v)); \ queue_l2_entry_update((_p),(_v)); \ }) @@ -289,6 +289,16 @@ static inline int HYPERVISOR_update_descriptor( : "=a" (ret) : "0" (__HYPERVISOR_set_gdt), "b" (pa), "c" (word1), "d" (word2) ); + return ret; +} + +static inline int HYPERVISOR_set_fast_trap(int idx) +{ + int ret; + __asm__ __volatile__ ( + TRAP_INSTR + : "=a" (ret) : "0" (__HYPERVISOR_set_fast_trap), + "b" (idx) ); return ret; } |