Skip to content

[8.0.0] Broken snapshot replay support on PowerPC

Host environment

  • Operating system: macOS 13.3.1
  • OS/kernel version: Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:17 PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64 x86_64
  • Architecture: x86_64
  • QEMU flavor: qemu-system-ppc
  • QEMU version: 8.0.0
  • QEMU command line:
    qemu-system-ppc -cpu e500mc -M ppce500 -m 128M -net none -icount 1,rr=record,rrfile=main.bin,rrsnapshot=init \
    -drive file=empty.qcow2,if=none,id=rr -display none -kernel hello.elf -serial stdio
    
    qemu-system-ppc -cpu e500mc -M ppce500 -m 128M -net none -icount 1,rr=replay,rrfile=main.bin,rrsnapshot=init \
    -drive file=empty.qcow2,if=none,id=rr -display none -kernel hello.elf -serial stdio

Emulated/Virtualized environment

  • Operating system: Bare metal hello world
  • OS/kernel version: None
  • Architecture: PowerPC e500mc (Book-E)

Description of problem

QEMU 8.0.0 can no longer replay snapshots on PowerPC e500mc (Book-E) architecture. The issue is caused by c4b07531, reverting this commit solves the issue.

Steps to reproduce

  1. Run bare metal example from the attachment with the first command-line to create snapshot.
  2. Run bare metal example from the attachment with the second command-line to replay snapshot.

Additional information

Any e500mc example would do really. I was unable to find a prebuilt Linux distribution, thus just wrote a minimal sample that prints hello world to UART: ppc-e500.zip

Log output:

% qemu-system-ppc -cpu e500mc -M ppce500 -m 128M -net none -icount 1,rr=record,rrfile=main.bin,rrsnapshot=init -drive file=empty.qcow2,if=none,id=rr -display none -kernel hello.elf -serial stdio
Hello world
qemu-system-ppc: terminating on signal 2 from pid 4505 (<unknown process>)
% qemu-system-ppc -cpu e500mc -M ppce500 -m 128M -net none -icount 1,rr=replay,rrfile=main.bin,rrsnapshot=init -drive file=empty.qcow2,if=none,id=rr -display none -kernel hello.elf -serial stdio
qemu-system-ppc: Missing random event in the replay log
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information