Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=25c47bb35355c1e1b2ae325b49441b2c8b201ece Commit: 25c47bb35355c1e1b2ae325b49441b2c8b201ece Parent: db24e8c2ef7eceb46818a8c22fc38dea733fe159 Author: Rusty Russell <[EMAIL PROTECTED]> AuthorDate: Thu Oct 25 14:09:53 2007 +1000 Committer: Rusty Russell <[EMAIL PROTECTED]> CommitDate: Thu Oct 25 14:09:53 2007 +1000
lguest: use defines from x86 headers instead of magic numbers Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- arch/x86/lguest/boot.c | 5 ++--- drivers/lguest/x86/core.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index d2235db..136d9df 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c @@ -371,8 +371,7 @@ static void lguest_cpuid(unsigned int *eax, unsigned int *ebx, static unsigned long current_cr0, current_cr3; static void lguest_write_cr0(unsigned long val) { - /* 8 == TS bit. */ - lazy_hcall(LHCALL_TS, val & 8, 0, 0); + lazy_hcall(LHCALL_TS, val & X86_CR0_TS, 0, 0); current_cr0 = val; } @@ -387,7 +386,7 @@ static unsigned long lguest_read_cr0(void) static void lguest_clts(void) { lazy_hcall(LHCALL_TS, 0, 0, 0); - current_cr0 &= ~8U; + current_cr0 &= ~X86_CR0_TS; } /* CR2 is the virtual address of the last page fault, which the Guest only ever diff --git a/drivers/lguest/x86/core.c b/drivers/lguest/x86/core.c index 9eed12d..09d9207 100644 --- a/drivers/lguest/x86/core.c +++ b/drivers/lguest/x86/core.c @@ -562,7 +562,7 @@ void lguest_arch_setup_regs(struct lguest *lg, unsigned long start) * is supposed to always be "1". Bit 9 (0x200) controls whether * interrupts are enabled. We always leave interrupts enabled while * running the Guest. */ - regs->eflags = 0x202; + regs->eflags = X86_EFLAGS_IF | 0x2; /* The "Extended Instruction Pointer" register says where the Guest is * running. */ - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html