Skip to contentSkip to conversation

hppa-softmmu update

GIT PULL Applied Richard Henderson 4 participants 8 messages Feb 4, 2018 – Feb 16, 2018

lore
Share & tools
lore
#0 lore raw

Clean up, and add to, make check-qtest-hppa.

r~

The following changes since commit fb2516ef94b8399ddded4a41c4346cbc1d5d98fc:

Merge remote-tracking branch 'remotes/kraxel/tags/vga-20180202-pull-request' into staging (2018-02-02 17:24:00 +0000)

are available in the Git repository at:

git://github.com/rth7680/qemu.git tags/pull-hppa-20180204

for you to fetch changes up to edf90bd0af98bf03ec1e60e5c7632774f62837d8:

roms/seabios-hppa: Update submodule and image (2018-02-04 14:11:18 -0800)

----------------------------------------------------------------
hppa-softmmu update

----------------------------------------------------------------
Richard Henderson (3):
hw/hppa: Use qemu_log_mask instead of fprintf to stderr
tests: Enable boot-serial-test for hppa roms/seabios-hppa: Update submodule and image

 hw/hppa/machine.c         |  17 ++++++++---------
 tests/boot-serial-test.c  |   1 +
 pc-bios/hppa-firmware.img | Bin 461352 -> 215696 bytes
 roms/seabios-hppa         |   2 +-
 tests/Makefile.include    |   2 ++
 5 files changed, 12 insertions(+), 10 deletions(-)
#1 lore raw

[Qemu-devel] [PULL 1/3] hw/hppa: Use qemu_log_mask instead of fprintf to stderr

---
 hw/hppa/machine.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
hw/hppa/machine.c +8 -9
index afd3867313..19033e268d 100644
@@ -19,6 +19,7 @@
 #include "hw/hppa/hppa_sys.h"
 #include "qemu/cutils.h"
 #include "qapi/error.h"
+#include "qemu/log.h"
 
 #define MAX_IDE_BUS 2
 
@@ -111,7 +112,6 @@ static void machine_hppa_init(MachineState *machine)
         uint32_t addr = DINO_UART_HPA + 0x800;
         serial_mm_init(addr_space, addr, 0, serial_irq,
                        115200, serial_hds[0], DEVICE_BIG_ENDIAN);
-        fprintf(stderr, "Serial port created at 0x%x\n", addr);
     }
 
     /* SCSI disk setup. */
@@ -146,9 +146,9 @@ static void machine_hppa_init(MachineState *machine)
         error_report("could not load firmware '%s'", firmware_filename);
         exit(1);
     }
-    fprintf(stderr, "Firmware loaded at 0x%08" PRIx64 "-0x%08" PRIx64
-            ", entry at 0x%08" PRIx64 ".\n",
-            firmware_low, firmware_high, firmware_entry);
+    qemu_log_mask(CPU_LOG_PAGE, "Firmware loaded at 0x%08" PRIx64
+                  "-0x%08" PRIx64 ", entry at 0x%08" PRIx64 ".\n",
+                  firmware_low, firmware_high, firmware_entry);
     if (firmware_low < ram_size || firmware_high >= FIRMWARE_END) {
         error_report("Firmware overlaps with memory or IO space");
         exit(1);
@@ -163,7 +163,6 @@ static void machine_hppa_init(MachineState *machine)
 
     /* Load kernel */
     if (kernel_filename) {
-        fprintf(stderr, "LOADING kernel '%s'\n", kernel_filename);
         size = load_elf(kernel_filename, &cpu_hppa_to_phys,
                         NULL, &kernel_entry, &kernel_low, &kernel_high,
                         true, EM_PARISC, 0, 0);
@@ -177,10 +176,10 @@ static void machine_hppa_init(MachineState *machine)
             error_report("could not load kernel '%s'", kernel_filename);
             exit(1);
         }
-
-        fprintf(stderr, "Kernel loaded at 0x%08" PRIx64 "-0x%08" PRIx64
-                ", entry at 0x%08" PRIx64 ", size %ld kB.\n",
-                kernel_low, kernel_high, kernel_entry, size / 1024);
+        qemu_log_mask(CPU_LOG_PAGE, "Kernel loaded at 0x%08" PRIx64
+                      "-0x%08" PRIx64 ", entry at 0x%08" PRIx64
+                      ", size %ld kB.\n",
+                      kernel_low, kernel_high, kernel_entry, size / 1024);
 
         if (kernel_cmdline) {
             cpu[0]->env.gr[24] = 0x4000;
Signature · 1 line
2.14.3
#2 lore raw

[Qemu-devel] [PULL 2/3] tests: Enable boot-serial-test for hppa

In reply to Richard Henderson
---
 tests/boot-serial-test.c | 1 +
 tests/Makefile.include   | 2 ++
 2 files changed, 3 insertions(+)
tests/boot-serial-test.c +1 -0
index 418c5b92dc..ea87a80be7 100644
@@ -87,6 +87,7 @@ static testdef_t tests[] = {
       sizeof(kernel_plml605), kernel_plml605 },
     { "moxie", "moxiesim", "", "TT", sizeof(bios_moxiesim), 0, bios_moxiesim },
     { "arm", "raspi2", "", "TT", sizeof(bios_raspi2), 0, bios_raspi2 },
+    { "hppa", "hppa", "", "SeaBIOS wants SYSTEM HALT" },
 
     { NULL }
 };
tests/Makefile.include +2 -0
index ca82e0c0cc..83def6994c 100644
@@ -299,6 +299,8 @@ gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y)
 
 check-qtest-alpha-y = tests/boot-serial-test$(EXESUF)
 
+check-qtest-hppa-y = tests/boot-serial-test$(EXESUF)
+
 check-qtest-m68k-y = tests/boot-serial-test$(EXESUF)
 
 check-qtest-microblaze-y = tests/boot-serial-test$(EXESUF)
Signature · 1 line
2.14.3
#3 lore raw

Re: [Qemu-devel] [PULL 2/3] tests: Enable boot-serial-test for hppa

Quoted 25 lines · Richard Henderson
---
 tests/boot-serial-test.c | 1 +
 tests/Makefile.include   | 2 ++
 2 files changed, 3 insertions(+)
tests/boot-serial-test.c +1 -0
index 418c5b92dc..ea87a80be7 100644
@@ -87,6 +87,7 @@ static testdef_t tests[] = {
       sizeof(kernel_plml605), kernel_plml605 },
     { "moxie", "moxiesim", "", "TT", sizeof(bios_moxiesim), 0, bios_moxiesim },
     { "arm", "raspi2", "", "TT", sizeof(bios_raspi2), 0, bios_raspi2 },
+    { "hppa", "hppa", "", "SeaBIOS wants SYSTEM HALT" },
 
     { NULL }
 };
tests/Makefile.include +0 -0
index ca82e0c0cc..83def6994c 100644

tests/Makefile.include gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y) · line 306

Quoted 8 lines
tests/Makefile.include +2 -0
@@ -299,6 +299,8 @@ gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y)
 
 check-qtest-alpha-y = tests/boot-serial-test$(EXESUF)
 
+check-qtest-hppa-y = tests/boot-serial-test$(EXESUF)
+
 check-qtest-m68k-y = tests/boot-serial-test$(EXESUF)
 
 check-qtest-microblaze-y = tests/boot-serial-test$(EXESUF)

I got this failure in 2 different branches:

GTESTER check-qtest-hppa
**
ERROR:tests/boot-serial-test.c:137:check_guest_output: assertion failed:
(output_ok)
GTester: last random seed: R02S55e7df877597841c1b3b62962e410123
make: *** [check-qtest-hppa] Error 1
make: *** Waiting for unfinished jobs....

https://travis-ci.org/philmd/qemu/jobs/341959060
"compiler": "gcc",
"env": "CONFIG=\"--disable-linux-user\"",
"dist": "trusty",
"os": "linux"

https://travis-ci.org/philmd/qemu/jobs/341979253
"compiler": "gcc",
"env": "CONFIG=\"--with-coroutine=ucontext --disable-linux-user\"", "dist": "trusty",
"os": "linux"

#4 lore raw

Re: [Qemu-devel] [PULL 2/3] tests: Enable boot-serial-test for hppa

Quoted 45 lines · Philippe Mathieu-Daudé
Quoted 25 lines · Richard Henderson
---
 tests/boot-serial-test.c | 1 +
 tests/Makefile.include   | 2 ++
 2 files changed, 3 insertions(+)
tests/boot-serial-test.c +1 -0
index 418c5b92dc..ea87a80be7 100644
@@ -87,6 +87,7 @@ static testdef_t tests[] = {
       sizeof(kernel_plml605), kernel_plml605 },
     { "moxie", "moxiesim", "", "TT", sizeof(bios_moxiesim), 0, bios_moxiesim },
     { "arm", "raspi2", "", "TT", sizeof(bios_raspi2), 0, bios_raspi2 },
+    { "hppa", "hppa", "", "SeaBIOS wants SYSTEM HALT" },
 
     { NULL }
 };
tests/Makefile.include +0 -0
index ca82e0c0cc..83def6994c 100644

tests/Makefile.include gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y) · line 306

Quoted 8 lines
tests/Makefile.include +2 -0
@@ -299,6 +299,8 @@ gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y)
 
 check-qtest-alpha-y = tests/boot-serial-test$(EXESUF)
 
+check-qtest-hppa-y = tests/boot-serial-test$(EXESUF)
+
 check-qtest-m68k-y = tests/boot-serial-test$(EXESUF)
 
 check-qtest-microblaze-y = tests/boot-serial-test$(EXESUF)

I got this failure in 2 different branches:

GTESTER check-qtest-hppa
**
ERROR:tests/boot-serial-test.c:137:check_guest_output: assertion failed:
(output_ok)
GTester: last random seed: R02S55e7df877597841c1b3b62962e410123
make: *** [check-qtest-hppa] Error 1
make: *** Waiting for unfinished jobs....

Quoted 1 line

https://travis-ci.org/philmd/qemu/jobs/341959060

which is not always reproducible... rebuilding this job worked.

Quoted 10 lines

"compiler": "gcc",
"env": "CONFIG=\"--disable-linux-user\"",
"dist": "trusty",
"os": "linux"

https://travis-ci.org/philmd/qemu/jobs/341979253
"compiler": "gcc",
"env": "CONFIG=\"--with-coroutine=ucontext --disable-linux-user\"", "dist": "trusty",
"os": "linux"

#5 lore raw

Re: [Qemu-devel] [PULL 2/3] tests: Enable boot-serial-test for hppa

In reply to Philippe Mathieu-Daudé
Quoted 37 lines · Philippe Mathieu-Daudé
Quoted 25 lines · Richard Henderson
---
 tests/boot-serial-test.c | 1 +
 tests/Makefile.include   | 2 ++
 2 files changed, 3 insertions(+)
tests/boot-serial-test.c +1 -0
index 418c5b92dc..ea87a80be7 100644
@@ -87,6 +87,7 @@ static testdef_t tests[] = {
       sizeof(kernel_plml605), kernel_plml605 },
     { "moxie", "moxiesim", "", "TT", sizeof(bios_moxiesim), 0, bios_moxiesim },
     { "arm", "raspi2", "", "TT", sizeof(bios_raspi2), 0, bios_raspi2 },
+    { "hppa", "hppa", "", "SeaBIOS wants SYSTEM HALT" },
 
     { NULL }
 };
tests/Makefile.include +0 -0
index ca82e0c0cc..83def6994c 100644

tests/Makefile.include gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y) · line 306

Quoted 8 lines
tests/Makefile.include +2 -0
@@ -299,6 +299,8 @@ gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y)
 
 check-qtest-alpha-y = tests/boot-serial-test$(EXESUF)
 
+check-qtest-hppa-y = tests/boot-serial-test$(EXESUF)
+
 check-qtest-m68k-y = tests/boot-serial-test$(EXESUF)
 
 check-qtest-microblaze-y = tests/boot-serial-test$(EXESUF)

I got this failure in 2 different branches:

Quoted 7 lines

GTESTER check-qtest-hppa
**
ERROR:tests/boot-serial-test.c:137:check_guest_output: assertion failed:
(output_ok)
GTester: last random seed: R02S55e7df877597841c1b3b62962e410123
make: *** [check-qtest-hppa] Error 1
make: *** Waiting for unfinished jobs....

Uh, oh, I actually can also reproduce this on my laptop when putting a lot of load on the system (make -j10 in another window). I think I know what the problem is: I've introduced a counter in commit 92b540dac9fc3a5 to handle the timeouts in a better way. But in case ccnt reaches 512, the current read character is ignored - and if that character is part of the string that we are looking for, the test fails to match the string.

Almost all of the tests look for a string within the first 512 bytes of firmware output, so the problem never triggered there. But the hppa test looks for a string at the very end of a long output, so that's likely the reason that the problem triggered here.

The fix is pretty simple:

tests/boot-serial-test.c +0 -0
diff a/tests/boot-serial-test.c b/tests/boot-serial-test.c
@@ -117,7 +117,7 @@ static void check_guest_output(const testdef_t

*test, int fd)

     /* Poll serial output... Wait at most 60 seconds */
     for (i = 0; i < 6000; ++i) {
         ccnt = 0;
-        while ((nbr = read(fd, &ch, 1)) == 1 && ccnt++ < 512) {
+        while (ccnt++ < 512 && (nbr = read(fd, &ch, 1)) == 1) {
             if (ch == test->expect[pos]) {
                 pos += 1;
                 if (test->expect[pos] == '\0') {

I'll submit this as a proper patch...

Thomas

#6 lore raw

[Qemu-devel] [PULL 3/3] roms/seabios-hppa: Update submodule and image

In reply to Richard Henderson
---
 pc-bios/hppa-firmware.img | Bin 461352 -> 215696 bytes
 roms/seabios-hppa         |   2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)
pc-bios/hppa-firmware.img binary +0 -0
index ae833437a73cb0955491b95f03cd42132d8d2e9c..d2098f1fd9ffd86554ba66088d462208b7182f04 100755
GIT binary patch
roms/seabios-hppa +1 -1
index 8fa4ca9935..649e6202b8 160000
@@ -1 +1 @@
-Subproject commit 8fa4ca9935669414a824ecda24f6e70c36e8dc94
+Subproject commit 649e6202b8d65d46c69f542b1380f840fbe8ab13
Signature · 1 line
2.14.3
#7 lore raw
In reply to Richard Henderson
Quoted 12 lines · Richard Henderson

Clean up, and add to, make check-qtest-hppa.

r~

The following changes since commit fb2516ef94b8399ddded4a41c4346cbc1d5d98fc:

Merge remote-tracking branch 'remotes/kraxel/tags/vga-20180202-pull-request' into staging (2018-02-02 17:24:00 +0000)

are available in the Git repository at:

Quoted 9 lines

git://github.com/rth7680/qemu.git tags/pull-hppa-20180204

for you to fetch changes up to edf90bd0af98bf03ec1e60e5c7632774f62837d8:

roms/seabios-hppa: Update submodule and image (2018-02-04 14:11:18 -0800)

----------------------------------------------------------------
hppa-softmmu update

Applied, thanks.

-- PMM