Re: [PATCH for-7.0] hw: Add compat machines for 7.0

2021-12-17 Thread Cornelia Huck
On Wed, Dec 08 2021, Cornelia Huck wrote: > Add 7.0 machine types for arm/i440fx/q35/s390x/spapr. > > Signed-off-by: Cornelia Huck > --- > hw/arm/virt.c | 9 - > hw/core/machine.c | 3 +++ > hw/i386/pc.c | 3 +++ > hw/i386/pc_piix.c | 14 +

Re: [PATCH v4 04/14] vfio-user: define vfio-user-server object

2021-12-17 Thread Stefan Hajnoczi
On Fri, Dec 17, 2021 at 02:31:14AM +, Jag Raman wrote: > > > > On Dec 16, 2021, at 4:58 AM, Stefan Hajnoczi wrote: > > > > On Wed, Dec 15, 2021 at 10:35:28AM -0500, Jagannathan Raman wrote: > >> +static void vfu_object_set_socket(Object *obj, Visitor *v, const char > >> *name, > >> +

Re: [RFC] vhost-vdpa-net: add vhost-vdpa-net host device support

2021-12-17 Thread Stefan Hajnoczi
On Fri, Dec 17, 2021 at 12:26:53PM +0800, Jason Wang wrote: Dave: You created the VIRTIO vmstate infrastructure in QEMU. Please see the bottom of this email about moving to a standard VIRTIO device save/load format defined by the VIRTIO spec in the future. > On Thu, Dec 16, 2021 at 5:10 PM Stefan

Re: [RFC PATCH] memory: Fix dma-reentrancy issues at the MMIO level

2021-12-17 Thread Klaus Jensen
On Dec 17 06:27, Qiuhao Li wrote: > Thanks Alex. It seems this patch sets and checks if the destination device is > busy. But how about the data transfers not triggered directly by PMIO/MMIO > handlers? For example: > > 1. Device A Timer's callback -> Device A MMIO handler > 2. Device A BH's cal

Re: [RFC PATCH] memory: Fix dma-reentrancy issues at the MMIO level

2021-12-17 Thread Qiuhao Li
Yes, it still works. Now it looks orthodox: cat << EOF | ./qemu-system-x86_64 -display none -machine accel=qtest \ -machine q35 -nodefaults -drive file=null-co://,if=none,format=raw,id=disk0 \ -device nvme,drive=disk0,serial=1 -qtest stdio \ outl 0xcf8 0x8810 /* MLBAR (BAR0) – M

[PATCH] meson: add "check" argument to run_command

2021-12-17 Thread Paolo Bonzini
Meson is planning to change the default of the "check" argument to run_command (from false to true). Be explicit and include it in all invocations. Signed-off-by: Paolo Bonzini --- docs/meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/meson.build b/docs

[PATCH v7 09/13] target/hexagon: import lexer for idef-parser

2021-12-17 Thread Anton Johansson via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Signed-off-by: Anton Johansson --- target/hexagon/idef-parser/idef-parser.h | 259 ++ target/hexagon/idef-parser/idef-parser.lex | 571 + target/hexagon/meson.build

[PATCH v7 02/13] target/hexagon: import README for idef-parser

2021-12-17 Thread Anton Johansson via
From: Alessandro Di Federico Signed-off-by: Alessandro Di Federico Signed-off-by: Anton Johansson --- target/hexagon/README | 5 + target/hexagon/idef-parser/README.rst | 722 ++ 2 files changed, 727 insertions(+) create mode 100644 target/hexagon/ide

[PATCH v7 04/13] target/hexagon: make helper functions non-static

2021-12-17 Thread Anton Johansson via
From: Paolo Montesel Make certain helper functions non-static, making them available outside genptr.c. These functions are required by code generated by the idef-parser. This commit also makes some op_helper.c non-static in order to avoid having them marked as unused when using the idef-parser g

[PATCH v7 06/13] target/hexagon: expose next PC in DisasContext

2021-12-17 Thread Anton Johansson via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Reviewed-by: Richard Henderson Reviewed-by: Taylor Simpson --- target/hexagon/translate.c | 3 ++- target/hexagon/translate.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/target/h

[PATCH v7 11/13] target/hexagon: call idef-parser functions

2021-12-17 Thread Anton Johansson via
From: Alessandro Di Federico Extend gen_tcg_funcs.py in order to emit calls to the functions emitted by the idef-parser, if available. An option is also added to fully disable the output of the idef-parser, which is useful for debugging purposes. Signed-off-by: Alessandro Di Federico Signed-off

[PATCH v7 03/13] target/hexagon: make slot number an unsigned

2021-12-17 Thread Anton Johansson via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Acked-by: Richard Henderson --- target/hexagon/genptr.c | 24 +--- target/hexagon/macros.h | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/target/hexagon/genp

[PATCH v7 08/13] target/hexagon: import flex/bison to docker files

2021-12-17 Thread Anton Johansson via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Signed-off-by: Anton Johansson --- .gitlab-ci.d/windows.yml | 2 ++ tests/docker/dockerfiles/alpine.docker | 2 ++ tests/docker/dockerfiles/centos8.docker

[PATCH v7 12/13] target/hexagon: import additional tests

2021-12-17 Thread Anton Johansson via
From: Niccolò Izzo Signed-off-by: Alessandro Di Federico Signed-off-by: Niccolò Izzo --- tests/tcg/hexagon/Makefile.target | 30 +- tests/tcg/hexagon/crt.S| 26 tests/tcg/hexagon/test_abs.S | 20 ++ tests/tcg/hexagon/test_bitcnt.S| 42 +++

[PATCH v7 05/13] target/hexagon: introduce new helper functions

2021-12-17 Thread Anton Johansson via
From: Niccolò Izzo These helpers will be employed by the idef-parser generated code. "Helper" can here mean two things, a helper in the QEMU sense added to `helper.h` and `op_helper.c`, but also helper functions providing a manual TCG implementation of a certain features. Signed-off-by: Alessand

[PATCH v7 13/13] gitlab-ci: do not use qemu-project Docker registry

2021-12-17 Thread Anton Johansson via
From: Alessandro Di Federico This commit is necessary in order to use container built by the current run of the CI. If we don't do this, we use official containers which are not affected by the additional dependencies we're introducing. This should be considered as a temporary solution in order

[PATCH v7 07/13] target/hexagon: prepare input for the idef-parser

2021-12-17 Thread Anton Johansson via
From: Alessandro Di Federico Introduce infrastructure necessary to produce a file suitable for being parsed by the idef-parser. Signed-off-by: Alessandro Di Federico Signed-off-by: Anton Johansson --- target/hexagon/gen_idef_parser_funcs.py | 123 + target/hexagon/idef-par

[PATCH v7 10/13] target/hexagon: import parser for idef-parser

2021-12-17 Thread Anton Johansson via
Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Signed-off-by: Anton Johansson --- target/hexagon/idef-parser/idef-parser.y| 1064 target/hexagon/idef-parser/parser-helpers.c | 2548 +++ target/hexagon/idef-parser/parser-helpers.h | 379 +++ tar

[PATCH v7 00/13] target/hexagon: introduce idef-parser

2021-12-17 Thread Anton Johansson via
This patchset introduces the idef-parser for target/hexagon. It's the seventh iteration of the patchset and includes fixes suggested in previous iterations. `idef-parser` is a build-time tool built using flex and bison. Its aim is to generate a large part of the tiny code generator frontend for H

Re: [PATCH] thunk: do not use HOST_* defines

2021-12-17 Thread Paolo Bonzini
On 12/16/21 11:05, Paolo Bonzini wrote: Just use sizeof, avoiding the need to write down all the ABIs twice. Cc: Laurent Vivier Signed-off-by: Paolo Bonzini This breaks bsd-user, I'll resend when "[PATCH v7 00/15] linux-user: simplify safe signal handling" is in. Paolo --- include/exe

[PATCH v7 01/13] target/hexagon: update MAINTAINERS for idef-parser

2021-12-17 Thread Anton Johansson via
From: Alessandro Di Federico Signed-off-by: Alessandro Di Federico Signed-off-by: Anton Johansson Reviewed-by: Richard Henderson --- MAINTAINERS | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 7543eb4d59..f6fbc5f664 100644 --- a/

Re: [PATCH 00/12] s390x/pci: zPCI interpretation support

2021-12-17 Thread Christian Borntraeger
Am 15.12.21 um 16:53 schrieb Matthew Rosato: On 12/15/21 2:35 AM, Pierre Morel wrote: On 12/7/21 22:04, Matthew Rosato wrote: Note:  The first 3 patches of this series are included as pre-reqs, but should be pulled via a separate series.  Also, patch 5 is needed to support 5.16+ linux head

Re: [PATCH] hw/scsi: Fix scsi_bus_init_named() docstring

2021-12-17 Thread Paolo Bonzini
On 12/15/21 11:29, Philippe Mathieu-Daudé wrote: Hi Laurent, This patch is reviewed, can it go via your trivial tree? Queued, thanks. Paolo On 11/22/21 11:47, Philippe Mathieu-Daudé wrote: Commit 739e95f5741 ("scsi: Replace scsi_bus_new() with scsi_bus_init(), scsi_bus_init_named()") forgo

Re: [PATCH-for-6.2 0/2] hw/scsi/megasas: Avoid overflowing the SGL buffer

2021-12-17 Thread Paolo Bonzini
On 11/19/21 21:11, Philippe Mathieu-Daudé wrote: Fix issue #521 reported by Alex some months ago: https://gitlab.com/qemu-project/qemu/-/issues/521 Philippe Mathieu-Daudé (2): hw/scsi/megasas: Fails command if SGL buffer overflows tests/qtest/fuzz-megasas-test: Add test for GitLab issue #5

Re: [PATCH] hw/i386/vmmouse: Require 'i8042' property to be set

2021-12-17 Thread Paolo Bonzini
On 12/1/21 23:32, Philippe Mathieu-Daudé wrote: If the 'i8042' property is not set, mouse events handled by vmmouse_mouse_event() end calling i8042_isa_mouse_fake_event() with a NULL argument, resulting in ps2_mouse_fake_event() being called with invalid PS2MouseState pointer. Fix by requiring th

[PATCH 1/1] multifd: Remove some redundant code

2021-12-17 Thread Li Zhang
Clean up some unnecessary code Signed-off-by: Li Zhang --- migration/multifd.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 3242f688e5..1405cf95b8 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -854,9

[PATCH v2] audio: Add sndio backend

2021-12-17 Thread 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 --- Thank you for the reviews and all the comments. Here's a second diff with all the sugges

Re: [PATCH] configure: Symlink binaries using .exe suffix with MinGW

2021-12-17 Thread Laurent Vivier
Le 09/11/2021 à 15:45, Philippe Mathieu-Daudé a écrit : When using the MinGW toolchain, we use the .exe suffix for the executable name. We also need to use it for the symlinks in the build directory. Signed-off-by: Philippe Mathieu-Daudé --- configure | 2 +- 1 file changed, 1 insertion(+),

Re: [PATCH 1/1] multifd: Remove some redundant code

2021-12-17 Thread Claudio Fontana
Hi Li, the full function for context: static void multifd_new_send_channel_async(QIOTask *task, gpointer opaque) { MultiFDSendParams *p = opaque; QIOChannel *sioc = QIO_CHANNEL(qio_task_get_source(task)); Error *local_err = NULL; trace_multifd_new_send_channel_async(p->id); i

Re: [PATCH-for-7.0] target/i386/kvm: Replace use of __u32 type

2021-12-17 Thread Laurent Vivier
Le 16/11/2021 à 20:39, Philippe Mathieu-Daudé a écrit : QEMU coding style mandates to not use Linux kernel internal types for scalars types. Replace __u32 by uint32_t. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/kvm/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [RFC PATCH] memory: Fix dma-reentrancy issues at the MMIO level

2021-12-17 Thread Mauro Matteo Cascella
On Fri, Dec 17, 2021 at 7:28 AM Qiuhao Li wrote: > > Thanks Alex. It seems this patch sets and checks if the destination device is > busy. But how about the data transfers not triggered directly by PMIO/MMIO > handlers? For example: > > 1. Device A Timer's callback -> Device A MMIO handler > 2.

Re: [PATCH] qemu-keymap: Add license in generated files

2021-12-17 Thread Laurent Vivier
Le 17/11/2021 à 18:45, Philippe Mathieu-Daudé a écrit : Signed-off-by: Philippe Mathieu-Daudé --- qemu-keymap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qemu-keymap.c b/qemu-keymap.c index 536e8f2385d..4095b654a60 100644 --- a/qemu-keymap.c +++ b/qemu-keymap.c @@ -187,6 +187,7 @@ i

Re: [PATCH] hw/avr: Realize AVRCPU qdev object using qdev_realize()

2021-12-17 Thread Laurent Vivier
Le 05/12/2021 à 23:41, Philippe Mathieu-Daudé a écrit : TYPE_AVR_CPU inherits TYPE_CPU, which itself inherits TYPE_DEVICE. TYPE_DEVICE instances are realized using qdev_realize(), we don't need to access QOM internal values. Signed-off-by: Philippe Mathieu-Daudé --- hw/avr/atmega.c | 2 +- 1

Re: [PATCH v3] hw/virtio/vhost: Fix typo in comment.

2021-12-17 Thread Laurent Vivier
Le 23/11/2021 à 12:48, lagar...@linux.ibm.com a écrit : From: Leonardo Garcia Signed-off-by: Leonardo Garcia Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé --- hw/virtio/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/vhost.c b/hw/vir

Re: [PATCH 1/1] multifd: Remove some redundant code

2021-12-17 Thread Li Zhang
On 12/17/21 10:39 AM, Claudio Fontana wrote: Hi Li, the full function for context: static void multifd_new_send_channel_async(QIOTask *task, gpointer opaque) { MultiFDSendParams *p = opaque; QIOChannel *sioc = QIO_CHANNEL(qio_task_get_source(task)); Error *local_err = NULL;

Re: [PATCH 12/12] s390x/pci: let intercept devices have separate PCI groups

2021-12-17 Thread Pierre Morel
On 12/16/21 16:16, Matthew Rosato wrote: On 12/16/21 3:15 AM, Pierre Morel wrote: On 12/7/21 22:04, Matthew Rosato wrote: Let's use the reserved pool of simulated PCI groups to allow intercept devices to have separate groups from interpreted devices as some group values may be different. I

Re: [PATCH] device_tree: Fix compiler error

2021-12-17 Thread Laurent Vivier
Le 08/11/2021 à 21:07, Stefan Weil a écrit : A build with gcc (Debian 10.2.1-6) 10.2.1 20210110 fails: ../../../softmmu/device_tree.c: In function ‘qemu_fdt_add_path’: ../../../softmmu/device_tree.c:560:18: error: ‘retval’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

[PATCH v2 1/1] multifd: Remove some redundant code

2021-12-17 Thread Li Zhang
Clean up some unnecessary code Signed-off-by: Li Zhang --- migration/multifd.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 3242f688e5..212be1ed04 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -85

Re: [PATCH] docs/block-replication.txt: Fix replication top-id command demo

2021-12-17 Thread Laurent Vivier
Le 18/10/2021 à 10:50, Zhang Chen a écrit : This demo not correct, the original childs1 can't pass the the bdrv_is_root_node check in replcation_start(). Keep consistent with docs/COLO-FT.txt Signed-off-by: Zhang Chen --- docs/block-replication.txt | 2 +- 1 file changed, 1 insertion(+), 1 d

Re: [PATCH] hw/net/allwinner_emac: Replace MII_ANAR_TX -> MII_ANLPAR_TX definition

2021-12-17 Thread Laurent Vivier
Le 15/12/2021 à 11:24, Philippe Mathieu-Daudé a écrit : Ping? On 11/22/21 11:51, Philippe Mathieu-Daudé wrote: While both MII_ANAR_TX / MII_ANLPAR_TX have the same value, the ANAR and ANLPAR registers are different, so technically the ANLPAR register have to use the MII_ANLPAR_TX definition. S

Re: [PATCH] docs/block-replication.txt: Fix replication top-id command demo

2021-12-17 Thread Laurent Vivier
Le 18/10/2021 à 10:50, Zhang Chen a écrit : This demo not correct, the original childs1 can't pass the the bdrv_is_root_node check in replcation_start(). Keep consistent with docs/COLO-FT.txt Signed-off-by: Zhang Chen --- docs/block-replication.txt | 2 +- 1 file changed, 1 insertion(+), 1 d

[PATCH v2] build: use "meson test" as the test harness

2021-12-17 Thread Paolo Bonzini
"meson test" starting with version 0.57 is just as capable and easy to use as QEMU's own TAP driver. All existing options for "make check" work. The only required code change involves how to mark "slow" tests; they need to belong additionally to the "slow" suite. The rules for .tap output are re

[PATCH] cpu: remove unnecessary #ifdef CONFIG_TCG

2021-12-17 Thread Paolo Bonzini
"if (tcg_enabled())" allows elision of the code inside it; we only need the prototype to exist, so that the code compile even for the --disable-tcg case. Signed-off-by: Paolo Bonzini --- cpu.c | 5 - include/exec/cpu-all.h | 2 -- 2 files changed, 7 deletions(-) diff --git

[PATCH] meson: reenable test-fdmon-epoll

2021-12-17 Thread Paolo Bonzini
The test was disabled when CONFIG_EPOLL_CREATE1 was moved out of config-host.mak. Fix the condition. Signed-off-by: Paolo Bonzini --- tests/unit/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/meson.build b/tests/unit/meson.build index acac3622ed..90ac

Re: [PATCH v3 02/28] glib-compat: Introduce g_memdup2() wrapper

2021-12-17 Thread Laurent Vivier
Le 03/09/2021 à 19:44, Philippe Mathieu-Daudé a écrit : When experimenting raising GLIB_VERSION_MIN_REQUIRED to 2.68 (Fedora 34 provides GLib 2.68.1) we get: hw/virtio/virtio-crypto.c:245:24: error: 'g_memdup' is deprecated: Use 'g_memdup2' instead [-Werror,-Wdeprecated-declarations] ...

Re: [PATCH v3 24/28] tests/qtest: Replace g_memdup() by g_memdup2()

2021-12-17 Thread Laurent Vivier
Le 03/09/2021 à 19:45, Philippe Mathieu-Daudé a écrit : Per https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538 The old API took the size of the memory to duplicate as a guint, whereas most memory functions take memory sizes as a gsize. This made it easy

Re: [PATCH v3 28/28] checkpatch: Do not allow deprecated g_memdup()

2021-12-17 Thread Laurent Vivier
Le 03/09/2021 à 19:45, Philippe Mathieu-Daudé a écrit : g_memdup() is insecure and as been deprecated in GLib 2.68. QEMU provides the safely equivalent g_memdup2() wrapper. Do not allow more g_memdup() calls in the repository, provide a hint to use g_memdup2(). Signed-off-by: Philippe Mathieu-D

Re: [PATCH v3 00/28] glib: Replace g_memdup() by g_memdup2()

2021-12-17 Thread Laurent Vivier
Le 15/12/2021 à 17:54, Philippe Mathieu-Daudé a écrit : Hi Laurent, On 9/3/21 19:44, Philippe Mathieu-Daudé wrote: This series provides the safely equivalent g_memdup2() wrapper, and replace all g_memdup() calls by it. Philippe Mathieu-Daudé (28): hw/hyperv/vmbus: Remove unused vmbus_loa

Re: [PATCH v5 28/31] block.c: assert BQL lock held in bdrv_co_invalidate_cache

2021-12-17 Thread Hanna Reitz
On 24.11.21 07:44, Emanuele Giuseppe Esposito wrote: bdrv_co_invalidate_cache is special: it is an I/O function, I still don’t believe it is, but well. (Yes, it is called by a test in an iothread, but I believe we’ve seen that the tests simply sometimes test things that shouldn’t be allowed.)

Re: [PATCH v3 02/28] glib-compat: Introduce g_memdup2() wrapper

2021-12-17 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 12/16/21 15:11, Alex Bennée wrote: >> Philippe Mathieu-Daudé writes: >> >>> When experimenting raising GLIB_VERSION_MIN_REQUIRED to 2.68 >>> (Fedora 34 provides GLib 2.68.1) we get: >>> >>> hw/virtio/virtio-crypto.c:245:24: error: 'g_memdup' is deprecated

Re: [PATCH v3 02/28] glib-compat: Introduce g_memdup2() wrapper

2021-12-17 Thread Laurent Vivier
Alex, I've added this patch to my trivial patches branch, do you want I drop it? Thanks, Laurent On 17/12/2021 12:10, Alex Bennée wrote: Philippe Mathieu-Daudé writes: On 12/16/21 15:11, Alex Bennée wrote: Philippe Mathieu-Daudé writes: When experimenting raising GLIB_VERSION_MIN_REQUIR

Re: [PATCH v3 02/28] glib-compat: Introduce g_memdup2() wrapper

2021-12-17 Thread Alex Bennée
Laurent Vivier writes: > Alex, > > I've added this patch to my trivial patches branch, do you want I drop > it? No - the patch itself is fine. I would like to fix up the consistency later if we can agree on what it should be. -- Alex Bennée

Re: [PATCH v5 30/31] crypto: delegate permission functions to JobDriver .pre_run

2021-12-17 Thread Hanna Reitz
On 24.11.21 07:44, Emanuele Giuseppe Esposito wrote: block_crypto_amend_options_generic_luks uses the block layer permission API, therefore it should be called with the BQL held. However, the same function is being called ib two BlockDriver s/ ib / by / callbacks: bdrv_amend_options (under B

Re: [PATCH v2 08/37] hw/display: report an error if virgl initialization failed

2021-12-17 Thread Philippe Mathieu-Daudé
On 10/9/21 23:08, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Currently, virgl initialization error is silent. Make it verbose instead. > > (this is likely going to bug later on, as the device isn't fully > initialized) > > Signed-off-by: Marc-André Lureau > --- > hw/disp

Re: [PATCH v2 09/37] virtio-gpu: use VIRTIO_GPU_RESOURCE_FLAG_Y_0_TOP

2021-12-17 Thread Philippe Mathieu-Daudé
On 10/9/21 23:08, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > --- > hw/display/virtio-gpu-virgl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [RFC PATCH] linux-user: don't adjust base of found hole

2021-12-17 Thread Laurent Vivier
Le 16/12/2021 à 15:44, Alex Bennée a écrit : The pgb_find_hole function goes to the trouble of taking account of both mmap_min_addr and any offset we've applied to decide the starting address of a potential hole. This is especially important for emulating 32bit ARM in a 32bit build as we have app

[PATCH] scripts/qemu-guest-agent/fsfreeze-hook: improve script description

2021-12-17 Thread Fabian Ebner
With the current wording, users might think that the -F option is not required as long as the script is placed in the default path[0]. Be clear that the option is always required. [0]: https://forum.proxmox.com/threads/82680/post-437608 Signed-off-by: Fabian Ebner --- I also tried to improve th

Re: [RFC PATCH] linux-user: don't adjust base of found hole

2021-12-17 Thread Alex Bennée
Laurent Vivier writes: > Le 16/12/2021 à 15:44, Alex Bennée a écrit : >> The pgb_find_hole function goes to the trouble of taking account of >> both mmap_min_addr and any offset we've applied to decide the starting >> address of a potential hole. This is especially important for >> emulating 32

Re: [PATCH] docs: Add measurement calculation details to amd-memory-encryption.txt

2021-12-17 Thread Daniel P . Berrangé
On Thu, Dec 16, 2021 at 11:41:27PM +0200, Dov Murik wrote: > > > On 16/12/2021 18:09, Daniel P. Berrangé wrote: > > On Thu, Dec 16, 2021 at 12:38:34PM +0200, Dov Murik wrote: > >> > >> > >> On 14/12/2021 20:39, Daniel P. Berrangé wrote: > >>> On Tue, Dec 14, 2021 at 01:59:10PM +, Dov Murik wr

Re: [PATCH v2 25/37] build-sys: set glib dependency version

2021-12-17 Thread Philippe Mathieu-Daudé
On 10/9/21 23:08, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Further meson configuration tests are to be added based on the glib > version. Also correct the version reporting in the config log. > > Signed-off-by: Marc-André Lureau > --- > configure | 1 + > meson.build

Re: [PATCH v2 33/37] chardev: make socket derivable

2021-12-17 Thread Philippe Mathieu-Daudé
On 10/9/21 23:08, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > --- > include/chardev/char-socket.h | 84 +++ > chardev/char-socket.c | 58 +--- > 2 files changed, 85 insertions(+),

Re: [PATCH for-7.0] hw: Add compat machines for 7.0

2021-12-17 Thread Daniel P . Berrangé
On Fri, Dec 17, 2021 at 09:13:55AM +0100, Cornelia Huck wrote: > On Wed, Dec 08 2021, Cornelia Huck wrote: > > > Add 7.0 machine types for arm/i440fx/q35/s390x/spapr. > > > > Signed-off-by: Cornelia Huck > > --- > > hw/arm/virt.c | 9 - > > hw/core/machine.c | 3

Re: [PATCH v2 11/37] ui: factor out qemu_console_set_display_gl_ctx()

2021-12-17 Thread Philippe Mathieu-Daudé
On 10/9/21 23:08, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > The next patch will make use of this function to dissociate > DisplayChangeListener from GL context. > > Signed-off-by: Marc-André Lureau > --- > include/ui/console.h | 3 +++ > ui/console.c | 22 ++

Re: [PATCH v2 36/37] ui/dbus: register D-Bus VC handler

2021-12-17 Thread Philippe Mathieu-Daudé
On 10/9/21 23:08, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Export the default consoles over the D-Bus chardev. > > Signed-off-by: Marc-André Lureau > --- > ui/dbus.c | 53 + > 1 file changed, 53 insertions(+) > +stati

Re: [PATCH v3 02/28] glib-compat: Introduce g_memdup2() wrapper

2021-12-17 Thread Daniel P . Berrangé
On Fri, Dec 17, 2021 at 11:10:31AM +, Alex Bennée wrote: > > Philippe Mathieu-Daudé writes: > > > On 12/16/21 15:11, Alex Bennée wrote: > >> Philippe Mathieu-Daudé writes: > >> > >>> When experimenting raising GLIB_VERSION_MIN_REQUIRED to 2.68 > >>> (Fedora 34 provides GLib 2.68.1) we get:

[PATCH v2 0/3] virtio-mem: Support VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE

2021-12-17 Thread David Hildenbrand
Based-on: 20211208170241.110551-1-coh...@redhat.com Support VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE in QEMU, which indicates to a guest that we don't support reading unplugged memory. We indicate the feature based on a new "unplugged-inaccessible" property available for x86 targets only (the only ones

[PATCH v2 3/3] virtio-mem: Set "unplugged-inaccessible=auto" for the 7.0 machine on x86

2021-12-17 Thread David Hildenbrand
Set the new default to "auto", keeping it set to "off" for compat machines. This property is only available for x86 targets. Reviewed-by: Michal Privoznik Reviewed-by: Pankaj Gupta Signed-off-by: David Hildenbrand --- hw/i386/pc.c | 4 +++- hw/virtio/virtio-mem.c | 2 +- 2 files chan

[PATCH v2 2/3] virtio-mem: Support VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE

2021-12-17 Thread David Hildenbrand
With VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE, we signal the VM that reading unplugged memory is not supported. We have to fail feature negotiation in case the guest does not support VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE. First, VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE is required to properly handle memory ba

[PATCH v2 1/8] util/oslib-posix: Let touch_all_pages() return an error

2021-12-17 Thread David Hildenbrand
Let's prepare touch_all_pages() for returning differing errors. Return an error from the thread and report the last processed error. Translate SIGBUS to -EFAULT, as a SIGBUS can mean all different kind of things (memory error, read error, out of memory). When allocating memory fails via the curren

[PATCH v2 1/3] linux-headers: sync VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE

2021-12-17 Thread David Hildenbrand
Let's synchronize the new feature flag, available in Linux since v5.16-rc1. Reviewed-by: Michal Privoznik Signed-off-by: David Hildenbrand --- include/standard-headers/linux/virtio_mem.h | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/standard-headers/linux/

[PATCH v2 5/8] util/oslib-posix: Avoid creating a single thread with MADV_POPULATE_WRITE

2021-12-17 Thread David Hildenbrand
Let's simplify the case when we only want a single thread and don't have to mess with signal handlers. Reviewed-by: Pankaj Gupta Reviewed-by: Daniel P. Berrangé Reviewed-by: Michal Privoznik Signed-off-by: David Hildenbrand --- util/oslib-posix.c | 8 1 file changed, 8 insertions(+)

[PATCH v2 2/8] util/oslib-posix: Support MADV_POPULATE_WRITE for os_mem_prealloc()

2021-12-17 Thread David Hildenbrand
Let's sense support and use it for preallocation. MADV_POPULATE_WRITE does not require a SIGBUS handler, doesn't actually touch page content, and avoids context switches; it is, therefore, faster and easier to handle than our current approach. While MADV_POPULATE_WRITE is, in general, faster than

Re: [RFC qemu.qmp PATCH 17/24] Makefile: add build and publish targets

2021-12-17 Thread Daniel P . Berrangé
On Thu, Dec 16, 2021 at 06:35:23PM -0500, John Snow wrote: > On Thu, Dec 16, 2021 at 5:48 AM Daniel P. Berrangé > wrote: > > > On Wed, Dec 15, 2021 at 04:06:27PM -0500, John Snow wrote: > > > Signed-off-by: John Snow > > > --- > > > Makefile | 32 > > > 1 file c

[PATCH v2 7/8] util/oslib-posix: Forward SIGBUS to MCE handler under Linux

2021-12-17 Thread David Hildenbrand
Temporarily modifying the SIGBUS handler is really nasty, as we might be unlucky and receive an MCE SIGBUS while having our handler registered. Unfortunately, there is no way around messing with SIGBUS when MADV_POPULATE_WRITE is not applicable or not around. Let's forward SIGBUS that don't belong

Re: [PATCH v2 25/37] build-sys: set glib dependency version

2021-12-17 Thread Marc-André Lureau
Hi On Fri, Dec 17, 2021 at 5:31 PM Philippe Mathieu-Daudé wrote: > On 10/9/21 23:08, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Further meson configuration tests are to be added based on the glib > > version. Also correct the version reporting in the config log. > >

[PATCH v2 6/8] util/oslib-posix: Support concurrent os_mem_prealloc() invocation

2021-12-17 Thread David Hildenbrand
Add a mutex to protect the SIGBUS case, as we cannot mess concurrently with the sigbus handler and we have to manage the global variable sigbus_memset_context. The MADV_POPULATE_WRITE path can run concurrently. Note that page_mutex and page_cond are shared between concurrent invocations, which sho

[PATCH v2 0/8] virtio-mem: Support "prealloc=on"

2021-12-17 Thread David Hildenbrand
Based-on: <20211217134039.29670-1-da...@redhat.com> Support preallocation of memory to make virtio-mem safe to use with scarce memory resources such as hugetlb. Before acknowledging a plug request from the guest, we'll try preallcoating memory. If that fails, we'll fail the request gracefully and

Re: [PATCH v3 02/28] glib-compat: Introduce g_memdup2() wrapper

2021-12-17 Thread Daniel P . Berrangé
On Thu, Dec 16, 2021 at 02:11:37PM +, Alex Bennée wrote: > > Philippe Mathieu-Daudé writes: > > > When experimenting raising GLIB_VERSION_MIN_REQUIRED to 2.68 > > (Fedora 34 provides GLib 2.68.1) we get: > > > > hw/virtio/virtio-crypto.c:245:24: error: 'g_memdup' is deprecated: Use > > 'g

Re: [RFC PATCH] memory: Fix dma-reentrancy issues at the MMIO level

2021-12-17 Thread Philippe Mathieu-Daudé
On 12/17/21 04:08, Alexander Bulekov wrote: > Here's my shot at fixing dma-reentracy issues. This patch adds a flag to > the DeviceState, which is set/checked when we call an accessor > associated with the device's IO MRs. Your approach is exactly what Gerd suggested: https://www.mail-archive.com/

[PATCH v2 4/8] util/oslib-posix: Don't create too many threads with small memory or little pages

2021-12-17 Thread David Hildenbrand
Let's limit the number of threads to something sane, especially that - We don't have more threads than the number of pages we have - We don't have threads that initialize small (< 64 MiB) memory Reviewed-by: Pankaj Gupta Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Daniel P. Berrangé Review

Re: [PATCH] meson: add "check" argument to run_command

2021-12-17 Thread Philippe Mathieu-Daudé
On 12/17/21 09:53, Paolo Bonzini wrote: > Meson is planning to change the default of the "check" argument to > run_command (from false to true). Be explicit and include it in > all invocations. > > Signed-off-by: Paolo Bonzini > --- > docs/meson.build | 6 +++--- > 1 file changed, 3 insertions(

[PATCH v2 3/8] util/oslib-posix: Introduce and use MemsetContext for touch_all_pages()

2021-12-17 Thread David Hildenbrand
Let's minimize the number of global variables to prepare for os_mem_prealloc() getting called concurrently and make the code a bit easier to read. The only consumer that really needs a global variable is the sigbus handler, which will require protection via a mutex in the future either way as we c

[PATCH v2 8/8] virtio-mem: Support "prealloc=on" option

2021-12-17 Thread David Hildenbrand
For scarce memory resources, such as hugetlb, we want to be able to prealloc such memory resources in order to not crash later on access. On simple user errors we could otherwise easily run out of memory resources an crash the VM -- pretty much undesired. For ordinary memory devices, such as DIMMs

Re: [PATCH qemu] s390x/css: fix PMCW invalid mask

2021-12-17 Thread Halil Pasic
On Thu, 16 Dec 2021 14:16:57 +0100 Nico Boehr wrote: > Previously, we required bits 5, 6 and 7 to be zero (0x07 == 0b111). But, > as per the principles of operation, bit 5 is ignored in MSCH and bits 0, > 1, 6 and 7 need to be zero. On a second thought, don't we have to make sure then that bit 5

Re: [RFC PATCH] memory: Fix dma-reentrancy issues at the MMIO level

2021-12-17 Thread Alexander Bulekov
On 211217 0627, Qiuhao Li wrote: > Thanks Alex. It seems this patch sets and checks if the destination device is > busy. But how about the data transfers not triggered directly by PMIO/MMIO > handlers? For example: > > 1. Device A Timer's callback -> Device A MMIO handler > 2. Device A BH's call

Re: [PATCH v2 36/37] ui/dbus: register D-Bus VC handler

2021-12-17 Thread Marc-André Lureau
On Fri, Dec 17, 2021 at 5:35 PM Philippe Mathieu-Daudé wrote: > > On 10/9/21 23:08, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Export the default consoles over the D-Bus chardev. > > > > Signed-off-by: Marc-André Lureau > > --- > > ui/dbus.c | 53

Re: [PATCH for-7.0] hw: Add compat machines for 7.0

2021-12-17 Thread Cornelia Huck
On Fri, Dec 17 2021, Daniel P. Berrangé wrote: > On Fri, Dec 17, 2021 at 09:13:55AM +0100, Cornelia Huck wrote: >> On Wed, Dec 08 2021, Cornelia Huck wrote: >> >> > Add 7.0 machine types for arm/i440fx/q35/s390x/spapr. >> > >> > Signed-off-by: Cornelia Huck >> > --- >> > hw/arm/virt.c

Re: [RFC PATCH] memory: Fix dma-reentrancy issues at the MMIO level

2021-12-17 Thread Alexander Bulekov
On 211217 1458, Philippe Mathieu-Daudé wrote: > On 12/17/21 04:08, Alexander Bulekov wrote: > > Here's my shot at fixing dma-reentracy issues. This patch adds a flag to > > the DeviceState, which is set/checked when we call an accessor > > associated with the device's IO MRs. > > Your approach is

Re: [PATCH v5 30/31] crypto: delegate permission functions to JobDriver .pre_run

2021-12-17 Thread Hanna Reitz
On 17.12.21 13:29, Hanna Reitz wrote: On 24.11.21 07:44, Emanuele Giuseppe Esposito wrote: block_crypto_amend_options_generic_luks uses the block layer permission API, therefore it should be called with the BQL held. However, the same function is being called ib two BlockDriver s/ ib / by /

Re: [PATCH v2 25/37] build-sys: set glib dependency version

2021-12-17 Thread Philippe Mathieu-Daudé
On 12/17/21 14:40, Marc-André Lureau wrote: > > diff --git a/meson.build b/meson.build > > index e1cddf5139..9494590aa2 100644 > > --- a/meson.build > > +++ b/meson.build > > @@ -311,14 +311,16 @@ endif > >  add_project_arguments(config_host['GLIB_CFLAGS'].split(), > > 

[PULL 00/36] ui: D-Bus display backend

2021-12-17 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 29eb5c2c86f935b0e9700fad2ecfe8a32b011d57: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2021-12-16 08:39:20 -0800) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qemu.git ta

[PULL 01/36] ui/vdagent: add CHECK_SPICE_PROTOCOL_VERSION

2021-12-17 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- meson.build | 5 + ui/vdagent.c | 8 2 files changed, 13 insertions(+) diff --git a/meson.build b/meson.build index ae67ca28ab38..58718691d7fc 100644 --- a/meson.build +++ b/meson.build @@ -1487

[RFC PATCH v2 0/2] Attempt to fix DMA reentrancy issues

2021-12-17 Thread Alexander Bulekov
Here's my shot at fixing dma-reentracy issues. This patch adds a flag to the DeviceState, which is set/checked when we call an accessor associated with the device's IO MRs. The problem, in short, as I understand it: For the vast majority of cases, we want to prevent a device from accessing it's ow

[PULL 03/36] ui: generalize clipboard notifier

2021-12-17 Thread marcandre . lureau
From: Marc-André Lureau Use a QemuClipboardNotify union type for extendable clipboard events. Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- include/ui/clipboard.h | 32 ++-- ui/clipboard.c | 12 ui/gtk-clipboard.c | 20 ++

[RFC PATCH v2 1/2] memory: fix dma-reentrancy issues at the MMIO level

2021-12-17 Thread Alexander Bulekov
Add a flag to the DeviceState, which is set/checked when we call an accessor associated with the device's IO MRs. This should prevent a device's MMIO handler from using DMA apis to access it's own MMIO regions. Signed-off-by: Alexander Bulekov --- include/hw/qdev-core.h | 1 + softmmu/memory.c

[RFC PATCH v2 2/2] memory: set engaged_in_io when a device calls DMA APIs

2021-12-17 Thread Alexander Bulekov
DMA reentrancy problems can occur in BHs: dev_mmio->schedule_bh dev_bh->dma_write->dev_mmio This patch attempts to address this scenario by marking the device as engaged_in_io, when it calls into PCI and SGList DMA APIs. Signed-off-by: Alexander Bulekov --- include/hw/pci/pci.h | 6 +- sof

[PULL 04/36] ui/vdagent: add serial capability support

2021-12-17 Thread marcandre . lureau
From: Marc-André Lureau The Spice agent implements a simple serial mechanism to avoid clipboard races between client & guest. See: https://gitlab.freedesktop.org/spice/spice-protocol/-/commit/045a6978d6dbbf7046affc5c321fa8177c8cce56 Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann ---

[PULL 06/36] ui/clipboard: add a clipboard reset serial event

2021-12-17 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- include/ui/clipboard.h | 9 + ui/clipboard.c | 7 +++ ui/gtk-clipboard.c | 3 +++ ui/vdagent.c | 12 ui/vnc-clipboard.c | 3 +++ ui/cocoa.m |

[PULL 07/36] hw/display: report an error if virgl initialization failed

2021-12-17 Thread marcandre . lureau
From: Marc-André Lureau Currently, virgl initialization error is silent. Make it verbose instead. (this is likely going to bug later on, as the device isn't fully initialized) Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé --- hw/display/virtio-

[PULL 12/36] ui: make gl_block use a counter

2021-12-17 Thread marcandre . lureau
From: Marc-André Lureau Track multiple callers blocking requests. Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- ui/console.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/ui/console.c b/ui/console.c index 87f897e46dc4..39f7b66baf54 10064

  1   2   3   >