Skip to contentSkip to conversation

s390x/qemu-user: TODO /home/dhildenb/git/qemu/tcg/tci.c:859: tcg_qemu_tb_exec()

DISCUSSION David Hildenbrand 5 participants 8 messages Oct 17, 2019 – Oct 21, 2019

lore
Share & tools
lore
#0 lore raw

Hi,

I'm currently trying to run Fedora 31 under qemu-user (https://github.com/fedora-cloud/docker-brew-fedora/tree/8a81f67271e959dfc8f8a888b161bbd540b7a83b/s390x) in order to debug a vector instruction issue.

Strangely, when trying to chroot into above rootfs and running /bin/bash, I get

t460s: ~/f31 $ sudo chroot . ./qemu-s390x /bin/bash TODO /home/dhildenb/git/qemu/tcg/tci.c:859: tcg_qemu_tb_exec() /home/dhildenb/git/qemu/tcg/tci.c:859: tcg fatal error Aborted

But it's not fundamentally broken:

t460s: ~/f31 $ sudo chroot . ./qemu-s390x /bin/ls

bin   dev  home  lib64       media  opt   qemu-s390x  run   srv  tmp  var
boot  etc  lib   lost+found  mnt    proc  root        sbin  sys  usr

I do wonder why we don't run into the same issue under qemu-systems390x.

@Richard, any idea?

Signature · 3 lines
Thanks,

David / dhildenb
#1 lore raw

Hi David,

Quoted 12 lines · David Hildenbrand

Hi,

I'm currently trying to run Fedora 31 under qemu-user (https://github.com/fedora-cloud/docker-brew-fedora/tree/8a81f67271e959dfc8f8a888b161bbd540b7a83b/s390x) in order to debug  a vector instruction issue.

Strangely, when trying to chroot into above rootfs and running /bin/bash, I get

t460s: ~/f31  $ sudo chroot . ./qemu-s390x  /bin/bash TODO /home/dhildenb/git/qemu/tcg/tci.c:859: tcg_qemu_tb_exec() /home/dhildenb/git/qemu/tcg/tci.c:859: tcg fatal error Aborted

Quoted 8 lines

But it's not fundamentally broken:

t460s: ~/f31  $ sudo chroot . ./qemu-s390x  /bin/ls
bin   dev  home  lib64       media  opt   qemu-s390x  run   srv  tmp  var boot  etc  lib   lost+found  mnt    proc  root        sbin  sys  usr

I do wonder why we don't run into the same issue under qemu-systems390x.

Are you also using TCI in system emulation?

Can you simply use TCG to debug your vector instruction issue instead?

Regards,

Phil.

#2 lore raw
Quoted 20 lines · Philippe Mathieu-Daudé

Hi David,

Quoted 17 lines · David Hildenbrand

Hi,

I'm currently trying to run Fedora 31 under qemu-user
(https://github.com/fedora-cloud/docker-brew-fedora/tree/8a81f67271e959dfc8f8a888b161bbd540b7a83b/s390x)
in order to debug  a vector instruction issue.

Strangely, when trying to chroot into above rootfs and running /bin/bash, I get

t460s: ~/f31  $ sudo chroot . ./qemu-s390x  /bin/bash TODO /home/dhildenb/git/qemu/tcg/tci.c:859: tcg_qemu_tb_exec() /home/dhildenb/git/qemu/tcg/tci.c:859: tcg fatal error Aborted

But it's not fundamentally broken:

Quoted 8 lines
Quoted 6 lines

t460s: ~/f31  $ sudo chroot . ./qemu-s390x  /bin/ls
bin   dev  home  lib64       media  opt   qemu-s390x  run   srv  tmp  var boot  etc  lib   lost+found  mnt    proc  root        sbin  sys  usr

I do wonder why we don't run into the same issue under qemu-systems390x.

Are you also using TCI in system emulation?

Most probably not. It took me longer than expected to find a ./configure variant that at least allows me to build static qemu-user binaries. Most probably something sneeked in there.

Quoted 2 lines

Can you simply use TCG to debug your vector instruction issue instead?

I was using

./configure --disable-strip --disable-werror --python=/usr/bin/python3 --enable-tcg-interpreter --disable-system --enable-linux-user --static --disable-pie --disable-sdl --disable-gtk --disable-spice --disable-tools --disable-guest-agent --disable-guest-agent-msi --disable-curses --disable-curl --disable-gnutls --disable-gcrypt --disable-nettle --disable-cap-ng --disable-brlapi --disable-mpath --disable-capstone --disable-xen --disable-rdma --extra-ldflags="-Wl,-z,relro -Wl,-z,now" --target-list=s390x-linux-user

inspired by the Fedora rpm SPEC.

"--enable-tcg-interpreter" is the relevant bit I blindly copied without thinking about it (in the rpm SPEC, it is wrapped by an ifdef ...)

Thanks for the hint, will try with --disable-tcg-interpreter

Quoted 5 lines

Regards,

Phil.

Signature · 3 lines
Thanks,

David / dhildenb
#3 lore raw
Quoted 47 lines · David Hildenbrand
Quoted 21 lines · Philippe Mathieu-Daudé

Hi David,

Quoted 18 lines · David Hildenbrand

Hi,

I'm currently trying to run Fedora 31 under qemu-user
(https://github.com/fedora-cloud/docker-brew-fedora/tree/8a81f67271e959dfc8f8a888b161bbd540b7a83b/s390x)

in order to debug  a vector instruction issue.

Strangely, when trying to chroot into above rootfs and running /bin/bash, I get

t460s: ~/f31  $ sudo chroot . ./qemu-s390x  /bin/bash TODO /home/dhildenb/git/qemu/tcg/tci.c:859: tcg_qemu_tb_exec() /home/dhildenb/git/qemu/tcg/tci.c:859: tcg fatal error Aborted

But it's not fundamentally broken:

Quoted 8 lines
Quoted 6 lines

t460s: ~/f31  $ sudo chroot . ./qemu-s390x  /bin/ls
bin   dev  home  lib64       media  opt   qemu-s390x  run   srv  tmp var boot  etc  lib   lost+found  mnt    proc  root        sbin  sys  usr

I do wonder why we don't run into the same issue under qemu-systems390x.

Are you also using TCI in system emulation?

Most probably not. It took me longer than expected to find a ./configure variant that at least allows me to build static qemu-user binaries. Most probably something sneeked in there.

Quoted 2 lines

Can you simply use TCG to debug your vector instruction issue instead?

I was using

./configure --disable-strip --disable-werror --python=/usr/bin/python3 --enable-tcg-interpreter --disable-system --enable-linux-user --static --disable-pie --disable-sdl --disable-gtk --disable-spice --disable-tools --disable-guest-agent --disable-guest-agent-msi --disable-curses --disable-curl --disable-gnutls --disable-gcrypt --disable-nettle --disable-cap-ng --disable-brlapi --disable-mpath --disable-capstone --disable-xen --disable-rdma --extra-ldflags="-Wl,-z,relro -Wl,-z,now" --target-list=s390x-linux-user

Quoted 3 lines

inspired by the Fedora rpm SPEC.

"--enable-tcg-interpreter" is the relevant bit I blindly copied without thinking about it (in the rpm SPEC, it is wrapped by an ifdef ...)

I thought there was a patch adding a big warning when ./configure is run with this option, but I can't find it so maybe we just talked about it.

Quoted 7 lines

Thanks for the hint, will try with --disable-tcg-interpreter

Quoted 5 lines

Regards,

Phil.

#4 lore raw
In reply to David Hildenbrand
Quoted 6 lines · David Hildenbrand

Hi,

I'm currently trying to run Fedora 31 under qemu-user
(https://github.com/fedora-cloud/docker-brew-fedora/tree/8a81f67271e959dfc8f8a888b161bbd540b7a83b/s390x)
in order to debug  a vector instruction issue.

Quoted 7 lines

Strangely, when trying to chroot into above rootfs and running /bin/bash, I get

t460s: ~/f31  $ sudo chroot . ./qemu-s390x  /bin/bash TODO /home/dhildenb/git/qemu/tcg/tci.c:859: tcg_qemu_tb_exec() /home/dhildenb/git/qemu/tcg/tci.c:859: tcg fatal error Aborted

That's likely the issue which might be fixed by Stefan's patch here:

https://patchwork.ozlabs.org/patch/1083601/

... unfortunately, this has never been merged into master. Stefan, any chance that you could finally get this upstream?

Thomas

#5 lore raw
Quoted 15 lines · Thomas Huth
Quoted 6 lines · David Hildenbrand

Hi,

I'm currently trying to run Fedora 31 under qemu-user
(https://github.com/fedora-cloud/docker-brew-fedora/tree/8a81f67271e959dfc8f8a888b161bbd540b7a83b/s390x)
in order to debug  a vector instruction issue.

Quoted 7 lines

Strangely, when trying to chroot into above rootfs and running /bin/bash, I get

t460s: ~/f31  $ sudo chroot . ./qemu-s390x  /bin/bash TODO /home/dhildenb/git/qemu/tcg/tci.c:859: tcg_qemu_tb_exec() /home/dhildenb/git/qemu/tcg/tci.c:859: tcg fatal error Aborted

Quoted 6 lines

That's likely the issue which might be fixed by Stefan's patch here:

https://patchwork.ozlabs.org/patch/1083601/

... unfortunately, this has never been merged into master. Stefan, any chance that you could finally get this upstream?

Oops. Sorry about that. Queued.

r~

#6 lore raw
Quoted 17 lines · Richard Henderson
Quoted 15 lines · Thomas Huth
Quoted 13 lines · David Hildenbrand

Hi,

I'm currently trying to run Fedora 31 under qemu-user
(https://github.com/fedora-cloud/docker-brew-fedora/tree/8a81f67271e959dfc8f8a888b161bbd540b7a83b/s390x)
in order to debug a vector instruction issue.

Strangely, when trying to chroot into above rootfs and running /bin/bash, I get

t460s: ~/f31 $ sudo chroot . ./qemu-s390x /bin/bash TODO /home/dhildenb/git/qemu/tcg/tci.c:859: tcg_qemu_tb_exec() /home/dhildenb/git/qemu/tcg/tci.c:859: tcg fatal error Aborted

Quoted 8 lines
Quoted 6 lines

That's likely the issue which might be fixed by Stefan's patch here:

https://patchwork.ozlabs.org/patch/1083601/

... unfortunately, this has never been merged into master. Stefan, any chance that you could finally get this upstream?

Oops. Sorry about that. Queued.

Er, you had review comments on it the first time round. Doesn't it need a v2 to be posted with those fixed ?

thanks
-- PMM

#7 lore raw
Quoted 11 lines · Peter Maydell
Quoted 8 lines
Quoted 6 lines

That's likely the issue which might be fixed by Stefan's patch here:

https://patchwork.ozlabs.org/patch/1083601/

... unfortunately, this has never been merged into master. Stefan, any chance that you could finally get this upstream?

Oops. Sorry about that. Queued.

Er, you had review comments on it the first time round. Doesn't it need a v2 to be posted with those fixed ?

The patch does follow existing practice within the file, although that itself could be cleaned up. I think that could just be done in a separate patch.

r~