Re: [patch, 2.6.10-rc3] safe_hlt() & NMIs

From: Andi Kleen
Date: Wed Dec 15 2004 - 00:06:45 EST


> But something like
>
> static inline int kernel_mode(struct pt_regs *regs)
> {
> return !((regs->eflags & VM_MASK) | (regs->xcs & 3));
> }
>
> should DTRT.
>
> Can you pls double-check my thinking, and test?

Reasoning looks correct to me.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/