On Tue, 2019-05-28 at 19:37 +0200, Martin Husemann wrote: > Stupid question: since this is all very rare and non-performance critical, > why isn't it done as a single register per call? Adding more registers > when thy arrive in newer cpu variants, and not worrying about how they > are saved (XSAVE or similar) nor what format is used in the kernel? > > So a debugger would do a single PT_GETREG_$REGISTER call from userland > for each register it is interested in. The current state with register > groups (regs, fpregs, dbregs, xmmmregs, vecregs, ...) looks like a hack > to me. > > The first two make some sense (across various cpu architectures), and > maybe performance and debug registers could be a third reasonable group > (especially given the security implications), but everything else is > arbitrary and may just as well be individual registers. >
Well, if we are only to consider new registers, then we're talking about 16 'pure' ymm registers + 32 zmm registers + 8 kN registers + 1 state register, multiply by two... 114 PT_* requests? -- Best regards, Michał Górny
