* Fixes for s390x TCG tests

* Update Haiku VM to a usable level
 * Some other miscellaneous small fixes
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmImScQRHHRodXRoQHJl
 ZGhhdC5jb20ACgkQLtnXdP5wLbV+/g//Qtf04mDw/+ICaXcQVq3UGvjjWCtkXa0H
 +MGdkz/gde43dyRM7a8vaFdH7DIuQZvy7vjbSLXcUdVmmquVlN8WBRFVdl6J2zcc
 0V5zI3B9BvfiQjwKrsGsn/yXeR2qwTlaDP60+2ZD1ea5C7tQNsnU8gD1stymrQmR
 awjRAzJo3PiT6MpEze5y9+ugfmF9wRatNzeazUJ0bSRznNQCQWQ42WiIEfRbdFo0
 oXsZB6rP3mmp0XKiUkNmWwBLvlkXgR7Or7XcIEslqSJEbYonroPoEtPSlIPCeHYA
 XVC29xca8bLqT4nDi2SAGVrcgySI9tT+ogZOf06/aIO+IGTYyxg58Iqx1LQxgpyq
 542oeAfGHtiF1SzkBy3VZzafti76dPJDkoUS8pygBHZFPxLIJF2pBifJAEC33+89
 TCm1yzlXbut73l+K3vWN9YjgYldrPv+n04TeOO3iYnnAT35vHTtE+JKTWLYGPYjA
 5c9IzaLmPEnBAmGxUbtRDGPMqZoMBIfiKAtb1wWKwrww2mTxjo/WkYidLGB73PCF
 Js/7kitrXKBWurS6RHLKXKF7pQ0l4lPyVTXLTwLpE7If4nh3v80olxAHXMtRM5pl
 mWf43EXnlWF5kvCT/OUucei0L2GxTlk25dfcipT7zudoiBc1eB1LbRYNRGabIUxM
 WAd/Gzuv9S8=
 =SY3w
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2022-03-07' into staging

* Fixes for s390x TCG tests
* Update Haiku VM to a usable level
* Some other miscellaneous small fixes

# gpg: Signature made Mon 07 Mar 2022 18:07:00 GMT
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* remotes/thuth-gitlab/tags/pull-request-2022-03-07:
  Check and report for incomplete 'global' option format
  tests/vm: Update haiku test vm to R1/Beta3
  tests/avocado: Cancel BootLinux tests in case there is no free port
  MAINTAINERS: Update the files in the FreeBSD section
  tests/tcg/s390x: Cleanup of mie3 tests.
  tests/tcg/s390x: Fix the exrl-trt* tests with Clang
  tests/tcg/s390x: Fix mvc, mvo and pack tests with Clang

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2022-03-08 17:09:18 +00:00
commit 9a61e6c7e1
11 changed files with 47 additions and 44 deletions

View File

@ -3611,7 +3611,8 @@ FreeBSD Hosted Continuous Integration
M: Ed Maste <emaste@freebsd.org>
M: Li-Wen Hsu <lwhsu@freebsd.org>
S: Maintained
F: .cirrus.yml
F: .gitlab-ci.d/cirrus/freebsd*
F: tests/vm/freebsd
W: https://cirrus-ci.com/github/qemu/qemu
Windows Hosted Continuous Integration

View File

@ -1038,6 +1038,13 @@ int qemu_global_option(const char *str)
if (!opts) {
return -1;
}
if (!qemu_opt_get(opts, "driver")
|| !qemu_opt_get(opts, "property")
|| !qemu_opt_get(opts, "value")) {
error_report("options 'driver', 'property', and 'value'"
" are required");
return -1;
}
return 0;
}

View File

@ -603,6 +603,8 @@ class LinuxTest(LinuxSSHMixIn, QemuSystemTest):
try:
cloudinit_iso = os.path.join(self.workdir, 'cloudinit.iso')
self.phone_home_port = network.find_free_port()
if not self.phone_home_port:
self.cancel('Failed to get a free port')
pubkey_content = None
if ssh_pubkey:
with open(ssh_pubkey) as pubkey:

View File

@ -5,8 +5,8 @@ int main(void)
{
char op1[] = "hello";
char op2[256];
uint64_t r1 = 0xffffffffffffffffull;
uint64_t r2 = 0xffffffffffffffffull;
register uint64_t r1 asm("r1") = 0xffffffffffffffffull;
register uint64_t r2 asm("r2") = 0xffffffffffffffffull;
uint64_t cc;
int i;
@ -21,8 +21,6 @@ int main(void)
" j 2f\n"
"1: trt 0(1,%[op1]),%[op2]\n"
"2: exrl %[op1_len],1b\n"
" lgr %[r1],%%r1\n"
" lgr %[r2],%%r2\n"
" ipm %[cc]\n"
: [r1] "+r" (r1),
[r2] "+r" (r2),
@ -30,7 +28,7 @@ int main(void)
: [op1] "a" (&op1),
[op1_len] "a" (5),
[op2] "Q" (op2)
: "r1", "r2", "cc");
: "cc");
cc = (cc >> 28) & 3;
if (cc != 2) {
write(1, "bad cc\n", 7);

View File

@ -5,8 +5,8 @@ int main(void)
{
char op1[] = {0, 1, 2, 3};
char op2[256];
uint64_t r1 = 0xffffffffffffffffull;
uint64_t r2 = 0xffffffffffffffffull;
register uint64_t r1 asm("r1") = 0xffffffffffffffffull;
register uint64_t r2 asm("r2") = 0xffffffffffffffffull;
uint64_t cc;
int i;
@ -21,8 +21,6 @@ int main(void)
" j 2f\n"
"1: trtr 3(1,%[op1]),%[op2]\n"
"2: exrl %[op1_len],1b\n"
" lgr %[r1],%%r1\n"
" lgr %[r2],%%r2\n"
" ipm %[cc]\n"
: [r1] "+r" (r1),
[r2] "+r" (r2),
@ -30,7 +28,7 @@ int main(void)
: [op1] "a" (&op1),
[op1_len] "a" (3),
[op2] "Q" (op2)
: "r1", "r2", "cc");
: "cc");
cc = (cc >> 28) & 3;
if (cc != 1) {
write(1, "bad cc\n", 7);

View File

@ -1,15 +1,17 @@
#include <stdint.h>
#include <string.h>
static inline void mvcrl_8(const char *dst, const char *src)
{
asm volatile (
"llill %%r0, 8\n"
".insn sse, 0xE50A00000000, 0(%[dst]), 0(%[src])"
: : [dst] "d" (dst), [src] "d" (src)
: "memory");
: "r0", "memory");
}
int main(int argc, char *argv[])
{
const char *alpha = "abcdefghijklmnop";

View File

@ -1,32 +1,27 @@
#include <stdint.h>
#define Fi3(S, ASM) uint64_t S(uint64_t a, uint64_t b, uint64_t c) \
{ \
uint64_t res = 0; \
asm ( \
"lg %%r2, %[a]\n" \
"lg %%r3, %[b]\n" \
"lg %%r0, %[c]\n" \
"ltgr %%r0, %%r0\n" \
asm volatile ( \
"ltgr %[c], %[c]\n" \
ASM \
"stg %%r0, %[res] " \
: [res] "=m" (res) \
: [a] "m" (a), \
[b] "m" (b), \
[c] "m" (c) \
: "r0", "r2", \
"r3", "r4" \
: [c] "+r" (c) \
: [a] "r" (a) \
, [b] "r" (b) \
); \
return res; \
return c; \
}
Fi3 (_selre, ".insn rrf, 0xB9F00000, %%r0, %%r3, %%r2, 8\n")
Fi3 (_selgrz, ".insn rrf, 0xB9E30000, %%r0, %%r3, %%r2, 8\n")
Fi3 (_selfhrnz, ".insn rrf, 0xB9C00000, %%r0, %%r3, %%r2, 7\n")
Fi3 (_selre, ".insn rrf, 0xB9F00000, %[c], %[b], %[a], 8\n")
Fi3 (_selgrz, ".insn rrf, 0xB9E30000, %[c], %[b], %[a], 8\n")
Fi3 (_selfhrnz, ".insn rrf, 0xB9C00000, %[c], %[b], %[a], 7\n")
int main(int argc, char *argv[])
{
uint64_t a = ~0, b = ~0, c = ~0;
a = _selre(0x066600000066ull, 0x066600000006ull, a);
b = _selgrz(0xF00D00000005ull, 0xF00D00000055ull, b);
c = _selfhrnz(0x043200000044ull, 0x065400000004ull, c);

View File

@ -20,8 +20,8 @@ static inline void mvc_256(const char *dst, const char *src)
asm volatile (
" mvc 0(256,%[dst]),0(%[src])\n"
:
: [dst] "d" (dst),
[src] "d" (src)
: [dst] "a" (dst),
[src] "a" (src)
: "memory");
}

View File

@ -11,8 +11,8 @@ int main(void)
asm volatile (
" mvo 0(4,%[dest]),0(3,%[src])\n"
:
: [dest] "d" (dest + 1),
[src] "d" (src + 1)
: [dest] "a" (dest + 1),
[src] "a" (src + 1)
: "memory");
for (i = 0; i < sizeof(expected); i++) {

View File

@ -9,7 +9,7 @@ int main(void)
asm volatile(
" pack 2(4,%[data]),2(4,%[data])\n"
:
: [data] "r" (&data[0])
: [data] "a" (&data[0])
: "memory");
for (i = 0; i < 8; i++) {
if (data[i] != exp[i]) {

View File

@ -2,7 +2,7 @@
#
# Haiku VM image
#
# Copyright 2020 Haiku, Inc.
# Copyright 2020-2022 Haiku, Inc.
#
# Authors:
# Alexander von Gluck IV <kallisti5@unixzen.com>
@ -48,8 +48,8 @@ class HaikuVM(basevm.BaseVM):
name = "haiku"
arch = "x86_64"
link = "https://app.vagrantup.com/haiku-os/boxes/r1beta2-x86_64/versions/20200702/providers/libvirt.box"
csum = "41c38b316e0cbdbc66b5dbaf3612b866700a4f35807cb1eb266a5bf83e9e68d5"
link = "https://app.vagrantup.com/haiku-os/boxes/r1beta3-x86_64/versions/20220216/providers/libvirt.box"
csum = "e67d4aacbcc687013d5cc91990ddd86cc5d70a5d28432ae2691944f8ce5d5041"
poweroff = "shutdown"
@ -99,7 +99,7 @@ class HaikuVM(basevm.BaseVM):
self.print_step("Extracting disk image")
subprocess.check_call(["tar", "xzf", tarball, "./box.img", "-O"],
subprocess.check_call(["tar", "xzf", tarball, "box.img", "-O"],
stdout=open(img, 'wb'))
self.print_step("Preparing disk image")