qemu-devel
[Top][All Lists]
Advanced

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

Re: 'make check-tcg' fails with an assert in qemu_plugin_vcpu_init_hook


From: Philippe Mathieu-Daudé
Subject: Re: 'make check-tcg' fails with an assert in qemu_plugin_vcpu_init_hook
Date: Wed, 21 Jun 2023 11:55:52 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0

On 21/6/23 10:53, Peter Maydell wrote:
On Wed, 21 Jun 2023 at 09:05, Alex Bennée <alex.bennee@linaro.org> wrote:


Peter Maydell <peter.maydell@linaro.org> writes:

On Tue, 20 Jun 2023 at 17:56, Peter Maydell <peter.maydell@linaro.org> wrote:

$ make -C build/x86 check-tcg
make: Entering directory '/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86'
[...]
   TEST    munmap-pthread on arm
**
ERROR:../../plugins/core.c:221:qemu_plugin_vcpu_init_hook: assertion
failed: (success)
**
ERROR:../../accel/tcg/cpu-exec.c:1024:cpu_exec_setjmp: assertion
failed: (cpu == current_cpu)

git bisect blames commit d7ee93e2435970:

     cputlb: Restrict SavedIOTLB to system emulation

I think that commit is not correct, because it means that
the size of 'struct CPUState' and also the offset of fields
like 'cpu_index' will be different for files which are
compile-per-target-for-usermode and files which are
compile-once-only. The assert happens here because the
code which sets up cpu_index is build-once, but the code
in qemu_plugin_vcpu_init_hook() which reads cpu_index is
build-per-target and now they don't agree about where in
the struct the field is...

Hmm two things from that imply:

   - I suspect the plugin core stuff could be build once (or maybe twice,
     system and user)

It is already build-once, that's why it goes wrong...

   - we need to have some guard rails somehow to make sure things don't
     go out of sync

We do, this is the poison.h stuff. CONFIG_USER_ONLY is a
special case which we don't poison because there would be
too much refactoring required...

Just FYI the goal of the series including this commit is to remove
"exec/hwaddr.h" from user emulation.




reply via email to

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