[PATCH v2] tests/vm: update openbsd image to 7.6
tests/vm: update openbsd image to 7.6 Remove tomli as Python has been updated to 3.11. Signed-off-by: Brad Smith --- tests/vm/openbsd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 49cab08782..dfd11c93f0 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -22,8 +22,8 @@ class OpenBSDVM(basevm.BaseVM): name = "openbsd" arch = "x86_64" -link = "https://cdn.openbsd.org/pub/OpenBSD/7.5/amd64/install75.iso"; -csum = "034435c6e27405d5a7fafb058162943c194eb793dafdc412c08d49bb56b3892a" +link = "https://cdn.openbsd.org/pub/OpenBSD/7.6/amd64/install76.iso"; +csum = "60cba8cb391b50bba8fa10fc768bd0529636f5345d82133c93e22c798d8e5269" size = "20G" pkgs = [ # tools @@ -32,7 +32,6 @@ class OpenBSDVM(basevm.BaseVM): "pkgconf", "bzip2", "xz", "ninja", -"py3-tomli", # gnu tools "bash", @@ -160,6 +159,7 @@ class OpenBSDVM(basevm.BaseVM): self.print_step("Installation started now, this will take a while") self.console_wait_send("Location of sets","done\n") +self.console_wait_send("Time appears wrong. Set to", "\n") self.console_wait("successfully completed") self.print_step("Installation finished, rebooting") -- 2.46.1
Re: [PATCH] tests/vm: update openbsd image to 7.6
On 2024-10-13 2:06 a.m., Thomas Huth wrote: On 13/10/2024 05.36, Brad Smith wrote: tests/vm: update openbsd image to 7.6 Maybe change the patch description to something more meaningful, e.g. a comment about the removed py3-tomli package ? Ok, I will post an updated diff. Signed-off-by: Brad Smith --- tests/vm/openbsd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Anyway: Reviewed-by: Thomas Huth Tested-by: Thomas Huth
[PATCH] tests/vm: update openbsd image to 7.6
tests/vm: update openbsd image to 7.6 Signed-off-by: Brad Smith --- tests/vm/openbsd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 49cab08782..dfd11c93f0 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -22,8 +22,8 @@ class OpenBSDVM(basevm.BaseVM): name = "openbsd" arch = "x86_64" -link = "https://cdn.openbsd.org/pub/OpenBSD/7.5/amd64/install75.iso"; -csum = "034435c6e27405d5a7fafb058162943c194eb793dafdc412c08d49bb56b3892a" +link = "https://cdn.openbsd.org/pub/OpenBSD/7.6/amd64/install76.iso"; +csum = "60cba8cb391b50bba8fa10fc768bd0529636f5345d82133c93e22c798d8e5269" size = "20G" pkgs = [ # tools @@ -32,7 +32,6 @@ class OpenBSDVM(basevm.BaseVM): "pkgconf", "bzip2", "xz", "ninja", -"py3-tomli", # gnu tools "bash", @@ -160,6 +159,7 @@ class OpenBSDVM(basevm.BaseVM): self.print_step("Installation started now, this will take a while") self.console_wait_send("Location of sets","done\n") +self.console_wait_send("Time appears wrong. Set to", "\n") self.console_wait("successfully completed") self.print_step("Installation finished, rebooting") -- 2.46.1
[PATCH] meson.build: Remove ncurses workaround for OpenBSD
meson.build: Remove ncurses workaround for OpenBSD OpenBSD 7.5 has upgraded to ncurses 6.4. Signed-off-by: Brad Smith --- meson.build | 2 +- ui/curses.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 4ea1984fc5..22e7629d81 100644 --- a/meson.build +++ b/meson.build @@ -1374,7 +1374,7 @@ iconv = not_found curses = not_found if have_system and get_option('curses').allowed() curses_test = ''' -#if defined(__APPLE__) || defined(__OpenBSD__) +#ifdef __APPLE__ #define _XOPEN_SOURCE_EXTENDED 1 #endif #include diff --git a/ui/curses.c b/ui/curses.c index ec61615f7c..4d0be9b37d 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -38,7 +38,7 @@ #include "ui/input.h" #include "sysemu/sysemu.h" -#if defined(__APPLE__) || defined(__OpenBSD__) +#ifdef __APPLE__ #define _XOPEN_SOURCE_EXTENDED 1 #endif -- 2.46.1
Re: [PATCH] contrib/plugins: ensure build does not pick up a system copy of plugin header
On 2024-09-21 8:55 a.m., Alex Bennée wrote: Brad Smith writes: contrib/plugins: ensure build does not pick up a system copy of plugin header I'm confused because this changes the ordering of the GLIB inclusion. We shouldn't be including the whole QEMU include path. That's intentional. The GLIB header paths cannot come before the header path for the plugin header otherwise it pulls in the older plugin header from the installed copy of QEMU and breaks. The QEMU include path is necessary for the plugin header. cc -O2 -g -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -fPIC -Wall -I/home/brad/tmp/qemu/contrib/plugins/../../include/qemu -c -o execlog.o /home/brad/tmp/qemu/contrib/plugins/execlog.c /home/brad/tmp/qemu/contrib/plugins/execlog.c:262:41: error: too many arguments to function call, expected single argument 'insn', have 3 arguments qemu_plugin_insn_data(insn, &insn_opcode, sizeof(insn_opcode)); ~ ^ /usr/local/include/qemu-plugin.h:407:13: note: 'qemu_plugin_insn_data' declared here const void *qemu_plugin_insn_data(const struct qemu_plugin_insn *insn); ^ 1 error generated. How does this fail? With the ordering of the header path if a copy of QEMU is installed it will pickup the system copy of the header before the build paths copy and the build will fail. Signed-off-by: Brad Smith --- contrib/plugins/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile index 05a2a45c5c..52fc390376 100644 --- a/contrib/plugins/Makefile +++ b/contrib/plugins/Makefile @@ -41,9 +41,10 @@ SONAMES := $(addsuffix $(SO_SUFFIX),$(addprefix lib,$(NAMES))) # The main QEMU uses Glib extensively so it is perfectly fine to use it # in plugins (which many example do). -PLUGIN_CFLAGS := $(shell $(PKG_CONFIG) --cflags glib-2.0) -PLUGIN_CFLAGS += -fPIC -Wall +GLIB_CFLAGS := $(shell $(PKG_CONFIG) --cflags glib-2.0) PLUGIN_CFLAGS += -I$(TOP_SRC_PATH)/include/qemu Not withstanding the fact I've just borrowed bswap.h for a test plugin maybe we should actually copy qemu-plugin.h to an entirely new location during the build and then include from there to avoid any other potential pollutions? I don't see how that would make any difference, but either way as long as the header path ordering is corrected so this new path is not passed last on the command line getting the ordering wrong. +PLUGIN_CFLAGS += $(GLIB_CFLAGS) +PLUGIN_CFLAGS += -fPIC -Wall # Helper that honours V=1 so we get some output when compiling quiet-@ = $(if $(V),,@$(if $1,printf " %-7s %s\n" "$(strip $1)" "$(strip $2)" && ))
[PATCH] contrib/plugins: ensure build does not pick up a system copy of plugin header
contrib/plugins: ensure build does not pick up a system copy of plugin header With the ordering of the header path if a copy of QEMU is installed it will pickup the system copy of the header before the build paths copy and the build will fail. Signed-off-by: Brad Smith --- contrib/plugins/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile index 05a2a45c5c..52fc390376 100644 --- a/contrib/plugins/Makefile +++ b/contrib/plugins/Makefile @@ -41,9 +41,10 @@ SONAMES := $(addsuffix $(SO_SUFFIX),$(addprefix lib,$(NAMES))) # The main QEMU uses Glib extensively so it is perfectly fine to use it # in plugins (which many example do). -PLUGIN_CFLAGS := $(shell $(PKG_CONFIG) --cflags glib-2.0) -PLUGIN_CFLAGS += -fPIC -Wall +GLIB_CFLAGS := $(shell $(PKG_CONFIG) --cflags glib-2.0) PLUGIN_CFLAGS += -I$(TOP_SRC_PATH)/include/qemu +PLUGIN_CFLAGS += $(GLIB_CFLAGS) +PLUGIN_CFLAGS += -fPIC -Wall # Helper that honours V=1 so we get some output when compiling quiet-@ = $(if $(V),,@$(if $1,printf " %-7s %s\n" "$(strip $1)" "$(strip $2)" && )) -- 2.46.1
Re: [PATCH] tests/functional/qemu_test: Use Python hashlib instead of external programs
On 2024-09-10 10:06 p.m., Brian Cain wrote: On 9/10/2024 5:26 PM, Brad Smith wrote: On 2024-09-10 4:17 p.m., Thomas Huth wrote: Some systems (like OpenBSD) do not have the sha256sum or sha512sum programs installed by default. Use the Python hashlib instead so we don't have to rely on the external programs. On OpenBSD they're named sha256 and sha512. Rather than port the test to each OS's particular program names, we should use the portable solution that's included w/Python. I wasn't trying to imply that the patch wasn't the right direction, it is when it comes portability. Just commenting on what it says in the commit message. This isn't the first time such differences have come up.
Re: [PATCH] tests/functional/qemu_test: Use Python hashlib instead of external programs
On 2024-09-10 4:17 p.m., Thomas Huth wrote: Some systems (like OpenBSD) do not have the sha256sum or sha512sum programs installed by default. Use the Python hashlib instead so we don't have to rely on the external programs. On OpenBSD they're named sha256 and sha512. Reported-by: Peter Maydell Signed-off-by: Thomas Huth --- tests/functional/qemu_test/asset.py | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tests/functional/qemu_test/asset.py b/tests/functional/qemu_test/asset.py index d3be2aff82..3ec429217e 100644 --- a/tests/functional/qemu_test/asset.py +++ b/tests/functional/qemu_test/asset.py @@ -43,15 +43,21 @@ def _check(self, cache_file): if self.hash is None: return True if len(self.hash) == 64: -sum_prog = 'sha256sum' +hl = hashlib.sha256() elif len(self.hash) == 128: -sum_prog = 'sha512sum' +hl = hashlib.sha512() else: raise Exception("unknown hash type") -checksum = subprocess.check_output( -[sum_prog, str(cache_file)]).split()[0] -return self.hash == checksum.decode("utf-8") +# Calculate the hash of the file: +with open(cache_file, 'rb') as file: +while True: +chunk = file.read(1 << 20) +if not chunk: +break +hl.update(chunk) + +return hl.hexdigest() def valid(self): return self.cache_file.exists() and self._check(self.cache_file)
[PATCH] util/cpuinfo: Make use of elf_aux_info(3) on OpenBSD
util/cpuinfo: Make use of elf_aux_info(3) on OpenBSD Signed-off-by: Brad Smith --- meson.build| 8 util/cpuinfo-aarch64.c | 9 ++--- util/cpuinfo-ppc.c | 5 +++-- util/getauxval.c | 2 +- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 5613b62a4f..97f63aa86c 100644 --- a/meson.build +++ b/meson.build @@ -2835,6 +2835,14 @@ config_host_data.set('CONFIG_GETAUXVAL', cc.links(gnu_source_prefix + ''' return getauxval(AT_HWCAP) == 0; }''')) +config_host_data.set('CONFIG_ELF_AUX_INFO', cc.links(gnu_source_prefix + ''' + #include + int main(void) { +unsigned long hwcap = 0; +elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap)); +return hwcap; + }''')) + config_host_data.set('CONFIG_USBFS', have_linux_user and cc.compiles(''' #include diff --git a/util/cpuinfo-aarch64.c b/util/cpuinfo-aarch64.c index 8ca775a14b..57468890c3 100644 --- a/util/cpuinfo-aarch64.c +++ b/util/cpuinfo-aarch64.c @@ -17,10 +17,13 @@ # define HWCAP2_BTI 0 /* added in glibc 2.32 */ # endif #endif +#ifdef CONFIG_ELF_AUX_INFO +#include +#endif #ifdef CONFIG_DARWIN # include #endif -#ifdef __OpenBSD__ +#if defined(__OpenBSD__) && !defined(CONFIG_ELF_AUX_INFO) # include # include # include @@ -61,7 +64,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void) info = CPUINFO_ALWAYS; -#ifdef CONFIG_LINUX +#if defined(CONFIG_LINUX) || defined(CONFIG_ELF_AUX_INFO) unsigned long hwcap = qemu_getauxval(AT_HWCAP); info |= (hwcap & HWCAP_ATOMICS ? CPUINFO_LSE : 0); info |= (hwcap & HWCAP_USCAT ? CPUINFO_LSE2 : 0); @@ -78,7 +81,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void) info |= sysctl_for_bool("hw.optional.arm.FEAT_PMULL") * CPUINFO_PMULL; info |= sysctl_for_bool("hw.optional.arm.FEAT_BTI") * CPUINFO_BTI; #endif -#ifdef __OpenBSD__ +#if defined(__OpenBSD__) && !defined(CONFIG_ELF_AUX_INFO) int mib[2]; uint64_t isar0; uint64_t pfr1; diff --git a/util/cpuinfo-ppc.c b/util/cpuinfo-ppc.c index 1304f9aa80..ccfcaa0754 100644 --- a/util/cpuinfo-ppc.c +++ b/util/cpuinfo-ppc.c @@ -14,7 +14,8 @@ # include "elf.h" # endif #endif -#ifdef __FreeBSD__ +#if defined(CONFIG_ELF_AUX_INFO) +# include # include # ifndef PPC_FEATURE2_ARCH_3_1 # define PPC_FEATURE2_ARCH_3_1 0 @@ -35,7 +36,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void) info = CPUINFO_ALWAYS; -#if defined(CONFIG_LINUX) || defined(__FreeBSD__) +#if defined(CONFIG_LINUX) || deinfed(CONFIG_ELF_AUX_INFO) unsigned long hwcap = qemu_getauxval(AT_HWCAP); unsigned long hwcap2 = qemu_getauxval(AT_HWCAP2); diff --git a/util/getauxval.c b/util/getauxval.c index b124107d61..5bdbb04f8f 100644 --- a/util/getauxval.c +++ b/util/getauxval.c @@ -98,7 +98,7 @@ unsigned long qemu_getauxval(unsigned long type) return 0; } -#elif defined(__FreeBSD__) +#elif deinfed(CONFIG_ELF_AUX_INFO) #include unsigned long qemu_getauxval(unsigned long type) -- 2.45.2
[PATCH v2] util/cpuinfo-ppc: Add FreeBSD support
util/cpuinfo-ppc: Add FreeBSD support Signed-off-by: Brad Smith --- v2: Use ifndef with PPC_FEATURE2_ARCH_3_1 util/cpuinfo-ppc.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/util/cpuinfo-ppc.c b/util/cpuinfo-ppc.c index 47af55aa0c..f0b9b895f1 100644 --- a/util/cpuinfo-ppc.c +++ b/util/cpuinfo-ppc.c @@ -14,6 +14,13 @@ # include "elf.h" # endif #endif +#ifdef __FreeBSD__ +# include +# ifndef PPC_FEATURE2_ARCH_3_1 +# define PPC_FEATURE2_ARCH_3_10 +# endif +# define PPC_FEATURE2_VEC_CRYPTO PPC_FEATURE2_HAS_VEC_CRYPTO +#endif unsigned cpuinfo; @@ -28,7 +35,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void) info = CPUINFO_ALWAYS; -#ifdef CONFIG_LINUX +#if defined(CONFIG_LINUX) || defined(__FreeBSD__) unsigned long hwcap = qemu_getauxval(AT_HWCAP); unsigned long hwcap2 = qemu_getauxval(AT_HWCAP2); -- 2.45.2
Re: [PATCH] util/cpuinfo-ppc: Add FreeBSD support
On 2024-06-28 12:19 p.m., Richard Henderson wrote: On 6/27/24 19:00, Brad Smith wrote: util/cpuinfo-ppc: Add FreeBSD support Signed-off-by: Brad Smith --- With corrected sign-off. Also this was based on the tcg-next branch. util/cpuinfo-ppc.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/util/cpuinfo-ppc.c b/util/cpuinfo-ppc.c index 47af55aa0c..0ad634b46f 100644 --- a/util/cpuinfo-ppc.c +++ b/util/cpuinfo-ppc.c @@ -14,6 +14,11 @@ # include "elf.h" # endif #endif +#ifdef __FreeBSD__ +# include +# define PPC_FEATURE2_ARCH_3_1 0 I assume freebsd will eventually add this bit. Possibly. The other flags are mostly in sync with the Linux flags. There is no Power 10 support so far. Perhaps better with ifndef? I'll do so just in case. r~ +# define PPC_FEATURE2_VEC_CRYPTO PPC_FEATURE2_HAS_VEC_CRYPTO +#endif unsigned cpuinfo; @@ -28,7 +33,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void) info = CPUINFO_ALWAYS; -#ifdef CONFIG_LINUX +#if defined(CONFIG_LINUX) || defined(__FreeBSD__) unsigned long hwcap = qemu_getauxval(AT_HWCAP); unsigned long hwcap2 = qemu_getauxval(AT_HWCAP2);
[PATCH] util/cpuinfo-ppc: Add FreeBSD support
util/cpuinfo-ppc: Add FreeBSD support Signed-off-by: Brad Smith --- With corrected sign-off. Also this was based on the tcg-next branch. util/cpuinfo-ppc.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/util/cpuinfo-ppc.c b/util/cpuinfo-ppc.c index 47af55aa0c..0ad634b46f 100644 --- a/util/cpuinfo-ppc.c +++ b/util/cpuinfo-ppc.c @@ -14,6 +14,11 @@ # include "elf.h" # endif #endif +#ifdef __FreeBSD__ +# include +# define PPC_FEATURE2_ARCH_3_1 0 +# define PPC_FEATURE2_VEC_CRYPTO PPC_FEATURE2_HAS_VEC_CRYPTO +#endif unsigned cpuinfo; @@ -28,7 +33,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void) info = CPUINFO_ALWAYS; -#ifdef CONFIG_LINUX +#if defined(CONFIG_LINUX) || defined(__FreeBSD__) unsigned long hwcap = qemu_getauxval(AT_HWCAP); unsigned long hwcap2 = qemu_getauxval(AT_HWCAP2); -- 2.45.2
[PATCH] util/cpuinfo-ppc: Add FreeBSD support
util/cpuinfo-ppc: Add FreeBSD support Signed-off-by: default avatarBrad Smith --- util/cpuinfo-ppc.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/util/cpuinfo-ppc.c b/util/cpuinfo-ppc.c index 47af55aa0c..0ad634b46f 100644 --- a/util/cpuinfo-ppc.c +++ b/util/cpuinfo-ppc.c @@ -14,6 +14,11 @@ # include "elf.h" # endif #endif +#ifdef __FreeBSD__ +# include +# define PPC_FEATURE2_ARCH_3_1 0 +# define PPC_FEATURE2_VEC_CRYPTO PPC_FEATURE2_HAS_VEC_CRYPTO +#endif unsigned cpuinfo; @@ -28,7 +33,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void) info = CPUINFO_ALWAYS; -#ifdef CONFIG_LINUX +#if defined(CONFIG_LINUX) || defined(__FreeBSD__) unsigned long hwcap = qemu_getauxval(AT_HWCAP); unsigned long hwcap2 = qemu_getauxval(AT_HWCAP2); -- 2.45.2
[PATCH] tcg/riscv: Fix building on OpenBSD/riscv64
tcg/riscv: Fix building on OpenBSD/riscv64 Use ucontext_t/struct sigcontext member name from machine/signal.h instead of Linux specific name. Signed-off-by: Brad Smith --- tcg/riscv/tcg-target.c.inc | 5 + 1 file changed, 5 insertions(+) diff --git a/tcg/riscv/tcg-target.c.inc b/tcg/riscv/tcg-target.c.inc index 639363039b..aeae9a8ad8 100644 --- a/tcg/riscv/tcg-target.c.inc +++ b/tcg/riscv/tcg-target.c.inc @@ -2116,7 +2116,12 @@ static void sigill_handler(int signo, siginfo_t *si, void *data) { /* Skip the faulty instruction */ ucontext_t *uc = (ucontext_t *)data; + +#ifdef __OpenBSD__ +uc->sc_sepc += 4; +#else uc->uc_mcontext.__gregs[REG_PC] += 4; +#endif got_sigill = 1; } -- 2.45.2
[PATCH v2] util: fix building on OpenBSD/powerpc
util: fix building on OpenBSD/powerpc Signed-off-by: Brad Smith --- v2: Keep headers in the same order as they originally were. util/cpuinfo-ppc.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/util/cpuinfo-ppc.c b/util/cpuinfo-ppc.c index b2d8893a06..47af55aa0c 100644 --- a/util/cpuinfo-ppc.c +++ b/util/cpuinfo-ppc.c @@ -6,11 +6,13 @@ #include "qemu/osdep.h" #include "host/cpuinfo.h" -#include -#ifdef CONFIG_GETAUXVAL -# include -#else -# include "elf.h" +#ifdef CONFIG_LINUX +# include +# ifdef CONFIG_GETAUXVAL +# include +# else +# include "elf.h" +# endif #endif unsigned cpuinfo; @@ -19,16 +21,17 @@ unsigned cpuinfo; unsigned __attribute__((constructor)) cpuinfo_init(void) { unsigned info = cpuinfo; -unsigned long hwcap, hwcap2; if (info) { return info; } -hwcap = qemu_getauxval(AT_HWCAP); -hwcap2 = qemu_getauxval(AT_HWCAP2); info = CPUINFO_ALWAYS; +#ifdef CONFIG_LINUX +unsigned long hwcap = qemu_getauxval(AT_HWCAP); +unsigned long hwcap2 = qemu_getauxval(AT_HWCAP2); + /* Version numbers are monotonic, and so imply all lower versions. */ if (hwcap2 & PPC_FEATURE2_ARCH_3_1) { info |= CPUINFO_V3_1 | CPUINFO_V3_0 | CPUINFO_V2_07 | CPUINFO_V2_06; @@ -58,6 +61,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void) } } } +#endif cpuinfo = info; return info; -- 2.45.2
[PATCH] tcg/riscv: Fix building on OpenBSD/riscv64
tcg/riscv: Fix building on OpenBSD/riscv64 Signed-off-by: Brad Smith --- tcg/riscv/tcg-target.c.inc | 5 + 1 file changed, 5 insertions(+) diff --git a/tcg/riscv/tcg-target.c.inc b/tcg/riscv/tcg-target.c.inc index 639363039b..aeae9a8ad8 100644 --- a/tcg/riscv/tcg-target.c.inc +++ b/tcg/riscv/tcg-target.c.inc @@ -2116,7 +2116,12 @@ static void sigill_handler(int signo, siginfo_t *si, void *data) { /* Skip the faulty instruction */ ucontext_t *uc = (ucontext_t *)data; + +#ifdef __OpenBSD__ +uc->sc_sepc += 4; +#else uc->uc_mcontext.__gregs[REG_PC] += 4; +#endif got_sigill = 1; } -- 2.45.2
Re: [PATCH] util: fix building on OpenBSD/powerpc
On 2024-06-23 6:03 p.m., Richard Henderson wrote: On 6/23/24 10:53, Richard Henderson wrote: On 6/22/24 19:03, Brad Smith wrote: util: fix building on OpenBSD/powerpc Signed-off-by: Brad Smith --- util/cpuinfo-ppc.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) Reviewed-by: Richard Henderson r~ Queued to tcg-next. There was one minor change I wanted to make to this. Do I send a v2?
Re: [PATCH] util/cpuinfo-aarch64: Add OpenBSD support
On 2024-06-23 6:08 p.m., Richard Henderson wrote: On 6/23/24 10:55, Richard Henderson wrote: On 6/22/24 19:12, Brad Smith wrote: + if (sysctl(mib, 2, &isar0, &len, NULL, 0) != -1) { + if (ID_AA64ISAR0_ATOMIC(isar0) >= ID_AA64ISAR0_ATOMIC_IMPL) + info |= CPUINFO_LSE; + if (ID_AA64ISAR0_AES(isar0) >= ID_AA64ISAR0_AES_BASE) + info |= CPUINFO_AES; + if (ID_AA64ISAR0_AES(isar0) >= ID_AA64ISAR0_AES_PMULL) + info |= CPUINFO_PMULL; + } + + mib[0] = CTL_MACHDEP; + mib[1] = CPU_ID_AA64PFR1; + len = sizeof(pfr1); + if (sysctl(mib, 2, &pfr1, &len, NULL, 0) != -1) { + if (ID_AA64PFR1_BT(pfr1) >= ID_AA64PFR1_BT_IMPL) + info |= CPUINFO_BTI; + } Need braces for all of the if's. Otherwise, Reviewed-by: Richard Henderson Fixed braces and queued to tcg-next. Thanks.
[PATCH] util/cpuinfo-aarch64: Add OpenBSD support
util/cpuinfo-aarch64: Add OpenBSD support Signed-off-by: Brad Smith --- util/cpuinfo-aarch64.c | 32 1 file changed, 32 insertions(+) diff --git a/util/cpuinfo-aarch64.c b/util/cpuinfo-aarch64.c index 4c8a005715..8a8c0a30a8 100644 --- a/util/cpuinfo-aarch64.c +++ b/util/cpuinfo-aarch64.c @@ -20,6 +20,12 @@ #ifdef CONFIG_DARWIN # include #endif +#ifdef __OpenBSD__ +# include +# include +# include +# include +#endif unsigned cpuinfo; @@ -72,6 +78,32 @@ unsigned __attribute__((constructor)) cpuinfo_init(void) info |= sysctl_for_bool("hw.optional.arm.FEAT_PMULL") * CPUINFO_PMULL; info |= sysctl_for_bool("hw.optional.arm.FEAT_BTI") * CPUINFO_BTI; #endif +#ifdef __OpenBSD__ +int mib[2]; +uint64_t isar0; +uint64_t pfr1; +size_t len; + +mib[0] = CTL_MACHDEP; +mib[1] = CPU_ID_AA64ISAR0; +len = sizeof(isar0); +if (sysctl(mib, 2, &isar0, &len, NULL, 0) != -1) { + if (ID_AA64ISAR0_ATOMIC(isar0) >= ID_AA64ISAR0_ATOMIC_IMPL) +info |= CPUINFO_LSE; + if (ID_AA64ISAR0_AES(isar0) >= ID_AA64ISAR0_AES_BASE) +info |= CPUINFO_AES; + if (ID_AA64ISAR0_AES(isar0) >= ID_AA64ISAR0_AES_PMULL) +info |= CPUINFO_PMULL; +} + +mib[0] = CTL_MACHDEP; +mib[1] = CPU_ID_AA64PFR1; +len = sizeof(pfr1); +if (sysctl(mib, 2, &pfr1, &len, NULL, 0) != -1) { + if (ID_AA64PFR1_BT(pfr1) >= ID_AA64PFR1_BT_IMPL) +info |= CPUINFO_BTI; +} +#endif cpuinfo = info; return info; -- 2.45.2
[PATCH] util: fix building on OpenBSD/powerpc
util: fix building on OpenBSD/powerpc Signed-off-by: Brad Smith --- util/cpuinfo-ppc.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/util/cpuinfo-ppc.c b/util/cpuinfo-ppc.c index b2d8893a06..d459c9c87e 100644 --- a/util/cpuinfo-ppc.c +++ b/util/cpuinfo-ppc.c @@ -6,11 +6,13 @@ #include "qemu/osdep.h" #include "host/cpuinfo.h" -#include -#ifdef CONFIG_GETAUXVAL -# include -#else -# include "elf.h" +#ifdef CONFIG_LINUX +# ifdef CONFIG_GETAUXVAL +# include +# else +# include +# include "elf.h" +# endif #endif unsigned cpuinfo; @@ -19,16 +21,17 @@ unsigned cpuinfo; unsigned __attribute__((constructor)) cpuinfo_init(void) { unsigned info = cpuinfo; -unsigned long hwcap, hwcap2; if (info) { return info; } -hwcap = qemu_getauxval(AT_HWCAP); -hwcap2 = qemu_getauxval(AT_HWCAP2); info = CPUINFO_ALWAYS; +#ifdef CONFIG_LINUX +unsigned long hwcap = qemu_getauxval(AT_HWCAP); +unsigned long hwcap2 = qemu_getauxval(AT_HWCAP2); + /* Version numbers are monotonic, and so imply all lower versions. */ if (hwcap2 & PPC_FEATURE2_ARCH_3_1) { info |= CPUINFO_V3_1 | CPUINFO_V3_0 | CPUINFO_V2_07 | CPUINFO_V2_06; @@ -58,6 +61,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void) } } } +#endif cpuinfo = info; return info; -- 2.45.2
Re: [PATCH 4/5] docs/system/target-sparc: Improve the Sparc documentation
On 2024-04-18 4:27 p.m., Mark Cave-Ayland wrote: On 07/03/2024 17:43, Thomas Huth wrote: Add some words about how to enable or disable boolean features, and remove the note about a Linux kernel being available on the QEMU website (they have been removed long ago already). Signed-off-by: Thomas Huth --- docs/system/target-sparc.rst | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/system/target-sparc.rst b/docs/system/target-sparc.rst index 9ec8c90c14..9f418b9d3e 100644 --- a/docs/system/target-sparc.rst +++ b/docs/system/target-sparc.rst @@ -27,6 +27,11 @@ architecture machines: The emulation is somewhat complete. SMP up to 16 CPUs is supported, but Linux limits the number of usable CPUs to 4. +The list of available CPUs can be viewed by starting QEMU with ``-cpu help``. +Optional boolean features can be added with a "+" in front of the feature name, +or disabled with a "-" in front of the name, for example +``-cpu TI-SuperSparc-II,+float128``. + QEMU emulates the following sun4m peripherals: - IOMMU @@ -55,8 +60,7 @@ OpenBIOS is a free (GPL v2) portable firmware implementation. The goal is to implement a 100% IEEE 1275-1994 (referred to as Open Firmware) compliant firmware. -A sample Linux 2.6 series kernel and ram disk image are available on the -QEMU web site. There are still issues with NetBSD and OpenBSD, but most +There are still issues with NetBSD and OpenBSD, but most kernel versions work. Please note that currently older Solaris kernels don't work probably due to interface issues between OpenBIOS and Solaris. Just curious as to what current issues exist with NetBSD and OpenBSD? At least both my NetBSD and OpenBSD test images survive a casual boot test here with latest git. I was just trying OpenBSD/sparc64 with 8.2 recently and found hme(4) does not work. I tried with the NE2k driver as I remember adding the driver to the OpenBSD kernel before an hme driver existed and it sort of worked, but there were still issues. I'll re-test with 9 now and see what happens.
Re: [PATCH for-9.0] meson.build: Disable -fzero-call-used-regs on OpenBSD
On 4/11/2024 8:12 AM, Thomas Huth wrote: On 11/04/2024 14.08, Thomas Huth wrote: QEMU currently does not work on OpenBSD since the -fzero-call-used-regs That should be "OpenBSD 7.5" ... older versions are fine since they are using an older version of Clang that does not have -fzero-call-used-regs yet, I think. About the compiler version that is correct. Between 7.4 and 7.5 we upgraded from Clang 13 to 16. -fzero-call-used-regs was added with the 15 release. https://github.com/llvm/llvm-project/commit/deaf22bc0e306bc44c70d2503e9364b5ed312c49 Retguard is also used to mitigate ROP exploits and is enabled by default. https://www.openbsd.org/papers/asiabsdcon2019-rop-paper.pdf
[PATCH] tests/vm: update openbsd image to 7.5
tests/vm: update openbsd to release 7.5 Signed-off-by: Brad Smith --- This exposes a further issue with Clang 16 and the ROP exploits flag usage at the moment.. https://gitlab.com/qemu-project/qemu/-/issues/2278 tests/vm/openbsd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 85c9863633..5e646f7c51 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -22,8 +22,8 @@ class OpenBSDVM(basevm.BaseVM): name = "openbsd" arch = "x86_64" -link = "https://cdn.openbsd.org/pub/OpenBSD/7.4/amd64/install74.iso"; -csum = "a1001736ed9fe2307965b5fcdb426ae11f9b80d26eb21e404a705144a0a224a0" +link = "https://cdn.openbsd.org/pub/OpenBSD/7.5/amd64/install75.iso"; +csum = "034435c6e27405d5a7fafb058162943c194eb793dafdc412c08d49bb56b3892a" size = "20G" pkgs = [ # tools @@ -124,7 +124,7 @@ class OpenBSDVM(basevm.BaseVM): self.console_wait_send("Allow root ssh login","yes\n") self.console_wait_send("timezone","UTC\n") self.console_wait_send("root disk", "\n") -self.console_wait_send("Encrypt the root disk with a passphrase", "no\n") +self.console_wait_send("Encrypt the root disk with a (p)assphrase", "no\n") self.console_wait_send("(W)hole disk","\n") self.console_wait_send("(A)uto layout", "c\n") -- 2.44.0
Re: [PATCH 1/2] tests/vm: skip X11 in openbsd installation
On 2023-03-22 9:40 a.m., Thomas Huth wrote: On 22/03/2023 14.38, Philippe Mathieu-Daudé wrote: On 22/3/23 13:36, Daniel P. Berrangé wrote: As a VM used only for automated testing there is no need to install the X11 stack. Signed-off-by: Daniel P. Berrangé --- tests/vm/openbsd | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/vm/openbsd b/tests/vm/openbsd index eaeb201e91..6af7afac0d 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -106,8 +106,7 @@ class OpenBSDVM(basevm.BaseVM): self.console_wait("Password for root account") self.console_send("%s\n" % self._config["root_pass"]) self.console_wait_send("Start sshd(8)", "yes\n") - self.console_wait_send("X Window System", "\n") - self.console_wait_send("xenodm", "\n") + self.console_wait_send("X Window System", "no\n") Wasn't this useful to link a X11-ready binary, even if only testing with -display=none? tests/vm/openbsd later installs sdl2 and gtk+3, so I assume that will pull in the required libraries if necessary, without all the other non-necessary stuff. No, it will not. If you want sdl2 / gtk+3 you have to have X enabled.
Re: [PATCH] thread-posix: add support for setting threads name on OpenBSD
ping. On 2022-12-18 3:22 a.m., Brad Smith wrote: Make use of pthread_set_name_np() to be able to set the threads name on OpenBSD. Signed-off-by: Brad Smith --- meson.build | 12 util/qemu-thread-posix.c | 9 - 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 5c6b5a1c75..68adcb6291 100644 --- a/meson.build +++ b/meson.build @@ -2123,6 +2123,18 @@ config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_WO_TID', cc.links(gnu_source_pre pthread_create(&thread, 0, f, 0); return 0; }''', dependencies: threads)) +config_host_data.set('CONFIG_PTHREAD_SET_NAME_NP', cc.links(gnu_source_prefix + ''' + #include + #include + + static void *f(void *p) { return NULL; } + int main(void) + { +pthread_t thread; +pthread_create(&thread, 0, f, 0); +pthread_set_name_np(thread, "QEMU"); +return 0; + }''', dependencies: threads)) config_host_data.set('CONFIG_PTHREAD_CONDATTR_SETCLOCK', cc.links(gnu_source_prefix + ''' #include #include diff --git a/util/qemu-thread-posix.c b/util/qemu-thread-posix.c index bae938c670..412caa45ef 100644 --- a/util/qemu-thread-posix.c +++ b/util/qemu-thread-posix.c @@ -18,6 +18,10 @@ #include "qemu/tsan.h" #include "qemu/bitmap.h" +#ifdef CONFIG_PTHREAD_SET_NAME_NP +#include +#endif + static bool name_threads; void qemu_thread_naming(bool enable) @@ -25,7 +29,8 @@ void qemu_thread_naming(bool enable) name_threads = enable; #if !defined CONFIG_PTHREAD_SETNAME_NP_W_TID && \ -!defined CONFIG_PTHREAD_SETNAME_NP_WO_TID +!defined CONFIG_PTHREAD_SETNAME_NP_WO_TID && \ +!defined CONFIG_PTHREAD_SET_NAME_NP /* This is a debugging option, not fatal */ if (enable) { fprintf(stderr, "qemu: thread naming not supported on this host\n"); @@ -480,6 +485,8 @@ static void *qemu_thread_start(void *args) pthread_setname_np(pthread_self(), qemu_thread_args->name); # elif defined(CONFIG_PTHREAD_SETNAME_NP_WO_TID) pthread_setname_np(qemu_thread_args->name); +# elif defined(CONFIG_PTHREAD_SET_NAME_NP) +pthread_set_name_np(pthread_self(), qemu_thread_args->name); # endif } QEMU_TSAN_ANNOTATE_THREAD_NAME(qemu_thread_args->name);
Re: [PULL 4/9] MAINTAINERS: Remove bouncing mail address from Kamil Rytarowski
I e-mailed his business address and received a bounce back from Google saying the account does not exist. On 1/18/2023 6:34 AM, Thomas Huth wrote: When sending mail to Kamil's address, it's bouncing with a message that the mailbox is full. This already happens since summer 2022, and the last message that Kamil sent to the qemu-devel mailing list is from November 2021 (as far as I can see), so we unfortunately have to assume that this e-mail address is not valid anymore. Message-Id: <20230113081735.1148057-1-th...@redhat.com> Signed-off-by: Thomas Huth --- MAINTAINERS | 2 -- 1 file changed, 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 0fe50d01e3..08ad1e5341 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -511,7 +511,6 @@ F: target/i386/hax/ Guest CPU Cores (NVMM) -- NetBSD Virtual Machine Monitor (NVMM) CPU support -M: Kamil Rytarowski M: Reinoud Zandijk S: Maintained F: include/sysemu/nvmm.h @@ -536,7 +535,6 @@ F: util/*posix*.c F: include/qemu/*posix*.h NETBSD -M: Kamil Rytarowski M: Reinoud Zandijk M: Ryo ONODERA S: Maintained
Re: [PATCH] qga: Add initial OpenBSD and NetBSD support
On 12/26/2022 9:02 AM, Konstantin Kostiuk wrote: the series was merged Thank you.
[PATCH] thread-posix: add support for setting threads name on OpenBSD
Make use of pthread_set_name_np() to be able to set the threads name on OpenBSD. Signed-off-by: Brad Smith --- meson.build | 12 util/qemu-thread-posix.c | 9 - 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 5c6b5a1c75..68adcb6291 100644 --- a/meson.build +++ b/meson.build @@ -2123,6 +2123,18 @@ config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_WO_TID', cc.links(gnu_source_pre pthread_create(&thread, 0, f, 0); return 0; }''', dependencies: threads)) +config_host_data.set('CONFIG_PTHREAD_SET_NAME_NP', cc.links(gnu_source_prefix + ''' + #include + #include + + static void *f(void *p) { return NULL; } + int main(void) + { +pthread_t thread; +pthread_create(&thread, 0, f, 0); +pthread_set_name_np(thread, "QEMU"); +return 0; + }''', dependencies: threads)) config_host_data.set('CONFIG_PTHREAD_CONDATTR_SETCLOCK', cc.links(gnu_source_prefix + ''' #include #include diff --git a/util/qemu-thread-posix.c b/util/qemu-thread-posix.c index bae938c670..412caa45ef 100644 --- a/util/qemu-thread-posix.c +++ b/util/qemu-thread-posix.c @@ -18,6 +18,10 @@ #include "qemu/tsan.h" #include "qemu/bitmap.h" +#ifdef CONFIG_PTHREAD_SET_NAME_NP +#include +#endif + static bool name_threads; void qemu_thread_naming(bool enable) @@ -25,7 +29,8 @@ void qemu_thread_naming(bool enable) name_threads = enable; #if !defined CONFIG_PTHREAD_SETNAME_NP_W_TID && \ -!defined CONFIG_PTHREAD_SETNAME_NP_WO_TID +!defined CONFIG_PTHREAD_SETNAME_NP_WO_TID && \ +!defined CONFIG_PTHREAD_SET_NAME_NP /* This is a debugging option, not fatal */ if (enable) { fprintf(stderr, "qemu: thread naming not supported on this host\n"); @@ -480,6 +485,8 @@ static void *qemu_thread_start(void *args) pthread_setname_np(pthread_self(), qemu_thread_args->name); # elif defined(CONFIG_PTHREAD_SETNAME_NP_WO_TID) pthread_setname_np(qemu_thread_args->name); +# elif defined(CONFIG_PTHREAD_SET_NAME_NP) +pthread_set_name_np(pthread_self(), qemu_thread_args->name); # endif } QEMU_TSAN_ANNOTATE_THREAD_NAME(qemu_thread_args->name); -- 2.38.1
[PATCH] FreeBSD: Upgrade to 12.4 release
FreeBSD: Upgrade to 12.4 release Signed-off-by: Brad Smith --- .gitlab-ci.d/cirrus.yml | 2 +- tests/vm/freebsd| 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.d/cirrus.yml b/.gitlab-ci.d/cirrus.yml index 634a73a742..785b163aa6 100644 --- a/.gitlab-ci.d/cirrus.yml +++ b/.gitlab-ci.d/cirrus.yml @@ -50,7 +50,7 @@ x64-freebsd-12-build: NAME: freebsd-12 CIRRUS_VM_INSTANCE_TYPE: freebsd_instance CIRRUS_VM_IMAGE_SELECTOR: image_family -CIRRUS_VM_IMAGE_NAME: freebsd-12-3 +CIRRUS_VM_IMAGE_NAME: freebsd-12-4 CIRRUS_VM_CPUS: 8 CIRRUS_VM_RAM: 8G UPDATE_COMMAND: pkg update diff --git a/tests/vm/freebsd b/tests/vm/freebsd index d6ff4461ba..ba2ba23d24 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -28,8 +28,8 @@ class FreeBSDVM(basevm.BaseVM): name = "freebsd" arch = "x86_64" -link = "https://download.freebsd.org/ftp/releases/ISO-IMAGES/12.3/FreeBSD-12.3-RELEASE-amd64-disc1.iso.xz"; -csum = "36dd0de50f1fe5f0a88e181e94657656de26fb64254412f74e80e128e8b938b4" +link = "https://download.freebsd.org/ftp/releases/ISO-IMAGES/12.4/FreeBSD-12.4-RELEASE-amd64-disc1.iso.xz"; +csum = "1dcf6446e31bf3f81b582e9aba3319a258c29a937a2af6138ee4b181ed719a87" size = "20G" pkgs = [ # build tools -- 2.38.1
[PATCH] qga: Add initial OpenBSD and NetBSD support
qga: Add initial OpenBSD and NetBSD support Signed-off-by: Brad Smith --- meson.build | 2 +- qga/commands-bsd.c | 5 + qga/commands-posix.c | 9 +++-- qga/main.c | 6 +++--- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index cf3e517e56..5556356f14 100644 --- a/meson.build +++ b/meson.build @@ -75,7 +75,7 @@ have_tools = get_option('tools') \ .allowed() have_ga = get_option('guest_agent') \ .disable_auto_if(not have_system and not have_tools) \ - .require(targetos in ['sunos', 'linux', 'windows', 'freebsd'], + .require(targetos in ['sunos', 'linux', 'windows', 'freebsd', 'netbsd', 'openbsd'], error_message: 'unsupported OS for QEMU guest agent') \ .allowed() have_block = have_system or have_tools diff --git a/qga/commands-bsd.c b/qga/commands-bsd.c index 15cade2d4c..17bddda1cf 100644 --- a/qga/commands-bsd.c +++ b/qga/commands-bsd.c @@ -21,7 +21,12 @@ #include #include #include +#if defined(__NetBSD__) || defined(__OpenBSD__) +#include +#include +#else #include +#endif #include #if defined(CONFIG_FSFREEZE) || defined(CONFIG_FSTRIM) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 32493d6383..86be320a1b 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -45,7 +45,12 @@ #include #include #include +#if defined(__NetBSD__) || defined(__OpenBSD__) +#include +#include +#else #include +#endif #include #ifdef CONFIG_SOLARIS #include @@ -2881,7 +2886,7 @@ static int guest_get_network_stats(const char *name, return -1; } -#ifndef __FreeBSD__ +#ifndef CONFIG_BSD /* * Fill "buf" with MAC address by ifaddrs. Pointer buf must point to a * buffer with ETHER_ADDR_LEN length at least. @@ -2930,7 +2935,7 @@ bool guest_get_hw_addr(struct ifaddrs *ifa, unsigned char *buf, close(sock); return true; } -#endif /* __FreeBSD__ */ +#endif /* CONFIG_BSD */ /* * Build information about guest interfaces diff --git a/qga/main.c b/qga/main.c index b3580508fa..0865c992f0 100644 --- a/qga/main.c +++ b/qga/main.c @@ -40,11 +40,11 @@ #include "commands-common.h" #ifndef _WIN32 -#ifdef __FreeBSD__ +#ifdef CONFIG_BSD #define QGA_VIRTIO_PATH_DEFAULT "/dev/vtcon/org.qemu.guest_agent.0" -#else /* __FreeBSD__ */ +#else /* CONFIG_BSD */ #define QGA_VIRTIO_PATH_DEFAULT "/dev/virtio-ports/org.qemu.guest_agent.0" -#endif /* __FreeBSD__ */ +#endif /* CONFIG_BSD */ #define QGA_SERIAL_PATH_DEFAULT "/dev/ttyS0" #define QGA_STATE_RELATIVE_DIR "run" #else -- 2.38.1
[PATCH] qga: Add initial OpenBSD support
qga: Add initial OpenBSD support Signed-off-by: Brad Smith --- meson.build | 2 +- qga/commands-bsd.c | 5 + qga/commands-posix.c | 9 +++-- qga/main.c | 4 ++-- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index 37737913df..fb69a6a683 100644 --- a/meson.build +++ b/meson.build @@ -75,7 +75,7 @@ have_tools = get_option('tools') \ .allowed() have_ga = get_option('guest_agent') \ .disable_auto_if(not have_system and not have_tools) \ - .require(targetos in ['sunos', 'linux', 'windows', 'freebsd'], + .require(targetos in ['sunos', 'linux', 'windows', 'freebsd', 'openbsd'], error_message: 'unsupported OS for QEMU guest agent') \ .allowed() have_block = have_system or have_tools diff --git a/qga/commands-bsd.c b/qga/commands-bsd.c index 15cade2d4c..4deb3bf580 100644 --- a/qga/commands-bsd.c +++ b/qga/commands-bsd.c @@ -21,7 +21,12 @@ #include #include #include +#ifdef __OpenBSD__ +#include +#include +#else #include +#endif #include #if defined(CONFIG_FSFREEZE) || defined(CONFIG_FSTRIM) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 32493d6383..640f26dc16 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -45,7 +45,12 @@ #include #include #include +#ifdef __OpenBSD__ +#include +#include +#else #include +#endif #include #ifdef CONFIG_SOLARIS #include @@ -2881,7 +2886,7 @@ static int guest_get_network_stats(const char *name, return -1; } -#ifndef __FreeBSD__ +#ifndef CONFIG_BSD /* * Fill "buf" with MAC address by ifaddrs. Pointer buf must point to a * buffer with ETHER_ADDR_LEN length at least. @@ -2930,7 +2935,7 @@ bool guest_get_hw_addr(struct ifaddrs *ifa, unsigned char *buf, close(sock); return true; } -#endif /* __FreeBSD__ */ +#endif /* CONFIG_BSD */ /* * Build information about guest interfaces diff --git a/qga/main.c b/qga/main.c index b3580508fa..0fe94e80d1 100644 --- a/qga/main.c +++ b/qga/main.c @@ -40,9 +40,9 @@ #include "commands-common.h" #ifndef _WIN32 -#ifdef __FreeBSD__ +#ifdef CONFIG_BSD #define QGA_VIRTIO_PATH_DEFAULT "/dev/vtcon/org.qemu.guest_agent.0" -#else /* __FreeBSD__ */ +#else /* CONFIG_BSD */ #define QGA_VIRTIO_PATH_DEFAULT "/dev/virtio-ports/org.qemu.guest_agent.0" #endif /* __FreeBSD__ */ #define QGA_SERIAL_PATH_DEFAULT "/dev/ttyS0" -- 2.38.0
Re: [PATCH v2] tests: Add sndio to the FreeBSD CI containers / VM
Thank you. On October 25, 2022 11:10:49 a.m. Thomas Huth wrote: On 25/10/2022 17.02, Brad Smith wrote: tests: Add sndio to the FreeBSD CI containers / VM Signed-off-by: Brad Smith --- Thanks, queued to my testing-next branch: https://gitlab.com/thuth/qemu/-/commits/testing-next Thomas Sent with Aqua Mail for Android https://www.aqua-mail.com
Re: [PATCH v2] tests: Add sndio to the FreeBSD CI containers / VM
On 10/25/2022 10:36 AM, Thomas Huth wrote: On 07/10/2022 09.21, Brad Smith wrote: tests: Add sndio to the FreeBSD CI containers / VM --- Patch description is missing "Signed-off-by" line ... to follow our QEMU development process, could you please reply with such a line to this mail? Thanks! Sorry about that. Sent over.
[PATCH v2] tests: Add sndio to the FreeBSD CI containers / VM
tests: Add sndio to the FreeBSD CI containers / VM Signed-off-by: Brad Smith --- .gitlab-ci.d/cirrus/freebsd-12.vars | 2 +- .gitlab-ci.d/cirrus/freebsd-13.vars | 2 +- tests/docker/dockerfiles/alpine.docker| 3 +- tests/docker/dockerfiles/centos8.docker | 2 +- .../dockerfiles/debian-amd64-cross.docker | 235 - tests/docker/dockerfiles/debian-amd64.docker | 237 +- .../dockerfiles/debian-arm64-cross.docker | 233 - .../dockerfiles/debian-armel-cross.docker | 231 - .../dockerfiles/debian-armhf-cross.docker | 233 - .../dockerfiles/debian-mips64el-cross.docker | 227 - .../dockerfiles/debian-mipsel-cross.docker| 227 - .../dockerfiles/debian-ppc64el-cross.docker | 231 - .../dockerfiles/debian-s390x-cross.docker | 229 - tests/docker/dockerfiles/fedora.docker| 230 - tests/docker/dockerfiles/opensuse-leap.docker | 3 +- tests/docker/dockerfiles/ubuntu2004.docker| 235 - tests/lcitool/libvirt-ci | 2 +- tests/lcitool/projects/qemu.yml | 1 + tests/vm/freebsd | 3 + 19 files changed, 1291 insertions(+), 1275 deletions(-) diff --git a/.gitlab-ci.d/cirrus/freebsd-12.vars b/.gitlab-ci.d/cirrus/freebsd-12.vars index c3db1d7d30..e3fc3235b9 100644 --- a/.gitlab-ci.d/cirrus/freebsd-12.vars +++ b/.gitlab-ci.d/cirrus/freebsd-12.vars @@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake' NINJA='/usr/local/bin/ninja' PACKAGING_COMMAND='pkg' PIP3='/usr/local/bin/pip-3.8' -PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv perl5 pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' +PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv perl5 pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy sndio spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' PYPI_PKGS='' PYTHON='/usr/local/bin/python3' diff --git a/.gitlab-ci.d/cirrus/freebsd-13.vars b/.gitlab-ci.d/cirrus/freebsd-13.vars index d31faa787f..9f56babd9c 100644 --- a/.gitlab-ci.d/cirrus/freebsd-13.vars +++ b/.gitlab-ci.d/cirrus/freebsd-13.vars @@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake' NINJA='/usr/local/bin/ninja' PACKAGING_COMMAND='pkg' PIP3='/usr/local/bin/pip-3.8' -PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv perl5 pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' +PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv perl5 pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy sndio spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' PYPI_PKGS='' PYTHON='/usr/local/bin/python3' diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfiles/alpine.docker index 9b7541261a..094f66f4eb 100644 --- a/tests/docker/dockerfiles/alpine.docker +++ b/tests/docker/dockerfiles/alpine.docker @@ -94,6 +94,7 @@ RUN apk update && \ sdl2_image-dev \ sed \ snappy-dev \ +sndio-dev \ sparse \ spice-dev \ spice-protocol \ @@ -119,8 +120,8 @@ RUN apk update && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrapper
[PATCH] tests/vm: update openbsd to release 7.2
tests/vm: update openbsd to release 7.2 Signed-off-by: Brad Smith --- tests/vm/openbsd | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 6f1b6f5b98..eaeb201e91 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -22,8 +22,8 @@ class OpenBSDVM(basevm.BaseVM): name = "openbsd" arch = "x86_64" -link = "https://cdn.openbsd.org/pub/OpenBSD/7.1/amd64/install71.iso"; -csum = "d3a7c5b9bf890bc404304a1c96f9ee72e1d9bbcf9cc849c1133bdb0d67843396" +link = "https://cdn.openbsd.org/pub/OpenBSD/7.2/amd64/install72.iso"; +csum = "0369ef40a3329efcb978c578c7fdc7bda71e502aecec930a74b44160928c91d3" size = "20G" pkgs = [ # tools @@ -56,6 +56,9 @@ class OpenBSDVM(basevm.BaseVM): # libs: migration "zstd", + +# libs: networking +"libslirp", ] BUILD_SCRIPT = """ -- 2.38.0
Re: [PATCH v2] tests: Add sndio to the FreeBSD CI containers / VM
On 10/7/2022 4:33 PM, Warner Losh wrote: On Fri, Oct 7, 2022 at 1:21 AM Brad Smith wrote: tests: Add sndio to the FreeBSD CI containers / VM --- .gitlab-ci.d/cirrus/freebsd-12.vars | 2 +- .gitlab-ci.d/cirrus/freebsd-13.vars | 2 +- tests/docker/dockerfiles/alpine.docker | 3 +- tests/docker/dockerfiles/centos8.docker | 2 +- .../dockerfiles/debian-amd64-cross.docker | 235 - tests/docker/dockerfiles/debian-amd64.docker | 237 +- .../dockerfiles/debian-arm64-cross.docker | 233 - .../dockerfiles/debian-armel-cross.docker | 231 - .../dockerfiles/debian-armhf-cross.docker | 233 - .../dockerfiles/debian-mips64el-cross.docker | 227 - .../dockerfiles/debian-mipsel-cross.docker | 227 - .../dockerfiles/debian-ppc64el-cross.docker | 231 - .../dockerfiles/debian-s390x-cross.docker | 229 - tests/docker/dockerfiles/fedora.docker | 230 - tests/docker/dockerfiles/opensuse-leap.docker | 3 +- tests/docker/dockerfiles/ubuntu2004.docker | 235 - tests/lcitool/libvirt-ci | 2 +- tests/lcitool/projects/qemu.yml | 1 + tests/vm/freebsd | 3 + 19 files changed, 1291 insertions(+), 1275 deletions(-) This looks good to me. Why did the Linux containers need updating for the FreeBSD update? Otherwise, the changes look good to my eye Reviewed-by: Warner Losh Because the CI configs are auto-generated. When refreshing them it generates them all. The intent was to update the FreeBSD configs, but when adding the dependency to tests/lcitool/projects/qemu.yml the FreeBSD configs are updated as well as the rest. Whatever OS's have a corresponding mapping in libvirt-ci are updated.
[PATCH v2] tests: Add sndio to the FreeBSD CI containers / VM
tests: Add sndio to the FreeBSD CI containers / VM --- .gitlab-ci.d/cirrus/freebsd-12.vars | 2 +- .gitlab-ci.d/cirrus/freebsd-13.vars | 2 +- tests/docker/dockerfiles/alpine.docker| 3 +- tests/docker/dockerfiles/centos8.docker | 2 +- .../dockerfiles/debian-amd64-cross.docker | 235 - tests/docker/dockerfiles/debian-amd64.docker | 237 +- .../dockerfiles/debian-arm64-cross.docker | 233 - .../dockerfiles/debian-armel-cross.docker | 231 - .../dockerfiles/debian-armhf-cross.docker | 233 - .../dockerfiles/debian-mips64el-cross.docker | 227 - .../dockerfiles/debian-mipsel-cross.docker| 227 - .../dockerfiles/debian-ppc64el-cross.docker | 231 - .../dockerfiles/debian-s390x-cross.docker | 229 - tests/docker/dockerfiles/fedora.docker| 230 - tests/docker/dockerfiles/opensuse-leap.docker | 3 +- tests/docker/dockerfiles/ubuntu2004.docker| 235 - tests/lcitool/libvirt-ci | 2 +- tests/lcitool/projects/qemu.yml | 1 + tests/vm/freebsd | 3 + 19 files changed, 1291 insertions(+), 1275 deletions(-) diff --git a/.gitlab-ci.d/cirrus/freebsd-12.vars b/.gitlab-ci.d/cirrus/freebsd-12.vars index c3db1d7d30..e3fc3235b9 100644 --- a/.gitlab-ci.d/cirrus/freebsd-12.vars +++ b/.gitlab-ci.d/cirrus/freebsd-12.vars @@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake' NINJA='/usr/local/bin/ninja' PACKAGING_COMMAND='pkg' PIP3='/usr/local/bin/pip-3.8' -PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv perl5 pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' +PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv perl5 pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy sndio spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' PYPI_PKGS='' PYTHON='/usr/local/bin/python3' diff --git a/.gitlab-ci.d/cirrus/freebsd-13.vars b/.gitlab-ci.d/cirrus/freebsd-13.vars index d31faa787f..9f56babd9c 100644 --- a/.gitlab-ci.d/cirrus/freebsd-13.vars +++ b/.gitlab-ci.d/cirrus/freebsd-13.vars @@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake' NINJA='/usr/local/bin/ninja' PACKAGING_COMMAND='pkg' PIP3='/usr/local/bin/pip-3.8' -PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv perl5 pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' +PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv perl5 pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy sndio spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' PYPI_PKGS='' PYTHON='/usr/local/bin/python3' diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfiles/alpine.docker index 9b7541261a..094f66f4eb 100644 --- a/tests/docker/dockerfiles/alpine.docker +++ b/tests/docker/dockerfiles/alpine.docker @@ -94,6 +94,7 @@ RUN apk update && \ sdl2_image-dev \ sed \ snappy-dev \ +sndio-dev \ sparse \ spice-dev \ spice-protocol \ @@ -119,8 +120,8 @@ RUN apk update && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" ENV LANG "en_US.UTF-8" ENV MAKE "/usr/bin/make" ENV NINJA "/usr/bin/ninja"
[PATCH] tests: Add sndio to the FreeBSD CI containers / VM
tests: Add sndio to the FreeBSD CI containers / VM Signed-off-by: Brad Smith --- .gitlab-ci.d/cirrus/freebsd-12.vars | 2 +- .gitlab-ci.d/cirrus/freebsd-13.vars | 2 +- tests/vm/freebsd| 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.d/cirrus/freebsd-12.vars b/.gitlab-ci.d/cirrus/freebsd-12.vars index 1a5959810f..4a2b41a46c 100644 --- a/.gitlab-ci.d/cirrus/freebsd-12.vars +++ b/.gitlab-ci.d/cirrus/freebsd-12.vars @@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake' NINJA='/usr/local/bin/ninja' PACKAGING_COMMAND='pkg' PIP3='/usr/local/bin/pip-3.8' -PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage cmocka ctags curl cyrus-sasl dbus diffutils dtc fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv perl5 pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' +PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage cmocka ctags curl cyrus-sasl dbus diffutils dtc fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv perl5 pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy sndio spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' PYPI_PKGS='' PYTHON='/usr/local/bin/python3' diff --git a/.gitlab-ci.d/cirrus/freebsd-13.vars b/.gitlab-ci.d/cirrus/freebsd-13.vars index 5e5aafd7e5..dc306aa858 100644 --- a/.gitlab-ci.d/cirrus/freebsd-13.vars +++ b/.gitlab-ci.d/cirrus/freebsd-13.vars @@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake' NINJA='/usr/local/bin/ninja' PACKAGING_COMMAND='pkg' PIP3='/usr/local/bin/pip-3.8' -PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage cmocka ctags curl cyrus-sasl dbus diffutils dtc fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv perl5 pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' +PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage cmocka ctags curl cyrus-sasl dbus diffutils dtc fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv perl5 pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy sndio spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' PYPI_PKGS='' PYTHON='/usr/local/bin/python3' diff --git a/tests/vm/freebsd b/tests/vm/freebsd index 3643fe325d..d6ff4461ba 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -66,6 +66,9 @@ class FreeBSDVM(basevm.BaseVM): # libs: networking "libslirp", + +# libs: sndio +"sndio", ] BUILD_SCRIPT = """ -- 2.37.3
Re: [PATCH v3] audio: Add sndio backend
On 9/9/2022 2:12 AM, Volker Rümelin wrote: Am 07.09.22 um 15:23 schrieb Alexandre Ratchov: sndio is the native API used by OpenBSD, although it has been ported to other *BSD's and Linux (packages for Ubuntu, Debian, Void, Arch, etc.). Signed-off-by: Brad Smith Signed-off-by: Alexandre Ratchov --- References to the previous patch versions and related discussions are here: https://marc.info/?l=qemu-devel&m=163973393011543 (v2) https://marc.info/?l=qemu-devel&m=163626248712444 (initial patch) Here are the changes between v2 and v3 of this patch: - fixed of typos in file-names in MAINTAINERS - added Gerd Hoffmann to the M: entry in MAINTAINERS - added missin S: entry in MAINTAINERS - removed unused #include "qemu-common.h" - bumped "Since:" version to 7.2 in qapi/audio.json - regenerated scripts/meson-buildoptions.sh - implement buffer_get_free() method, introduced by commit 9833438ef624155de879d4ed57ecfcd3464a0bbe audio: restore mixing-engine playback buffer size Running "make update-buildoptions" triggered unrelated changes of scripts/meson-buildoptions.sh, that I removed from the commit as they are not related to sndio. Tested on OpenBSD, still works as expected :-) Regards, Alexandre MAINTAINERS | 7 + audio/audio.c | 1 + audio/audio_template.h | 2 + audio/meson.build | 1 + audio/sndioaudio.c | 565 ++ meson.build | 9 +- meson_options.txt | 4 +- qapi/audio.json | 25 +- qemu-options.hx | 16 + scripts/meson-buildoptions.sh | 7 +- 10 files changed, 632 insertions(+), 5 deletions(-) create mode 100644 audio/sndioaudio.c Tested again on Linux. Reviewed-by: Volker Rümelin Tested-by: Volker Rümelin ping.
Re: [PATCH] tests/vm: update NetBSD to 9.3
On September 19, 2022 9:05:31 a.m. Thomas Huth wrote: On 06/09/2022 03.04, Brad Smith wrote: tests/vm: update NetBSD to 9.3 Signed-off-by: Brad Smith --- tests/vm/netbsd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/vm/netbsd b/tests/vm/netbsd index da6773ff59..aa54338dfa 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.2/images/NetBSD-9.2-amd64.iso"; -csum = "5ee0ea101f73386b9b424f5d1041e371db3c42fdd6f4e4518dc79c4a08f31d43091ebe93425c9f0dcaaed2b51131836fe6774f33f89030b58d64709b35fda72f" +link = "https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.3/images/NetBSD-9.3-amd64.iso"; +csum = "2bfce544f762a579f61478e7106c436fc48731ff25cf6f79b392ba5752e6f5ec130364286f7471716290a5f033637cf56aacee7fedb91095face59adf36300c3" size = "20G" pkgs = [ # tools Tested-by: Thomas Huth I can pick this up for my next "testing"-related pull request. Thanks. Sent with Aqua Mail for Android https://www.aqua-mail.com
[PATCH] tests/vm: update NetBSD to 9.3
tests/vm: update NetBSD to 9.3 Signed-off-by: Brad Smith --- tests/vm/netbsd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/vm/netbsd b/tests/vm/netbsd index da6773ff59..aa54338dfa 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.2/images/NetBSD-9.2-amd64.iso"; -csum = "5ee0ea101f73386b9b424f5d1041e371db3c42fdd6f4e4518dc79c4a08f31d43091ebe93425c9f0dcaaed2b51131836fe6774f33f89030b58d64709b35fda72f" +link = "https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.3/images/NetBSD-9.3-amd64.iso"; +csum = "2bfce544f762a579f61478e7106c436fc48731ff25cf6f79b392ba5752e6f5ec130364286f7471716290a5f033637cf56aacee7fedb91095face59adf36300c3" size = "20G" pkgs = [ # tools -- 2.37.2
Re: [PATCH] tests/vm: update openbsd to release 7.1
The checksum can be found here... https://cdn.openbsd.org/pub/OpenBSD/7.1/amd64/SHA256 SHA256 (install71.iso) = d3a7c5b9bf890bc404304a1c96f9ee72e1d9bbcf9cc849c1133bdb0d67843396 On 5/5/2022 10:45 PM, Warner Losh wrote: On Thu, May 5, 2022 at 5:32 PM Brad Smith wrote: tests/vm/openbsd: Update to release 7.1 Signed-off-by: Brad Smith Reviewed-by: Warner Losh Though i didn't verify the csum. Warner --- tests/vm/openbsd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 337fe7c303..dc34b2718b 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -22,8 +22,8 @@ class OpenBSDVM(basevm.BaseVM): name = "openbsd" arch = "x86_64" - link = "https://cdn.openbsd.org/pub/OpenBSD/7.0/amd64/install70.iso"; - csum = "1882f9a23c9800e5dba3dbd2cf0126f552605c915433ef4c5bb672610a4ca3a4" + link = "https://cdn.openbsd.org/pub/OpenBSD/7.1/amd64/install71.iso"; + csum = "d3a7c5b9bf890bc404304a1c96f9ee72e1d9bbcf9cc849c1133bdb0d67843396" size = "20G" pkgs = [ # tools -- 2.36.0
[PATCH] tests/vm: update openbsd to release 7.1
tests/vm/openbsd: Update to release 7.1 Signed-off-by: Brad Smith --- tests/vm/openbsd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 337fe7c303..dc34b2718b 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -22,8 +22,8 @@ class OpenBSDVM(basevm.BaseVM): name = "openbsd" arch = "x86_64" -link = "https://cdn.openbsd.org/pub/OpenBSD/7.0/amd64/install70.iso"; -csum = "1882f9a23c9800e5dba3dbd2cf0126f552605c915433ef4c5bb672610a4ca3a4" +link = "https://cdn.openbsd.org/pub/OpenBSD/7.1/amd64/install71.iso"; +csum = "d3a7c5b9bf890bc404304a1c96f9ee72e1d9bbcf9cc849c1133bdb0d67843396" size = "20G" pkgs = [ # tools -- 2.36.0
Re: [RFC PATCH for-7.1] Remove the slirp submodule (and only compile with an external libslirp)
On 4/20/2022 6:13 AM, Thomas Huth wrote: On 19/04/2022 18.24, Daniel P. Berrangé wrote: On Mon, Apr 11, 2022 at 08:55:19AM +0200, Thomas Huth wrote: On 11/04/2022 01.50, Brad Smith wrote: On 4/10/2022 5:06 AM, Peter Maydell wrote: On Sun, 10 Apr 2022 at 05:51, Brad Smith wrote: On 4/8/2022 12:47 PM, Thomas Huth wrote: QEMU 7.1 won't support Ubuntu 18.04 anymore, so the last big important distro that did not have a pre-packaged libslirp has been dismissed. All other major distros seem to have a libslirp package in their distribution already - according to repology.org: Fedora 34: 4.4.0 CentOS 8 (RHEL-8): 4.4.0 Debian Buster: 4.3.1 (in buster-backports) OpenSUSE Leap 15.3: 4.3.1 Ubuntu LTS 20.04: 4.1.0 FreeBSD Ports: 4.6.1 NetBSD pkgsrc: 4.3.1 Homebrew: 4.6.1 MSYS2 mingw: 4.6.1 The only one that still seems to be missing a libslirp package is OpenBSD - but I assume that they can add it to their ports system quickly if required. I wish I had seen this earlier as our 7.1 release was just tagged. I have whipped up a port of 4.6.1 for OpenBSD as it was pretty simple. I will see about submitting it in a number of days when the tree opens. How awkward would it be for an end-user who's on OpenBSD 7.1 to build a QEMU that doesn't have libslirp? (That is, is it easy and common for an end user to pull in a port of libslirp that only came along in a later OpenBSD, or would they instead have to manually compile libslirp themselves from the upstream sources?) (I'm asking here because if it's painful, then we should perhaps defer dropping our submodule copy of libslirp a little longer.) thanks -- PMM They would have to pull down a -current ports tree and build it. No package would exist for the release. It is possible, but not "supported". I have not looked at the CI bits to see how difficult that would be. Our release cycles are 6 months and the next release will be in the middle of October. OK, thanks for the update, Brad ... so I guess we should defer this patch to QEMU 7.2 (to be released in december) instead? (which would be fine for me - I just wanted to get the discussion started, that's also why I've marked this patch as RFC) Perhaps make 7.1 simply issue a warning message in configure if the bundled slirp is used, to give people a heads up that they'll want to install libslirp-devel soon. Not sure if people will notice a warning in the output of "configure" ... but I've put some sentences in the ChangeLog here: https://wiki.qemu.org/ChangeLog/7.0#New_deprecated_options_and_features (which we could repeat for the 7.1 release again) I hope that helps to make people aware... Thomas Just to note.. my libslirp port went in. https://marc.info/?l=openbsd-ports-cvs&m=165070969206193&w=2 and have switched our QEMU port to build with the libslirp port.. https://marc.info/?l=openbsd-ports-cvs&m=165070979906266&w=2
Re: [RFC PATCH for-7.1] Remove the slirp submodule (and only compile with an external libslirp)
On 4/11/2022 2:55 AM, Thomas Huth wrote: On 11/04/2022 01.50, Brad Smith wrote: On 4/10/2022 5:06 AM, Peter Maydell wrote: On Sun, 10 Apr 2022 at 05:51, Brad Smith wrote: On 4/8/2022 12:47 PM, Thomas Huth wrote: QEMU 7.1 won't support Ubuntu 18.04 anymore, so the last big important distro that did not have a pre-packaged libslirp has been dismissed. All other major distros seem to have a libslirp package in their distribution already - according to repology.org: Fedora 34: 4.4.0 CentOS 8 (RHEL-8): 4.4.0 Debian Buster: 4.3.1 (in buster-backports) OpenSUSE Leap 15.3: 4.3.1 Ubuntu LTS 20.04: 4.1.0 FreeBSD Ports: 4.6.1 NetBSD pkgsrc: 4.3.1 Homebrew: 4.6.1 MSYS2 mingw: 4.6.1 The only one that still seems to be missing a libslirp package is OpenBSD - but I assume that they can add it to their ports system quickly if required. I wish I had seen this earlier as our 7.1 release was just tagged. I have whipped up a port of 4.6.1 for OpenBSD as it was pretty simple. I will see about submitting it in a number of days when the tree opens. How awkward would it be for an end-user who's on OpenBSD 7.1 to build a QEMU that doesn't have libslirp? (That is, is it easy and common for an end user to pull in a port of libslirp that only came along in a later OpenBSD, or would they instead have to manually compile libslirp themselves from the upstream sources?) (I'm asking here because if it's painful, then we should perhaps defer dropping our submodule copy of libslirp a little longer.) thanks -- PMM They would have to pull down a -current ports tree and build it. No package would exist for the release. It is possible, but not "supported". I have not looked at the CI bits to see how difficult that would be. Our release cycles are 6 months and the next release will be in the middle of October. OK, thanks for the update, Brad ... so I guess we should defer this patch to QEMU 7.2 (to be released in december) instead? (which would be fine for me - I just wanted to get the discussion started, that's also why I've marked this patch as RFC) I would prefer that. My libslirp port will be going in in the next couple days and packages for -current snaps will be built. Our 7.2 release should be out well before the next QEMU release.
Re: [RFC PATCH for-7.1] Remove the slirp submodule (and only compile with an external libslirp)
On 4/10/2022 5:06 AM, Peter Maydell wrote: On Sun, 10 Apr 2022 at 05:51, Brad Smith wrote: On 4/8/2022 12:47 PM, Thomas Huth wrote: QEMU 7.1 won't support Ubuntu 18.04 anymore, so the last big important distro that did not have a pre-packaged libslirp has been dismissed. All other major distros seem to have a libslirp package in their distribution already - according to repology.org: Fedora 34: 4.4.0 CentOS 8 (RHEL-8): 4.4.0 Debian Buster: 4.3.1 (in buster-backports) OpenSUSE Leap 15.3: 4.3.1 Ubuntu LTS 20.04: 4.1.0 FreeBSD Ports: 4.6.1 NetBSD pkgsrc: 4.3.1 Homebrew: 4.6.1 MSYS2 mingw: 4.6.1 The only one that still seems to be missing a libslirp package is OpenBSD - but I assume that they can add it to their ports system quickly if required. I wish I had seen this earlier as our 7.1 release was just tagged. I have whipped up a port of 4.6.1 for OpenBSD as it was pretty simple. I will see about submitting it in a number of days when the tree opens. How awkward would it be for an end-user who's on OpenBSD 7.1 to build a QEMU that doesn't have libslirp? (That is, is it easy and common for an end user to pull in a port of libslirp that only came along in a later OpenBSD, or would they instead have to manually compile libslirp themselves from the upstream sources?) (I'm asking here because if it's painful, then we should perhaps defer dropping our submodule copy of libslirp a little longer.) thanks -- PMM They would have to pull down a -current ports tree and build it. No package would exist for the release. It is possible, but not "supported". I have not looked at the CI bits to see how difficult that would be. Our release cycles are 6 months and the next release will be in the middle of October.
Re: [RFC PATCH for-7.1] Remove the slirp submodule (and only compile with an external libslirp)
On 4/8/2022 12:47 PM, Thomas Huth wrote: QEMU 7.1 won't support Ubuntu 18.04 anymore, so the last big important distro that did not have a pre-packaged libslirp has been dismissed. All other major distros seem to have a libslirp package in their distribution already - according to repology.org: Fedora 34: 4.4.0 CentOS 8 (RHEL-8): 4.4.0 Debian Buster: 4.3.1 (in buster-backports) OpenSUSE Leap 15.3: 4.3.1 Ubuntu LTS 20.04: 4.1.0 FreeBSD Ports: 4.6.1 NetBSD pkgsrc: 4.3.1 Homebrew: 4.6.1 MSYS2 mingw: 4.6.1 The only one that still seems to be missing a libslirp package is OpenBSD - but I assume that they can add it to their ports system quickly if required. So there is no real urgent need for keeping the slirp submodule in the QEMU tree anymore. Thus let's drop the slirp submodule now and rely on the libslirp packages from the distributions instead. Signed-off-by: Thomas Huth I wish I had seen this earlier as our 7.1 release was just tagged. I have whipped up a port of 4.6.1 for OpenBSD as it was pretty simple. I will see about submitting it in a number of days when the tree opens.
Re: [PULL 18/30] configure, meson: move guest-agent, tools to meson
Trying out 7.0.0-rc0 I noticed after this commit that the guest agent does not build on the BSD's and macOS. From the configure scrip it went from.. elif [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" -o "$mingw32" = "yes" ] ; then guest_agent=yes to this in meson.build.. have_ga = get_option('guest_agent') \ .disable_auto_if(not have_system and not have_tools) \ .require(targetos in ['sunos', 'linux', 'windows'], So Linux, Solaris and Windows are listed but not the BSD's and macOS. On 2/15/2022 4:32 AM, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini --- configure | 48 ++-- contrib/vhost-user-gpu/meson.build | 2 +- docs/meson.build | 2 -- meson.build| 50 -- meson_options.txt | 4 +++ qga/meson.build| 7 + scripts/meson-buildoptions.sh | 6 tests/Makefile.include | 2 +- tests/unit/meson.build | 4 +-- 9 files changed, 50 insertions(+), 75 deletions(-) diff --git a/configure b/configure index 9230ebd4a8..a66e2c0d71 100755 --- a/configure +++ b/configure @@ -317,10 +317,8 @@ pie="" trace_backends="log" trace_file="trace" opengl="$default_feature" -guest_agent="$default_feature" vss_win32_sdk="$default_feature" win_sdk="no" -want_tools="$default_feature" coroutine="" tls_priority="NORMAL" plugins="$default_feature" @@ -960,10 +958,6 @@ for opt do ;; --disable-zlib-test) ;; - --enable-guest-agent) guest_agent="yes" - ;; - --disable-guest-agent) guest_agent="no" - ;; --with-vss-sdk) vss_win32_sdk="" ;; --with-vss-sdk=*) vss_win32_sdk="$optarg" @@ -976,10 +970,6 @@ for opt do ;; --without-win-sdk) win_sdk="no" ;; - --enable-tools) want_tools="yes" - ;; - --disable-tools) want_tools="no" - ;; --disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane) echo "$0: $opt is obsolete, virtio-blk data-plane is always on" >&2 ;; @@ -1256,7 +1246,6 @@ cat << EOF usersupported user emulation targets linux-user all linux usermode emulation targets bsd-userall BSD usermode emulation targets - guest-agent build the QEMU Guest Agent pie Position Independent Executables modules modules support (non-Windows) module-upgrades try to load modules from alternate paths for upgrades @@ -1275,7 +1264,6 @@ cat << EOF vhost-user vhost-user backend support vhost-vdpa vhost-vdpa kernel backend support opengl opengl support - tools build qemu-io, qemu-nbd and qemu-img tools gio libgio support NOTE: The object files are built at the place where configure is launched @@ -1678,16 +1666,6 @@ else exit 1 fi -## -# system tools -if test -z "$want_tools"; then -if test "$softmmu" = "no"; then -want_tools=no -else -want_tools=yes -fi -fi - # # vhost interdependencies and host support @@ -2344,7 +2322,7 @@ fi # check if we have VSS SDK headers for win guest_agent_with_vss="no" -if test "$mingw32" = "yes" && test "$guest_agent" != "no" && \ +if test "$mingw32" = "yes" && \ test "$vss_win32_sdk" != "no" ; then case "$vss_win32_sdk" in "") vss_win32_include="-isystem $source_path" ;; @@ -2381,7 +2359,7 @@ fi # VSS provider from the source. It is usually unnecessary because the # pre-compiled .tlb file is included. -if test "$mingw32" = "yes" && test "$guest_agent" != "no" && \ +if test "$mingw32" = "yes" && \ test "$guest_agent_with_vss" = "yes" ; then if test -z "$win_sdk"; then programfiles="$PROGRAMFILES" @@ -2399,7 +2377,7 @@ fi ## # check if mingw environment provides a recent ntddscsi.h guest_agent_ntddscsi="no" -if test "$mingw32" = "yes" && test "$guest_agent" != "no"; then +if test "$mingw32" = "yes"; then cat > $TMPC << EOF #include #include @@ -2825,20 +2803,6 @@ if test "$mingw32" = "yes" ; then done fi -# Probe for guest agent support/options - -if [ "$guest_agent" != "no" ]; then - if [ "$softmmu" = no -a "$want_tools" = no ] ; then - guest_agent=no - elif [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" -o "$mingw32" = "yes" ] ; then - guest_agent=yes - elif [ "$guest_agent" != yes ]; then - guest_agent=no - else - error_exit "Guest agent is not supported on this platform" - fi -fi - # Guest agent Windows MSI package if test "$QEMU_GA_MANUFACTURER" = ""; then @@ -2968,12 +2932,6 @@ fi if test "$static" = "yes" ; then echo "CONFIG_STATIC=y" >> $config_host_mak fi -if test "$want_tools" = "yes" ; then - echo "CONFIG_TOOLS=y" >> $config_host_mak -fi -if test "$guest_agent" =
Re: [PATCH v2] audio: Add sndio backend
On 12/19/2021 4:07 PM, Volker Rümelin wrote: Hi Alexandre, sndio is the native API used by OpenBSD, although it has been ported to other *BSD's and Linux (packages for Ubuntu, Debian, Void, Arch, etc.). Signed-off-by: Brad Smith Signed-off-by: Alexandre Ratchov --- Thank you for the reviews and all the comments. Here's a second diff with all the suggested changes: - Replace ISC license by SPDX-License-Identifier header - Fix units (milli- vs micro-) in comment about SNDIO_LATENCY_US - Drop outdated comment about the "size" argument of sndio_get_buffer_out() - Fix AUDIO_FORMAT_U32 handling (missing "break" statement) - Set {read,write] methods to audio_generic_{read,write} (fixes craches) - Check if backend is enabled in sndio_poll_event() - Usehttps://sndio.org in description - Mark options as available after 7.0 release (instead of 6.2) - Describe sndio-specific options (dev, latency) in qemu-options.hx - Add myself as reviewer to MAINTAINERS - Style fixes: no space after function names, use 4-space indent - Don't use "return foo()" if foo() returns void - Include backend to audio_drivers_priority[] Tested on OpenBSD, works as expected! MAINTAINERS | 5 + audio/audio.c | 1 + audio/audio_template.h | 2 + audio/meson.build | 1 + audio/sndioaudio.c | 555 + meson.build | 9 +- meson_options.txt | 4 +- I just noticed you changed meson_options.txt but you forgot to regenerate scripts/meson-buildoptions.sh with make update-buildoptions in your build directory. See docs/devel/build-system.rst. My bad. That was me. We were discussing the diff before Alexandre posted it. I was not sure if the auto-generated file should be touched. And I'm still convinced you should CC all maintainers of the files this patch changes. With best regards, Volker qapi/audio.json | 25 +- qemu-options.hx | 16 ++ tests/vm/freebsd | 3 + 10 files changed, 618 insertions(+), 3 deletions(-)
[PATCH v2] FreeBSD: Upgrade to 12.3 release
FreeBSD: Upgrade to 12.3 release Note, since libtasn1 was fixed in 12.3 [*], this commit re-enables GnuTLS. [*] https://gitlab.com/gnutls/libtasn1/-/merge_requests/71 Signed-off-by: Brad Smith Tested-by: Thomas Huth Reviewed-by: Warner Losh --- .gitlab-ci.d/cirrus.yml | 5 + tests/vm/freebsd| 8 +++- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.d/cirrus.yml b/.gitlab-ci.d/cirrus.yml index d273a9e713..18ded37c77 100644 --- a/.gitlab-ci.d/cirrus.yml +++ b/.gitlab-ci.d/cirrus.yml @@ -52,14 +52,11 @@ x64-freebsd-12-build: NAME: freebsd-12 CIRRUS_VM_INSTANCE_TYPE: freebsd_instance CIRRUS_VM_IMAGE_SELECTOR: image_family -CIRRUS_VM_IMAGE_NAME: freebsd-12-2 +CIRRUS_VM_IMAGE_NAME: freebsd-12-3 CIRRUS_VM_CPUS: 8 CIRRUS_VM_RAM: 8G UPDATE_COMMAND: pkg update INSTALL_COMMAND: pkg install -y -# TODO: Enable gnutls again once FreeBSD's libtasn1 got fixed -# See: https://gitlab.com/gnutls/libtasn1/-/merge_requests/71 -CONFIGURE_ARGS: --disable-gnutls TEST_TARGETS: check x64-freebsd-13-build: diff --git a/tests/vm/freebsd b/tests/vm/freebsd index 6e20e84322..805db759d6 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -28,8 +28,8 @@ class FreeBSDVM(basevm.BaseVM): name = "freebsd" arch = "x86_64" -link = "https://download.freebsd.org/ftp/releases/ISO-IMAGES/12.2/FreeBSD-12.2-RELEASE-amd64-disc1.iso.xz"; -csum = "a4530246cafbf1dd42a9bd3ea441ca9a78a6a0cd070278cbdf63f3a6f803ecae" +link = "https://download.freebsd.org/ftp/releases/ISO-IMAGES/12.3/FreeBSD-12.3-RELEASE-amd64-disc1.iso.xz"; +csum = "36dd0de50f1fe5f0a88e181e94657656de26fb64254412f74e80e128e8b938b4" size = "20G" pkgs = [ # build tools @@ -65,8 +65,6 @@ class FreeBSDVM(basevm.BaseVM): "zstd", ] -# TODO: Enable gnutls again once FreeBSD's libtasn1 got fixed -# See: https://gitlab.com/gnutls/libtasn1/-/merge_requests/71 BUILD_SCRIPT = """ set -e; rm -rf /home/qemu/qemu-test.* @@ -74,7 +72,7 @@ class FreeBSDVM(basevm.BaseVM): mkdir src build; cd src; tar -xf /dev/vtbd1; cd ../build -../src/configure --python=python3.7 --disable-gnutls {configure_opts}; +../src/configure --python=python3.7 {configure_opts}; gmake --output-sync -j{jobs} {target} {verbose}; """ -- 2.34.1
[PATCH] FreeBSD: Upgrade to 12.3 release
FreeBSD: Upgrade to 12.3 release Signed-off-by: Brad Smith Tested-by: Thomas Huth --- .gitlab-ci.d/cirrus.yml | 5 + tests/vm/freebsd| 8 +++- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.d/cirrus.yml b/.gitlab-ci.d/cirrus.yml index d273a9e713..18ded37c77 100644 --- a/.gitlab-ci.d/cirrus.yml +++ b/.gitlab-ci.d/cirrus.yml @@ -52,14 +52,11 @@ x64-freebsd-12-build: NAME: freebsd-12 CIRRUS_VM_INSTANCE_TYPE: freebsd_instance CIRRUS_VM_IMAGE_SELECTOR: image_family -CIRRUS_VM_IMAGE_NAME: freebsd-12-2 +CIRRUS_VM_IMAGE_NAME: freebsd-12-3 CIRRUS_VM_CPUS: 8 CIRRUS_VM_RAM: 8G UPDATE_COMMAND: pkg update INSTALL_COMMAND: pkg install -y -# TODO: Enable gnutls again once FreeBSD's libtasn1 got fixed -# See: https://gitlab.com/gnutls/libtasn1/-/merge_requests/71 -CONFIGURE_ARGS: --disable-gnutls TEST_TARGETS: check x64-freebsd-13-build: diff --git a/tests/vm/freebsd b/tests/vm/freebsd index 6e20e84322..805db759d6 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -28,8 +28,8 @@ class FreeBSDVM(basevm.BaseVM): name = "freebsd" arch = "x86_64" -link = "https://download.freebsd.org/ftp/releases/ISO-IMAGES/12.2/FreeBSD-12.2-RELEASE-amd64-disc1.iso.xz"; -csum = "a4530246cafbf1dd42a9bd3ea441ca9a78a6a0cd070278cbdf63f3a6f803ecae" +link = "https://download.freebsd.org/ftp/releases/ISO-IMAGES/12.3/FreeBSD-12.3-RELEASE-amd64-disc1.iso.xz"; +csum = "36dd0de50f1fe5f0a88e181e94657656de26fb64254412f74e80e128e8b938b4" size = "20G" pkgs = [ # build tools @@ -65,8 +65,6 @@ class FreeBSDVM(basevm.BaseVM): "zstd", ] -# TODO: Enable gnutls again once FreeBSD's libtasn1 got fixed -# See: https://gitlab.com/gnutls/libtasn1/-/merge_requests/71 BUILD_SCRIPT = """ set -e; rm -rf /home/qemu/qemu-test.* @@ -74,7 +72,7 @@ class FreeBSDVM(basevm.BaseVM): mkdir src build; cd src; tar -xf /dev/vtbd1; cd ../build -../src/configure --python=python3.7 --disable-gnutls {configure_opts}; +../src/configure --python=python3.7 {configure_opts}; gmake --output-sync -j{jobs} {target} {verbose}; """ -- 2.34.1
Re: [PATCH v2 for-6.2] meson.build: Support ncurses on MacOS and OpenBSD
On 11/17/2021 3:53 PM, Stefan Weil wrote: MacOS provides header files for curses 5.7 with support for wide characters, but requires _XOPEN_SOURCE_EXTENDED=1 to activate that. By default those old header files are used even if there is a newer Homebrew installation of ncurses 6.2 available. Change also the old macro definition of NCURSES_WIDECHAR and set it to 1 like it is done in newer versions of curses.h when _XOPEN_SOURCE_EXTENDED=1 is defined. OpenBSD has the same version of ncurses and needs the same fix. Suggested-by: Daniel P. Berrangé Signed-off-by: Stefan Weil --- v2: - Only define _XOPEN_SOURCE_EXTENDED when curses.h is used. - Extended to fix OpenBSD, too (untested!) meson.build | 5 - ui/curses.c | 4 2 files changed, 8 insertions(+), 1 deletion(-) Tested-by: Brad Smith
Re: [PATCH] audio: Add sndio backend
On 11/14/2021 8:18 AM, Christian Schoenebeck wrote: On Samstag, 13. November 2021 21:40:39 CET Brad Smith wrote: On 11/8/2021 8:03 AM, Christian Schoenebeck wrote: On Sonntag, 7. November 2021 06:19:26 CET Brad Smith wrote: audio: Add sndio backend Add a sndio backend. Hi Brad! sndio is the native API used by OpenBSD, although it has been ported to other *BSD's and Linux (packages for Ubuntu, Debian, Void, Arch, etc.). The C code is from Alexandre Ratchov and the rest of the bits are from me. A Signed-off-by: line is mandatory for all QEMU patches: https://wiki.qemu.org/Contribute/SubmitAPatch Ah, I was not aware of that. I usually include it but it was an oversight this time. Also, it should be clear from the patches who did what exactly, either by splitting the patches up and assigning the respective authors accordingly, or by making the person with the most relevant work the patch author and describing in the commit log additional authors and what they have added/ changed, along with their Signed-off-by: line: Signed-off-by: Alexandre Ratchov [Brad Smith: - Added foo - Some other change] Signed-off-by: Brad Smith I think I'll go with this. http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/ Documentation/SubmittingPatches? id=f6f94e2ab1b33f0082ac22d71f66385a60d8157f#n297 Please CC those involved authors. Will do. I added Alexandre Ratchov on CC as he seems to be the primary author of this patch series. --- audio/audio.c | 1 + audio/audio_template.h | 2 + audio/meson.build | 1 + audio/sndioaudio.c | 555 + meson.build| 7 + meson_options.txt | 4 +- qapi/audio.json| 25 +- qemu-options.hx| 8 + tests/vm/freebsd | 3 + 9 files changed, 604 insertions(+), 2 deletions(-) An additional subsection for this backend should be added to MAINTAINERS. I did not add anything here as I figured it implies a certain level of obligation. His time available varies quite a bit (especially at the current time) and I wasn't sure if it's appropriate listing him. Yes, that's an unpleasant but legitimate question: will there be anybody caring for this sndio backend in QEMU or would it go orphaned right from the start? Orphaned from the start makes it sound like we're dumping code and walking away. When I say obligation I mean say responding withing say 3 - 4 days for some sort of an issue vs say maybe taking 1.5 - 2 weeks to respond. It would be good to have at least somebody familiar with this code to volunteer as reviewer(s) ("R:" line(s) in MAINTAINERS file). Reviewers are automatically CCed, so that they can (optionally) give their feedback on future changes to the sndio backend, i.e. when somebody sends sndio patches to qemu-devel. This is voluntary and can be revoked at any time, and I do not expect that you would frequently get emailed for this either. That sounds reasonable. I'll prod Alexandre further about responding. As this is a BSD-specific audio backend, it is not likely that an active QEMU developer would be able to care for it. I would not say it is BSD-specific. sndio is also packaged and available on a good number of Linux OS's (Alpine, Arch, Gentoo, Magia, Manjaro and some others). I know I have seen some Gentoo users around testing and contributing to sndio backends. Some use it as their default sound API (Void Linux for example). There are older packages for Debian / Ubuntu that unfortunately don't have the pkg-config file. create mode 100644 audio/sndioaudio.c diff --git a/audio/audio.c b/audio/audio.c index 54a153c0ef..bad1ceb69e 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -2005,6 +2005,7 @@ void audio_create_pdos(Audiodev *dev) CASE(OSS, oss, Oss); CASE(PA, pa, Pa); CASE(SDL, sdl, Sdl); +CASE(SNDIO, sndio, ); CASE(SPICE, spice, ); CASE(WAV, wav, ); diff --git a/audio/audio_template.h b/audio/audio_template.h index c6714946aa..ecc5a0bc6d 100644 --- a/audio/audio_template.h +++ b/audio/audio_template.h @@ -337,6 +337,8 @@ AudiodevPerDirectionOptions *glue(audio_get_pdo_, TYPE)(Audiodev *dev) return qapi_AudiodevPaPerDirectionOptions_base(dev->u.pa.TYPE); case AUDIODEV_DRIVER_SDL: return qapi_AudiodevSdlPerDirectionOptions_base(dev->u.sdl.TYPE); +case AUDIODEV_DRIVER_SNDIO: +return dev->u.sndio.TYPE; case AUDIODEV_DRIVER_SPICE: return dev->u.spice.TYPE; case AUDIODEV_DRIVER_WAV: diff --git a/audio/meson.build b/audio/meson.build index 462533bb8c..e24c86e7e6 100644 --- a/audio/meson.build +++ b/audio/meson.build @@ -17,6 +17,7 @@ foreach m : [ ['pa', pulse, files('paaudio.c')], ['sdl', sdl, files('sdlaudio.c')], [
Re: [PATCH] audio: Add sndio backend
On 11/10/2021 1:22 AM, WANG Xuerui wrote: On 2021/11/7 13:19, Brad Smith wrote: audio: Add sndio backend Add a sndio backend. sndio is the native API used by OpenBSD, although it has been ported to other *BSD's and Linux (packages for Ubuntu, Debian, Void, Arch, etc.). The C code is from Alexandre Ratchov and the rest of the bits are from me. As pointed out by others, this is lacking Signed-off-by lines; IIUC you may contact Alexandre to get theirs, and then add yours. I'm not familiar with this part of qemu, so what follows is only a somewhat brief review. That said... --- audio/audio.c | 1 + audio/audio_template.h | 2 + audio/meson.build | 1 + audio/sndioaudio.c | 555 + meson.build| 7 + meson_options.txt | 4 +- qapi/audio.json| 25 +- qemu-options.hx| 8 + tests/vm/freebsd | 3 + 9 files changed, 604 insertions(+), 2 deletions(-) create mode 100644 audio/sndioaudio.c diff --git a/audio/sndioaudio.c b/audio/sndioaudio.c new file mode 100644 index 00..204af07781 --- /dev/null +++ b/audio/sndioaudio.c @@ -0,0 +1,555 @@ +/* + * Copyright (c) 2019 Alexandre Ratchov + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ Perhaps using an SPDX license identifier would be better? Have done so. + +/* + * TODO : + * + * Use a single device and open it in full-duplex rather than + * opening it twice (once for playback once for recording). + * + * This is the only way to ensure that playback doesn't drift with respect + * to recording, which is what guest systems expect. + */ + +#include +#include +#include "qemu/osdep.h" +#include "qemu-common.h" +#include "qemu/main-loop.h" +#include "audio.h" +#include "trace.h" + +#define AUDIO_CAP "sndio" +#include "audio_int.h" + +/* default latency in ms if no option is set */ +#define SNDIO_LATENCY_US 5 Maybe you mean "microseconds" in the comment? 50 *seconds* seems a bit long ;) I have corrected the comment.
Re: [PATCH] audio: Add sndio backend
On 11/8/2021 9:58 AM, Paolo Bonzini wrote: On 11/7/21 06:19, Brad Smith wrote: if not get_option('spice_protocol').auto() or have_system @@ -1301,6 +1306,7 @@ if have_system 'oss': oss.found(), 'pa': pulse.found(), 'sdl': sdl.found(), + 'sndio': sndio.found(), } foreach k, v: audio_drivers_available config_host_data.set('CONFIG_AUDIO_' + k.to_upper(), v) Maybe you want to add sndio to the audio_drivers_priority array if targetos == 'openbsd'? Paolo I see what to do there now. When I first came across it I wasn't sure.
Re: [PATCH] audio: Add sndio backend
On 11/8/2021 8:03 AM, Christian Schoenebeck wrote: On Sonntag, 7. November 2021 06:19:26 CET Brad Smith wrote: audio: Add sndio backend Add a sndio backend. Hi Brad! sndio is the native API used by OpenBSD, although it has been ported to other *BSD's and Linux (packages for Ubuntu, Debian, Void, Arch, etc.). The C code is from Alexandre Ratchov and the rest of the bits are from me. A Signed-off-by: line is mandatory for all QEMU patches: https://wiki.qemu.org/Contribute/SubmitAPatch Ah, I was not aware of that. I usually include it but it was an oversight this time. Also, it should be clear from the patches who did what exactly, either by splitting the patches up and assigning the respective authors accordingly, or by making the person with the most relevant work the patch author and describing in the commit log additional authors and what they have added/ changed, along with their Signed-off-by: line: Signed-off-by: Alexandre Ratchov [Brad Smith: - Added foo - Some other change] Signed-off-by: Brad Smith I think I'll go with this. http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/ Documentation/SubmittingPatches? id=f6f94e2ab1b33f0082ac22d71f66385a60d8157f#n297 Please CC those involved authors. Will do. --- audio/audio.c | 1 + audio/audio_template.h | 2 + audio/meson.build | 1 + audio/sndioaudio.c | 555 + meson.build| 7 + meson_options.txt | 4 +- qapi/audio.json| 25 +- qemu-options.hx| 8 + tests/vm/freebsd | 3 + 9 files changed, 604 insertions(+), 2 deletions(-) An additional subsection for this backend should be added to MAINTAINERS. I did not add anything here as I figured it implies a certain level of obligation. His time available varies quite a bit (especially at the current time) and I wasn't sure if it's appropriate listing him. create mode 100644 audio/sndioaudio.c diff --git a/audio/audio.c b/audio/audio.c index 54a153c0ef..bad1ceb69e 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -2005,6 +2005,7 @@ void audio_create_pdos(Audiodev *dev) CASE(OSS, oss, Oss); CASE(PA, pa, Pa); CASE(SDL, sdl, Sdl); +CASE(SNDIO, sndio, ); CASE(SPICE, spice, ); CASE(WAV, wav, ); diff --git a/audio/audio_template.h b/audio/audio_template.h index c6714946aa..ecc5a0bc6d 100644 --- a/audio/audio_template.h +++ b/audio/audio_template.h @@ -337,6 +337,8 @@ AudiodevPerDirectionOptions *glue(audio_get_pdo_, TYPE)(Audiodev *dev) return qapi_AudiodevPaPerDirectionOptions_base(dev->u.pa.TYPE); case AUDIODEV_DRIVER_SDL: return qapi_AudiodevSdlPerDirectionOptions_base(dev->u.sdl.TYPE); +case AUDIODEV_DRIVER_SNDIO: +return dev->u.sndio.TYPE; case AUDIODEV_DRIVER_SPICE: return dev->u.spice.TYPE; case AUDIODEV_DRIVER_WAV: diff --git a/audio/meson.build b/audio/meson.build index 462533bb8c..e24c86e7e6 100644 --- a/audio/meson.build +++ b/audio/meson.build @@ -17,6 +17,7 @@ foreach m : [ ['pa', pulse, files('paaudio.c')], ['sdl', sdl, files('sdlaudio.c')], ['jack', jack, files('jackaudio.c')], + ['sndio', sndio, files('sndioaudio.c')], ['spice', spice, files('spiceaudio.c')] ] if m[1].found() diff --git a/audio/sndioaudio.c b/audio/sndioaudio.c new file mode 100644 index 00..204af07781 --- /dev/null +++ b/audio/sndioaudio.c @@ -0,0 +1,555 @@ +/* + * Copyright (c) 2019 Alexandre Ratchov + * It is quite common for new source files in QEMU to have an authors list section in the header here like: * Autors: * Alexandre Ratchov I was looking through the tree and all of the examples I came across were using this with a Copyright for a company as opposed to an individual. What would be the format? That way scripts/get_maintainer.pl can suggest those people as well in case they are not explicitly listed in MAINTAINERS. Does not seem to be mandatory for QEMU though. Just saying.
Re: [PATCH] audio: Add sndio backend
On 11/8/2021 9:58 AM, Paolo Bonzini wrote: On 11/7/21 06:19, Brad Smith wrote: if not get_option('spice_protocol').auto() or have_system @@ -1301,6 +1306,7 @@ if have_system 'oss': oss.found(), 'pa': pulse.found(), 'sdl': sdl.found(), + 'sndio': sndio.found(), } foreach k, v: audio_drivers_available config_host_data.set('CONFIG_AUDIO_' + k.to_upper(), v) Maybe you want to add sndio to the audio_drivers_priority array if targetos == 'openbsd'? That part I was not 100% sure of. Am I to understand with the current Meson code it will try to use PulseAudio instead of ALSA on a Linux system unless overrriden?
[PATCH] audio: Add sndio backend
audio: Add sndio backend Add a sndio backend. sndio is the native API used by OpenBSD, although it has been ported to other *BSD's and Linux (packages for Ubuntu, Debian, Void, Arch, etc.). The C code is from Alexandre Ratchov and the rest of the bits are from me. --- audio/audio.c | 1 + audio/audio_template.h | 2 + audio/meson.build | 1 + audio/sndioaudio.c | 555 + meson.build| 7 + meson_options.txt | 4 +- qapi/audio.json| 25 +- qemu-options.hx| 8 + tests/vm/freebsd | 3 + 9 files changed, 604 insertions(+), 2 deletions(-) create mode 100644 audio/sndioaudio.c diff --git a/audio/audio.c b/audio/audio.c index 54a153c0ef..bad1ceb69e 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -2005,6 +2005,7 @@ void audio_create_pdos(Audiodev *dev) CASE(OSS, oss, Oss); CASE(PA, pa, Pa); CASE(SDL, sdl, Sdl); +CASE(SNDIO, sndio, ); CASE(SPICE, spice, ); CASE(WAV, wav, ); diff --git a/audio/audio_template.h b/audio/audio_template.h index c6714946aa..ecc5a0bc6d 100644 --- a/audio/audio_template.h +++ b/audio/audio_template.h @@ -337,6 +337,8 @@ AudiodevPerDirectionOptions *glue(audio_get_pdo_, TYPE)(Audiodev *dev) return qapi_AudiodevPaPerDirectionOptions_base(dev->u.pa.TYPE); case AUDIODEV_DRIVER_SDL: return qapi_AudiodevSdlPerDirectionOptions_base(dev->u.sdl.TYPE); +case AUDIODEV_DRIVER_SNDIO: +return dev->u.sndio.TYPE; case AUDIODEV_DRIVER_SPICE: return dev->u.spice.TYPE; case AUDIODEV_DRIVER_WAV: diff --git a/audio/meson.build b/audio/meson.build index 462533bb8c..e24c86e7e6 100644 --- a/audio/meson.build +++ b/audio/meson.build @@ -17,6 +17,7 @@ foreach m : [ ['pa', pulse, files('paaudio.c')], ['sdl', sdl, files('sdlaudio.c')], ['jack', jack, files('jackaudio.c')], + ['sndio', sndio, files('sndioaudio.c')], ['spice', spice, files('spiceaudio.c')] ] if m[1].found() diff --git a/audio/sndioaudio.c b/audio/sndioaudio.c new file mode 100644 index 00..204af07781 --- /dev/null +++ b/audio/sndioaudio.c @@ -0,0 +1,555 @@ +/* + * Copyright (c) 2019 Alexandre Ratchov + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * TODO : + * + * Use a single device and open it in full-duplex rather than + * opening it twice (once for playback once for recording). + * + * This is the only way to ensure that playback doesn't drift with respect + * to recording, which is what guest systems expect. + */ + +#include +#include +#include "qemu/osdep.h" +#include "qemu-common.h" +#include "qemu/main-loop.h" +#include "audio.h" +#include "trace.h" + +#define AUDIO_CAP "sndio" +#include "audio_int.h" + +/* default latency in ms if no option is set */ +#define SNDIO_LATENCY_US 5 + +typedef struct SndioVoice { +union { +HWVoiceOut out; +HWVoiceIn in; +} hw; +struct sio_par par; +struct sio_hdl *hdl; +struct pollfd *pfds; +struct pollindex { +struct SndioVoice *self; +int index; +} *pindexes; +unsigned char *buf; +size_t buf_size; +size_t sndio_pos; +size_t qemu_pos; +unsigned int mode; +unsigned int nfds; +} SndioVoice; + +typedef struct SndioConf { +const char *devname; +unsigned int latency; +} SndioConf; + +/* needed for forward reference */ +static void sndio_poll_in(void *arg); +static void sndio_poll_out(void *arg); + +/* + * stop polling descriptors + */ +static void sndio_poll_clear(SndioVoice *self) +{ +struct pollfd *pfd; +int i; + +for (i = 0; i < self->nfds; i++) { +pfd = &self->pfds[i]; +qemu_set_fd_handler (pfd->fd, NULL, NULL, NULL); +} + +self->nfds = 0; +} + +/* + * write data to the device until it blocks or + * all of our buffered data is written + */ +static void sndio_write(SndioVoice *self) +{ +size_t todo, n; + +todo = self->qemu_pos - self->sndio_pos; + +/* + * transfer data to device, until it blocks + */ +while (todo > 0) { +n = sio_write(self->hdl, self->buf + self->sndio_pos, todo); +if (n == 0) { +break; +} +self->sndio_pos += n; +todo -= n; +} + +if (self->s
Re: [PATCH] tests/vm: update openbsd to release 7.0
On 10/18/2021 2:28 AM, Thomas Huth wrote: On 17/10/2021 00.56, Brad Smith wrote: tests/vm: update openbsd to release 7.0 Signed-off-by: Brad Smith --- tests/vm/openbsd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/vm/openbsd b/tests/vm/openbsd index c4c78a80f1..abf510e117 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -22,8 +22,8 @@ class OpenBSDVM(basevm.BaseVM): name = "openbsd" arch = "x86_64" - link = "https://cdn.openbsd.org/pub/OpenBSD/6.9/amd64/install69.iso"; - csum = "140d26548aec680e34bb5f82295414228e7f61e4f5e7951af066014fda2d6e43" + link = "https://cdn.openbsd.org/pub/OpenBSD/7.0/amd64/install70.iso"; + csum = "1882f9a23c9800e5dba3dbd2cf0126f552605c915433ef4c5bb672610a4ca3a4" size = "20G" pkgs = [ # tools That does not work for me. It hangs in the "DNS domain ..." line until it times out. When I disable that line with: diff --git a/tests/vm/openbsd b/tests/vm/openbsd index abf510e117..dfefb6bba3 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -98,7 +100,7 @@ class OpenBSDVM(basevm.BaseVM): self.console_wait_send("IPv4 address", "dhcp\n") self.console_wait_send("IPv6 address", "none\n") self.console_wait_send("Which network interface", "done\n") - self.console_wait_send("DNS domain name", "localnet\n") + #self.console_wait_send("DNS domain name", "localnet\n") self.console_wait("Password for root account") self.console_send("%s\n" % self._config["root_pass"]) self.console_wait("Password for root account") ... then it succeeds the installation... could you please check with a fresh install on your side whether you could reproduce this problem? I was actually looking at that particular line when looking at the other diff Richard sent out. With the installer sub-routine the question is only asked under a set of conditions and since there is only one physical interface as far as I know of and using DHCP then that question is never asked. I don't see it when I was verifying the steps. # Get & apply fqdn to hostname. Don't ask if there's only one configured # interface and if it's managed by dhclient and if the domain name is # configured via dhclient too. resp="${_dn:-$(get_fqdn)}" if ifconfig dhcp >/dev/null 2>&1 && [[ $NIFS == 1 && -z $_dn ]]; then # If we have a 'domain-name' option in the lease file use that. # It might *NOT* not be the same as the first domain in any # 'domain-search' option. set -- $(get_ifs dhcp) set -- $(lease_value /var/db/dhcpleased/$1 domain-name) [[ -n $1 ]] && resp=$1 echo "Using DNS domainname $resp" else ask "DNS domain name? (e.g. 'example.com')" "$resp" fi hostname "$(hostname -s).$resp" Thanks, Thomas
[PATCH] tests/vm: update openbsd to release 7.0
tests/vm: update openbsd to release 7.0 Signed-off-by: Brad Smith --- tests/vm/openbsd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/vm/openbsd b/tests/vm/openbsd index c4c78a80f1..abf510e117 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -22,8 +22,8 @@ class OpenBSDVM(basevm.BaseVM): name = "openbsd" arch = "x86_64" -link = "https://cdn.openbsd.org/pub/OpenBSD/6.9/amd64/install69.iso"; -csum = "140d26548aec680e34bb5f82295414228e7f61e4f5e7951af066014fda2d6e43" +link = "https://cdn.openbsd.org/pub/OpenBSD/7.0/amd64/install70.iso"; +csum = "1882f9a23c9800e5dba3dbd2cf0126f552605c915433ef4c5bb672610a4ca3a4" size = "20G" pkgs = [ # tools -- 2.33.1
Re: [PATCH] tests/vm/openbsd: Move timezone set to after disk setup
Yes, this is the correct order. The timezone question comes after the install sets are extracted. Signed-off-by: Brad Smith On 10/13/2021 12:31 PM, Richard Henderson wrote: Currently the install gets stuck waiting for the timezone when the installer is waiting on the disk. Swap the two. Signed-off-by: Richard Henderson --- tests/vm/openbsd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vm/openbsd b/tests/vm/openbsd index c4c78a80f1..cbb4006ef7 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -119,7 +119,6 @@ class OpenBSDVM(basevm.BaseVM): self.console_send("%s\n" % self._config["guest_pass"]) self.console_wait_send("Allow root ssh login","yes\n") -self.console_wait_send("timezone","UTC\n") self.console_wait_send("root disk", "\n") self.console_wait_send("(W)hole disk","\n") self.console_wait_send("(A)uto layout", "\n") @@ -130,6 +129,7 @@ class OpenBSDVM(basevm.BaseVM): self.print_step("Installation started now, this will take a while") self.console_wait_send("Location of sets","done\n") +self.console_wait_send("timezone","UTC\n") self.console_wait("successfully completed") self.print_step("Installation finished, rebooting")
Re: [PATCH 3/3] dtc: Update to version 1.6.1
On 10/1/2021 1:54 PM, Brad Smith wrote: On 10/1/2021 5:44 AM, Daniel P. Berrangé wrote: On Fri, Oct 01, 2021 at 10:37:51AM +0100, Peter Maydell wrote: On Fri, 1 Oct 2021 at 10:10, Daniel P. Berrangé wrote: On Thu, Sep 30, 2021 at 09:10:12AM +0200, Thomas Huth wrote: On 27/08/2021 14.09, Thomas Huth wrote: The dtc submodule is currently pointing to non-release commit. It's nicer if submodules point to release versions instead and since dtc 1.6.1 is available now, let's update to that version. Most of our supported platforms don't have version 1.6.1 available. As a general goal IMHO we should be seeking to eliminate bundling of 3rd party modules that are commonly available in distros. We've carried dtc for a hell of a long time, and if we keep updating our submodule we'll keep relyin on new features, and never be able to drop it because it will always be newer than what's in the distros. So personally I think we should never again update dtc and capstone modules. If we want to take adbantage of new features, then do that through conditional compilation, as we do for any of the other 3rd party libraries consumed. I agree in general, but (per the commit message here) our dtc submodule is currently pointing at some random not-a-release commit in upstream dtc. We should at least move forward to whatever the next released dtc after that is, before we say "no more dtc updates". Yep, if we want to fix it onto an official version tag, that's OK, just not jumping right to very latest version. We might want to move it backwards to better align with what we're targetting in the support Best I can tell the distros currently have these versions: - Alpine 3.14 - 1.6.1 - CentOS 8 - 1.6.0 - Debian 10 - 1.4.7 - Fedora 33 - 1.6.0 - OpenSUSE Leap 15.3 - 1.5.1 - Ubuntu 18.04 - 1.4.5 - FreeBSD Ports - 1.6.0 - OpenBSD Ports - 1.6.0 I already updated OpenBSD to 1.6.1. and NetBSD is at 1.4.7. - macOS HomeBrew - 1.6.1 - Windows MSys2 - 1.6.0 Regards, Daniel
Re: [PATCH 3/3] dtc: Update to version 1.6.1
On 10/1/2021 5:44 AM, Daniel P. Berrangé wrote: On Fri, Oct 01, 2021 at 10:37:51AM +0100, Peter Maydell wrote: On Fri, 1 Oct 2021 at 10:10, Daniel P. Berrangé wrote: On Thu, Sep 30, 2021 at 09:10:12AM +0200, Thomas Huth wrote: On 27/08/2021 14.09, Thomas Huth wrote: The dtc submodule is currently pointing to non-release commit. It's nicer if submodules point to release versions instead and since dtc 1.6.1 is available now, let's update to that version. Most of our supported platforms don't have version 1.6.1 available. As a general goal IMHO we should be seeking to eliminate bundling of 3rd party modules that are commonly available in distros. We've carried dtc for a hell of a long time, and if we keep updating our submodule we'll keep relyin on new features, and never be able to drop it because it will always be newer than what's in the distros. So personally I think we should never again update dtc and capstone modules. If we want to take adbantage of new features, then do that through conditional compilation, as we do for any of the other 3rd party libraries consumed. I agree in general, but (per the commit message here) our dtc submodule is currently pointing at some random not-a-release commit in upstream dtc. We should at least move forward to whatever the next released dtc after that is, before we say "no more dtc updates". Yep, if we want to fix it onto an official version tag, that's OK, just not jumping right to very latest version. We might want to move it backwards to better align with what we're targetting in the support Best I can tell the distros currently have these versions: - Alpine 3.14 - 1.6.1 - CentOS 8 - 1.6.0 - Debian 10 - 1.4.7 - Fedora 33 - 1.6.0 - OpenSUSE Leap 15.3 - 1.5.1 - Ubuntu 18.04 - 1.4.5 - FreeBSD Ports - 1.6.0 - OpenBSD Ports - 1.6.0 I already updated OpenBSD to 1.6.1. - macOS HomeBrew - 1.6.1 - Windows MSys2 - 1.6.0 Regards, Daniel
Re: Rust in Qemu BoF followup: Rust vs. qemu platform support
On 9/17/2021 4:58 AM, David Gibson wrote: Hi all, At the qemu-in-rust BoF at KVM Forum, I volunteered to look into whether Rust supported all the host/build platforms that qemu does, which is obviously vital if we want to make Rust a non-optional component of the build. I've added the information to our wiki at: https://wiki.qemu.org/RustInQemu TBH, the coverage is not as good as I expected. Linux, macOS and Windows are pretty much ok, with the exception of Linux on Sparc. There are a lot of gaps in *BSD support, however. I've included some notes on where the information comes from, and some uncertainties in there. I've made an effort to get the information correct, but double checking would be appreciated. I haven't yet looked into the packaging situation for the Rust toolchain on various platforms and distros, but I still intend to do so. Regarding this entry on the Wiki page.. "I think OpenBSD lacks mips32 support, but the presence of Loongson means I'm having trouble pinning that down with certainty" That is correct. Our loongson port is mips64el. OpenBSD only supports 64-bit MIPS. OpenBSD currently only provides packages and host tools for aarch64, amd64, i386 and sparc64. So for the Wiki armv7, MIPS (64-bit), PPC (32-bit) should be changed to N/A. The SPARC (64-bit) entry should be changed to yellow. I'd like to fill in the gaps for arm, mips64, mips64el, powerpc, powerpc64, and riscv64.
Re: [PATCH 00/11] Fixes for clang-13 plus tcg/ppc
On 7/12/2021 5:55 PM, Richard Henderson wrote: The goal here was to address Brad's report for clang vs ppc32. Somewhere in between here and there I forgot about the ppc32 part, needed a newer clang for gcc135, accidentally built master instead of the clang-12 release branch, fixed a bunch of buggy looking things, and only then remembered I was building ppc64 and wasn't going to test what I thought I would. So: Brad, could you double-check this fixes your problem? Yes, this does. Thank you. Others: Only patch 7 obviously should have been using the variable indicated as unused. But please double-check. r~ Cc: Alex Bennée Cc: Brad Smith Cc: David Gibson Cc: Eric Blake Cc: Gerd Hoffmann Cc: Greg Kurz Cc: Jason Wang Cc: Laurent Vivier Cc: qemu-bl...@nongnu.org Cc: qemu-...@nongnu.org Cc: Vladimir Sementsov-Ogievskiy Richard Henderson (11): nbd/server: Remove unused variable accel/tcg: Remove unused variable in cpu_exec util/selfmap: Discard mapping on error net/checksum: Remove unused variable in net_checksum_add_iov hw/audio/adlib: Remove unused variable in adlib_callback hw/ppc/spapr_events: Remove unused variable from check_exception hw/pci-hist/pnv_phb4: Fix typo in pnv_phb4_ioda_write linux-user/syscall: Remove unused variable from execve tests/unit: Remove unused variable from test_io tcg/ppc: Replace TCG_TARGET_CALL_DARWIN with _CALL_DARWIN tcg/ppc: Ensure _CALL_SYSV is set for 32-bit ELF accel/tcg/cpu-exec.c | 3 --- hw/audio/adlib.c | 3 +-- hw/pci-host/pnv_phb4.c | 2 +- hw/ppc/spapr_events.c| 5 - linux-user/syscall.c | 3 --- nbd/server.c | 4 net/checksum.c | 4 +--- tests/unit/test-iov.c| 5 + util/selfmap.c | 28 tcg/ppc/tcg-target.c.inc | 25 - 10 files changed, 40 insertions(+), 42 deletions(-)
Re: [PATCH] tests/vm: update NetBSD to 9.2
Sorry my mistake. I'll keep that script in mind as it looks incredibly useful. On 6/30/2021 6:33 AM, Philippe Mathieu-Daudé wrote: Hi Brad, You forgot to Cc the maintainers: $ ./scripts/get_maintainer.pl -f tests/vm/netbsd "Alex Bennée" (maintainer:Build and test au...) "Philippe Mathieu-Daudé" (maintainer:Build and test au...) Thomas Huth (maintainer:Build and test au...) Wainer dos Santos Moschetta (reviewer:Build and test au...) Willian Rampazzo (reviewer:Build and test au...) qemu-devel@nongnu.org (open list:All patches CC here) On 6/2/21 7:21 PM, Brad Smith wrote: tests/vm: update NetBSD to 9.2 Signed-off-by: Brad Smith Acked-by: Philippe Mathieu-Daudé --- tests/vm/netbsd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/vm/netbsd b/tests/vm/netbsd index b9efc269d2..4cc58df130 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.1/images/NetBSD-9.1-amd64.iso"; -csum = "65bddc95945991c3b2021f9c8ded7f34c25f0a7611b7aa15a15fe23399e902307e926ae97fcd01dc1662ac67b5f6e4be643c6a2b581692ddcb616d30125066f9" +link = "https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.2/images/NetBSD-9.2-amd64.iso"; +csum = "5ee0ea101f73386b9b424f5d1041e371db3c42fdd6f4e4518dc79c4a08f31d43091ebe93425c9f0dcaaed2b51131836fe6774f33f89030b58d64709b35fda72f" size = "20G" pkgs = [ # tools
Re: [PATCH] tests/vm: update NetBSD to 9.2
ping. On 6/3/2021 3:19 AM, Gerd Hoffmann wrote: On Wed, Jun 02, 2021 at 01:21:49PM -0400, Brad Smith wrote: tests/vm: update NetBSD to 9.2 Signed-off-by: Brad Smith Tested-by: Gerd Hoffmann
Re: [PATCH] tests/vm: update openbsd to release 6.9
ping. On 5/31/2021 12:55 AM, Gerd Hoffmann wrote: On Sun, May 30, 2021 at 10:01:28PM -0400, Brad Smith wrote: tests/vm: update openbsd to release 6.9 Signed-off-by: Brad Smith Tested-by: Gerd Hoffmann
Re: [PATCH] meson.build: Support ncurses on MacOS
On 6/14/2021 1:45 AM, Philippe Mathieu-Daudé wrote: On 6/13/21 8:33 AM, Stefan Weil wrote: Am 13.06.21 um 03:40 schrieb Brad Smith: This same problem also applies to OpenBSD as we have the same version of ncurses with support for wide characters. I have a similar patch in our QEMU port. Then we should either extend the conditional statement to handle OpenBSD as well, or simply define both macros unconditionally: # Newer versions of curses use NCURSES_WIDECHAR. # Older versions (e. g. on MacOS, OpenBSD) still require _XOPEN_SOURCE_EXTENDED. curses_compile_args = ['-DNCURSES_WIDECHAR=1', '-D_XOPEN_SOURCE_EXTENDED=1'] Defining only _XOPEN_SOURCE_EXTENDED would also work with old and new versions, so that's another option. It is simpler to ask Brad to upstream the OpenBSD patch :) That doesn't answer his question and that's the part that actually matters.
Re: [PATCH] meson.build: Support ncurses on MacOS
This same problem also applies to OpenBSD as we have the same version of ncurses with support for wide characters. I have a similar patch in our QEMU port. On 6/12/2021 4:03 AM, Stefan Weil wrote: MacOS provides header files for curses 5.7 with support for wide characters, but requires _XOPEN_SOURCE_EXTENDED=1 to activate that. By default those old header files are used even if there is a newer Homebrew installation of ncurses 6.2 available. Change also the old macro definition of NCURSES_WIDECHAR and set it to 1 like it is done in newer versions of curses.h when _XOPEN_SOURCE_EXTENDED=1 is defined. Suggested-by: Daniel P. Berrangé Signed-off-by: Stefan Weil --- meson.build | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index d2a9ce91f5..3ca8faa264 100644 --- a/meson.build +++ b/meson.build @@ -606,7 +606,11 @@ if have_system and not get_option('curses').disabled() endif endforeach msg = get_option('curses').enabled() ? 'curses library not found' : '' - curses_compile_args = ['-DNCURSES_WIDECHAR'] + if host_machine.system() == 'darwin' +curses_compile_args = [ '-D_XOPEN_SOURCE_EXTENDED=1'] + else +curses_compile_args = ['-DNCURSES_WIDECHAR=1'] + endif if curses.found() if cc.links(curses_test, args: curses_compile_args, dependencies: [curses]) curses = declare_dependency(compile_args: curses_compile_args, dependencies: [curses])
[PATCH] tests/vm: update NetBSD to 9.2
tests/vm: update NetBSD to 9.2 Signed-off-by: Brad Smith --- tests/vm/netbsd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/vm/netbsd b/tests/vm/netbsd index b9efc269d2..4cc58df130 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.1/images/NetBSD-9.1-amd64.iso"; -csum = "65bddc95945991c3b2021f9c8ded7f34c25f0a7611b7aa15a15fe23399e902307e926ae97fcd01dc1662ac67b5f6e4be643c6a2b581692ddcb616d30125066f9" +link = "https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.2/images/NetBSD-9.2-amd64.iso"; +csum = "5ee0ea101f73386b9b424f5d1041e371db3c42fdd6f4e4518dc79c4a08f31d43091ebe93425c9f0dcaaed2b51131836fe6774f33f89030b58d64709b35fda72f" size = "20G" pkgs = [ # tools -- 2.31.1
[PATCH] tests/vm: update openbsd to release 6.9
tests/vm: update openbsd to release 6.9 Signed-off-by: Brad Smith --- tests/vm/openbsd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 4d1399378e..c4c78a80f1 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -22,8 +22,8 @@ class OpenBSDVM(basevm.BaseVM): name = "openbsd" arch = "x86_64" -link = "https://cdn.openbsd.org/pub/OpenBSD/6.8/amd64/install68.iso"; -csum = "47e291fcc2d0c1a8ae0b66329f040b33af755b6adbd21739e20bb5ad56f62b6c" +link = "https://cdn.openbsd.org/pub/OpenBSD/6.9/amd64/install69.iso"; +csum = "140d26548aec680e34bb5f82295414228e7f61e4f5e7951af066014fda2d6e43" size = "20G" pkgs = [ # tools -- 2.31.1
Re: [PATCH] oslib-posix: Remove OpenBSD workaround for fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure
ping. On 4/1/2021 1:34 PM, Brad Smith wrote: OpenBSD prior to 6.3 required a workaround to utilize fcntl(F_SETFL) on memory devices. Since modern verions of OpenBSD that are only officialy supported and buildable on do not have this issue I am garbage collecting this workaround. Signed-off-by: Brad Smith diff --git a/util/oslib-posix.c b/util/oslib-posix.c index 36820fec16..7b4bec1402 100644 --- a/util/oslib-posix.c +++ b/util/oslib-posix.c @@ -273,17 +273,6 @@ int qemu_try_set_nonblock(int fd) return -errno; } if (fcntl(fd, F_SETFL, f | O_NONBLOCK) == -1) { -#ifdef __OpenBSD__ -/* - * Previous to OpenBSD 6.3, fcntl(F_SETFL) is not permitted on - * memory devices and sets errno to ENODEV. - * It's OK if we fail to set O_NONBLOCK on devices like /dev/null, - * because they will never block anyway. - */ -if (errno == ENODEV) { -return 0; -} -#endif return -errno; } return 0;
Re: [PATCH] tcg/ppc: Fix building with Clang
On 5/2/2021 12:02 AM, Brad Smith wrote: On 4/22/2021 11:39 AM, Richard Henderson wrote: On 4/22/21 2:20 AM, Peter Maydell wrote: On Thu, 22 Apr 2021 at 06:18, Richard Henderson I'm thinking something like #if !defined(_CALL_SYSV) && \ !defined(_CALL_DARWIN) && \ !defined(_CALL_AIX) && \ !defined(_CALL_ELF) # if defined(__APPLE__) # define _CALL_DARWIN # elif defined(__ELF__) && TCG_TARGET_REG_BITS == 32 # define _CALL_SYSV # else # error "Unknown ABI" # endif #endif Doesn't this also need some case that handles "64bit ppc clang which doesn't define _CALL_anything" ? Clang does define _CALL_ELF for ppc64: // ABI options. if (ABI == "elfv1") Builder.defineMacro("_CALL_ELF", "1"); if (ABI == "elfv2") Builder.defineMacro("_CALL_ELF", "2"); Able to spin up a patch that you think is appropriate? ping?
Re: [PATCH] tap-bsd: Remove special casing for older OpenBSD releases
On 5/5/2021 10:19 PM, Jason Wang wrote: 在 2021/5/2 下午12:10, Brad Smith 写道: On 4/1/2021 3:24 AM, Jason Wang wrote: 在 2021/3/30 上午4:38, Brad Smith 写道: On 3/28/2021 11:58 PM, Jason Wang wrote: 在 2021/3/29 上午11:03, Brad Smith 写道: It very much is correct. We don't care about such releases anymore. So is there a doc/wiki to say Qemu doesn't support those OpenBSD release? The (OpenBSD itself and QEMU) project only makes a concerted effort to support two previous releases. I can't remember where in the QEMU Wiki it is mentioned. Just looking at the Meson requirement alone limits us to the previous two releases never mind older. Even if that wasn't a consideration there would be issues with a few other dependencies like Gtk before going back this far to support such old OpenBSD releases. Ok. So I've applied this patch. Thanks I do not see where. I don't queue it for 6.0 so it will be in the next pull request. Thanks Ah, I didn't think it would be 6.0 but thought I would be able to find it in your git repo. Anyway, thank you.
Re: [PATCH 1/7] migration: use GDateTime for formatting timestamp in snapshot names
Thank you. On 5/5/2021 6:36 AM, Daniel P. Berrangé wrote: The GDateTime APIs provided by GLib avoid portability pitfalls, such as some platforms where 'struct timeval.tv_sec' field is still 'long' instead of 'time_t'. When combined with automatic cleanup, GDateTime often results in simpler code too. Signed-off-by: Daniel P. Berrangé --- migration/savevm.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c index 52e2d72e4b..72848b946c 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -2775,8 +2775,7 @@ bool save_snapshot(const char *name, bool overwrite, const char *vmstate, QEMUFile *f; int saved_vm_running; uint64_t vm_state_size; -qemu_timeval tv; -struct tm tm; +g_autoptr(GDateTime) now = g_date_time_new_now_local(); AioContext *aio_context; if (migration_is_blocked(errp)) { @@ -2836,9 +2835,8 @@ bool save_snapshot(const char *name, bool overwrite, const char *vmstate, memset(sn, 0, sizeof(*sn)); /* fill auxiliary fields */ -qemu_gettimeofday(&tv); -sn->date_sec = tv.tv_sec; -sn->date_nsec = tv.tv_usec * 1000; +sn->date_sec = g_date_time_to_unix(now); +sn->date_nsec = g_date_time_get_microsecond(now) * 1000; sn->vm_clock_nsec = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); if (replay_mode != REPLAY_MODE_NONE) { sn->icount = replay_get_current_icount(); @@ -2849,9 +2847,8 @@ bool save_snapshot(const char *name, bool overwrite, const char *vmstate, if (name) { pstrcpy(sn->name, sizeof(sn->name), name); } else { -/* cast below needed for OpenBSD where tv_sec is still 'long' */ -localtime_r((const time_t *)&tv.tv_sec, &tm); -strftime(sn->name, sizeof(sn->name), "vm-%Y%m%d%H%M%S", &tm); +g_autofree char *autoname = g_date_time_format(now, "vm-%Y%m%d%H%M%S"); +pstrcpy(sn->name, sizeof(sn->name), autoname); } /* save the VM state */
Re: [PATCH] tap-bsd: Remove special casing for older OpenBSD releases
On 4/1/2021 3:24 AM, Jason Wang wrote: 在 2021/3/30 上午4:38, Brad Smith 写道: On 3/28/2021 11:58 PM, Jason Wang wrote: 在 2021/3/29 上午11:03, Brad Smith 写道: It very much is correct. We don't care about such releases anymore. So is there a doc/wiki to say Qemu doesn't support those OpenBSD release? The (OpenBSD itself and QEMU) project only makes a concerted effort to support two previous releases. I can't remember where in the QEMU Wiki it is mentioned. Just looking at the Meson requirement alone limits us to the previous two releases never mind older. Even if that wasn't a consideration there would be issues with a few other dependencies like Gtk before going back this far to support such old OpenBSD releases. Ok. So I've applied this patch. Thanks I do not see where.
Re: [PATCH] oslib-posix: Remove OpenBSD workaround for fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure
ping. On 4/1/2021 1:34 PM, Brad Smith wrote: OpenBSD prior to 6.3 required a workaround to utilize fcntl(F_SETFL) on memory devices. Since modern verions of OpenBSD that are only officialy supported and buildable on do not have this issue I am garbage collecting this workaround. Signed-off-by: Brad Smith diff --git a/util/oslib-posix.c b/util/oslib-posix.c index 36820fec16..7b4bec1402 100644 --- a/util/oslib-posix.c +++ b/util/oslib-posix.c @@ -273,17 +273,6 @@ int qemu_try_set_nonblock(int fd) return -errno; } if (fcntl(fd, F_SETFL, f | O_NONBLOCK) == -1) { -#ifdef __OpenBSD__ -/* - * Previous to OpenBSD 6.3, fcntl(F_SETFL) is not permitted on - * memory devices and sets errno to ENODEV. - * It's OK if we fail to set O_NONBLOCK on devices like /dev/null, - * because they will never block anyway. - */ -if (errno == ENODEV) { -return 0; -} -#endif return -errno; } return 0;
Re: [PATCH] tcg/ppc: Fix building with Clang
On 4/22/2021 11:39 AM, Richard Henderson wrote: On 4/22/21 2:20 AM, Peter Maydell wrote: On Thu, 22 Apr 2021 at 06:18, Richard Henderson I'm thinking something like #if !defined(_CALL_SYSV) && \ !defined(_CALL_DARWIN) && \ !defined(_CALL_AIX) && \ !defined(_CALL_ELF) # if defined(__APPLE__) # define _CALL_DARWIN # elif defined(__ELF__) && TCG_TARGET_REG_BITS == 32 # define _CALL_SYSV # else # error "Unknown ABI" # endif #endif Doesn't this also need some case that handles "64bit ppc clang which doesn't define _CALL_anything" ? Clang does define _CALL_ELF for ppc64: // ABI options. if (ABI == "elfv1") Builder.defineMacro("_CALL_ELF", "1"); if (ABI == "elfv2") Builder.defineMacro("_CALL_ELF", "2"); Able to spin up a patch that you think is appropriate?
[PATCH] tcg/ppc: Fix building with Clang
Fix building with Clang. At the moment Clang does not define _CALL_SYSV as GCC does. From clang/lib/Basic/Targets/PPC.cpp in getTargetDefines().. // FIXME: The following are not yet generated here by Clang, but are //generated by GCC: // // _SOFT_FLOAT_ // __RECIP_PRECISION__ // __APPLE_ALTIVEC__ // __RECIP__ // __RECIPF__ // __RSQRTE__ // __RSQRTEF__ // _SOFT_DOUBLE_ // __NO_LWSYNC__ // __CMODEL_MEDIUM__ // __CMODEL_LARGE__ // _CALL_SYSV // _CALL_DARWIN This is from the OpenBSD ports tree where we use it to build on OpenBSD/powerpc. Signed-off-by: Brad Smith diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index 838ccfa42d..d2611832e5 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -25,6 +25,11 @@ #include "elf.h" #include "../tcg-pool.c.inc" +/* Clang does not define _CALL_* */ +#if defined(__clang__) && defined(__ELF__) && !defined(_CALL_SYSV) +#define _CALL_SYSV 1 +#endif + #if defined _CALL_DARWIN || defined __APPLE__ #define TCG_TARGET_CALL_DARWIN #endif
tcg/ppc: Fix building with Clang
Fix building with Clang. At the moment Clang does not define _CALL_SYSV as GCC does. From clang/lib/Basic/Targets/PPC.cpp in getTargetDefines().. // FIXME: The following are not yet generated here by Clang, but are //generated by GCC: // // _SOFT_FLOAT_ // __RECIP_PRECISION__ // __APPLE_ALTIVEC__ // __RECIP__ // __RECIPF__ // __RSQRTE__ // __RSQRTEF__ // _SOFT_DOUBLE_ // __NO_LWSYNC__ // __CMODEL_MEDIUM__ // __CMODEL_LARGE__ // _CALL_SYSV // _CALL_DARWIN This is from the OpenBSD ports tree where we use it to build on OpenBSD/powerpc. Signed-off-by: Brad Smith diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index 838ccfa42d..d2611832e5 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -25,6 +25,11 @@ #include "elf.h" #include "../tcg-pool.c.inc" +/* Clang does not define _CALL_* */ +#if defined(__clang__) && defined(__ELF__) && !defined(_CALL_SYSV) +#define _CALL_SYSV 1 +#endif + #if defined _CALL_DARWIN || defined __APPLE__ #define TCG_TARGET_CALL_DARWIN #endif
[PATCH] oslib-posix: Remove OpenBSD workaround for fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure
OpenBSD prior to 6.3 required a workaround to utilize fcntl(F_SETFL) on memory devices. Since modern verions of OpenBSD that are only officialy supported and buildable on do not have this issue I am garbage collecting this workaround. Signed-off-by: Brad Smith diff --git a/util/oslib-posix.c b/util/oslib-posix.c index 36820fec16..7b4bec1402 100644 --- a/util/oslib-posix.c +++ b/util/oslib-posix.c @@ -273,17 +273,6 @@ int qemu_try_set_nonblock(int fd) return -errno; } if (fcntl(fd, F_SETFL, f | O_NONBLOCK) == -1) { -#ifdef __OpenBSD__ -/* - * Previous to OpenBSD 6.3, fcntl(F_SETFL) is not permitted on - * memory devices and sets errno to ENODEV. - * It's OK if we fail to set O_NONBLOCK on devices like /dev/null, - * because they will never block anyway. - */ -if (errno == ENODEV) { -return 0; -} -#endif return -errno; } return 0;
Re: [PATCH] migration: Remove time_t cast for OpenBSD
On 4/1/2021 4:14 AM, Daniel P. Berrangé wrote: On Wed, Mar 31, 2021 at 03:26:16PM -0400, Brad Smith wrote: On 3/13/2021 6:33 PM, Brad Smith wrote: On 3/11/2021 1:39 PM, Daniel P. Berrangé wrote: On Thu, Mar 11, 2021 at 06:28:57PM +, Dr. David Alan Gilbert wrote: * Laurent Vivier (laur...@vivier.eu) wrote: Le 08/03/2021 à 12:46, Thomas Huth a écrit : On 22/02/2021 08.28, Brad Smith wrote: OpenBSD has supported 64-bit time_t across all archs since 5.5 released in 2014. Remove a time_t cast that is no longer necessary. Signed-off-by: Brad Smith diff --git a/migration/savevm.c b/migration/savevm.c index 52e2d72e4b..9557f85ba9 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -2849,8 +2849,7 @@ bool save_snapshot(const char *name, bool overwrite, const char *vmstate, if (name) { pstrcpy(sn->name, sizeof(sn->name), name); } else { - /* cast below needed for OpenBSD where tv_sec is still 'long' */ - localtime_r((const time_t *)&tv.tv_sec, &tm); + localtime_r(&tv.tv_sec, &tm); strftime(sn->name, sizeof(sn->name), "vm-%Y%m%d%H%M%S", &tm); } but the qemu_timeval from "include/sysemu/os-win32.h" still uses a long: is this file compiled for win32? Yep this fails for me when built with x86_64-w64-mingw32- (it's fine with i686-w64-mingw32- ) We could just switch the code to use GDateTime from GLib and thus avoid portability issues. I think this should be equivalent: g_autoptr(GDateTime) now = g_date_time_new_now_local(); g_autofree char *nowstr = g_date_time_format(now, "vm-%Y%m%d%H%M%s"); strncpy(sn->name, sizeof(sn->name), nowstr); Which way do you guys want to go? Something like above, remove the comment or some variation on the comment but not mentioning OpenBSD since it is no longer relevant? Anyone? Personally I always favour using GLib APIs if there's an applicable one, since it eliminates portability problems - or rather offloads them to the GLib maintainers, who have already solved them generally. Can you please submit a proper diff and I'll drop this?
Re: [PATCH] migration: Remove time_t cast for OpenBSD
On 3/13/2021 6:33 PM, Brad Smith wrote: On 3/11/2021 1:39 PM, Daniel P. Berrangé wrote: On Thu, Mar 11, 2021 at 06:28:57PM +, Dr. David Alan Gilbert wrote: * Laurent Vivier (laur...@vivier.eu) wrote: Le 08/03/2021 à 12:46, Thomas Huth a écrit : On 22/02/2021 08.28, Brad Smith wrote: OpenBSD has supported 64-bit time_t across all archs since 5.5 released in 2014. Remove a time_t cast that is no longer necessary. Signed-off-by: Brad Smith diff --git a/migration/savevm.c b/migration/savevm.c index 52e2d72e4b..9557f85ba9 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -2849,8 +2849,7 @@ bool save_snapshot(const char *name, bool overwrite, const char *vmstate, if (name) { pstrcpy(sn->name, sizeof(sn->name), name); } else { - /* cast below needed for OpenBSD where tv_sec is still 'long' */ - localtime_r((const time_t *)&tv.tv_sec, &tm); + localtime_r(&tv.tv_sec, &tm); strftime(sn->name, sizeof(sn->name), "vm-%Y%m%d%H%M%S", &tm); } but the qemu_timeval from "include/sysemu/os-win32.h" still uses a long: is this file compiled for win32? Yep this fails for me when built with x86_64-w64-mingw32- (it's fine with i686-w64-mingw32- ) We could just switch the code to use GDateTime from GLib and thus avoid portability issues. I think this should be equivalent: g_autoptr(GDateTime) now = g_date_time_new_now_local(); g_autofree char *nowstr = g_date_time_format(now, "vm-%Y%m%d%H%M%s"); strncpy(sn->name, sizeof(sn->name), nowstr); Which way do you guys want to go? Something like above, remove the comment or some variation on the comment but not mentioning OpenBSD since it is no longer relevant? Anyone?
Re: [PATCH] tap-bsd: Remove special casing for older OpenBSD releases
On 3/28/2021 11:58 PM, Jason Wang wrote: 在 2021/3/29 上午11:03, Brad Smith 写道: It very much is correct. We don't care about such releases anymore. So is there a doc/wiki to say Qemu doesn't support those OpenBSD release? The (OpenBSD itself and QEMU) project only makes a concerted effort to support two previous releases. I can't remember where in the QEMU Wiki it is mentioned. Just looking at the Meson requirement alone limits us to the previous two releases never mind older. Even if that wasn't a consideration there would be issues with a few other dependencies like Gtk before going back this far to support such old OpenBSD releases.
Re: [PATCH] tap-bsd: Remove special casing for older OpenBSD releases
It very much is correct. We don't care about such releases anymore. On March 28, 2021 10:24:51 p.m. Jason Wang wrote: 在 2021/3/27 上午7:49, Brad Smith 写道: OpenBSD added support for tap(4) 10 releases ago. Remove the special casing for older releases. Signed-off-by: Brad Smith diff --git a/net/tap-bsd.c b/net/tap-bsd.c index 77aaf674b1..59dfcdfae0 100644 --- a/net/tap-bsd.c +++ b/net/tap-bsd.c @@ -35,10 +35,6 @@ #include #endif -#if defined(__OpenBSD__) -#include -#endif - #ifndef __FreeBSD__ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required, int mq_required, Error **errp) @@ -59,11 +55,7 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, if (*ifname) { snprintf(dname, sizeof dname, "/dev/%s", ifname); } else { -#if defined(__OpenBSD__) && OpenBSD < 201605 I am not sure this sis correct. My understanding is that we still need to use tun for old OpenBSD release. Thanks -snprintf(dname, sizeof dname, "/dev/tun%d", i); -#else snprintf(dname, sizeof dname, "/dev/tap%d", i); -#endif } TFR(fd = open(dname, O_RDWR)); if (fd >= 0) { Sent with Aqua Mail for Android https://www.mobisystems.com/aqua-mail
[PATCH] tap-bsd: Remove special casing for older OpenBSD releases
OpenBSD added support for tap(4) 10 releases ago. Remove the special casing for older releases. Signed-off-by: Brad Smith diff --git a/net/tap-bsd.c b/net/tap-bsd.c index 77aaf674b1..59dfcdfae0 100644 --- a/net/tap-bsd.c +++ b/net/tap-bsd.c @@ -35,10 +35,6 @@ #include #endif -#if defined(__OpenBSD__) -#include -#endif - #ifndef __FreeBSD__ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required, int mq_required, Error **errp) @@ -59,11 +55,7 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, if (*ifname) { snprintf(dname, sizeof dname, "/dev/%s", ifname); } else { -#if defined(__OpenBSD__) && OpenBSD < 201605 -snprintf(dname, sizeof dname, "/dev/tun%d", i); -#else snprintf(dname, sizeof dname, "/dev/tap%d", i); -#endif } TFR(fd = open(dname, O_RDWR)); if (fd >= 0) {
Re: [PATCH] migration: Remove time_t cast for OpenBSD
On 3/11/2021 1:39 PM, Daniel P. Berrangé wrote: On Thu, Mar 11, 2021 at 06:28:57PM +, Dr. David Alan Gilbert wrote: * Laurent Vivier (laur...@vivier.eu) wrote: Le 08/03/2021 à 12:46, Thomas Huth a écrit : On 22/02/2021 08.28, Brad Smith wrote: OpenBSD has supported 64-bit time_t across all archs since 5.5 released in 2014. Remove a time_t cast that is no longer necessary. Signed-off-by: Brad Smith diff --git a/migration/savevm.c b/migration/savevm.c index 52e2d72e4b..9557f85ba9 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -2849,8 +2849,7 @@ bool save_snapshot(const char *name, bool overwrite, const char *vmstate, if (name) { pstrcpy(sn->name, sizeof(sn->name), name); } else { - /* cast below needed for OpenBSD where tv_sec is still 'long' */ - localtime_r((const time_t *)&tv.tv_sec, &tm); + localtime_r(&tv.tv_sec, &tm); strftime(sn->name, sizeof(sn->name), "vm-%Y%m%d%H%M%S", &tm); } but the qemu_timeval from "include/sysemu/os-win32.h" still uses a long: is this file compiled for win32? Yep this fails for me when built with x86_64-w64-mingw32- (it's fine with i686-w64-mingw32- ) We could just switch the code to use GDateTime from GLib and thus avoid portability issues. I think this should be equivalent: g_autoptr(GDateTime) now = g_date_time_new_now_local(); g_autofree char *nowstr = g_date_time_format(now, "vm-%Y%m%d%H%M%s"); strncpy(sn->name, sizeof(sn->name), nowstr); Which way do you guys want to go? Something like above, remove the comment or some variation on the comment but not mentioning OpenBSD since it is no longer relevant?
Re: [PATCH] migration: Remove time_t cast for OpenBSD
On 3/8/2021 6:46 AM, Thomas Huth wrote: On 22/02/2021 08.28, Brad Smith wrote: OpenBSD has supported 64-bit time_t across all archs since 5.5 released in 2014. Remove a time_t cast that is no longer necessary. Signed-off-by: Brad Smith diff --git a/migration/savevm.c b/migration/savevm.c index 52e2d72e4b..9557f85ba9 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -2849,8 +2849,7 @@ bool save_snapshot(const char *name, bool overwrite, const char *vmstate, if (name) { pstrcpy(sn->name, sizeof(sn->name), name); } else { - /* cast below needed for OpenBSD where tv_sec is still 'long' */ - localtime_r((const time_t *)&tv.tv_sec, &tm); + localtime_r(&tv.tv_sec, &tm); strftime(sn->name, sizeof(sn->name), "vm-%Y%m%d%H%M%S", &tm); } Please make sure to CC: the maintainers (see MAINTAINERS file). Done now. Reviewed-by: Thomas Huth My bad. That was an oversight on my part. I was quick to send it to the list without thinking about something like that.
[PATCH] migration: Remove time_t cast for OpenBSD
OpenBSD has supported 64-bit time_t across all archs since 5.5 released in 2014. Remove a time_t cast that is no longer necessary. Signed-off-by: Brad Smith diff --git a/migration/savevm.c b/migration/savevm.c index 52e2d72e4b..9557f85ba9 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -2849,8 +2849,7 @@ bool save_snapshot(const char *name, bool overwrite, const char *vmstate, if (name) { pstrcpy(sn->name, sizeof(sn->name), name); } else { -/* cast below needed for OpenBSD where tv_sec is still 'long' */ -localtime_r((const time_t *)&tv.tv_sec, &tm); +localtime_r(&tv.tv_sec, &tm); strftime(sn->name, sizeof(sn->name), "vm-%Y%m%d%H%M%S", &tm); }
[Bug 1818937] Re: Crash with HV_ERROR on macOS host
I'm getting this error immediately and consistently when trying to boot the Win10 ISO with the following command: $ qemu-system-x86_64 -M accel=hvf -cpu host -smp 2 -hda windows-image.img -cdrom Win10_20H2_English_x64.iso -m 8G -vga virtio -usb -device usb-tablet -display default -boot d qemu-system-x86_64: Error: HV_ERROR [1]3921 abort qemu-system-x86_64 -M accel=hvf -cpu host -smp 2 -hda windows-image.img -cdro $ qemu-system-x86_64 --version QEMU emulator version 5.1.0 Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers Running on MacOS 11.0.1 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1818937 Title: Crash with HV_ERROR on macOS host Status in QEMU: Fix Released Bug description: On macOS host running Windows 10 guest, qemu crashed with error message: Error: HV_ERROR. Host: macOS Mojave 10.14.3 (18D109) Late 2014 Mac mini presumably Core i5 4278U. QEMU: git commit a3e3b0a7bd5de211a62cdf2d6c12b96d3c403560 QEMU parameter: qemu-system-x86_64 -m 3000 -drive file=disk.img,if=virtio,discard=unmap -accel hvf -soundhw hda -smp 3 thread list Process 56054 stopped thread #1: tid = 0x2ffec8, 0x7fff48d0805a vImage`vLookupTable_Planar16 + 970, queue = 'com.apple.main-thread' thread #2: tid = 0x2ffecc, 0x7fff79d6d7de libsystem_kernel.dylib`__psynch_cvwait + 10 thread #3: tid = 0x2ffecd, 0x7fff79d715aa libsystem_kernel.dylib`__select + 10 thread #4: tid = 0x2ffece, 0x7fff79d71d9a libsystem_kernel.dylib`__sigwait + 10 * thread #6: tid = 0x2ffed0, 0x7fff79d7023e libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGABRT thread #7: tid = 0x2ffed1, 0x7fff79d6d7de libsystem_kernel.dylib`__psynch_cvwait + 10 thread #8: tid = 0x2ffed2, 0x7fff79d6d7de libsystem_kernel.dylib`__psynch_cvwait + 10 thread #11: tid = 0x2fff34, 0x7fff79d6a17a libsystem_kernel.dylib`mach_msg_trap + 10, name = 'com.apple.NSEventThread' thread #30: tid = 0x300c04, 0x7fff79e233f8 libsystem_pthread.dylib`start_wqthread thread #31: tid = 0x300c16, 0x7fff79e233f8 libsystem_pthread.dylib`start_wqthread thread #32: tid = 0x300c17, 0x thread #33: tid = 0x300c93, 0x7fff79d6d7de libsystem_kernel.dylib`__psynch_cvwait + 10 Crashed thread: * thread #6, stop reason = signal SIGABRT * frame #0: 0x7fff79d7023e libsystem_kernel.dylib`__pthread_kill + 10 frame #1: 0x7fff79e26c1c libsystem_pthread.dylib`pthread_kill + 285 frame #2: 0x7fff79cd91c9 libsystem_c.dylib`abort + 127 frame #3: 0x00010baa476d qemu-system-x86_64`assert_hvf_ok(ret=) at hvf.c:106 [opt] frame #4: 0x00010baa4c8f qemu-system-x86_64`hvf_vcpu_exec(cpu=0x7f8e5283de00) at hvf.c:681 [opt] frame #5: 0x00010b988423 qemu-system-x86_64`qemu_hvf_cpu_thread_fn(arg=0x7f8e5283de00) at cpus.c:1636 [opt] frame #6: 0x00010bd9dfce qemu-system-x86_64`qemu_thread_start(args=) at qemu-thread-posix.c:502 [opt] frame #7: 0x7fff79e24305 libsystem_pthread.dylib`_pthread_body + 126 frame #8: 0x7fff79e2726f libsystem_pthread.dylib`_pthread_start + 70 frame #9: 0x7fff79e23415 libsystem_pthread.dylib`thread_start + 13 To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1818937/+subscriptions
[PATCH] tests/vm: update NetBSD to 9.1
tests/vm: update NetBSD to 9.1 Signed-off-by: Brad Smith Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann --- 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.28.0
Re: [PATCH] tests/vm: update openbsd to release 6.8
On 11/9/2020 3:13 AM, Thomas Huth wrote: On 07/11/2020 07.07, Brad Smith wrote: ping. It's not directly my turf, but I can add it to my next testing-related pull request if nobody else picks this patch up before. Please, if you could. Thank you. Thomas On 10/27/2020 6:22 AM, Brad Smith wrote: On Tue, Oct 27, 2020 at 11:05:20AM +0100, Philippe Mathieu-Daud?? wrote: On 10/27/20 6:30 AM, Brad Smith wrote: tests/vm: update openbsd to release 6.8 A double dash at the end of a package name removes ambiguity when the intent is to install a non-FLAVORed package. Signed-off-by: Brad Smith Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daud?? I confirm Brad sent us this patch off-list, and - our review comments are addressed, - the tags are correct. The patch format itself seems broken... Like a copy/paste into an email client... Well, git diff vs a format-patch. Subject: [PATCH] tests/vm: update openbsd to release 6.8 A double dash at the end of a package name removes ambiguity when the intent is to install a non-FLAVORed package. Signed-off-by: Brad Smith Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé --- tests/vm/openbsd | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 8356646f21..5ffa4f1b37 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -22,8 +22,8 @@ class OpenBSDVM(basevm.BaseVM): name = "openbsd" arch = "x86_64" - link ="https://cdn.openbsd.org/pub/OpenBSD/6.6/amd64/install66.iso"; - csum = "b22e63df56e6266de6bbeed8e9be0fbe9ee2291551c5bc03f3cc2e4ab9436ee3" + link ="https://cdn.openbsd.org/pub/OpenBSD/6.8/amd64/install68.iso"; + csum = "47e291fcc2d0c1a8ae0b66329f040b33af755b6adbd21739e20bb5ad56f62b6c" size = "20G" pkgs = [ # tools @@ -36,10 +36,10 @@ class OpenBSDVM(basevm.BaseVM): "bash", "gmake", "gsed", - "gettext", + "gettext-tools", # libs: usb - "libusb1", + "libusb1--", # libs: crypto "gnutls",
Re: [PATCH] tests/vm: update openbsd to release 6.8
ping. On 10/27/2020 6:22 AM, Brad Smith wrote: On Tue, Oct 27, 2020 at 11:05:20AM +0100, Philippe Mathieu-Daud?? wrote: On 10/27/20 6:30 AM, Brad Smith wrote: tests/vm: update openbsd to release 6.8 A double dash at the end of a package name removes ambiguity when the intent is to install a non-FLAVORed package. Signed-off-by: Brad Smith Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daud?? I confirm Brad sent us this patch off-list, and - our review comments are addressed, - the tags are correct. The patch format itself seems broken... Like a copy/paste into an email client... Well, git diff vs a format-patch. Subject: [PATCH] tests/vm: update openbsd to release 6.8 A double dash at the end of a package name removes ambiguity when the intent is to install a non-FLAVORed package. Signed-off-by: Brad Smith Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé --- tests/vm/openbsd | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 8356646f21..5ffa4f1b37 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -22,8 +22,8 @@ class OpenBSDVM(basevm.BaseVM): name = "openbsd" arch = "x86_64" -link = "https://cdn.openbsd.org/pub/OpenBSD/6.6/amd64/install66.iso"; -csum = "b22e63df56e6266de6bbeed8e9be0fbe9ee2291551c5bc03f3cc2e4ab9436ee3" +link = "https://cdn.openbsd.org/pub/OpenBSD/6.8/amd64/install68.iso"; +csum = "47e291fcc2d0c1a8ae0b66329f040b33af755b6adbd21739e20bb5ad56f62b6c" size = "20G" pkgs = [ # tools @@ -36,10 +36,10 @@ class OpenBSDVM(basevm.BaseVM): "bash", "gmake", "gsed", -"gettext", +"gettext-tools", # libs: usb -"libusb1", +"libusb1--", # libs: crypto "gnutls",
Re: [PATCH] tests/vm: update openbsd to release 6.8
On Tue, Oct 27, 2020 at 11:05:20AM +0100, Philippe Mathieu-Daud?? wrote: > On 10/27/20 6:30 AM, Brad Smith wrote: > > tests/vm: update openbsd to release 6.8 > > > > A double dash at the end of a package name removes ambiguity > > when the intent is to install a non-FLAVORed package. > > > > Signed-off-by: Brad Smith > > Reviewed-by: Gerd Hoffmann > > Tested-by: Gerd Hoffmann > > Reviewed-by: Philippe Mathieu-Daud?? > > I confirm Brad sent us this patch off-list, and > - our review comments are addressed, > - the tags are correct. > > The patch format itself seems broken... Like a copy/paste > into an email client... Well, git diff vs a format-patch. Subject: [PATCH] tests/vm: update openbsd to release 6.8 A double dash at the end of a package name removes ambiguity when the intent is to install a non-FLAVORed package. Signed-off-by: Brad Smith Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daud?? --- tests/vm/openbsd | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 8356646f21..5ffa4f1b37 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -22,8 +22,8 @@ class OpenBSDVM(basevm.BaseVM): name = "openbsd" arch = "x86_64" -link = "https://cdn.openbsd.org/pub/OpenBSD/6.6/amd64/install66.iso"; -csum = "b22e63df56e6266de6bbeed8e9be0fbe9ee2291551c5bc03f3cc2e4ab9436ee3" +link = "https://cdn.openbsd.org/pub/OpenBSD/6.8/amd64/install68.iso"; +csum = "47e291fcc2d0c1a8ae0b66329f040b33af755b6adbd21739e20bb5ad56f62b6c" size = "20G" pkgs = [ # tools @@ -36,10 +36,10 @@ class OpenBSDVM(basevm.BaseVM): "bash", "gmake", "gsed", -"gettext", +"gettext-tools", # libs: usb -"libusb1", +"libusb1--", # libs: crypto "gnutls", -- 2.28.0
[PATCH] tests/vm: update openbsd to release 6.8
tests/vm: update openbsd to release 6.8 A double dash at the end of a package name removes ambiguity when the intent is to install a non-FLAVORed package. Signed-off-by: Brad Smith Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daud?? diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 8356646f21..5ffa4f1b37 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -22,8 +22,8 @@ class OpenBSDVM(basevm.BaseVM): name = "openbsd" arch = "x86_64" -link = "https://cdn.openbsd.org/pub/OpenBSD/6.6/amd64/install66.iso"; -csum = "b22e63df56e6266de6bbeed8e9be0fbe9ee2291551c5bc03f3cc2e4ab9436ee3" +link = "https://cdn.openbsd.org/pub/OpenBSD/6.8/amd64/install68.iso"; +csum = "47e291fcc2d0c1a8ae0b66329f040b33af755b6adbd21739e20bb5ad56f62b6c" size = "20G" pkgs = [ # tools @@ -36,10 +36,10 @@ class OpenBSDVM(basevm.BaseVM): "bash", "gmake", "gsed", -"gettext", +"gettext-tools", # libs: usb -"libusb1", +"libusb1--", # libs: crypto "gnutls",
Re: [RFC PATCH v4 00/29] Hexagon patch series
On 9/29/2020 1:01 PM, Philippe Mathieu-Daudé wrote: On 9/29/20 5:53 PM, Taylor Simpson wrote: -Original Message- From: Philippe Mathieu-Daudé On Behalf Of Philippe Mathieu-Daudé Sent: Tuesday, September 29, 2020 6:22 AM To: Taylor Simpson ; qemu-devel@nongnu.org Cc: a...@rev.ng; riku.voi...@iki.fi; richard.hender...@linaro.org; laur...@vivier.eu; aleksandar.m.m...@gmail.com Subject: Re: [RFC PATCH v4 00/29] Hexagon patch series cc1: all warnings being treated as errors make: *** [Makefile.ninja:638: libqemu-hexagon-linux-user.fa.p/target_hexagon_decode.c.o] Error 1 $ gcc --version gcc (GCC) 10.2.1 20200723 (Red Hat 10.2.1-1) Thanks for all your feedback. I really appreciate it and will make the changes you mentioned. No problem, I also appreciate the effort you did to address all of the previous issues :) I'm using an older GCC that doesn't have these errors. Is this the version of GCC that is recommended (mandated?) for building qemu? QEMU aims to support the 2 latest releases of supported distributions. From time to time a brave developer look at the different versions packaged and make some cleanup in the code base. It used to be tedious, now that repology.org exists it is a bit easier. The last effort is from Thomas, see commit efc6c070aca: The supported distributions use the following version of GCC: RHEL-7: 4.8.5 Debian (Stretch): 6.3.0 Debian (Jessie): 4.8.4 OpenBSD (ports): 4.9.4 OpenBSD as of 6.6 uses GCC 8.3.0 for our ports-gcc. FreeBSD (ports): 8.2.0 OpenSUSE Leap 15: 7.3.1 Ubuntu (Xenial): 5.3.1 macOS (Homebrew): 8.2.0 So we can safely assume GCC 4.8 these days. FreeBSD and OpenBSD nowadays use Clang for the (system) compiler. This is the "mandated" compiler version. QEMU has some CI jobs, see: https://wiki.qemu.org/Testing/CI You can use most of them by opening GitLab and Travis/Cirrus (for GitHub, which you already use). GitLab will become our "gating CI" soon, so your series is expected to pass all the GitLab jobs. IIRC running the tests is as easy as register and push your branch to your account. PS You were right about Richard recommending const. It's already on my TODO list from his review 😉 =) Regards, Phil. Thanks, Taylor
Re: [PULL 147/150] meson: convert po/
If you're in need of the tools then the package name needs to be gettext-tools. On August 19, 2020 4:06:32 a.m. Paolo Bonzini wrote: On 19/08/20 03:56, Brad Smith wrote: This last part is redundant. If glib2 and/or gtk+3 is installed then gettext is installed. The package name is wrong as well as gettext changed from gettext to gettext-runtime relatively recently. Are you sure gettext-runtime includes xgettext, and is installed if glib2 is? Paolo diff --git a/tests/vm/freebsd b/tests/vm/freebsd index b34b14fc53..5f866e09c4 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -39,6 +39,7 @@ class FreeBSDVM(basevm.BaseVM): "bash", "gmake", "gsed", +"gettext", # libs: crypto "gnutls", diff --git a/tests/vm/netbsd b/tests/vm/netbsd index 93d48b6fdd..ffb65a89be 100755 --- a/tests/vm/netbsd +++ b/tests/vm/netbsd @@ -37,6 +37,7 @@ class NetBSDVM(basevm.BaseVM): "bash", "gmake", "gsed", +"gettext", # libs: crypto "gnutls", diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 7e27fda642..8356646f21 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -36,6 +36,7 @@ class OpenBSDVM(basevm.BaseVM): "bash", "gmake", "gsed", +"gettext", # libs: usb "libusb1", Sent with AquaMail for Android https://www.mobisystems.com/aqua-mail
Re: [PULL 147/150] meson: convert po/
On 8/18/2020 10:10 AM, Paolo Bonzini wrote: From: Marc-André Lureau Meson warns if xgettext is not found. In the future we may want to add a required argument to i18n.gettext(); in the meanwhile, I am adding a --enable-gettext/--disable-gettext option and feature detection in configure. This preserves QEMU's default behavior of detecting system features, without any warning, if neither --enable-* nor --disable-* is requested. Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Makefile | 5 +--- configure | 21 +- meson.build | 3 ++ meson_options.txt | 1 + po/LINGUAS| 8 + po/Makefile | 52 - po/POTFILES | 1 + po/meson.build| 7 + po/messages.po| 74 --- tests/vm/freebsd | 1 + tests/vm/netbsd | 1 + tests/vm/openbsd | 1 + 12 files changed, 44 insertions(+), 131 deletions(-) create mode 100644 po/LINGUAS delete mode 100644 po/Makefile create mode 100644 po/POTFILES create mode 100644 po/meson.build delete mode 100644 po/messages.po diff --git a/Makefile b/Makefile index bbb27f7981..8ba5990504 100644 --- a/Makefile +++ b/Makefile @@ -210,7 +210,7 @@ distclean: clean ninja-distclean rm -f config-host.mak config-host.h* rm -f tests/tcg/config-*.mak rm -f config-all-disas.mak config.status - rm -f po/*.mo tests/qemu-iotests/common.env + rm -f tests/qemu-iotests/common.env rm -f roms/seabios/config.mak roms/vgabios/config.mak rm -f qemu-plugins-ld.symbols qemu-plugins-ld64.symbols rm -f *-config-target.h *-config-devices.mak *-config-devices.h @@ -288,9 +288,6 @@ endif mkdir -p "$(DESTDIR)$(qemu_desktopdir)" $(INSTALL_DATA) $(SRC_PATH)/ui/qemu.desktop \ "$(DESTDIR)$(qemu_desktopdir)/qemu.desktop" -ifdef CONFIG_GTK - $(MAKE) -C po $@ -endif $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps" set -e; for x in $(KEYMAPS); do \ $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \ diff --git a/configure b/configure index 86f384be29..0167822204 100755 --- a/configure +++ b/configure @@ -522,6 +522,7 @@ rng_none="no" secret_keyring="" libdaxctl="" meson="" +gettext="" bogus_os="no" malloc_trim="" @@ -1112,6 +1113,10 @@ for opt do ;; --enable-vnc) vnc="enabled" ;; + --disable-gettext) gettext="false" + ;; + --enable-gettext) gettext="true" + ;; --oss-lib=*) oss_lib="$optarg" ;; --audio-drv-list=*) audio_drv_list="$optarg" @@ -2983,6 +2988,19 @@ if test "$whpx" != "no" ; then fi fi +## +# gettext probe +if test "$gettext" != "false" ; then + if has xgettext; then +gettext=true + else +if test "$gettext" = "true" ; then + feature_not_found "gettext" "Install xgettext binary" +fi +gettext=false + fi +fi + ## # Sparse probe if test "$sparse" != "no" ; then @@ -8047,7 +8065,7 @@ DIRS="$DIRS docs docs/interop fsdev scsi" DIRS="$DIRS pc-bios/optionrom pc-bios/s390-ccw" DIRS="$DIRS roms/seabios" LINKS="Makefile" -LINKS="$LINKS tests/tcg/lm32/Makefile po/Makefile" +LINKS="$LINKS tests/tcg/lm32/Makefile" LINKS="$LINKS tests/tcg/Makefile.target" LINKS="$LINKS pc-bios/optionrom/Makefile pc-bios/keymaps" LINKS="$LINKS pc-bios/s390-ccw/Makefile" @@ -8179,6 +8197,7 @@ NINJA=$PWD/ninjatool $meson setup \ -Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false; fi) \ -Dsdl=$sdl -Dsdl_image=$sdl_image \ -Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \ + -Dgettext=$gettext \ $cross_arg \ "$PWD" "$source_path" diff --git a/meson.build b/meson.build index afe684cbad..57cfa8723d 100644 --- a/meson.build +++ b/meson.build @@ -1108,6 +1108,9 @@ subdir('tools') subdir('pc-bios') subdir('tests') subdir('docs') +if 'CONFIG_GTK' in config_host + subdir('po') +endif if build_docs makeinfo = find_program('makeinfo', required: build_docs) diff --git a/meson_options.txt b/meson_options.txt index 67455c57bc..e5f45243ce 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,4 @@ +option('gettext', type : 'boolean', value : true) option('sdl', type : 'feature', value : 'auto') option('sdl_image', type : 'feature', value : 'auto') option('vnc', type : 'feature', value : 'enabled') diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 00..cc4b5c3b36 --- /dev/null +++ b/po/LINGUAS @@ -0,0 +1,8 @@ +bg +de_DE +fr_FR +hu +it +sv +tr +zh_CN diff --git a/po/Makefile b/po/Makefile deleted file mode 100644 index c041f4c858..00 --- a/po/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# This makefile is very special as it's meant to build as part of the build -# process and a
Re: [PATCH] util: qemu_get_thread_id for OpenBSD
On 7/15/2020 12:54 AM, Thomas Huth wrote: On 14/07/2020 23.26, David CARLIER wrote: From 9c7f54c67d40fae0174ba795fbaad829cd59c264 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Tue, 14 Jul 2020 23:23:55 +0100 Subject: [PATCH] util: qemu_get_thread_id implementation for OpenBSD. ussage of getthrid syscall. Signed-off-by: David Carlier --- util/oslib-posix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/oslib-posix.c b/util/oslib-posix.c index 72907d4d7f..b4f7de83c8 100644 --- a/util/oslib-posix.c +++ b/util/oslib-posix.c @@ -100,6 +100,8 @@ int qemu_get_thread_id(void) return (int)tid; #elif defined(__NetBSD__) return _lwp_self(); +#elif defined(__OpenBSD__) +return getthrid(); #else return getpid(); #endif Brad, since you're listed as OpenBSD maintainer, could you please review above patch? Thank you David and Thomas. Reviewed-by: Brad Smith