I'd like to detect when the kernel stack changes and it seems to me that
might be possible by looking at when the tss structure is accessed and
the esp element is changed. Linux uses a command something like the
following to update the esp in the tss during a task switch...
init_tss[smp_processor_
Can anyone think of a way to save and restore an additional cpu state
variable during a context switch without modifying the target operating
system? Basically I would like to add a variable to the CPUState
structure that is saved and restored with the registers.
Any ideas?
Thanks,
Nuri
Thanks Paul for the reply, I don't see how this function is called
though by the exception handler. The way I understand it is that an
exception is raised via raise_interrupt(exception_index, 0, 0, 0); in
helper.c which in turn calls raise_interrupt() that sends the control
flow back to the mai
In the QEMU internals docs under exception support the following is
stated... "The simulated program counter is found by retranslating the
corresponding basic block and by looking where the host program counter
was at the exception point."
Can anyone point me to the place in the code where the
I'm still looking for any suggestions on how to save and restore the
target cpu state from within a custom instruction in op.c. I basically
want a custom instruction to save the cpu state to a data structure and
then continue on normally, a second custom instruction would then be
used to restor
I'm experimenting a bit with QEMU and am in need of a way to save and
restore X86 CPU state including the pc so that the processor state can
be rolled back to re execute from the previous point. I've found the
functions "cpu_x86_fsave" and "cpu_restore_state" but do not understand
them well eno