> Ok, so I think this is what Andy meant last night and PeterZ just > suggested it too: > > We do a: > > _ASM_EXTABLE_HANDLE(1b, 2b, ex_handler_panic) > > which panics straight in the #GP handler and avoids the IRET.
We can even get a nice diagnostic message since the handler has access to "regs". It can print which MSR (regs->cx) and where it happened (regs->ip). Which sounds like you might want a specific ex_handler_rdmsr function rather than a generic ex_handler_panic. Maybe same deal for wrmsr() too? That would also print edx:eax so you could see what was being written. -Tony