Skip to content

Commit

Permalink
x86: add macro for privileged 64-bit operation
Browse files Browse the repository at this point in the history
i386 has a macro GET_CR0_INTO_EAX, used in early trap handling code.
x86_64 has similar needs, only it needs to put cr2 into rcx. We provide
a macro for such task, in the same way

Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Glauber de Oliveira Costa authored and Ingo Molnar committed Jan 30, 2008
1 parent 2e47d3e commit 4a8c4c4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/asm-x86/paravirt.h
Original file line number Diff line number Diff line change
Expand Up @@ -1227,6 +1227,12 @@ static inline unsigned long __raw_local_irq_save(void)
push %ecx; push %edx; \
call *pv_cpu_ops+PV_CPU_read_cr0; \
pop %edx; pop %ecx
#else
#define GET_CR2_INTO_RCX \
call *pv_mmu_ops+PV_MMU_read_cr2; \
movq %rax, %rcx; \
xorq %rax, %rax;

#endif

#endif /* __ASSEMBLY__ */
Expand Down

0 comments on commit 4a8c4c4

Please sign in to comment.