qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 00/12] Misc fixes for 5.2
@ 2020-11-17  9:57 Thomas Huth
  2020-11-17  9:57 ` [PULL 01/12] qemu/bswap: Remove unused qemu_bswap_len() Thomas Huth
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Thomas Huth @ 2020-11-17  9:57 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

 Hi Peter,

the following changes since commit b17d3b7b77f043f0e76f0e6ce6def3c1b1d5ee8b:

  Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2020-11-16-tag' into staging (2020-11-16 20:15:57 +0000)

are available in the Git repository at:

  https://gitlab.com/huth/qemu.git tags/pull-request-2020-11-17

for you to fetch changes up to 46b42f715d1310cd80acfeb7c84337a128fd190b:

  max111x: put it into the 'misc' category (2020-11-17 10:17:02 +0100)

----------------------------------------------------------------
* Fixes for compiling on Haiku, and add Haiku VM for compile-testing
* Update NetBSD VM to version 9.1
* Misc fixes (e.g. categorize some devices)
----------------------------------------------------------------

AlexChen (1):
      target/microblaze: Fix possible array out of bounds in mmu_write()

Alexander von Gluck IV (1):
      tests/vm: Add Haiku test based on their vagrant images

Brad Smith (1):
      tests/vm: update NetBSD to 9.1

Gan Qixin (4):
      ssd0323: put it into the 'display' category
      ads7846: put it into the 'input' category
      nand: put it into the 'storage' category
      max111x: put it into the 'misc' category

Philippe Mathieu-Daudé (1):
      qemu/bswap: Remove unused qemu_bswap_len()

Rebecca Cran (1):
      gitlab-ci: Use $CI_REGISTRY instead of hard-coding registry.gitlab.com

Thomas Huth (3):
      configure: Fix the _BSD_SOURCE define for the Haiku build
      configure: Do not build pc-bios/optionrom on Haiku
      configure: Add a proper check for sys/ioccom.h and use it in tpm_ioctl.h

 .gitlab-ci.d/containers.yml |   2 +-
 backends/tpm/tpm_ioctl.h    |   4 ++
 configure                   |   4 +-
 hw/block/nand.c             |   1 +
 hw/display/ads7846.c        |   2 +
 hw/display/ssd0323.c        |   1 +
 hw/misc/max111x.c           |   1 +
 include/qemu/bswap.h        |   6 ---
 meson.build                 |   2 +
 nbd/nbd-internal.h          |   2 +-
 target/microblaze/mmu.c     |   3 +-
 tests/keys/vagrant          |  27 ++++++++++
 tests/keys/vagrant.pub      |   1 +
 tests/vm/Makefile.include   |   3 +-
 tests/vm/basevm.py          |   5 +-
 tests/vm/haiku.x86_64       | 119 ++++++++++++++++++++++++++++++++++++++++++++
 tests/vm/netbsd             |   6 +--
 17 files changed, 172 insertions(+), 17 deletions(-)
 create mode 100644 tests/keys/vagrant
 create mode 100644 tests/keys/vagrant.pub
 create mode 100755 tests/vm/haiku.x86_64



^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PULL 01/12] qemu/bswap: Remove unused qemu_bswap_len()
  2020-11-17  9:57 [PULL 00/12] Misc fixes for 5.2 Thomas Huth
@ 2020-11-17  9:57 ` Thomas Huth
  2020-11-17  9:57 ` [PULL 02/12] configure: Fix the _BSD_SOURCE define for the Haiku build Thomas Huth
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Thomas Huth @ 2020-11-17  9:57 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Last use of qemu_bswap_len() has been removed in commit
e5fd1eb05ec ("apb: add busA qdev property to PBM PCI bridge").

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200928131934.739451-2-philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 include/qemu/bswap.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
index 1d3e4c24e4..8b01c38040 100644
--- a/include/qemu/bswap.h
+++ b/include/qemu/bswap.h
@@ -169,12 +169,6 @@ CPU_CONVERT(le, 16, uint16_t)
 CPU_CONVERT(le, 32, uint32_t)
 CPU_CONVERT(le, 64, uint64_t)
 
-/* len must be one of 1, 2, 4 */
-static inline uint32_t qemu_bswap_len(uint32_t value, int len)
-{
-    return bswap32(value) >> (32 - 8 * len);
-}
-
 /*
  * Same as cpu_to_le{16,32}, except that gcc will figure the result is
  * a compile-time constant if you pass in a constant.  So this can be
-- 
2.18.4



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 02/12] configure: Fix the _BSD_SOURCE define for the Haiku build
  2020-11-17  9:57 [PULL 00/12] Misc fixes for 5.2 Thomas Huth
  2020-11-17  9:57 ` [PULL 01/12] qemu/bswap: Remove unused qemu_bswap_len() Thomas Huth
@ 2020-11-17  9:57 ` Thomas Huth
  2020-11-17  9:57 ` [PULL 03/12] configure: Do not build pc-bios/optionrom on Haiku Thomas Huth
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Thomas Huth @ 2020-11-17  9:57 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

The Haiku VM that we are going to add is using _BSD_SOURCE instead
of BSD_SOURCE (without initial underscore)... according to David
Carlier, the BSD_SOURCE without underscore was likely a typo, so
let's simply add the underscore there now.
This fixes the build failure with the bswapXX() macros not being
defined after including <endian.h>.

Message-Id: <20201114165137.15379-2-thuth@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 4cef321d9d..a273a93377 100755
--- a/configure
+++ b/configure
@@ -790,7 +790,7 @@ SunOS)
 ;;
 Haiku)
   haiku="yes"
-  QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS -DBSD_SOURCE $QEMU_CFLAGS"
+  QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS -D_BSD_SOURCE $QEMU_CFLAGS"
 ;;
 Linux)
   audio_drv_list="try-pa oss"
-- 
2.18.4



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 03/12] configure: Do not build pc-bios/optionrom on Haiku
  2020-11-17  9:57 [PULL 00/12] Misc fixes for 5.2 Thomas Huth
  2020-11-17  9:57 ` [PULL 01/12] qemu/bswap: Remove unused qemu_bswap_len() Thomas Huth
  2020-11-17  9:57 ` [PULL 02/12] configure: Fix the _BSD_SOURCE define for the Haiku build Thomas Huth
@ 2020-11-17  9:57 ` Thomas Huth
  2020-11-17  9:57 ` [PULL 04/12] configure: Add a proper check for sys/ioccom.h and use it in tpm_ioctl.h Thomas Huth
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Thomas Huth @ 2020-11-17  9:57 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

Compilation of pc-bios/optionrom fails on Haiku with:

   BUILD   pvh.img
 ld: pvh_main.o: in function `pvh_load_kernel':
 pc-bios/optionrom/pvh_main.c:73: undefined reference to `GLOBAL_OFFSET_TABLE_'
 Makefile:57: recipe for target 'pvh.img' failed
 make[1]: *** [pvh.img] Error 1

Let's simply disable it, like it is already done on macOS and Solaris.

Message-Id: <20201114165137.15379-3-thuth@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index a273a93377..c0acda164d 100755
--- a/configure
+++ b/configure
@@ -5842,7 +5842,7 @@ fi
 roms=
 if { test "$cpu" = "i386" || test "$cpu" = "x86_64"; } && \
         test "$targetos" != "Darwin" && test "$targetos" != "SunOS" && \
-        test "$softmmu" = yes ; then
+        test "$targetos" != "Haiku" && test "$softmmu" = yes ; then
     # Different host OS linkers have different ideas about the name of the ELF
     # emulation. Linux and OpenBSD/amd64 use 'elf_i386'; FreeBSD uses the _fbsd
     # variant; OpenBSD/i386 uses the _obsd variant; and Windows uses i386pe.
-- 
2.18.4



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 04/12] configure: Add a proper check for sys/ioccom.h and use it in tpm_ioctl.h
  2020-11-17  9:57 [PULL 00/12] Misc fixes for 5.2 Thomas Huth
                   ` (2 preceding siblings ...)
  2020-11-17  9:57 ` [PULL 03/12] configure: Do not build pc-bios/optionrom on Haiku Thomas Huth
@ 2020-11-17  9:57 ` Thomas Huth
  2020-11-17  9:57 ` [PULL 05/12] tests/vm: Add Haiku test based on their vagrant images Thomas Huth
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Thomas Huth @ 2020-11-17  9:57 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

On Solaris and Haiku, the _IO() macros are defined in <sys/ioccom.h>.
Add a proper check for this header to our build system, and make sure
to include the header in tpm_ioctl.h to fix a build failure on Solaris
and Haiku.

Message-Id: <20201115152317.42752-1-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 backends/tpm/tpm_ioctl.h | 4 ++++
 meson.build              | 2 ++
 nbd/nbd-internal.h       | 2 +-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/backends/tpm/tpm_ioctl.h b/backends/tpm/tpm_ioctl.h
index f5f5c553a9..bd6c12cb86 100644
--- a/backends/tpm/tpm_ioctl.h
+++ b/backends/tpm/tpm_ioctl.h
@@ -12,6 +12,10 @@
 #include <sys/uio.h>
 #include <sys/ioctl.h>
 
+#ifdef HAVE_SYS_IOCCOM_H
+#include <sys/ioccom.h>
+#endif
+
 /*
  * Every response from a command involving a TPM command execution must hold
  * the ptm_res as the first element.
diff --git a/meson.build b/meson.build
index 132bc49782..30f86ddafb 100644
--- a/meson.build
+++ b/meson.build
@@ -794,6 +794,8 @@ config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0]
 config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1])
 config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2])
 
+config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h'))
+
 ignored = ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target
 arrays = ['CONFIG_AUDIO_DRIVERS', 'CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST']
 strings = ['HOST_DSOSUF', 'CONFIG_IASL']
diff --git a/nbd/nbd-internal.h b/nbd/nbd-internal.h
index 60629ef160..1b2141ab4b 100644
--- a/nbd/nbd-internal.h
+++ b/nbd/nbd-internal.h
@@ -19,7 +19,7 @@
 #ifndef _WIN32
 #include <sys/ioctl.h>
 #endif
-#if defined(__sun__) || defined(__HAIKU__)
+#ifdef HAVE_SYS_IOCCOM_H
 #include <sys/ioccom.h>
 #endif
 
-- 
2.18.4



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 05/12] tests/vm: Add Haiku test based on their vagrant images
  2020-11-17  9:57 [PULL 00/12] Misc fixes for 5.2 Thomas Huth
                   ` (3 preceding siblings ...)
  2020-11-17  9:57 ` [PULL 04/12] configure: Add a proper check for sys/ioccom.h and use it in tpm_ioctl.h Thomas Huth
@ 2020-11-17  9:57 ` Thomas Huth
  2020-11-17  9:57 ` [PULL 06/12] tests/vm: update NetBSD to 9.1 Thomas Huth
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Thomas Huth @ 2020-11-17  9:57 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

From: Alexander von Gluck IV <kallisti5@unixzen.com>

Signed-off-by: Alexander von Gluck IV <kallisti5@unixzen.com>
[PMD: Avoid recreating the image each time]
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
[thuth: Add ninja package, /usr/bin/env hack and --disable-slirp]
Message-Id: <20201114165137.15379-5-thuth@redhat.com>
Buglink: https://bugs.launchpad.net/qemu/+bug/1715203
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/keys/vagrant        |  27 +++++++++
 tests/keys/vagrant.pub    |   1 +
 tests/vm/Makefile.include |   3 +-
 tests/vm/basevm.py        |   5 +-
 tests/vm/haiku.x86_64     | 119 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 152 insertions(+), 3 deletions(-)
 create mode 100644 tests/keys/vagrant
 create mode 100644 tests/keys/vagrant.pub
 create mode 100755 tests/vm/haiku.x86_64

diff --git a/tests/keys/vagrant b/tests/keys/vagrant
new file mode 100644
index 0000000000..7d6a083909
--- /dev/null
+++ b/tests/keys/vagrant
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEogIBAAKCAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzI
+w+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoP
+kcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2
+hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NO
+Td0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcW
+yLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQIBIwKCAQEA4iqWPJXtzZA68mKd
+ELs4jJsdyky+ewdZeNds5tjcnHU5zUYE25K+ffJED9qUWICcLZDc81TGWjHyAqD1
+Bw7XpgUwFgeUJwUlzQurAv+/ySnxiwuaGJfhFM1CaQHzfXphgVml+fZUvnJUTvzf
+TK2Lg6EdbUE9TarUlBf/xPfuEhMSlIE5keb/Zz3/LUlRg8yDqz5w+QWVJ4utnKnK
+iqwZN0mwpwU7YSyJhlT4YV1F3n4YjLswM5wJs2oqm0jssQu/BT0tyEXNDYBLEF4A
+sClaWuSJ2kjq7KhrrYXzagqhnSei9ODYFShJu8UWVec3Ihb5ZXlzO6vdNQ1J9Xsf
+4m+2ywKBgQD6qFxx/Rv9CNN96l/4rb14HKirC2o/orApiHmHDsURs5rUKDx0f9iP
+cXN7S1uePXuJRK/5hsubaOCx3Owd2u9gD6Oq0CsMkE4CUSiJcYrMANtx54cGH7Rk
+EjFZxK8xAv1ldELEyxrFqkbE4BKd8QOt414qjvTGyAK+OLD3M2QdCQKBgQDtx8pN
+CAxR7yhHbIWT1AH66+XWN8bXq7l3RO/ukeaci98JfkbkxURZhtxV/HHuvUhnPLdX
+3TwygPBYZFNo4pzVEhzWoTtnEtrFueKxyc3+LjZpuo+mBlQ6ORtfgkr9gBVphXZG
+YEzkCD3lVdl8L4cw9BVpKrJCs1c5taGjDgdInQKBgHm/fVvv96bJxc9x1tffXAcj
+3OVdUN0UgXNCSaf/3A/phbeBQe9xS+3mpc4r6qvx+iy69mNBeNZ0xOitIjpjBo2+
+dBEjSBwLk5q5tJqHmy/jKMJL4n9ROlx93XS+njxgibTvU6Fp9w+NOFD/HvxB3Tcz
+6+jJF85D5BNAG3DBMKBjAoGBAOAxZvgsKN+JuENXsST7F89Tck2iTcQIT8g5rwWC
+P9Vt74yboe2kDT531w8+egz7nAmRBKNM751U/95P9t88EDacDI/Z2OwnuFQHCPDF
+llYOUI+SpLJ6/vURRbHSnnn8a/XG+nzedGH5JGqEJNQsz+xT2axM0/W/CRknmGaJ
+kda/AoGANWrLCz708y7VYgAtW2Uf1DPOIYMdvo6fxIB5i9ZfISgcJ/bbCUkFrhoH
++vq/5CIWxCPp0f85R4qxxQ5ihxJ0YDQT9Jpx4TMss4PSavPaBH3RXow5Ohe+bYoQ
+NE5OgEXk2wVfZczCZpigBKbKZHNYcelXtTt/nP3rsCuGcM4h53s=
+-----END RSA PRIVATE KEY-----
diff --git a/tests/keys/vagrant.pub b/tests/keys/vagrant.pub
new file mode 100644
index 0000000000..b8d012d787
--- /dev/null
+++ b/tests/keys/vagrant.pub
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== well-known vagrant key for qemu-test, do not use on any machine exposed to an external network
diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
index 61f893ffdc..e94d95ec54 100644
--- a/tests/vm/Makefile.include
+++ b/tests/vm/Makefile.include
@@ -4,7 +4,7 @@
 
 EFI_AARCH64 = $(wildcard $(BUILD_DIR)/pc-bios/edk2-aarch64-code.fd)
 
-IMAGES := freebsd netbsd openbsd centos fedora
+IMAGES := freebsd netbsd openbsd centos fedora haiku.x86_64
 ifneq ($(GENISOIMAGE),)
 IMAGES += ubuntu.i386 centos
 ifneq ($(EFI_AARCH64),)
@@ -41,6 +41,7 @@ endif
 else
 	@echo "  (install genisoimage to build centos/ubuntu images)"
 endif
+	@echo "  vm-build-haiku.x86_64           - Build QEMU in Haiku VM"
 	@echo ""
 	@echo "  vm-build-all                    - Build QEMU in all VMs"
 	@echo "  vm-clean-all                    - Clean up VM images"
diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 3fac20e929..00f1d5ca8d 100644
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -44,6 +44,7 @@ DEFAULT_CONFIG = {
     'machine'         : 'pc',
     'guest_user'      : "qemu",
     'guest_pass'      : "qemupass",
+    'root_user'       : "root",
     'root_pass'       : "qemupass",
     'ssh_key_file'    : SSH_KEY_FILE,
     'ssh_pub_key_file': SSH_PUB_KEY_FILE,
@@ -245,13 +246,13 @@ class BaseVM(object):
         return self._ssh_do(self._config["guest_user"], cmd, False)
 
     def ssh_root(self, *cmd):
-        return self._ssh_do("root", cmd, False)
+        return self._ssh_do(self._config["root_user"], cmd, False)
 
     def ssh_check(self, *cmd):
         self._ssh_do(self._config["guest_user"], cmd, True)
 
     def ssh_root_check(self, *cmd):
-        self._ssh_do("root", cmd, True)
+        self._ssh_do(self._config["root_user"], cmd, True)
 
     def build_image(self, img):
         raise NotImplementedError
diff --git a/tests/vm/haiku.x86_64 b/tests/vm/haiku.x86_64
new file mode 100755
index 0000000000..37af48bf1b
--- /dev/null
+++ b/tests/vm/haiku.x86_64
@@ -0,0 +1,119 @@
+#!/usr/bin/env python3
+#
+# Haiku VM image
+#
+# Copyright 2020 Haiku, Inc.
+#
+# Authors:
+#  Alexander von Gluck IV <kallisti5@unixzen.com>
+#
+# This code is licensed under the GPL version 2 or later.  See
+# the COPYING file in the top-level directory.
+#
+
+import os
+import re
+import sys
+import time
+import socket
+import subprocess
+import basevm
+
+VAGRANT_KEY_FILE = os.path.join(os.path.dirname(__file__),
+    "..", "keys", "vagrant")
+
+VAGRANT_PUB_KEY_FILE = os.path.join(os.path.dirname(__file__),
+    "..", "keys", "vagrant.pub")
+
+HAIKU_CONFIG = {
+    'cpu'             : "max",
+    'machine'         : 'pc',
+    'guest_user'      : "vagrant",
+    'guest_pass'      : "",
+    'root_user'       : "vagrant",
+    'root_pass'       : "",
+    'ssh_key_file'    : VAGRANT_KEY_FILE,
+    'ssh_pub_key_file': VAGRANT_PUB_KEY_FILE,
+    'memory'          : "4G",
+    'extra_args'      : [],
+    'qemu_args'       : "-device VGA",
+    'dns'             : "",
+    'ssh_port'        : 0,
+    'install_cmds'    : "",
+    'boot_dev_type'   : "block",
+    'ssh_timeout'     : 1,
+}
+
+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"
+
+    poweroff = "shutdown"
+
+    requirements = [
+        "devel:libbz2",
+        "devel:libcapstone",
+        "devel:libcurl",
+        "devel:libfdt",
+        "devel:libgcrypt",
+        "devel:libgl",
+        "devel:libglib_2.0",
+        "devel:libgnutls",
+        "devel:libgpg_error",
+        "devel:libintl",
+        "devel:libjpeg",
+        "devel:liblzo2",
+        "devel:libncursesw",
+        "devel:libnettle",
+        "devel:libpixman_1",
+        "devel:libpng16",
+        "devel:libsdl2_2.0",
+        "devel:libsnappy",
+        "devel:libssh2",
+        "devel:libtasn1",
+        "devel:libusb_1.0",
+        "devel:libz",
+        "ninja",
+        "setuptools_python3"
+    ]
+
+    # https://dev.haiku-os.org/ticket/16512 virtio disk1 shows up as 0 (reversed order)
+    BUILD_SCRIPT = """
+        set -e;
+        rm -rf /tmp/qemu-test.*
+        cd $(mktemp -d /tmp/qemu-test.XXXXXX);
+        mkdir src build; cd src;
+        tar -xf /dev/disk/virtual/virtio_block/0/raw;
+        mkdir -p /usr/bin
+        ln -s /boot/system/bin/env /usr/bin/env
+        cd ../build
+        ../src/configure --disable-slirp {configure_opts};
+        make --output-sync -j{jobs} {target} {verbose};
+    """
+
+    def build_image(self, img):
+        self.print_step("Downloading disk image")
+        tarball = self._download_with_cache(self.link, sha256sum=self.csum)
+
+        self.print_step("Extracting disk image")
+
+        subprocess.check_call(["tar", "xzf", tarball, "./box.img", "-O"],
+                              stdout=open(img, 'wb'))
+
+        self.print_step("Preparing disk image")
+        self.boot(img)
+
+        # Wait for ssh to be available.
+        self.wait_ssh(wait_root=True, cmd="exit 0")
+
+        # Install packages
+        self.ssh_root("pkgman install -y %s" % " ".join(self.requirements))
+        self.graceful_shutdown()
+
+        self.print_step("All done")
+
+if __name__ == "__main__":
+    sys.exit(basevm.main(HaikuVM, config=HAIKU_CONFIG))
-- 
2.18.4



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 06/12] tests/vm: update NetBSD to 9.1
  2020-11-17  9:57 [PULL 00/12] Misc fixes for 5.2 Thomas Huth
                   ` (4 preceding siblings ...)
  2020-11-17  9:57 ` [PULL 05/12] tests/vm: Add Haiku test based on their vagrant images Thomas Huth
@ 2020-11-17  9:57 ` Thomas Huth
  2020-11-17  9:57 ` [PULL 07/12] target/microblaze: Fix possible array out of bounds in mmu_write() Thomas Huth
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Thomas Huth @ 2020-11-17  9:57 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

From: Brad Smith <brad@comstyle.com>

update NetBSD to 9.1

Signed-off-by: Brad Smith <brad@comstyle.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20201114040150.GD13329@humpty.home.comstyle.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/vm/netbsd | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/vm/netbsd b/tests/vm/netbsd
index 447de9747d..596717cc76 100755
--- a/tests/vm/netbsd
+++ b/tests/vm/netbsd
@@ -22,8 +22,8 @@ class NetBSDVM(basevm.BaseVM):
     name = "netbsd"
     arch = "x86_64"
 
-    link = "https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.0/images/NetBSD-9.0-amd64.iso"
-    csum = "34da4882ee61bdbf69f241195a8933dc800949d30b43fc6988da853d57fc2b8cac50cf97a0d2adaf93250b4e329d189c1a8b83c33bd515226f37745d50c33369"
+    link = "https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.1/images/NetBSD-9.1-amd64.iso"
+    csum = "65bddc95945991c3b2021f9c8ded7f34c25f0a7611b7aa15a15fe23399e902307e926ae97fcd01dc1662ac67b5f6e4be643c6a2b581692ddcb616d30125066f9"
     size = "20G"
     pkgs = [
         # tools
@@ -38,7 +38,7 @@ class NetBSDVM(basevm.BaseVM):
         "bash",
         "gmake",
         "gsed",
-        "gettext",
+        "gettext-tools",
 
         # libs: crypto
         "gnutls",
-- 
2.18.4



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 07/12] target/microblaze: Fix possible array out of bounds in mmu_write()
  2020-11-17  9:57 [PULL 00/12] Misc fixes for 5.2 Thomas Huth
                   ` (5 preceding siblings ...)
  2020-11-17  9:57 ` [PULL 06/12] tests/vm: update NetBSD to 9.1 Thomas Huth
@ 2020-11-17  9:57 ` Thomas Huth
  2020-11-17  9:57 ` [PULL 08/12] gitlab-ci: Use $CI_REGISTRY instead of hard-coding registry.gitlab.com Thomas Huth
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Thomas Huth @ 2020-11-17  9:57 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

From: AlexChen <alex.chen@huawei.com>

The size of env->mmu.regs is 3, but the range of 'rn' is [0, 5].
To avoid data access out of bounds, only if 'rn' is less than 3, we
can print env->mmu.regs[rn]. In other cases, we can print
env->mmu.regs[MMU_R_TLBX].

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Alex Chen <alex.chen@huawei.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-Id: <5FA10ABA.1080109@huawei.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 target/microblaze/mmu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/microblaze/mmu.c b/target/microblaze/mmu.c
index 2baaef7545..1e426963ba 100644
--- a/target/microblaze/mmu.c
+++ b/target/microblaze/mmu.c
@@ -234,7 +234,8 @@ void mmu_write(CPUMBState *env, bool ext, uint32_t rn, uint32_t v)
     unsigned int i;
 
     qemu_log_mask(CPU_LOG_MMU,
-                  "%s rn=%d=%x old=%x\n", __func__, rn, v, env->mmu.regs[rn]);
+                  "%s rn=%d=%x old=%x\n", __func__, rn, v,
+                  rn < 3 ? env->mmu.regs[rn] : env->mmu.regs[MMU_R_TLBX]);
 
     if (cpu->cfg.mmu < 2 || !cpu->cfg.mmu_tlb_access) {
         qemu_log_mask(LOG_GUEST_ERROR, "MMU access on MMU-less system\n");
-- 
2.18.4



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 08/12] gitlab-ci: Use $CI_REGISTRY instead of hard-coding registry.gitlab.com
  2020-11-17  9:57 [PULL 00/12] Misc fixes for 5.2 Thomas Huth
                   ` (6 preceding siblings ...)
  2020-11-17  9:57 ` [PULL 07/12] target/microblaze: Fix possible array out of bounds in mmu_write() Thomas Huth
@ 2020-11-17  9:57 ` Thomas Huth
  2020-11-17  9:57 ` [PULL 09/12] ssd0323: put it into the 'display' category Thomas Huth
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Thomas Huth @ 2020-11-17  9:57 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

From: Rebecca Cran <rebecca@nuviainc.com>

Update containers.yml to use the $CI_REGISTRY variable as other files
such as edk2.yml do.

Signed-off-by: Rebecca Cran <rebecca@nuviainc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201113172519.31056-1-rebecca@nuviainc.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 .gitlab-ci.d/containers.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml
index 11d079ea58..892ca8d838 100644
--- a/.gitlab-ci.d/containers.yml
+++ b/.gitlab-ci.d/containers.yml
@@ -8,7 +8,7 @@
     - export COMMON_TAG="$CI_REGISTRY/qemu-project/qemu/$NAME:latest"
     - apk add python3
     - docker info
-    - docker login registry.gitlab.com -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
+    - docker login $CI_REGISTRY -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
   script:
     - echo "TAG:$TAG"
     - echo "COMMON_TAG:$COMMON_TAG"
-- 
2.18.4



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 09/12] ssd0323: put it into the 'display' category
  2020-11-17  9:57 [PULL 00/12] Misc fixes for 5.2 Thomas Huth
                   ` (7 preceding siblings ...)
  2020-11-17  9:57 ` [PULL 08/12] gitlab-ci: Use $CI_REGISTRY instead of hard-coding registry.gitlab.com Thomas Huth
@ 2020-11-17  9:57 ` Thomas Huth
  2020-11-17  9:57 ` [PULL 10/12] ads7846: put it into the 'input' category Thomas Huth
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Thomas Huth @ 2020-11-17  9:57 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

From: Gan Qixin <ganqixin@huawei.com>

The category of the ssd0323 device is not set, put it into the 'display'
category.

Signed-off-by: Gan Qixin <ganqixin@huawei.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20201112125824.763182-2-ganqixin@huawei.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/display/ssd0323.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/display/ssd0323.c b/hw/display/ssd0323.c
index 17d4b32ae3..cbfd21dfd5 100644
--- a/hw/display/ssd0323.c
+++ b/hw/display/ssd0323.c
@@ -370,6 +370,7 @@ static void ssd0323_class_init(ObjectClass *klass, void *data)
     k->transfer = ssd0323_transfer;
     k->cs_polarity = SSI_CS_HIGH;
     dc->vmsd = &vmstate_ssd0323;
+    set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
 }
 
 static const TypeInfo ssd0323_info = {
-- 
2.18.4



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 10/12] ads7846: put it into the 'input' category
  2020-11-17  9:57 [PULL 00/12] Misc fixes for 5.2 Thomas Huth
                   ` (8 preceding siblings ...)
  2020-11-17  9:57 ` [PULL 09/12] ssd0323: put it into the 'display' category Thomas Huth
@ 2020-11-17  9:57 ` Thomas Huth
  2020-11-17  9:57 ` [PULL 11/12] nand: put it into the 'storage' category Thomas Huth
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Thomas Huth @ 2020-11-17  9:57 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

From: Gan Qixin <ganqixin@huawei.com>

The category of the ads7846 device is not set, put it into the 'input'
category.

Signed-off-by: Gan Qixin <ganqixin@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20201112125824.763182-3-ganqixin@huawei.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/display/ads7846.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/display/ads7846.c b/hw/display/ads7846.c
index 023165b2a3..cb3a431cfd 100644
--- a/hw/display/ads7846.c
+++ b/hw/display/ads7846.c
@@ -163,10 +163,12 @@ static void ads7846_realize(SSISlave *d, Error **errp)
 
 static void ads7846_class_init(ObjectClass *klass, void *data)
 {
+    DeviceClass *dc = DEVICE_CLASS(klass);
     SSISlaveClass *k = SSI_SLAVE_CLASS(klass);
 
     k->realize = ads7846_realize;
     k->transfer = ads7846_transfer;
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
 static const TypeInfo ads7846_info = {
-- 
2.18.4



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 11/12] nand: put it into the 'storage' category
  2020-11-17  9:57 [PULL 00/12] Misc fixes for 5.2 Thomas Huth
                   ` (9 preceding siblings ...)
  2020-11-17  9:57 ` [PULL 10/12] ads7846: put it into the 'input' category Thomas Huth
@ 2020-11-17  9:57 ` Thomas Huth
  2020-11-17  9:57 ` [PULL 12/12] max111x: put it into the 'misc' category Thomas Huth
  2020-11-17 15:09 ` [PULL 00/12] Misc fixes for 5.2 Peter Maydell
  12 siblings, 0 replies; 14+ messages in thread
From: Thomas Huth @ 2020-11-17  9:57 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

From: Gan Qixin <ganqixin@huawei.com>

The category of the nand device is not set, put it into the 'storage'
category.

Signed-off-by: Gan Qixin <ganqixin@huawei.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20201112125824.763182-4-ganqixin@huawei.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/block/nand.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/block/nand.c b/hw/block/nand.c
index bcceb64ebb..1d7a48a2ec 100644
--- a/hw/block/nand.c
+++ b/hw/block/nand.c
@@ -449,6 +449,7 @@ static void nand_class_init(ObjectClass *klass, void *data)
     dc->reset = nand_reset;
     dc->vmsd = &vmstate_nand;
     device_class_set_props(dc, nand_properties);
+    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
 }
 
 static const TypeInfo nand_info = {
-- 
2.18.4



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 12/12] max111x: put it into the 'misc' category
  2020-11-17  9:57 [PULL 00/12] Misc fixes for 5.2 Thomas Huth
                   ` (10 preceding siblings ...)
  2020-11-17  9:57 ` [PULL 11/12] nand: put it into the 'storage' category Thomas Huth
@ 2020-11-17  9:57 ` Thomas Huth
  2020-11-17 15:09 ` [PULL 00/12] Misc fixes for 5.2 Peter Maydell
  12 siblings, 0 replies; 14+ messages in thread
From: Thomas Huth @ 2020-11-17  9:57 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell

From: Gan Qixin <ganqixin@huawei.com>

The category of the max111x device is not set, put it into the 'misc'
category.

Signed-off-by: Gan Qixin <ganqixin@huawei.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20201112125824.763182-5-ganqixin@huawei.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/misc/max111x.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/misc/max111x.c b/hw/misc/max111x.c
index 7e6723f343..eae0f9b598 100644
--- a/hw/misc/max111x.c
+++ b/hw/misc/max111x.c
@@ -185,6 +185,7 @@ static void max111x_class_init(ObjectClass *klass, void *data)
     k->transfer = max111x_transfer;
     dc->reset = max111x_reset;
     dc->vmsd = &vmstate_max111x;
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }
 
 static const TypeInfo max111x_info = {
-- 
2.18.4



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PULL 00/12] Misc fixes for 5.2
  2020-11-17  9:57 [PULL 00/12] Misc fixes for 5.2 Thomas Huth
                   ` (11 preceding siblings ...)
  2020-11-17  9:57 ` [PULL 12/12] max111x: put it into the 'misc' category Thomas Huth
@ 2020-11-17 15:09 ` Peter Maydell
  12 siblings, 0 replies; 14+ messages in thread
From: Peter Maydell @ 2020-11-17 15:09 UTC (permalink / raw)
  To: Thomas Huth; +Cc: QEMU Developers

On Tue, 17 Nov 2020 at 09:57, Thomas Huth <thuth@redhat.com> wrote:
>
>  Hi Peter,
>
> the following changes since commit b17d3b7b77f043f0e76f0e6ce6def3c1b1d5ee8b:
>
>   Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2020-11-16-tag' into staging (2020-11-16 20:15:57 +0000)
>
> are available in the Git repository at:
>
>   https://gitlab.com/huth/qemu.git tags/pull-request-2020-11-17
>
> for you to fetch changes up to 46b42f715d1310cd80acfeb7c84337a128fd190b:
>
>   max111x: put it into the 'misc' category (2020-11-17 10:17:02 +0100)
>
> ----------------------------------------------------------------
> * Fixes for compiling on Haiku, and add Haiku VM for compile-testing
> * Update NetBSD VM to version 9.1
> * Misc fixes (e.g. categorize some devices)
> ----------------------------------------------------------------

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.2
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-11-17 15:10 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-17  9:57 [PULL 00/12] Misc fixes for 5.2 Thomas Huth
2020-11-17  9:57 ` [PULL 01/12] qemu/bswap: Remove unused qemu_bswap_len() Thomas Huth
2020-11-17  9:57 ` [PULL 02/12] configure: Fix the _BSD_SOURCE define for the Haiku build Thomas Huth
2020-11-17  9:57 ` [PULL 03/12] configure: Do not build pc-bios/optionrom on Haiku Thomas Huth
2020-11-17  9:57 ` [PULL 04/12] configure: Add a proper check for sys/ioccom.h and use it in tpm_ioctl.h Thomas Huth
2020-11-17  9:57 ` [PULL 05/12] tests/vm: Add Haiku test based on their vagrant images Thomas Huth
2020-11-17  9:57 ` [PULL 06/12] tests/vm: update NetBSD to 9.1 Thomas Huth
2020-11-17  9:57 ` [PULL 07/12] target/microblaze: Fix possible array out of bounds in mmu_write() Thomas Huth
2020-11-17  9:57 ` [PULL 08/12] gitlab-ci: Use $CI_REGISTRY instead of hard-coding registry.gitlab.com Thomas Huth
2020-11-17  9:57 ` [PULL 09/12] ssd0323: put it into the 'display' category Thomas Huth
2020-11-17  9:57 ` [PULL 10/12] ads7846: put it into the 'input' category Thomas Huth
2020-11-17  9:57 ` [PULL 11/12] nand: put it into the 'storage' category Thomas Huth
2020-11-17  9:57 ` [PULL 12/12] max111x: put it into the 'misc' category Thomas Huth
2020-11-17 15:09 ` [PULL 00/12] Misc fixes for 5.2 Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).