Then I added SCSI adapter with the option –device lsi,id=scsi0 and QEMU failed
with the following error:
qemu: fatal: IO on conditional branch instruction
It happens here:
static void arm_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
{
DisasContext *dc = container_of(dcbase, DisasContext, base);
if (tb_cflags(dc->base.tb) & CF_LAST_IO && dc->condjmp) {
/* FIXME: This can theoretically happen with self-modifying code. */
cpu_abort(cpu, "IO on conditional branch instruction");
}
Seems, that your kernel is incomatible with QEMU, which ARM emulation is not
good enough.
Pavel Dovgalyuk
From: Pavel Dovgalyuk [mailto:[email protected]]
Sent: Tuesday, February 13, 2018 12:58 PM
To: 'Ciro Santilli'
Cc: 'Pavel Dovgalyuk'; [email protected]; [email protected]; 'Peter
Maydell'; [email protected]; 'Igor R'; [email protected];
[email protected]; [email protected]; 'Aleksandr Bezzubikov';
[email protected]; [email protected]; 'Thomas Dullien';
[email protected]; 'Alex Bennée'
Subject: RE: [RFC PATCH v6 00/20] replay additions
There is the same file I downloaded this morning.
Now I re-checked everything and it prints the following error: qemu-system-arm:
-device scsi-hd,drive=img-blkreplay: No 'SCSI' bus found for device 'scsi-hd'
Pavel Dovgalyuk
From: Ciro Santilli [mailto:[email protected]]
Sent: Tuesday, February 13, 2018 12:07 PM
To: Pavel Dovgalyuk
Cc: Pavel Dovgalyuk; [email protected]; [email protected]; Peter Maydell;
[email protected]; Igor R; [email protected]; [email protected];
[email protected]; Aleksandr Bezzubikov; [email protected];
[email protected]; Thomas Dullien; [email protected]; Alex Bennée
Subject: Re: [RFC PATCH v6 00/20] replay additions
On Tue, Feb 13, 2018 at 6:50 AM, Pavel Dovgalyuk <[email protected]> wrote:
Your command line looks wrong, because you forgot –icount, but specified other
replay options
Sorry about that, my full command is exactly the previous but with -icount
'shift=7,rr=record,rrfile=replay.bin' added to the end.
.
I tried recording and replaying with your command line and the execution hangs
at some moment of replay.
The problem may be hidden in –dtb option, because it may add the devices
without configuring replay for them.
Can you specify the whole hardware configuration in the command line?
Ah, now that you mentioned this, I had a modification on the DTB which needed
to be reverted. I have re-uploaded it to the same address:
https://github.com/cirosantilli/linux-kernel-module-cheat/releases/download/test-replay-arm/images.zip
please use the new one instead.
Now it should be just the vanilla Linux kernel versatilepb one.
How to specify the --dtb configuration explicitly on the command line? I have
also included the dts on the zip if that helps.
Pavel Dovgalyuk
From: Ciro Santilli [mailto:[email protected]]
Sent: Tuesday, February 13, 2018 8:58 AM
To: Pavel Dovgalyuk
Cc: Pavel Dovgalyuk; [email protected]; [email protected]; Peter Maydell;
[email protected]; Igor R; [email protected]; [email protected];
[email protected]; Aleksandr Bezzubikov; [email protected];
[email protected]; Thomas Dullien; [email protected]; Alex Bennée
Subject: Re: [RFC PATCH v6 00/20] replay additions
On Mon, Feb 12, 2018 at 5:47 AM, Pavel Dovgalyuk <[email protected]> wrote:
I tested ARM only with –kernel and –initrd.
Can you provide the full command line and the disk image?
The command I tried was:
time ./buildroot/output.arm~/host/usr/bin/qemu-system-arm -M versatilepb
-append 'root=/dev/sda nokaslr norandmaps printk.devkmsg=on printk.time=y -
lkmc_eval="/rand_check.out;wget -S google.com;/poweroff.out;"' -kernel
./buildroot/output.arm~/images/zImage -dtb
./buildroot/output.arm~/images/versatile-pb.dtb -nographic -drive
file=./buildroot/output.arm~/images/rootfs.ext2,if=scsi,id=img-direct,format=raw
-drive driver=blkreplay,if=none,image=img-direct,id=img-blkreplay -device
scsi-hd,drive=img-blkreplay -netdev user,id=net1 -device rtl8139,netdev=net1
-object filter-replay,id=replay,netdev=net1
and the required files can be downloaded from:
https://github.com/cirosantilli/linux-kernel-module-cheat/releases/download/test-replay-arm/images.zip
They were generated with:
./build -a arm
on that repo.
Pavel Dovgalyuk
From: Ciro Santilli [mailto:[email protected]]
Sent: Saturday, February 10, 2018 3:09 AM
To: Pavel Dovgalyuk
Cc: Pavel Dovgalyuk; [email protected]; [email protected]; Peter Maydell;
[email protected]; Igor R; [email protected]; [email protected];
[email protected]; Aleksandr Bezzubikov; [email protected];
[email protected]; Thomas Dullien; [email protected]; Alex Bennée
Subject: Re: [RFC PATCH v6 00/20] replay additions
Also, what command do you use to test on ARM? I'm a bit stuck to get the drive
part right, e.g.:
-drive
file=./buildroot/output.arm~/images/rootfs.ext2,if=scsi,id=img-direct,format=raw
\
-drive driver=blkreplay,if=none,image=img-direct,id=img-blkreplay \
-device scsi-hd,drive=img-blkreplay \
fails with: qemu-system-arm: -device scsi-hd,drive=img-blkreplay: Conflicts
with use by img-direct as 'root', which does not allow 'write' on #block968