On Wed, 23 Jun 2021 at 22:10, Steven Raasch <sraa...@gmail.com> wrote: > I have used KVM to create a snapshot of a windows-10 guest running a > graphics-intensive app. The *original* issue is that the app does not execute > correctly when re-started from the snapshot using TCG (it doesn't crash, but > it doesn't run correctly, either).
I'm not sure that taking a snapshot with KVM and then resuming under TCG is really tested. So I'm not very surprised that it doesn't work. > I'm setting DEBUG & single-step modes by calling cpu_single_step() from the > top of kvm_vcpu_thread_fn(). > in kvm_cpu_exec() I wait until I get a KVM_EXIT_DEBUG signal before logging > the instruction. If your app can cope with the slowdown involved in taking a VM exit after every instruction (which will be massive), then it can probably also handle the extra overhead on top of that of the gdbstub communication protocol. So it's probably simplest just to connect to QEMU's gdbstub and do the single-stepping that way. The other approach to this would be to see if intel's perf monitor stuff (which I know nothing about) has some kind of execution-trace capture support and if that works when passing through the PMU to a KVM guest. thanks -- PMM