Re: Extracting PC information from QEMU/KVM during single-step

2021-06-24 Thread Steven Raasch
Peter - Thanks for the clarification, that makes perfect sense. In this case, using GDB is clearly the best way to go about the tracing. I appreciate your time! -S On Thu, Jun 24, 2021 at 1:51 PM Peter Maydell wrote: > On Thu, 24 Jun 2021 at 18:09, Steven Raasch wrote: > > NOTE: I do not ye

Re: Extracting PC information from QEMU/KVM during single-step

2021-06-24 Thread Peter Maydell
On Thu, 24 Jun 2021 at 18:09, Steven Raasch wrote: > NOTE: I do not yet understand how gdb interacts with the virtual machine. I > have experience with GDB, but only at a linux app-debug level. I don't grok > how gdb on a linux host works with QEMU running a windows guest. > My *assumption* is t

Re: Extracting PC information from QEMU/KVM during single-step

2021-06-24 Thread Steven Raasch
Understood with your KVM/TCG snapshot comment. I thought it was worth a try. NOTE: I do not yet understand how gdb interacts with the virtual machine. I have experience with GDB, but only at a linux app-debug level. I don't grok how gdb on a linux host works with QEMU running a windows guest. My *

Re: Extracting PC information from QEMU/KVM during single-step

2021-06-24 Thread Peter Maydell
On Wed, 23 Jun 2021 at 22:10, Steven Raasch 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 r

Re: Extracting PC information from QEMU/KVM during single-step

2021-06-24 Thread Alexander Bulekov
I see. I haven't encountered the corrupted RIP problem you described - maybe someone else has seen it. Even if the overhead of the gdb ipc is prohibitive, looking at gdbstub.c might be useful for comparing with your tracing code. Under the hood, the gdb stub is calling the same cpu_single_step fun

Re: Extracting PC information from QEMU/KVM during single-step

2021-06-24 Thread Steven Raasch
Alex - Our application is similar to a high-end game in that it adjusts it's code-path depending on how "fast" it is running. Our previous attempts to trace it's execution have run into issues due to the overhead of the trace collection. My hope had been that by using QEMU, I could control the "h

Re: Extracting PC information from QEMU/KVM during single-step

2021-06-23 Thread Alexander Bulekov
On 210623 1514, Steven Raasch wrote: > Hi - > > I'm trying to create a hack that will allow me to extract an instruction > trace from QEMU/KVM (i386). The KVM part is important (see below). > > Background: > >- I have used KVM to create a snapshot of a windows-10 guest running a >graphic

Extracting PC information from QEMU/KVM during single-step

2021-06-23 Thread Steven Raasch
Hi - I'm trying to create a hack that will allow me to extract an instruction trace from QEMU/KVM (i386). The KVM part is important (see below). Background: - 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 d