Re: [tip:perfcounters/core] perf_counter: x86: Fix call-chain supportto use NMI-safe methods

From: Linus Torvalds
Date: Mon Jun 15 2009 - 14:32:07 EST




On Mon, 15 Jun 2009, Mathieu Desnoyers wrote:
>
> Hrm, would it be possible to save the c2 register upon nmi handler entry
> and restore it before iret instead ?

Yes, that would work as well, and be less subtle.

It still does have the same worries about CPU's not being all that happy
about writing to %cr2 (we do it when restoring CPU state at resume time,
but nobody has ever _cared_ before, so I don't know if it matters).

Linus
--
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/