[PATCH v7 0/2] vhost-user hardware notifier bug fixes

2022-02-06 Thread Xueming Li
Fix 2 ciritical bugs of vhost-user hardware notifier. Xueming Li (2): vhost-user: remove VirtQ notifier restore vhost-user: fix VirtQ notifier cleanup hw/virtio/vhost-user.c | 61 +++--- include/hw/virtio/vhost-user.h | 3 +- 2 files changed, 29 insertio

[PATCH v3 03/21] exec: Declare vaddr as a generic target-agnostic type

2022-02-06 Thread Philippe Mathieu-Daudé via
Move vaddr type declaration to the generic "exec/cpu-common.h" header. Reviewed-by: Paolo Bonzini Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-common.h | 12 include/hw/core/cpu.h | 13 + 2 files changed, 13 insertions(+

[PATCH v3 00/21] softmmu: Make various objects target agnostic

2022-02-06 Thread Philippe Mathieu-Daudé via
This is a re-org accel/ and softmmu/ to have more target-agnostic objects. Series fully reviewed. Paolo, Richard, do you want me to send a pull request for this and the 'Remove "qemu/log.h"' series? Since v1: - Simplify kvm_cpus_are_resettable (Richard) Since RFC: - Rework accel/meson (Richard)

[PATCH v7 1/2] vhost-user: remove VirtQ notifier restore

2022-02-06 Thread Xueming Li
Notifier set when vhost-user backend asks qemu to mmap an FD and offset. When vhost-user backend restart or getting killed, VQ notifier FD and mmap addresses become invalid. After backend restart, MR contains the invalid address will be restored and fail on notifier access. On the other hand, qemu

Re: [RFC v4 08/21] vfio-user: define socket receive functions

2022-02-06 Thread John Johnson
> On Feb 4, 2022, at 4:42 AM, Thanos Makatos wrote: > >> -Original Message- >> From: Qemu-devel > bounces+thanos.makatos=nutanix@nongnu.org> On Behalf Of Thanos >> Makatos >> Sent: 03 February 2022 21:54 >> To: John Johnson ; qemu-devel@nongnu.org >> Subject: RE: [RFC v4 08/21] vfio

[PATCH v16] ACPI ERST: specification for ERST support

2022-02-06 Thread Ani Sinha
From: Eric DeVolder Information on the implementation of the ACPI ERST support. Signed-off-by: Eric DeVolder Acked-by: Ani Sinha --- docs/specs/acpi_erst.rst | 200 +++ docs/specs/index.rst | 1 + 2 files changed, 201 insertions(+) create mode 100644

[PATCH v7 2/2] vhost-user: fix VirtQ notifier cleanup

2022-02-06 Thread Xueming Li
When vhost-user device cleanup, remove notifier MR and munmaps notifier address in the event-handling thread, VM CPU thread writing the notifier in concurrent fails with an error of accessing invalid address. It happens because MR is still being referenced and accessed in another thread while the u

Re: [RFC v4 09/21] vfio-user: define socket send functions

2022-02-06 Thread John Johnson
> On Jan 26, 2022, at 2:17 AM, Thanos Makatos > wrote: > >> >> +static int wait_time = 1000; /* wait 1 sec for replies */ > > Could we make this configurable via the command line as it helps debugging? > Yes, I can add a CLI option. JJ

[PATCH v16] ACPI ERST: specification for ERST support

2022-02-06 Thread Ani Sinha
Hi Michael: Sendiding ERST doc patch again with TOC added for the build fix. thanks ani

Re: [PATCH v4 11/11] 9p: darwin: Adjust assumption on virtio-9p-test

2022-02-06 Thread Thomas Huth
On 06/02/2022 21.07, Will Cohen wrote: The previous test depended on the assumption that P9_DOTL_AT_REMOVEDIR and AT_REMOVEDIR have the same value. While this is true on Linux, it is not true everywhere, and leads to an incorrect test failure on unlink_at, noticed when adding 9p to darwin: Rece

Re: [PATCH] erst: drop cast to long long

2022-02-06 Thread Thomas Huth
On 06/02/2022 10.35, Michael S. Tsirkin wrote: The way to print uint64_t is with PRIx64, not with a cast to long long. Cc: Eric DeVolder Signed-off-by: Michael S. Tsirkin --- tests/qtest/erst-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/erst-test.c

Re: Fwd: VirtioSound device emulation implementation

2022-02-06 Thread Shreyansh Chouhan
On Thu, 20 Jan 2022 at 16:09, Laurent Vivier wrote: > > Le 29/12/2021 à 06:52, Shreyansh Chouhan a écrit : > > Hi, > > > > I am sorry for the absence of activity on this. A couple of people very > > close to me died, and I also > > got busy > > with the linux kernel mentorship program for a while

[PATCH] memory: Fix qemu crash on starting dirty log twice with stopped VM

2022-02-06 Thread Peter Xu
QEMU can now easily crash with two continuous migration carried out: (qemu) migrate -d exec:cat>out (qemu) migrate_cancel (qemu) migrate -d exec:cat>out [crash] ../softmmu/memory.c:2782: memory_global_dirty_log_start: Assertion `!(global_dirty_tracking & flags)' failed. It's because memory API pr

Re: [RFC PATCH] Allow VIRTIO_F_IN_ORDER to be negotiated for vdpa devices

2022-02-06 Thread Jason Wang
On Sun, Feb 6, 2022 at 12:04 AM wrote: > > From: Gautam Dawar > > Hi All, > > The VIRTIO_F_IN_ORDER feature is implemented by DPDK's virtio_net > driver but not by the Linux kernel's virtio_net driver. > However, this feature still can't be tested using vhost-vdpa with > hardware devices that imp

Re: [RFC PATCH] spapr: Add SPAPR_CAP_AIL_MODES for supported AIL modes for H_SET_MODE hcall

2022-02-06 Thread David Gibson
On Mon, Jan 31, 2022 at 04:10:34PM -0300, Daniel Henrique Barboza wrote: > > > On 1/29/22 03:50, Nicholas Piggin wrote: > > The behaviour of the Address Translation Mode on Interrupt resource is > > not consistently supported by all CPU versions or all KVM versions. In > > particular KVM HV only

Re: [RFC PATCH] spapr: Add SPAPR_CAP_AIL_MODES for supported AIL modes for H_SET_MODE hcall

2022-02-06 Thread David Gibson
On Sat, Jan 29, 2022 at 04:50:07PM +1000, Nicholas Piggin wrote: > The behaviour of the Address Translation Mode on Interrupt resource is > not consistently supported by all CPU versions or all KVM versions. In > particular KVM HV only supports mode 0 on POWER7 processors, and does > not support m

Re: [RFC PATCH] spapr: Add SPAPR_CAP_AIL_MODES for supported AIL modes for H_SET_MODE hcall

2022-02-06 Thread David Gibson
On Mon, Jan 31, 2022 at 12:51:00PM -0300, Fabiano Rosas wrote: > Nicholas Piggin writes: > > > The behaviour of the Address Translation Mode on Interrupt resource is > > not consistently supported by all CPU versions or all KVM versions. In > > particular KVM HV only supports mode 0 on POWER7 pr

Re: [PATCH v4 09/11] 9p: darwin: Implement compatibility for mknodat

2022-02-06 Thread Will Cohen
This patch set currently places it in 9p-util only because 9p is the only place where this issue seems to have come up so far and we were wary of editing files too far afield, but I have no attachment to its specific location! On Sun, Feb 6, 2022 at 4:21 PM Philippe Mathieu-Daudé wrote: > On 6/2

Re: [PATCH v4 10/11] 9p: darwin: meson: Allow VirtFS on Darwin

2022-02-06 Thread Will Cohen
Only because porting the proxy-helper to macOS is outside the scope of this particular patch. While some initial concepts around it have been considered by some of the contributors to this patch, those implementations weren't tested enough and the security implications weren't considered in full. W

Re: [PATCH 08/10] target: Add missing "qemu/timer.h" include

2022-02-06 Thread Alistair Francis
On Fri, Feb 4, 2022 at 6:35 AM Philippe Mathieu-Daudé via wrote: > > cpu_get_host_ticks() and NANOSECONDS_PER_SECOND are declared > in "qemu/timer.h". > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > target/arm/cpu.c | 1 + > target/arm/helper.c

[PATCH 7/8] Hexagon (tests/tcg/hexagon) add floating point instructions to usr.c

2022-02-06 Thread Taylor Simpson
Tests to confirm floating point instructions are properly setting exception bits in USR Signed-off-by: Taylor Simpson --- tests/tcg/hexagon/usr.c | 339 1 file changed, 339 insertions(+) diff --git a/tests/tcg/hexagon/usr.c b/tests/tcg/hexagon/usr.c inde

[PATCH 8/8] Hexagon (tests/tcg/hexagon) update overflow test

2022-02-06 Thread Taylor Simpson
Add a test that sets USR multiple times in a packet Signed-off-by: Taylor Simpson --- tests/tcg/hexagon/overflow.c | 61 +++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/tests/tcg/hexagon/overflow.c b/tests/tcg/hexagon/overflow.c index 196fcf7f3a

[PATCH 2/8] Hexagon HVX (target/hexagon)) fix bug in HVX saturate instructions

2022-02-06 Thread Taylor Simpson
Two tests added to tests/tcg/hexagon/hvx_misc.c v21.uw = vadd(v11.uw, v10.uw):sat v25:24.uw = vsub(v17:16.uw, v27:26.uw):sat Signed-off-by: Taylor Simpson --- target/hexagon/macros.h | 4 +- tests/tcg/hexagon/hvx_misc.c | 71 +++- 2 files changed, 72

[PATCH 4/8] Hexagon (target/hexagon) properly handle SNaN in dfmin/dfmax/sfmin/sfmax

2022-02-06 Thread Taylor Simpson
The float??_minnum implementation differs from Hexagon for SNaN, it returns NaN, but Hexagon returns the other input. So, we add checks for NaN before calling it. test cases added in a subsequent patch to more extensively test USR bits Signed-off-by: Taylor Simpson --- target/hexagon/op_helper

[PATCH 6/8] Hexagon (tests/tcg/hexagon) test instructions that might set bits in USR

2022-02-06 Thread Taylor Simpson
Hexagon has ~200 instructions that set the saturate bit in USR, these were broken into groups of similar instructions and one instruction from each group is tested with at least one input that does not saturate and at least one input that does saturate. Signed-off-by: Taylor Simpson --- tests/tc

[PATCH 3/8] Hexagon (target/hexagon) properly set FPINVF bit in sfcmp.uo and dfcmp.uo

2022-02-06 Thread Taylor Simpson
Instead of checking for nan arguments, use float??_unordered_quiet test cases added in a subsequent patch to more extensively test USR bits Signed-off-by: Taylor Simpson --- target/hexagon/op_helper.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/target/hexagon/op_he

[PATCH 1/8] Hexagon (target/hexagon) fix bug in circular addressing

2022-02-06 Thread Taylor Simpson
From: Michael Lambert Versions V3 and earlier should treat the "K_const" and "length" values as unsigned. Modified circ_test_v3() in tests/tcg/hexagon/circ.c to reproduce the bug Signed-off-by: Michael Lambert Signed-off-by: Taylor Simpson --- target/hexagon/op_helper.c | 6 +++--- tests/tcg

[PATCH 5/8] Hexagon (target/hexagon) properly handle denorm in arch_sf_recip_common

2022-02-06 Thread Taylor Simpson
The arch_sf_recip_common function was calling float32_getexp which adjusts for denorm, but the we actually need the raw exponent bits. This function is called from 3 instructions sfrecipa sffixupn sffixupd Test cases added to tests/tcg/hexagon/fpstuff.c Signed-off-by: Taylor Simpson

[PATCH 0/8] Hexagon bug fixes and additional tests

2022-02-06 Thread Taylor Simpson
Fix bugs reported from Hexagon users There is a pattern of issues setting bits in user status register (USR), so I created new tests dedicated to instructions that might set USR. Michael Lambert (1): Hexagon (target/hexagon) fix bug in circular addressing Taylor Simpson (7): Hexagon HVX (ta

[PATCH qemu] Add TCG support for UMIP

2022-02-06 Thread ~hildardorf
From: Gareth Webb --- target/i386/cpu.c | 2 +- target/i386/cpu.h | 4 +++- target/i386/helper.c| 8 +++- target/i386/tcg/translate.c | 12 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index

Re: [PATCH v4 10/11] 9p: darwin: meson: Allow VirtFS on Darwin

2022-02-06 Thread Philippe Mathieu-Daudé via
On 6/2/22 21:07, Will Cohen wrote: From: Keno Fischer Signed-off-by: Keno Fischer [Michael Roitzsch: - Rebase for NixOS] Signed-off-by: Michael Roitzsch [Will Cohen: - Rebase to master] Signed-off-by: Will Cohen Reviewed-by: Paolo Bonzini [Will Cohen: - Add check for pthread_fchdir_np to vi

Re: [PATCH v4 09/11] 9p: darwin: Implement compatibility for mknodat

2022-02-06 Thread Philippe Mathieu-Daudé via
On 6/2/22 21:07, Will Cohen wrote: From: Keno Fischer Darwin does not support mknodat. However, to avoid race conditions with later setting the permissions, we must avoid using mknod on the full path instead. We could try to fchdir, but that would cause problems if multiple threads try to call

Re: [PATCH v4 02/11] 9p: Rename 9p-util -> 9p-util-linux

2022-02-06 Thread Philippe Mathieu-Daudé via
On 6/2/22 21:07, Will Cohen wrote: From: Keno Fischer The current file only has the Linux versions of these functions. Rename the file accordingly and update the Makefile to only build it on Linux. A Darwin version of these will follow later in the series. Signed-off-by: Keno Fischer [Michael

Re: [PATCH v4 01/11] 9p: linux: Fix a couple Linux assumptions

2022-02-06 Thread Philippe Mathieu-Daudé via
On 6/2/22 21:07, Will Cohen wrote: From: Keno Fischer - Guard Linux only headers. - Add qemu/statfs.h header to abstract over the which headers are needed for struct statfs - Define `ENOATTR` only if not only defined (it's defined in system headers on Darwin). Signed-off-by: Keno

Re: [PATCH v3 1/2] hw/display/vmware_vga: replace fprintf calls with trace events

2022-02-06 Thread Philippe Mathieu-Daudé via
On 6/2/22 19:39, Carwyn Ellis wrote: Debug output was always being sent to STDERR. This has been replaced with trace events. Signed-off-by: Carwyn Ellis --- hw/display/trace-events | 3 +++ hw/display/vmware_vga.c | 30 ++ 2 files changed, 21 insertions(+), 12

Re: Add TCG support for UMIP

2022-02-06 Thread Philippe Mathieu-Daudé via
On 6/2/22 21:27, Gareth Webb wrote: Dear Maintainers, Please find attached a .patch that adds support for the UMIP cpu feature to x86 TCG. Apologies for the patch being via attachment, I can not get git send-email to play nice with office365. Can you try posting from sourcehut? It worked for

Add TCG support for UMIP

2022-02-06 Thread Gareth Webb
Dear Maintainers, Please find attached a .patch that adds support for the UMIP cpu feature to x86 TCG. Apologies for the patch being via attachment, I can not get git send-email to play nice with office365. This is my first time committing to the project, so please be nice and point out any is

Re: [PATCH] tcg/loongarch64: Fix fallout from recent MO_Q renaming

2022-02-06 Thread Richard Henderson
On 2/7/22 03:21, WANG Xuerui wrote: From: WANG Xuerui Apparently we were left behind; just renaming MO_Q to MO_UQ is enough. Fixes: fc313c64345453c7 ("exec/memop: Adding signedness to quad definitions") Signed-off-by: WANG Xuerui --- tcg/loongarch64/tcg-target.c.inc | 2 +- 1 file changed,

Re: [PATCH v3 16/26] tests/tcg/sh4: disable another unreliable test

2022-02-06 Thread Philippe Mathieu-Daudé via
On 4/2/22 21:43, Alex Bennée wrote: Given the other failures it looks like general thread handling on sh4 is sketchy. It fails more often on CI than on my developer machine though. See https://gitlab.com/qemu-project/qemu/-/issues/856 for more details. Signed-off-by: Alex Bennée Cc: Yoshinori S

[PATCH v4 11/11] 9p: darwin: Adjust assumption on virtio-9p-test

2022-02-06 Thread Will Cohen
The previous test depended on the assumption that P9_DOTL_AT_REMOVEDIR and AT_REMOVEDIR have the same value. While this is true on Linux, it is not true everywhere, and leads to an incorrect test failure on unlink_at, noticed when adding 9p to darwin: Received response 7 (RLERROR) instead of 77 (

[PATCH v4 05/11] 9p: darwin: Ignore O_{NOATIME, DIRECT}

2022-02-06 Thread Will Cohen
From: Keno Fischer Darwin doesn't have either of these flags. Darwin does have F_NOCACHE, which is similar to O_DIRECT, but has different enough semantics that other projects don't generally map them automatically. In any case, we don't support O_DIRECT on Linux at the moment either. Signed-off-

[PATCH v4 08/11] 9p: darwin: Compatibility for f/l*xattr

2022-02-06 Thread Will Cohen
From: Keno Fischer On darwin `fgetxattr` takes two extra optional arguments, and the l* variants are not defined (in favor of an extra flag to the regular variants. Signed-off-by: Keno Fischer [Michael Roitzsch: - Rebase for NixOS] Signed-off-by: Michael Roitzsch Signed-off-by: Will Cohen ---

[PATCH v4 07/11] 9p: darwin: *xattr_nofollow implementations

2022-02-06 Thread Will Cohen
From: Keno Fischer This implements the darwin equivalent of the functions that were moved to 9p-util(-linux) earlier in this series in the new 9p-util-darwin file. Signed-off-by: Keno Fischer [Michael Roitzsch: - Rebase for NixOS] Signed-off-by: Michael Roitzsch Signed-off-by: Will Cohen ---

[PATCH v4 10/11] 9p: darwin: meson: Allow VirtFS on Darwin

2022-02-06 Thread Will Cohen
From: Keno Fischer Signed-off-by: Keno Fischer [Michael Roitzsch: - Rebase for NixOS] Signed-off-by: Michael Roitzsch [Will Cohen: - Rebase to master] Signed-off-by: Will Cohen Reviewed-by: Paolo Bonzini [Will Cohen: - Add check for pthread_fchdir_np to virtfs] Signed-off-by: Will Cohen ---

[PATCH v4 02/11] 9p: Rename 9p-util -> 9p-util-linux

2022-02-06 Thread Will Cohen
From: Keno Fischer The current file only has the Linux versions of these functions. Rename the file accordingly and update the Makefile to only build it on Linux. A Darwin version of these will follow later in the series. Signed-off-by: Keno Fischer [Michael Roitzsch: - Rebase for NixOS] Signed

[PATCH v4 03/11] 9p: darwin: Handle struct stat(fs) differences

2022-02-06 Thread Will Cohen
From: Keno Fischer Signed-off-by: Keno Fischer Signed-off-by: Michael Roitzsch [Will Cohen: - Note lack of f_namelen and f_frsize on Darwin - Ensure that tv_sec and tv_nsec are both initialized for Darwin and non-Darwin] Signed-off-by: Will Cohen --- hw/9pfs/9p-pro

[PATCH v4 06/11] 9p: darwin: Move XATTR_SIZE_MAX->P9_XATTR_SIZE_MAX

2022-02-06 Thread Will Cohen
From: Keno Fischer Signed-off-by: Keno Fischer Signed-off-by: Michael Roitzsch Because XATTR_SIZE_MAX is not defined on Darwin, create a cross-platform P9_XATTR_SIZE_MAX instead. [Will Cohen: - Adjust coding style - Lower XATTR_SIZE_MAX to 64k - Add explanatory conte

[PATCH v4 04/11] 9p: darwin: Handle struct dirent differences

2022-02-06 Thread Will Cohen
From: Keno Fischer On darwin d_seekoff exists, but is optional and does not seem to be commonly used by file systems. Use `telldir` instead to obtain the seek offset and inject it into d_seekoff, and create a qemu_dirent_off helper to call it appropriately when appropriate. Signed-off-by: Keno F

[PATCH v4 00/11] 9p: Add support for darwin

2022-02-06 Thread Will Cohen
This is a followup to https://lists.nongnu.org/archive/html/qemu-devel/2022-01/msg05993.html, adding 9p server support for Darwin. Since v3, the following changes have been made: - Move XATTR_SIZE_MAX to P9_XATTR_SIZE MAX in 9p.h, and provide explanatory context as preliminary solution - Add ex

[PATCH v4 09/11] 9p: darwin: Implement compatibility for mknodat

2022-02-06 Thread Will Cohen
From: Keno Fischer Darwin does not support mknodat. However, to avoid race conditions with later setting the permissions, we must avoid using mknod on the full path instead. We could try to fchdir, but that would cause problems if multiple threads try to call mknodat at the same time. However, lu

[PATCH v4 01/11] 9p: linux: Fix a couple Linux assumptions

2022-02-06 Thread Will Cohen
From: Keno Fischer - Guard Linux only headers. - Add qemu/statfs.h header to abstract over the which headers are needed for struct statfs - Define `ENOATTR` only if not only defined (it's defined in system headers on Darwin). Signed-off-by: Keno Fischer [Michael Roitzsch: - Rebase for

Re: [PATCH-for-6.2 0/2] hw/block/fdc: Fix CVE-2021-3507

2022-02-06 Thread Jon Maloy
Trying again with correct email address. ///jon On 2/6/22 14:15, Jon Maloy wrote: On 1/27/22 15:14, Jon Maloy wrote: On 11/18/21 06:57, Philippe Mathieu-Daudé wrote: Trivial fix for CVE-2021-3507. Philippe Mathieu-Daudé (2):    hw/block/fdc: Prevent end-of-track overrun (CVE-2021-3507)   

Re: [PATCH-for-6.2 0/2] hw/block/fdc: Fix CVE-2021-3507

2022-02-06 Thread Jon Maloy
On 1/27/22 15:14, Jon Maloy wrote: On 11/18/21 06:57, Philippe Mathieu-Daudé wrote: Trivial fix for CVE-2021-3507. Philippe Mathieu-Daudé (2):    hw/block/fdc: Prevent end-of-track overrun (CVE-2021-3507)    tests/qtest/fdc-test: Add a regression test for CVE-2021-3507   hw/block/fdc.c

[PATCH v3 0/2] use trace events and fix garbled output

2022-02-06 Thread Carwyn Ellis
This patchset supersedes earlier submissions and incorporates feedback from Laurent Vivier, Gerd Hoffmann and Philippe Mathieu-Daudé. There are two patches addressing the following in the vmware vga display code - use of fprintf to log debug output to STDERR This has been replaced with trace

Re: [PATCH 0/6] target/arm: -cpu host/max KVM and HVF fixes

2022-02-06 Thread Philippe Mathieu-Daudé via
On 4/2/22 17:55, Peter Maydell wrote: Peter Maydell (6): target/arm: Move '-cpu host' code to cpu64.c target/arm: Use aarch64_cpu_register() for 'host' CPU type target/arm: Make KVM -cpu max exactly like -cpu host target/arm: Unindent unnecessary else-clause target/arm: Fix '-cpu

[PATCH v3 1/2] hw/display/vmware_vga: replace fprintf calls with trace events

2022-02-06 Thread Carwyn Ellis
Debug output was always being sent to STDERR. This has been replaced with trace events. Signed-off-by: Carwyn Ellis --- hw/display/trace-events | 3 +++ hw/display/vmware_vga.c | 30 ++ 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/hw/display/trac

[PATCH v3 2/2] hw/display/vmware_vga: do not discard screen updates

2022-02-06 Thread Carwyn Ellis
In certain circumstances, typically when there is lots changing on the screen, updates will be discarded resulting in garbled output. This change simplifies the traversal of the display update FIFO queue when applying updates. We just track the queue length and iterate up to the end of the queue.

Re: [PATCH] erst: drop cast to long long

2022-02-06 Thread Philippe Mathieu-Daudé via
On 6/2/22 10:35, Michael S. Tsirkin wrote: The way to print uint64_t is with PRIx64, not with a cast to long long. Cc: Eric DeVolder Signed-off-by: Michael S. Tsirkin --- tests/qtest/erst-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PULL v2 00/24] virtio,pc: features, cleanups, fixes

2022-02-06 Thread Peter Maydell
On Sun, 6 Feb 2022 at 09:37, Michael S. Tsirkin wrote: > > Changes from v1: > erst patch fixups > virtio introspection patches dropped > > The following changes since commit 8f3e5ce773c62bb5c4a847f3a9a5c98bbb3b359f: > > Merge remote-tracking branch > 'remotes/hdeller/tags/hppa-updates-pull-requ

[PATCH] tcg/loongarch64: Fix fallout from recent MO_Q renaming

2022-02-06 Thread WANG Xuerui
From: WANG Xuerui Apparently we were left behind; just renaming MO_Q to MO_UQ is enough. Fixes: fc313c64345453c7 ("exec/memop: Adding signedness to quad definitions") Signed-off-by: WANG Xuerui --- tcg/loongarch64/tcg-target.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

Re: [PULL 00/32] virtio,pc: features, cleanups, fixes

2022-02-06 Thread Michael S. Tsirkin
On Sun, Feb 06, 2022 at 10:44:47AM +, Peter Maydell wrote: > On Sun, 6 Feb 2022 at 09:29, Michael S. Tsirkin wrote: > > > > On Sat, Feb 05, 2022 at 09:05:12PM +, Peter Maydell wrote: > > > On the build-tsan and build-cfi-x86_64 jobs and also on macos > > > (this is a "clang is pickier than

Re: [PATCH v5 3/6] tcg/sparc: Convert patch_reloc to return bool

2022-02-06 Thread Peter Maydell
On Sun, 6 Feb 2022 at 10:31, Richard Henderson wrote: > > Since 7ecd02a06f8, if patch_reloc fails we restart translation > with a smaller TB. Sparc had its function signature changed, > but not the logic. Replace assert with return false. > > Signed-off-by: Richard Henderson > --- > tcg/sparc/

Re: [PATCH 6/6] target/arm: Support PAuth extension for hvf

2022-02-06 Thread Peter Maydell
On Sun, 6 Feb 2022 at 00:26, Richard Henderson wrote: > > On 2/5/22 03:55, Peter Maydell wrote: > > Currently we don't allow guests under hvf to use the PAuth extension, > > because we didn't have any special code to handle that, and therefore > > in arm_cpu_pauth_finalize() we will sanitize the I

Re: [PULL 00/32] virtio,pc: features, cleanups, fixes

2022-02-06 Thread Peter Maydell
On Sun, 6 Feb 2022 at 09:29, Michael S. Tsirkin wrote: > > On Sat, Feb 05, 2022 at 09:05:12PM +, Peter Maydell wrote: > > On the build-tsan and build-cfi-x86_64 jobs and also on macos > > (this is a "clang is pickier than gcc about unused functions" one): > > https://gitlab.com/qemu-project/qe

[PATCH v5 3/6] tcg/sparc: Convert patch_reloc to return bool

2022-02-06 Thread Richard Henderson
Since 7ecd02a06f8, if patch_reloc fails we restart translation with a smaller TB. Sparc had its function signature changed, but not the logic. Replace assert with return false. Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c.inc | 8 ++-- 1 file changed, 6 insertions(+), 2 dele

Re: [PATCH v2] hw/display/tcx: Mark the VRAM dirty upon reset

2022-02-06 Thread Peter Maydell
On Sun, 6 Feb 2022 at 09:30, Mark Cave-Ayland wrote: > > On 05/02/2022 15:39, Peter Maydell wrote: > > The handling of the vram buffer seems weird in this device overall, > > though -- the memory block is divided into three parts > > * main vram, one byte per pixel > > * vram24, four bytes per

[PATCH v5 2/6] tcg/sparc: Improve code gen for shifted 32-bit constants

2022-02-06 Thread Richard Henderson
We had code for checking for 13 and 21-bit shifted constants, but we can do better and allow 32-bit shifted constants. This is still 2 insns shorter than the full 64-bit sequence. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/sparc/tcg-

[PATCH v5 6/6] tcg/sparc: Support unaligned access for user-only

2022-02-06 Thread Richard Henderson
This is kinda sorta the opposite of the other tcg hosts, where we get (normal) alignment checks for free with host SIGBUS and need to add code to support unaligned accesses. This inline code expansion is somewhat large, but it takes quite a few instructions to make a function call to a helper anyw

[PATCH v5 0/6] tcg/sparc: Unaligned access for user-only

2022-02-06 Thread Richard Henderson
Changes from v4: * Remove assert from tcg_out_movi; rely on the one in tcg_out_movi_int (pmm). * Finish conversion of patch_reloc (pmm). * Simplify unaligned access loads. Changes from v3: * Rebase on master, two patches merged. r~ Richard Henderson (6): tcg/sparc: Add scratch argume

[PATCH v5 5/6] tcg/sparc: Add tcg_out_jmpl_const for better tail calls

2022-02-06 Thread Richard Henderson
Due to mapping changes, we now rarely place the code_gen_buffer near the main executable. Which means that direct calls will now rarely be in range. So, always use indirect calls for tail calls, which allows us to avoid clobbering %o7, and therefore we need not save and restore it. Reviewed-by:

[PATCH v5 1/6] tcg/sparc: Add scratch argument to tcg_out_movi_int

2022-02-06 Thread Richard Henderson
This will allow us to control exactly what scratch register is used for loading the constant. Also, fix a theoretical problem in recursing through tcg_out_movi, which may provide a different value for in_prologue. Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c.inc | 21

[PATCH v5 4/6] tcg/sparc: Use the constant pool for 64-bit constants

2022-02-06 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c.inc | 15 +++ 1 file changed, 15 insertions(+) diff --git a/tcg/sparc/tcg-target.c.inc b/tcg/sparc/tcg-target.c.inc index f3043e6833..074fb25af2 100644 --- a/tcg/sparc/tcg-target.c.inc +++ b/tcg/s

Re: [PATCH v11 0/8] hmp,qmp: Add commands to introspect virtio devices

2022-02-06 Thread Michael S. Tsirkin
On Thu, Jan 20, 2022 at 06:29:20AM -0500, Jonah Palmer wrote: > This series introduces new QMP/HMP commands to dump the status of a > virtio device at different levels. I dropped this patchset due to various build failures. Pls take a look at Peter's comments on the pull request to see some of the

[PULL v2 20/24] ACPI ERST: create ACPI ERST table for pc/x86 machines

2022-02-06 Thread Michael S. Tsirkin
From: Eric DeVolder This change exposes ACPI ERST support for x86 guests. Signed-off-by: Eric DeVolder Reviewed-by: Ani Sinha Message-Id: <1643402289-22216-8-git-send-email-eric.devol...@oracle.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/acpi/erst.h

[PULL v2 21/24] ACPI ERST: qtest for ERST

2022-02-06 Thread Michael S. Tsirkin
From: Eric DeVolder This change provides a qtest that locates and then does a simple interrogation of the ERST feature within the guest. Signed-off-by: Eric DeVolder Reviewed-by: Ani Sinha Message-Id: <1643402289-22216-9-git-send-email-eric.devol...@oracle.com> Reviewed-by: Michael S. Tsirkin

[PULL v2 15/24] ACPI ERST: bios-tables-test.c steps 1 and 2

2022-02-06 Thread Michael S. Tsirkin
From: Eric DeVolder Following the guidelines in tests/qtest/bios-tables-test.c, this change adds empty placeholder files per step 1 for the new ERST table, and excludes resulting changed files in bios-tables-test-allowed-diff.h per step 2. Signed-off-by: Eric DeVolder Acked-by: Igor Mammedov M

[PULL v2 11/24] libvhost-user: fix VHOST_USER_REM_MEM_REG not closing the fd

2022-02-06 Thread Michael S. Tsirkin
From: David Hildenbrand We end up not closing the file descriptor, resulting in leaking one file descriptor for each VHOST_USER_REM_MEM_REG message. Fixes: 875b9fd97b34 ("Support individual region unmap in libvhost-user") Cc: Michael S. Tsirkin Cc: Raphael Norwitz Cc: "Marc-André Lureau" Cc:

[PULL v2 13/24] libvhost-user: handle removal of identical regions

2022-02-06 Thread Michael S. Tsirkin
From: Raphael Norwitz Today if QEMU (or any other VMM) has sent multiple copies of the same region to a libvhost-user based backend and then attempts to remove the region, only one instance of the region will be removed, leaving stale copies of the region in dev->regions[]. This change resolves

[PULL v2 18/24] ACPI ERST: support for ACPI ERST feature

2022-02-06 Thread Michael S. Tsirkin
From: Eric DeVolder This implements a PCI device for ACPI ERST. This implements the non-NVRAM "mode" of operation for ERST as it is supported by Linux and Windows. Signed-off-by: Eric DeVolder Reviewed-by: Ani Sinha Message-Id: <1643402289-22216-6-git-send-email-eric.devol...@oracle.com> Revie

[PULL v2 23/24] ACPI ERST: step 6 of bios-tables-test.c

2022-02-06 Thread Michael S. Tsirkin
From: Eric DeVolder Following the guidelines in tests/qtest/bios-tables-test.c, this is step 6. Below is the disassembly of tests/data/acpi/pc/ERST.acpierst. /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20180508 (64-bit version) * Copyright (c) 2000 - 2018 Intel

[PULL v2 16/24] ACPI ERST: PCI device_id for ERST

2022-02-06 Thread Michael S. Tsirkin
From: Eric DeVolder This change reserves the PCI device_id for the new ACPI ERST device. Signed-off-by: Eric DeVolder Acked-by: Igor Mammedov Acked-by: Ani Sinha Message-Id: <1643402289-22216-4-git-send-email-eric.devol...@oracle.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S.

[PULL v2 12/24] libvhost-user: prevent over-running max RAM slots

2022-02-06 Thread Michael S. Tsirkin
From: Raphael Norwitz When VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS support was added to libvhost-user, no guardrails were added to protect against QEMU attempting to hot-add too many RAM slots to a VM with a libvhost-user based backed attached. This change adds the missing error handling by in

[PULL v2 24/24] util/oslib-posix: Fix missing unlock in the error path of os_mem_prealloc()

2022-02-06 Thread Michael S. Tsirkin
From: David Hildenbrand We're missing an unlock in case installing the signal handler failed. Fortunately, we barely see this error in real life. Fixes: a960d6642d39 ("util/oslib-posix: Support concurrent os_mem_prealloc() invocation") Fixes: CID 1468941 Cc: Paolo Bonzini Cc: Michael S. Tsirki

[PULL v2 14/24] libvhost-user: Map shared RAM with MAP_NORESERVE to support virtio-mem with hugetlb

2022-02-06 Thread Michael S. Tsirkin
From: David Hildenbrand For fd-based shared memory, MAP_NORESERVE is only effective for hugetlb, otherwise it's ignored. Older Linux versions that didn't support reservation of huge pages ignored MAP_NORESERVE completely. The first client to mmap a hugetlb fd without MAP_NORESERVE will trigger r

[PULL v2 22/24] ACPI ERST: bios-tables-test testcase

2022-02-06 Thread Michael S. Tsirkin
From: Eric DeVolder This change implements the test suite checks for the ERST table. Signed-off-by: Eric DeVolder Reviewed-by: Ani Sinha Message-Id: <1643402289-22216-10-git-send-email-eric.devol...@oracle.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtes

[PULL v2 08/24] libvhost-user: Add vu_rem_mem_reg input validation

2022-02-06 Thread Michael S. Tsirkin
From: Raphael Norwitz Today if multiple FDs are sent from the VMM to the backend in a VHOST_USER_REM_MEM_REG message, one FD will be unmapped and the remaining FDs will be leaked. Therefore if multiple FDs are sent we report an error and fail the operation, closing all FDs in the message. Likewi

Re: [PULL 00/32] virtio,pc: features, cleanups, fixes

2022-02-06 Thread Michael S. Tsirkin
On Sat, Feb 05, 2022 at 09:05:12PM +, Peter Maydell wrote: > On the build-tsan and build-cfi-x86_64 jobs and also on macos > (this is a "clang is pickier than gcc about unused functions" one): > https://gitlab.com/qemu-project/qemu/-/jobs/2058536617 > https://gitlab.com/qemu-project/qemu/-/jobs

[PULL v2 19/24] ACPI ERST: build the ACPI ERST table

2022-02-06 Thread Michael S. Tsirkin
From: Eric DeVolder This builds the ACPI ERST table to inform OSPM how to communicate with the acpi-erst device. Signed-off-by: Eric DeVolder Reviewed-by: Ani Sinha Message-Id: <1643402289-22216-7-git-send-email-eric.devol...@oracle.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael

[PULL v2 01/24] cpuid: use unsigned for max cpuid

2022-02-06 Thread Michael S. Tsirkin
__get_cpuid_max returns an unsigned value. For consistency, store the result in an unsigned variable. Cc: Paolo Bonzini Cc: Richard Henderson Signed-off-by: Michael S. Tsirkin Reviewed-by: Philippe Mathieu-Daudé --- configure | 2 +- util/bufferiszero.c | 2 +- tcg/i386/

[PULL v2 17/24] ACPI ERST: header file for ERST

2022-02-06 Thread Michael S. Tsirkin
From: Eric DeVolder This change introduces the public defintions for ACPI ERST. Signed-off-by: Eric DeVolder Reviewed-by: Ani Sinha Message-Id: <1643402289-22216-5-git-send-email-eric.devol...@oracle.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/acpi/

[PULL v2 05/24] acpi: fix OEM ID/OEM Table ID padding

2022-02-06 Thread Michael S. Tsirkin
From: Igor Mammedov Commit [2] broke original '\0' padding of OEM ID and OEM Table ID fields in headers of ACPI tables. While it doesn't have impact on default values since QEMU uses 6 and 8 characters long values respectively, it broke usecase where IDs are provided on QEMU CLI. It shouldn't aff

[PATCH v3 6/6] target/riscv: Enable privileged spec version 1.12

2022-02-06 Thread Atish Patra
Virt machine uses privileged specification version 1.12 now. All other machine continue to use the default one defined for that machine unless changed to 1.12 by the user explicitly. Signed-off-by: Atish Patra --- target/riscv/cpu.c | 8 +--- target/riscv/csr.c | 5 + 2 files changed, 10

[PULL v2 00/24] virtio,pc: features, cleanups, fixes

2022-02-06 Thread Michael S. Tsirkin
Changes from v1: erst patch fixups virtio introspection patches dropped The following changes since commit 8f3e5ce773c62bb5c4a847f3a9a5c98bbb3b359f: Merge remote-tracking branch 'remotes/hdeller/tags/hppa-updates-pull-request' into staging (2022-02-02 19:54:30 +) are available in the Git

[PULL v2 10/24] libvhost-user: Simplify VHOST_USER_REM_MEM_REG

2022-02-06 Thread Michael S. Tsirkin
From: David Hildenbrand Let's avoid having to manually copy all elements. Copy only the ones necessary to close the hole and perform the operation in-place without a second array. Reviewed-by: Stefan Hajnoczi Signed-off-by: David Hildenbrand Signed-off-by: Raphael Norwitz Message-Id: <2022011

[PATCH v3 4/6] target/riscv: Add support for mconfigptr

2022-02-06 Thread Atish Patra
RISC-V privileged specification v1.12 introduced a mconfigptr which will hold the physical address of a configuration data structure. As Qemu doesn't have a configuration data structure, is read as zero which is valid as per the priv spec. Signed-off-by: Atish Patra --- target/riscv/cpu_bits.h |

[PULL v2 04/24] tests: acpi: whitelist nvdimm's SSDT and FACP.slic expected blobs

2022-02-06 Thread Michael S. Tsirkin
From: Igor Mammedov The next commit will revert OEM fields whitespace padding to padding with '\0' as it was before [1]. That will change OEM Table ID for: * SSDT.*: where it was padded from 6 characters to 8 * FACP.slic: where it was padded from 2 characters to 8 after reverting whitespace p

[PULL v2 09/24] libvhost-user: Add vu_add_mem_reg input validation

2022-02-06 Thread Michael S. Tsirkin
From: Raphael Norwitz Today if multiple FDs are sent from the VMM to the backend in a VHOST_USER_ADD_MEM_REG message, one FD will be mapped and the remaining FDs will be leaked. Therefore if multiple FDs are sent we report an error and fail the operation, closing all FDs in the message. Likewise

[PULL v2 06/24] tests: acpi: update expected blobs

2022-02-06 Thread Michael S. Tsirkin
From: Igor Mammedov Expected changes caused by previous commit: nvdimm ssdt (q35/pc/virt): - * OEM Table ID "NVDIMM " + * OEM Table ID "NVDIMM" SLIC test FADT (tests/data/acpi/q35/FACP.slic): -[010h 0016 8] Oem Table ID : "ME " +[010h 0016 8]

[PULL v2 03/24] tests: acpi: manually pad OEM_ID/OEM_TABLE_ID for test_oem_fields() test

2022-02-06 Thread Michael S. Tsirkin
From: Igor Mammedov The next commit will revert OEM fields padding with whitespace to padding with '\0' as it was before [1]. As result test_oem_fields() will fail due to unexpectedly smaller ID sizes read from QEMU ACPI tables. Pad OEM_ID/OEM_TABLE_ID manually with spaces so that values the tes

[PULL v2 02/24] hw/i386: Add the possibility to disable the 'isapc' machine

2022-02-06 Thread Michael S. Tsirkin
From: Thomas Huth We already have a CONFIG_ISAPC switch - but we're not using it yet. Add some "#ifdefs" to make it possible to disable this machine now. Signed-off-by: Thomas Huth Message-Id: <20220107160713.235918-1-th...@redhat.com> Acked-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud

  1   2   >