From 0c2bd829d47f6815500420789ad765c7a125b54c Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Tue, 20 Feb 2018 22:37:20 +0000 Subject: [PATCH] qemu 2.11 Fixes required: - split and fakeup a clean one feature per commit history - lkmc_pci_min: use INTERFACE_CONVENTIONAL_PCI_DEVICE or an assert failed - trace event location changes, use generated trace-events-all --- CONTRIBUTING.adoc | 18 +++++++++++++++--- README.adoc | 12 ++++++------ qemu | 2 +- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index 6594c9e..96674ba 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -7,8 +7,8 @@ Testing that should be done for every functional patch. === Guest testing .... -./build -./run -e '- lkmc_eval="/insrm.sh hello 5;wget -S google.com;poweroff;"' -n +./run -a x86_64 -e '- lkmc_eval="/insrm.sh hello 5;wget -S google.com;poweroff;"' -n +./run -a arm -e '- lkmc_eval="/insrm.sh hello 5;wget -S google.com;poweroff;"' .... Should: @@ -22,4 +22,16 @@ TODO automate all of this with a `/test-all.sh` script in guest which outputs to === Host testing -* `./run -d` and on another shell `./rungdb start_kernel` should break GDB at `start_kernel` +Shell 1: + +.... +./run -d +.... + +Shell 2: + +.... +./rungdb start_kernel +.... + +Should break GDB at `start_kernel`. diff --git a/README.adoc b/README.adoc index 71d750f..c7de190 100644 --- a/README.adoc +++ b/README.adoc @@ -1097,11 +1097,11 @@ A friend told me this but I haven't tried it yet: Best attempt so far: .... -time ./run -n -e 'init=/poweroff.out' -- -trace exec_tb,file=trace && \ - time ./qemu/scripts/simpletrace.py qemu/trace-events trace >trace.txt && \ - wc -l trace.txt && \ - sed '/0x1000000/q' trace.txt >trace-boot.txt && \ - wc -l trace-boot.txt +time ./run -n -e 'init=/poweroff.out' -- -trace exec_tb,file=trace +time ./qemu/scripts/simpletrace.py buildroot/output.x86_64~/build/host-qemu-custom/trace-events-all trace >trace.txt +wc -l trace.txt +sed '/0x1000000/q' trace.txt >trace-boot.txt +wc -l trace-boot.txt .... Notes: @@ -1156,7 +1156,7 @@ This works because we have already done the following with QEMU: It makes 3x execution faster than the default trace backend which logs human readable data to stdout. + This also alters the actual execution, and reduces the instruction count by 10M TODO understand exactly why, possibly due to the `All QSes seen` thing. -* the simple QEMU patch mentioned at: https://rwmj.wordpress.com/2016/03/17/tracing-qemu-guest-execution/ of removing the `disable` from `exec_tb` in the `trace-events` template file in the QEMU source +* patch QEMU source to remove the `disable` from `exec_tb` in the `trace-events`. See also: https://rwmj.wordpress.com/2016/03/17/tracing-qemu-guest-execution/ Possible improvements: diff --git a/qemu b/qemu index 09fa182..8dbff6d 160000 --- a/qemu +++ b/qemu @@ -1 +1 @@ -Subproject commit 09fa182a4e16b06fc83e3cec4322bb6137378494 +Subproject commit 8dbff6d3728ff78c4da74d667bb4833edade06aa