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

Linus Torvalds
2009-06-15T18:32:03Z

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