[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging multi-threaded TCG for aarch64 emulation (stalled vCPU)

From: Alex Bennée
Subject: Re: Debugging multi-threaded TCG for aarch64 emulation (stalled vCPU)
Date: Fri, 12 Jun 2020 18:01:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Jesus Sanchez-Palencia
<forgerbr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Hi there,
> I'm investigating an intermittent issue where one of the vCPUs is
> stalled during the MTCG main loop, so I'm sampling all vCPUs state to
> rootcause the issue.

How is it stalled? Is it busy looping running guest code or has it
exited the run loop?

> Is there a way to print which instruction a TCG thread is currently 
> emulating? I have access to all pointers to CPUState, TranslationBlock, etc. 
> lookup_symbol() doesn't return anything and I'm not
> seeing any other obvious options.

The hammer approach is to run with -d exec,cpu

which will dump the CPU state each time the code enters the run loop.

> I'd appreciate some guidance here.

With my developer hat on I would attach gdb to QEMU itself and run:

  thread apply bt all

and start poking around from there. If the thread in question is not
running actual guest code then the state of CPUState will be valid.

> Thanks.

Alex Bennée

reply via email to

[Prev in Thread] Current Thread [Next in Thread]