[PATCH] target/riscv: line up all of the registers in the info register dump

2021-10-08 Thread Travis Geiselbrecht
Ensure the columns for all of the register names and values line up. No functional change, just a minor tweak to the output. Signed-off-by: Travis Geiselbrecht --- target/riscv/cpu.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/riscv/cpu.c

Re: [RFC PATCH v1 1/2] s390x: sigp: Force Set Architecture to return Invalid Parameter

2021-10-08 Thread Thomas Huth
On 08/10/2021 22.38, Eric Farman wrote: According to the Principles of Operation, the SIGP Set Architecture order will return Incorrect State if some CPUs are not stopped, but only if the CZAM facility is not present. If it is, the order will return Invalid Parameter because the architecture

Re: [PATCH] hw/misc: applesmc: use host osk as default on macs

2021-10-08 Thread Pedro Tôrres
Hey Paolo and Phil, I understand you concerns regarding the license that Apple open-source code is distributed. If I restart from scratch and implement this feature based only on VirtualBox code, that is distributed under GPLv2, would it be fine? Best regards, Pedro Tôrres > On Oct 8, 2021,

[PATCH v2 15/15] bsd-user/signal: Create a dummy signal queueing function

2021-10-08 Thread Warner Losh
Create dummy signal queueing function so we can start to integrate other architectures (at the cost of signals remaining broken) to tame the dependency graph a bit and to bring in signals in a more controlled fashion. Log unimplemented events to it in the mean time. Signed-off-by: Warner Losh

[PATCH v2 14/15] bsd-user: Rename sigqueue to qemu_sigqueue

2021-10-08 Thread Warner Losh
To avoid a name clash with FreeBSD's sigqueue data structure in signalvar.h, rename sigqueue to qemu_sigqueue. This sturcture is currently defined, but unused. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- bsd-user/qemu.h | 14 +++---

[PATCH v2 12/15] bsd-user/sysarch: Move to using do_freebsd_arch_sysarch interface

2021-10-08 Thread Warner Losh
do_freebsd_arch_sysarch() exists in $ARCH/target_arch_sysarch.h for x86. Call it from do_freebsd_sysarch() and remove the mostly duplicate version in syscall.c. Future changes will move it to os-sys.c and support other architectures. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson ---

[PATCH v2 11/15] bsd-user: Add stop_all_tasks

2021-10-08 Thread Warner Losh
Similar to the same function in linux-user: this stops all the current tasks. Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/main.c | 9 + bsd-user/qemu.h | 1 + 2 files changed, 10 insertions(+) diff --git a/bsd-user/main.c b/bsd-user/main.c index

[PATCH v2 00/15] bsd-user: misc cleanup for aarch64 import

2021-10-08 Thread Warner Losh
Prepare for aarch64 support (the next architecture to be upstreamed). As the aarch64 emulation is more complete, it relies on a number of different items. In some cases, I've pulled in the full support from bsd-user fork. In other cases I've created a simple stub (as is the case for signals, which

[PATCH v2 07/15] bsd-user: move TARGET_MC_GET_CLEAR_RET to target_os_signal.h

2021-10-08 Thread Warner Losh
Move TARGET_MC_GET_CLEAR_RET to freebsd/target_os_signal.h since it's architecture agnostic on FreeBSD. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- bsd-user/freebsd/target_os_signal.h | 3 +++ bsd-user/i386/target_arch_signal.h | 2 --

[PATCH v2 10/15] bsd-user: Remove used from TaskState

2021-10-08 Thread Warner Losh
The 'used' field in TaskState is write only. Remove it from TaskState. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- bsd-user/main.c | 1 - bsd-user/qemu.h | 1 - 2 files changed, 2 deletions(-) diff --git a/bsd-user/main.c

[PATCH v2 13/15] bsd-user/sysarch: Provide a per-arch framework for sysarch syscall

2021-10-08 Thread Warner Losh
Add the missing glue to pull in do_freebsd_sysarch to call do_freebsd_arch_sysarch. Put it in os-sys.c, which will be used for sysctl and sysarch system calls because they are mostly arch specific. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson ---

[PATCH v2 09/15] bsd-user/target_os_elf: If ELF_HWCAP2 is defined, publish it

2021-10-08 Thread Warner Losh
Some architectures publish AT_HWCAP2 as well as AT_HWCAP. Those architectures will define ELF_HWCAP2 in their target_arch_elf.h files for the value for this process. If it is defined, then publish it. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé

[PATCH v2 04/15] bsd-user: TARGET_RESET define is unused, remove it

2021-10-08 Thread Warner Losh
Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- bsd-user/i386/target_arch_cpu.h | 2 -- bsd-user/x86_64/target_arch_cpu.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/bsd-user/i386/target_arch_cpu.h b/bsd-user/i386/target_arch_cpu.h

[PATCH v2 08/15] bsd-user/target_os_elf.h: Remove fallback ELF_HWCAP and reorder

2021-10-08 Thread Warner Losh
All architectures have a ELF_HWCAP, so remove the fallback ifdef. Place ELF_HWCAP in the same order as on native FreeBSD. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- bsd-user/freebsd/target_os_elf.h | 8 ++-- 1 file changed, 2

[PATCH v2 06/15] bsd-user/errno_defs.h: Add internal error numbers

2021-10-08 Thread Warner Losh
From: Stacey Son To emulate signals and interrupted system calls, we need to have the same mechanisms we have in the kernel, including these errno values. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/errno_defs.h | 14 +++--- 1

[PATCH v2 02/15] bsd-user/target_os-user.h: Remove support for FreeBSD older than 12.0

2021-10-08 Thread Warner Losh
Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/freebsd/target_os_user.h | 100 +- 1 file changed, 1 insertion(+), 99 deletions(-) diff --git a/bsd-user/freebsd/target_os_user.h b/bsd-user/freebsd/target_os_user.h index 95b1fa9f99..19892c5071

[PATCH v2 01/15] meson: *-user: only descend into *-user when configured

2021-10-08 Thread Warner Losh
To increase flexibility, only descend into *-user when that is configured. This allows *-user to selectively include directories based on the host OS which may not exist on all hosts. Adopt Paolo's suggestion of checking the configuration in the directories that know about the configuration.

[PATCH v2 05/15] bsd-user: export get_errno and is_error from syscall.c

2021-10-08 Thread Warner Losh
Make get_errno and is_error global so files other than syscall.c can use them. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- bsd-user/qemu.h| 4 bsd-user/syscall.c | 10 +- 2 files changed, 9 insertions(+), 5 deletions(-)

[PATCH v2 03/15] bsd-user/strace.list: Remove support for FreeBSD versions older than 12.0

2021-10-08 Thread Warner Losh
Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/freebsd/strace.list | 11 --- 1 file changed, 11 deletions(-) diff --git a/bsd-user/freebsd/strace.list b/bsd-user/freebsd/strace.list index b01b5f36e8..275d2dbe27 100644 --- a/bsd-user/freebsd/strace.list +++

[PATCH 6/6] docs/sphinx: add 's' keyboard binding to focus search

2021-10-08 Thread marcandre . lureau
From: Marc-André Lureau This is pretty ubiquitous. ('/' is already taken by some browsers for quick search) Signed-off-by: Marc-André Lureau --- docs/conf.py | 4 docs/sphinx-static/custom.js | 9 + 2 files changed, 13 insertions(+) create mode 100644

[PATCH 4/6] meson: remove explicit extensions dependency file list

2021-10-08 Thread marcandre . lureau
From: Marc-André Lureau This is now generated automatically by depfile.py. Signed-off-by: Marc-André Lureau --- docs/meson.build | 10 -- tests/qapi-schema/meson.build | 5 - 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/docs/meson.build

[PATCH 2/6] docs/sphinx: add static files to generated depfile

2021-10-08 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- docs/sphinx/depfile.py | 5 + 1 file changed, 5 insertions(+) diff --git a/docs/sphinx/depfile.py b/docs/sphinx/depfile.py index b6fb926df1..99539adb48 100644 --- a/docs/sphinx/depfile.py +++ b/docs/sphinx/depfile.py @@ -13,6

[PATCH 5/6] docs/sphinx: set navigation_with_keys=True

2021-10-08 Thread marcandre . lureau
From: Marc-André Lureau Allow navigating to the previous/next page using the keyboard's left and right arrows. I wish this would be the default, and that the themes would provide more key navigation, but that doesn't seem on the roadmap. Signed-off-by: Marc-André Lureau --- docs/conf.py | 1 +

[PATCH 3/6] docs/sphinx: add templates files to generated depfile

2021-10-08 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- docs/conf.py | 2 +- docs/sphinx/depfile.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index ff6e92c6e2..edc2bf8fcb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@

[PATCH 1/6] docs/sphinx: add loaded modules to generated depfile

2021-10-08 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- docs/sphinx/depfile.py | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/sphinx/depfile.py b/docs/sphinx/depfile.py index 277fdf0f56..b6fb926df1 100644 --- a/docs/sphinx/depfile.py +++

[PATCH 0/6] Some Sphinx improvements

2021-10-08 Thread marcandre . lureau
From: Marc-André Lureau Hi, I have collected a few Sphinx-related improvements to improve depfile generation and add some keyboard navigation. Hope you'll like it. Marc-André Lureau (6): docs/sphinx: add loaded modules to generated depfile docs/sphinx: add static files to generated depfile

[PATCH v3 9/9] bsd-user/mmap.c: assert that target_mprotect cannot fail

2021-10-08 Thread Warner Losh
Similar to the equivalent linux-user change 86abac06c14. All error conditions that target_mprotect checks are also checked by target_mmap. EACCESS cannot happen because we are just removing PROT_WRITE. ENOMEM should not happen because we are modifying a whole VMA (and we have bigger problems

[PATCH v3 7/9] bsd-user/mmap.c: Don't mmap fd == -1 independently from MAP_ANON flag

2021-10-08 Thread Warner Losh
From: Guy Yur Switch checks for !(flags & MAP_ANONYMOUS) with checks for fd != -1. MAP_STACK and MAP_GUARD both require fd == -1 and don't require mapping the fd either. Add analysis from Guy Yur detailing the different cases for MAP_GUARD and MAP_STACK. Signed-off-by: Guy Yur [ partially

[PATCH v3 5/9] bsd-user/mmap.c: mmap prefer MAP_ANON for BSD

2021-10-08 Thread Warner Losh
MAP_ANON and MAP_ANONYMOUS are identical. Prefer MAP_ANON for BSD since the file is now a confusing mix of the two. Signed-off-by: Warner Losh Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- bsd-user/mmap.c | 11 +-- 1 file changed, 5 insertions(+), 6

[PATCH v3 8/9] bsd-user/mmap.c: Implement MAP_EXCL, required by jemalloc in head

2021-10-08 Thread Warner Losh
From: Kyle Evans jemalloc requires a working MAP_EXCL. Ensure that no page is double mapped when specified. In addition, use guest_range_valid_untagged to test for valid ranges of pages rather than an incomplete inlined version of the test that might be wrong. Signed-off-by: Kyle Evans

[PATCH v3 2/9] bsd-user/mmap.c: check pread's return value to fix warnings with _FORTIFY_SOURCE

2021-10-08 Thread Warner Losh
From: Mikaël Urankar Simmilar to the equivalent linux-user: commit fb7e378cf9c, which added checking to pread's return value. Update to current qemu standards with {} around the if statement. Signed-off-by: Mikaël Urankar Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by:

[PATCH v3 4/9] bsd-user/mmap.c: mmap return ENOMEM on overflow

2021-10-08 Thread Warner Losh
mmap should return ENOMEM on len overflow rather than EINVAL. Return EINVAL when len == 0 and ENOMEM when the rounded to a page length is 0. Found by make check-tcg. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- bsd-user/mmap.c | 9 -

[PATCH v3 6/9] bsd-user/mmap.c: Convert to qemu_log logging for mmap debugging

2021-10-08 Thread Warner Losh
Convert DEBUG_MMAP to qemu_log CPU_LOG_PAGE. Signed-off-by: Warner Losh --- bsd-user/mmap.c | 53 + 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c index 301108ed25..face98573f 100644 ---

[PATCH v3 1/9] bsd-user/mmap.c: Always zero MAP_ANONYMOUS memory in mmap_frag()

2021-10-08 Thread Warner Losh
From: Mikaël Urankar Similar to the equivalent linux-user commit e6deac9cf99 When mapping MAP_ANONYMOUS memory fragments, still need notice about to set it zero, or it will cause issues. Signed-off-by: Mikaël Urankar Signed-off-by: Warner Losh Reviewed-by: Richard Henderson ---

[PATCH v3 3/9] bsd-user/mmap.c: MAP_ symbols are defined, so no need for ifdefs

2021-10-08 Thread Warner Losh
All these MAP_ symbols are always defined on supported FreeBSD versions (12.2 and newer), so remove the #ifdefs since they aren't needed. Signed-off-by: Warner Losh Reviewed-by: Philippe Mathieu-Daudé Acked-by: Richard Henderson --- bsd-user/mmap.c | 14 -- 1 file changed, 14

[PATCH v3 0/9] bsd-user mmap fixes

2021-10-08 Thread Warner Losh
This series synchronizes mmap.c with the bsd-user fork. This is a mix of old bug fixes pulled in from linux-user, as well as some newer fixes to adress bugs found in check-tcg and recent FreeBSD developments. There are also a couple of style commits. Updated to migrate debugging to qemu_log. v3:

[RFC PATCH v1 2/2] s390x/kvm: Pass SIGP Stop flags

2021-10-08 Thread Eric Farman
When building a Stop IRQ to pass to KVM, we should incorporate the flags if handling the SIGP Stop and Store Status order. With that, KVM can reject other orders that are submitted for the same CPU while the operation is fully processed. Signed-off-by: Eric Farman Acked-by: Janosch Frank ---

[RFC PATCH v1 1/2] s390x: sigp: Force Set Architecture to return Invalid Parameter

2021-10-08 Thread Eric Farman
According to the Principles of Operation, the SIGP Set Architecture order will return Incorrect State if some CPUs are not stopped, but only if the CZAM facility is not present. If it is, the order will return Invalid Parameter because the architecture mode cannot be changed. Since CZAM always

[RFC PATCH v1 0/2] Improvements to SIGP handling [QEMU]

2021-10-08 Thread Eric Farman
I'm cleaning up some of the SIGP code in KVM and QEMU, and would like to propose the following changes. Patch 1 should be less concerning than its KVM counterpart, since the CZAM bit in question is already present in QEMU. Patch 2 provides some handshaking with KVM. Since QEMU injects a Stop IRQ

Re: [PATCH] hw/misc: applesmc: use host osk as default on macs

2021-10-08 Thread Paolo Bonzini
On 08/10/21 14:03, Phil Dennis-Jordan wrote: 1. Licensing Given that the code it's heavily based on is copyright Apple Computer Inc., licensed under APSL, is it safe including it in qemu as is? If the integrated code is going to be quite so "directly inspired" (down to the inconsistent struct

Re: [PATCH] hvf: Determine slot count from struct layout

2021-10-08 Thread Paolo Bonzini
On 08/10/21 07:46, Alexander Graf wrote: We can handle up to a static amount of memory slots, capped by the size of an internal array. Let's make sure that array size is the only source of truth for the number of elements in that array. Signed-off-by: Alexander Graf ---

Re: [PATCH] tests: tcg: Fix PVH test with binutils 2.36+

2021-10-08 Thread Paolo Bonzini
On 08/10/21 18:21, Cole Robinson wrote: binutils started adding a .note.gnu.property ELF section which makes the PVH test fail: TESThello on x86_64 qemu-system-x86_64: Error loading uncompressed kernel without PVH ELF Note Discard .note.gnu* while keeping the PVH .note bits intact.

Re: [PATCH] qapi: Make some ObjectTypes depend on the build settings

2021-10-08 Thread Paolo Bonzini
On 08/10/21 14:01, Markus Armbruster wrote: Paolo, do you have something for QOM queued up already? If not, I'm happy to take this through my tree. I don't but I have enough stuff that I'll be sending a pull request shortly. So, queued, and while at it I also made memory-backend-epc

Re: QAPI sync meeting

2021-10-08 Thread Paolo Bonzini
On 08/10/21 12:06, Markus Armbruster wrote: and I'd rather use -object/object-add for chardevs if that's at all possible. How far are we from making -object the preferred machine-friendly interface for creating character devices? I'd guess a week of work

[PATCH] tests: tcg: Fix PVH test with binutils 2.36+

2021-10-08 Thread Cole Robinson
binutils started adding a .note.gnu.property ELF section which makes the PVH test fail: TESThello on x86_64 qemu-system-x86_64: Error loading uncompressed kernel without PVH ELF Note Discard .note.gnu* while keeping the PVH .note bits intact. This also strips the build-id note, so drop

Re: [PATCH v2 0/3] virtio: increase VIRTQUEUE_MAX_SIZE to 32k

2021-10-08 Thread Christian Schoenebeck
On Freitag, 8. Oktober 2021 16:24:42 CEST Christian Schoenebeck wrote: > On Freitag, 8. Oktober 2021 09:25:33 CEST Greg Kurz wrote: > > On Thu, 7 Oct 2021 16:42:49 +0100 > > > > Stefan Hajnoczi wrote: > > > On Thu, Oct 07, 2021 at 02:51:55PM +0200, Christian Schoenebeck wrote: > > > > On

Re: [PATCH 2/5] plugins/cache: implement unified L2 cache emulation

2021-10-08 Thread Alex Bennée
Mahmoud Mandour writes: > This adds an implementation of a simple L2 configuration, in which a > unified L2 cache (stores both blocks of instructions and data) is > maintained for each core separately, with no inter-core interaction > taken in account. The L2 cache is used as a backup for L1

Re: [PATCH v3 13/22] target/i386/sev: Remove stubs by using code elision

2021-10-08 Thread Brijesh Singh
On 10/6/21 11:55 AM, Philippe Mathieu-Daudé wrote: > On 10/4/21 10:19, Paolo Bonzini wrote: >> On 02/10/21 14:53, Philippe Mathieu-Daudé wrote: >>> Only declare sev_enabled() and sev_es_enabled() when CONFIG_SEV is >>> set, to allow the compiler to elide unused code. Remove unnecessary >>>

Re: [PATCH v2 1/1] virtio: write back F_VERSION_1 before validate

2021-10-08 Thread Michael S. Tsirkin
On Fri, Oct 08, 2021 at 03:51:56PM +0200, Halil Pasic wrote: > On Fri, 8 Oct 2021 09:05:03 -0400 > "Michael S. Tsirkin" wrote: > > > On Fri, Oct 08, 2021 at 02:34:22PM +0200, Halil Pasic wrote: > > > The virtio specification virtio-v1.1-cs01 states: "Transitional devices > > > MUST detect Legacy

Re: [PATCH v4 10/11] tests/acpi: add expected blob for VIOT test on virt machine

2021-10-08 Thread Jean-Philippe Brucker
On Tue, Oct 05, 2021 at 03:34:57PM +0530, Ani Sinha wrote: > > > On Fri, 1 Oct 2021, Jean-Philippe Brucker wrote: > > > The VIOT blob contains the following: > > > > [000h 4]Signature : "VIOT"[Virtual I/O > > Translation Table] > > [004h 0004 4]

Re: [PATCH v4 10/11] tests/acpi: add expected blob for VIOT test on virt machine

2021-10-08 Thread Jean-Philippe Brucker
On Tue, Oct 05, 2021 at 09:38:13PM +0200, Eric Auger wrote: > Hi Jean, > > On 10/1/21 7:33 PM, Jean-Philippe Brucker wrote: > > The VIOT blob contains the following: > > > > [000h 4]Signature : "VIOT"[Virtual I/O > > Translation Table] > > [004h 0004 4]

Re: [PATCH v4 09/11] tests/acpi: add test cases for VIOT

2021-10-08 Thread Jean-Philippe Brucker
On Tue, Oct 05, 2021 at 03:57:17PM +0530, Ani Sinha wrote: > > > On Fri, 1 Oct 2021, Jean-Philippe Brucker wrote: > > > Add two test cases for VIOT, one on the q35 machine and the other on > > virt. To test complex topologies the q35 test has two PCIe buses that > > bypass the IOMMU (and are

Re: [PATCH v4 08/11] tests/acpi: allow updates of VIOT expected data files

2021-10-08 Thread Jean-Philippe Brucker
On Wed, Oct 06, 2021 at 10:12:15AM +0200, Igor Mammedov wrote: > On Fri, 1 Oct 2021 18:33:56 +0100 > Jean-Philippe Brucker wrote: > > > Create empty data files and allow updates for the upcoming VIOT tests. > > > > Signed-off-by: Jean-Philippe Brucker > > --- > >

Re: [PATCH v4 07/11] pc: Allow instantiating a virtio-iommu device

2021-10-08 Thread Jean-Philippe Brucker
On Wed, Oct 06, 2021 at 09:19:54AM +0200, Igor Mammedov wrote: > > @@ -1367,8 +1368,11 @@ static void pc_virtio_md_pci_unplug(HotplugHandler > > *hotplug_dev, > > static void pc_machine_device_pre_plug_cb(HotplugHandler *hotplug_dev, > >DeviceState

Re: [PATCH v4 03/11] hw/arm/virt: Remove device tree restriction for virtio-iommu

2021-10-08 Thread Jean-Philippe Brucker
On Tue, Oct 05, 2021 at 01:57:35PM +0200, Eric Auger wrote: > > diff --git a/hw/virtio/virtio-iommu-pci.c b/hw/virtio/virtio-iommu-pci.c > > index 770c286be7..f30eb16cbf 100644 > > --- a/hw/virtio/virtio-iommu-pci.c > > +++ b/hw/virtio/virtio-iommu-pci.c > > @@ -48,16 +48,9 @@ static void

Re: [PATCH v4 01/11] hw/acpi: Add VIOT table

2021-10-08 Thread Jean-Philippe Brucker
On Wed, Oct 06, 2021 at 10:09:50AM +0200, Igor Mammedov wrote: > On Fri, 1 Oct 2021 18:33:49 +0100 > Jean-Philippe Brucker wrote: > > > Add a function that generates a Virtual I/O Translation table (VIOT), > > describing the topology of paravirtual IOMMUs. The table is created when > >

Re: [PATCH v4 00/11] virtio-iommu: Add ACPI support

2021-10-08 Thread Jean-Philippe Brucker
On Tue, Oct 05, 2021 at 11:45:42AM -0400, Michael S. Tsirkin wrote: > Looks like this can not be applied yet because the bypass bit > isn't in yet. what's up with that? The boot-bypass bit isn't a hard dependency for this series, but it will be needed for full support eventually. It will be

Re: [PATCH v2 14/15] qdev: Base object creation on QDict rather than QemuOpts

2021-10-08 Thread Laurent Vivier
On 08/10/2021 15:34, Kevin Wolf wrote: QDicts are both what QMP natively uses and what the keyval parser produces. Going through QemuOpts isn't useful for either one, so switch the main device creation function to QDicts. By sharing more code with the -object/object-add code path, we can even

Re: [PATCH v2 1/1] virtio: write back F_VERSION_1 before validate

2021-10-08 Thread Cornelia Huck
On Fri, Oct 08 2021, Halil Pasic wrote: > On Fri, 8 Oct 2021 09:05:03 -0400 > "Michael S. Tsirkin" wrote: > >> On Fri, Oct 08, 2021 at 02:34:22PM +0200, Halil Pasic wrote: >> > The virtio specification virtio-v1.1-cs01 states: "Transitional devices >> > MUST detect Legacy drivers by detecting

Re: [PATCH v2 0/2] vfio: Some fixes about vfio-pci MMIO RAM mapping

2021-10-08 Thread Alex Williamson
On Fri, 8 Oct 2021 09:27:04 +0800 Kunkun Jiang wrote: > Kindly ping, > > Hi all, > > Will this patch be picked up soon, or is there any other advice? More reviews are always appreciated. Requesting reviews by your colleagues and/or exchanging reviews with other contributors are good ways to

Re: [PATCH v2 1/3] virtio: turn VIRTQUEUE_MAX_SIZE into a variable

2021-10-08 Thread Christian Schoenebeck
On Donnerstag, 7. Oktober 2021 17:18:03 CEST Stefan Hajnoczi wrote: > On Thu, Oct 07, 2021 at 03:09:16PM +0200, Christian Schoenebeck wrote: > > On Mittwoch, 6. Oktober 2021 16:42:34 CEST Stefan Hajnoczi wrote: > > > On Wed, Oct 06, 2021 at 02:50:07PM +0200, Christian Schoenebeck wrote: > > > > On

Re: [PATCH 3/5] plugins/cache: split command line arguments into name and value

2021-10-08 Thread Alex Bennée
Mahmoud Mandour writes: > This way of handling args is more lenient and sets a better framework to > parse boolean command line arguments. > > Signed-off-by: Mahmoud Mandour > --- > contrib/plugins/cache.c | 57 ++--- > 1 file changed, 30 insertions(+), 27

Re: [PATCH 1/5] plugins/cache: freed heap-allocated mutexes

2021-10-08 Thread Alex Bennée
Mahmoud Mandour writes: > Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PULL 00/12] some testing and plugin updates

2021-10-08 Thread Richard Henderson
On 10/8/21 5:25 AM, Alex Bennée wrote: The following changes since commit 14f12119aa675e9e28207a48b0728a2daa5b88d6: Merge remote-tracking branch 'remotes/vsementsov/tags/pull-jobs-2021-10-07-v2' into staging (2021-10-07 10:26:35 -0700) are available in the Git repository at:

Re: [PATCH v2 0/3] virtio: increase VIRTQUEUE_MAX_SIZE to 32k

2021-10-08 Thread Christian Schoenebeck
On Freitag, 8. Oktober 2021 09:25:33 CEST Greg Kurz wrote: > On Thu, 7 Oct 2021 16:42:49 +0100 > > Stefan Hajnoczi wrote: > > On Thu, Oct 07, 2021 at 02:51:55PM +0200, Christian Schoenebeck wrote: > > > On Donnerstag, 7. Oktober 2021 07:23:59 CEST Stefan Hajnoczi wrote: > > > > On Mon, Oct 04,

[PATCH v2 15/15] vl: Enable JSON syntax for -device

2021-10-08 Thread Kevin Wolf
Like we already do for -object, introduce support for JSON syntax in -device, which can be kept stable in the long term and guarantees that a single code path with identical behaviour is used for both QMP and the command line. Compared to the QemuOpts based code, the parser contains less surprises

Re: [PATCH v2 1/1] virtio: write back F_VERSION_1 before validate

2021-10-08 Thread Halil Pasic
On Fri, 8 Oct 2021 09:05:03 -0400 "Michael S. Tsirkin" wrote: > On Fri, Oct 08, 2021 at 02:34:22PM +0200, Halil Pasic wrote: > > The virtio specification virtio-v1.1-cs01 states: "Transitional devices > > MUST detect Legacy drivers by detecting that VIRTIO_F_VERSION_1 has not > > been

[PATCH v2 11/15] qdev: Add Error parameter to hide_device() callbacks

2021-10-08 Thread Kevin Wolf
hide_device() is used for virtio-net failover, where the standby virtio device delays creation of the primary device. It only makes sense to have a single primary device for each standby device. Adding a second one should result in an error instead of hiding it and never using it afterwards.

[PATCH v2 12/15] virtio-net: Store failover primary opts pointer locally

2021-10-08 Thread Kevin Wolf
Instead of accessing the global QemuOptsList, which really belong to the command line parser and shouldn't be accessed from devices, store a pointer to the QemuOpts in a new VirtIONet field. This is not the final state, but just an intermediate step to get rid of QemuOpts in devices. It will

[PATCH v2 13/15] virtio-net: Avoid QemuOpts in failover_find_primary_device()

2021-10-08 Thread Kevin Wolf
Don't go through the global QemuOptsList, it is state of the legacy command line parser and we will create devices that are not contained in it. It is also just the command line configuration and not necessarily the current runtime state. Instead, look at the qdev device tree which has the

[PATCH v2 14/15] qdev: Base object creation on QDict rather than QemuOpts

2021-10-08 Thread Kevin Wolf
QDicts are both what QMP natively uses and what the keyval parser produces. Going through QemuOpts isn't useful for either one, so switch the main device creation function to QDicts. By sharing more code with the -object/object-add code path, we can even reduce the code size a bit. This commit

[PATCH v2 05/15] iotests/245: Fix type for iothread property

2021-10-08 Thread Kevin Wolf
iothread is a string property, so None (= JSON null) is not a valid value for it. Pass the empty string instead to get the default iothread. Signed-off-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/245 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH v2 10/15] qemu-option: Allow deleting opts during qemu_opts_foreach()

2021-10-08 Thread Kevin Wolf
Use QTAILQ_FOREACH_SAFE() so that the current QemuOpts can be deleted while iterating through the whole list. Signed-off-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy --- util/qemu-option.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/qemu-option.c

[PATCH v2 08/15] qdev: Make DeviceState.id independent of QemuOpts

2021-10-08 Thread Kevin Wolf
DeviceState.id is a pointer to a string that is stored in the QemuOpts object DeviceState.opts and freed together with it. We want to create devices without going through QemuOpts in the future, so make this a separately allocated string. Signed-off-by: Kevin Wolf Reviewed-by: Vladimir

[PATCH v2 09/15] softmmu/qdev-monitor: add error handling in qdev_set_id

2021-10-08 Thread Kevin Wolf
From: Damien Hedde qdev_set_id() is mostly used when the user adds a device (using -device cli option or device_add qmp command). This commit adds an error parameter to handle the case where the given id is already taken. Also document the function and add a return value in order to be able to

[PATCH v2 07/15] qdev: Avoid using string visitor for properties

2021-10-08 Thread Kevin Wolf
The only thing the string visitor adds compared to a keyval visitor is list support. git grep for 'visit_start_list' and 'visit.*List' shows that devices don't make use of this. In a world with a QAPIfied command line interface, the keyval visitor is used to parse the command line. In order to

[PATCH v2 04/15] qom: Reduce use of error_propagate()

2021-10-08 Thread Kevin Wolf
ERRP_GUARD() makes debugging easier by making sure that _abort still fails at the real origin of the error instead of error_propagate(). Signed-off-by: Kevin Wolf --- qom/object.c| 7 +++ qom/object_interfaces.c | 19 ++- 2 files changed, 9 insertions(+), 17

[PATCH v2 03/15] net/vhost-vdpa: Fix device compatibility check

2021-10-08 Thread Kevin Wolf
vhost-vdpa works only with specific devices. At startup, it second guesses what the command line option handling will do and error out if it thinks a non-virtio device will attach to them. This second guessing is not only ugly, it can lead to wrong error messages ('-device floppy,netdev=foo'

[PATCH v2 02/15] net/vhost-user: Fix device compatibility check

2021-10-08 Thread Kevin Wolf
vhost-user works only with specific devices. At startup, it second guesses what the command line option handling will do and error out if it thinks a non-virtio device will attach to them. This second guessing is not only ugly, it can lead to wrong error messages ('-device floppy,netdev=foo'

[PATCH v2 06/15] iotests/051: Fix typo

2021-10-08 Thread Kevin Wolf
The iothread isn't called 'iothread0', but 'thread0'. Depending on the order that properties are parsed, the error message may change from the expected one to another one saying that the iothread doesn't exist. Signed-off-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy ---

[PATCH v2 00/15] qdev: Add JSON -device

2021-10-08 Thread Kevin Wolf
It's still a long way until we'll have QAPIfied devices, but there are some improvements that we can already make now to make the future switch easier. One important part of this is having code paths without QemuOpts, which we want to get rid of and replace with the keyval parser in the long run.

[PATCH v2 01/15] net: Introduce NetClientInfo.check_peer_type()

2021-10-08 Thread Kevin Wolf
Some network backends (vhost-user and vhost-vdpa) work only with specific devices. At startup, they second guess what the command line option handling will do and error out if they think a non-virtio device will attach to them. This second guessing is not only ugly, it can lead to wrong error

Re: [PULL 00/13] M68k next patches

2021-10-08 Thread Richard Henderson
request q800 20211008 macfb: fixes for booting MacOS Mark Cave-Ayland (13): macfb: handle errors that occur during realize macfb: update macfb.c to use the Error API best practices macfb: fix invalid object reference

Re: [PATCH] MAINTAINERS: Add myself as reviewer of 'Machine core' API

2021-10-08 Thread Marcel Apfelbaum
Hi Philippe, On Thu, Oct 7, 2021 at 12:32 PM Philippe Mathieu-Daudé wrote: > > In order to help Eduardo and Marcel with the machine > core API, add myself as reviewer. That will also help > me to learn more about this subsystem :) > > Signed-off-by: Philippe Mathieu-Daudé > --- > MAINTAINERS |

Re: [PATCH v2 1/1] virtio: write back F_VERSION_1 before validate

2021-10-08 Thread Michael S. Tsirkin
On Fri, Oct 08, 2021 at 02:34:22PM +0200, Halil Pasic wrote: > The virtio specification virtio-v1.1-cs01 states: "Transitional devices > MUST detect Legacy drivers by detecting that VIRTIO_F_VERSION_1 has not > been acknowledged by the driver." This is exactly what QEMU as of 6.1 > has done

[PATCH v2 1/1] virtio: write back F_VERSION_1 before validate

2021-10-08 Thread Halil Pasic
The virtio specification virtio-v1.1-cs01 states: "Transitional devices MUST detect Legacy drivers by detecting that VIRTIO_F_VERSION_1 has not been acknowledged by the driver." This is exactly what QEMU as of 6.1 has done relying solely on VIRTIO_F_VERSION_1 for detecting that. However, the

[PULL 12/12] tests/docker: add a debian-native image and make available

2021-10-08 Thread Alex Bennée
This image is intended for building whatever the native versions of QEMU are for the host architecture. This will hopefully be an aid for 3rd parties who want to be able to build QEMU themselves without redoing all the dependencies themselves. We disable the registry because we currently don't

[PULL 10/12] accel/tcg: re-factor plugin_inject_cb so we can assert insn_idx is valid

2021-10-08 Thread Alex Bennée
Coverity doesn't know enough about how we have arranged our plugin TCG ops to know we will always have incremented insn_idx before injecting the callback. Let us assert it for the benefit of Coverity and protect ourselves from accidentally breaking the assumption and triggering harder to grok

[PULL 11/12] .github: move repo lockdown to the v2 configuration

2021-10-08 Thread Alex Bennée
I was getting prompted by GitHub for new permissions but it turns out per https://github.com/dessant/repo-lockdown/issues/6: Repo Lockdown has been rewritten for GitHub Actions, offering new features and better control over your automation presets. The legacy GitHub App has been deprecated,

[PULL 05/12] gitlab: Add cross-riscv64-system, cross-riscv64-user

2021-10-08 Thread Alex Bennée
From: Richard Henderson Signed-off-by: Richard Henderson Message-Id: <20210914185830.1378771-3-richard.hender...@linaro.org> [AJB: add allow_failure] Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Willian Rampazzo Message-Id:

[PULL 07/12] gitlab: skip the check-patch job on the upstream repo

2021-10-08 Thread Alex Bennée
From: Daniel P. Berrangé The check-patch job is intended to be used by contributors or subsystem maintainers to see if there are style mistakes. The false positive rate is too high to be used in a gating scenario so should not run it on the upstream repo ever. Signed-off-by: Daniel P. Berrangé

[PULL 06/12] travis.yml: Remove the "Release tarball" job

2021-10-08 Thread Alex Bennée
From: Thomas Huth This is a leftover from the days when we were using Travis excessively, but since x86 jobs are not really usable there anymore, this job has likely never been used since many months. Let's simply remove it now. Signed-off-by: Thomas Huth Reviewed-by: Daniel P. Berrangé

[PULL 08/12] gitlab: fix passing of TEST_TARGETS env to cirrus

2021-10-08 Thread Alex Bennée
From: Daniel P. Berrangé A typo meant the substitution would not work, and the placeholder in the target file didn't even exist. The result was that tests were never run on the FreeBSD and macOS jobs, only a basic build. Signed-off-by: Daniel P. Berrangé Acked-by: Thomas Huth Reviewed-by:

[PULL 03/12] tests/tcg: move some multiarch files and make conditional

2021-10-08 Thread Alex Bennée
We had some messy code to filter out stuff we can't build. Lets junk that and simplify the logic by pushing some stuff into subdirs. In particular we move: float_helpers into libs - not a standalone test linux-test into linux - so we only build on Linux hosts This allows for at least some of

[PULL 04/12] tests/docker: promote debian-riscv64-cross to a full image

2021-10-08 Thread Alex Bennée
To be able to cross build QEMU itself we need to include a few more libraries. These are only available in Debian's unstable ports repo for now so we need to base the riscv64 image on sid with the the minimal libs needed to build QEMU (glib/pixman). The result works but is not as clean as using

[PULL 09/12] plugins/: Add missing functions to symbol list

2021-10-08 Thread Alex Bennée
From: Lukas Jünger Some functions of the plugin API were missing in the symbol list. However, they are all used by the contributed example plugins. QEMU fails to load the plugin if the function symbol is not exported. Signed-off-by: Lukas Jünger Message-Id:

[PULL 02/12] tests/tcg/sha1: remove endian include

2021-10-08 Thread Alex Bennée
This doesn't exist in BSD world and doesn't seem to be needed by either. Signed-off-by: Alex Bennée Reviewed-by: Warner Losh Message-Id: <20210917162332.3511179-3-alex.ben...@linaro.org> diff --git a/tests/tcg/multiarch/sha1.c b/tests/tcg/multiarch/sha1.c index 87bfbcdf52..0081bd7657 100644

[PULL 00/12] some testing and plugin updates

2021-10-08 Thread Alex Bennée
The following changes since commit 14f12119aa675e9e28207a48b0728a2daa5b88d6: Merge remote-tracking branch 'remotes/vsementsov/tags/pull-jobs-2021-10-07-v2' into staging (2021-10-07 10:26:35 -0700) are available in the Git repository at: https://github.com/stsquad/qemu.git

[PULL 01/12] configure: don't override the selected host test compiler if defined

2021-10-08 Thread Alex Bennée
There are not many cases you would want to do this but one is if you want to use a test friendly compiler like gcc instead of a system compiler like clang. Either way we should honour the users choice if they have made it. Signed-off-by: Alex Bennée Cc: Warner Losh Reviewed-by: Warner Losh

Re: [PATCH] qapi: Make some ObjectTypes depend on the build settings

2021-10-08 Thread Markus Armbruster
Paolo, do you have something for QOM queued up already? If not, I'm happy to take this through my tree.

  1   2   >