Re: [PATCH v4 1/8] hw/intc: GICv3 ITS initial framework

2021-06-11 Thread Eric Auger
On 6/2/21 8:00 PM, Shashi Mallela wrote: > Added register definitions relevant to ITS,implemented overall > ITS device framework with stubs for ITS control and translater > regions read/write,extended ITS common to handle mmio init between > existing kvm device and newer qemu device. > > Signed

[PATCH] Fix assertion failure in lsi53c810 emulator

2021-06-11 Thread Liu Cyrus
From: cyruscyliu An assertion failure can be triggered in the lsi53c810 emulator by a guest when ((s->sstat1 & 0x7) == PHASE_DO) || (s->sstat1 & 0x7) == PHASE_DI)) && (!s->current) holds. Check s->sstat1 and s->current in lsi_reg_writeb before lsi_execute_script() to discard this MMIO write. Fix

Subject: [PATCH] hw/vmxnet3: fix vmxnet3 g_assert_not_reached bug

2021-06-11 Thread Liu Cyrus
From: cyruscyliu A g_assert_not_reached of vmxnet3 can be triggered by a guest with the root privilege. Remove the VMXNET3_REG_ICR branch thus get rid of this crash. Fixes: 786fd2b0f87b ("VMXNET3 device implementation") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/309 Buglink: https:/

Re: [PATCH v4 2/8] hw/intc: GICv3 ITS register definitions added

2021-06-11 Thread Eric Auger
On 6/2/21 8:00 PM, Shashi Mallela wrote: > Defined descriptors for ITS device table,collection table and ITS > command queue entities.Implemented register read/write functions, > extract ITS table parameters and command queue parameters,extended > gicv3 common to capture qemu address space(which

[PATCH] linux-user: Set CF_PARALLEL when mapping shared memory

2021-06-11 Thread Richard Henderson
Signal the translator to use host atomic instructions for guest operations, insofar as it is possible. This is the best we can do to allow the guest to interact atomically with other processes. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/121 Signed-off-by: Richard Henderson --- linu

Re: [RFC PATCH 4/5] qmp: Added qemu-ebpf-rss-path command.

2021-06-11 Thread Markus Armbruster
Andrew Melnychenko writes: > New qmp command to query ebpf helper. > It's crucial that qemu and helper are in sync and in touch. > Technically helper should pass eBPF fds that qemu may accept. > And different qemu's builds may have different eBPF programs and helpers. > Qemu returns helper that s

[RFC PATCH V1 0/3] tpm: Eliminate TPM related code if CONFIG_TPM is not set

2021-06-11 Thread Stefan Berger
The following patches entirely elimiante TPM related code if CONFIG_TPM is not set. Stefan Stefan Berger (3): acpi: Eliminate all TPM related code if CONFIG_TPM is not set arm: Eliminate all TPM related code if CONFIG_TPM is not set sysemu: Make TPM structures inaccessible if CONFIG_TPM i

[RFC PATCH V1 1/3] acpi: Eliminate all TPM related code if CONFIG_TPM is not set

2021-06-11 Thread Stefan Berger
Cc: M: Michael S. Tsirkin Cc: Igor Mammedov Signed-off-by: Stefan Berger --- hw/acpi/aml-build.c | 2 ++ hw/arm/virt-acpi-build.c | 2 ++ hw/i386/acpi-build.c | 20 include/hw/acpi/tpm.h| 4 stubs/tpm.c | 4 5 files changed, 28 insert

[RFC PATCH V1 2/3] arm: Eliminate all TPM related code if CONFIG_TPM is not set

2021-06-11 Thread Stefan Berger
Cc: Peter Maydell Signed-off-by: Stefan Berger --- hw/arm/sysbus-fdt.c | 4 hw/arm/virt-acpi-build.c | 4 hw/arm/virt.c| 2 ++ 3 files changed, 10 insertions(+) diff --git a/hw/arm/sysbus-fdt.c b/hw/arm/sysbus-fdt.c index 6b6906f4cf..48c5fe9bf1 100644 --- a/hw/arm/sys

[RFC PATCH V1 3/3] sysemu: Make TPM structures inaccessible if CONFIG_TPM is not defined

2021-06-11 Thread Stefan Berger
Signed-off-by: Stefan Berger --- include/sysemu/tpm.h | 6 +- include/sysemu/tpm_backend.h | 6 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h index 1a85564e47..2ca3fa32ee 100644 --- a/include/sysemu/tpm.h +++ b/inclu

[PATCH v2 2/3] hw/nvme: namespace parameter for EUI-64

2021-06-11 Thread Heinrich Schuchardt
The EUI-64 field is the only identifier for NVMe namespaces in UEFI device paths. Add a new namespace property "eui64", that provides the user the option to specify the EUI-64. Signed-off-by: Heinrich Schuchardt Acked-by: Klaus Jensen --- v2: fix typo %s/EUI64/EUI-64/ --- docs/system/nv

[PULL 34/34] docs/devel: Explain in more detail the TB chaining mechanisms

2021-06-11 Thread Richard Henderson
From: Luis Pires Signed-off-by: Luis Pires Message-Id: <20210601125143.191165-1-luis.pi...@eldorado.org.br> Signed-off-by: Richard Henderson --- docs/devel/tcg.rst | 101 - 1 file changed, 90 insertions(+), 11 deletions(-) diff --git a/docs/devel/tc

[PATCH v2 1/3] hw: virt: consider hw_compat_6_0

2021-06-11 Thread Heinrich Schuchardt
virt-6.0 must consider hw_compat_6_0. Fixes: da7e13c00b59 ("hw: add compat machines for 6.1") Signed-off-by: Heinrich Schuchardt Reviewed-by: Cornelia Huck --- v2: add missing Fixes: tag --- hw/arm/virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.

[PULL 32/34] tcg/arm: Fix tcg_out_op function signature

2021-06-11 Thread Richard Henderson
From: "Jose R. Ziviani" Commit 5e8892db93 fixed several function signatures but tcg_out_op for arm is missing. This patch fixes it as well. Signed-off-by: Jose R. Ziviani Message-Id: <20210610224450.23425-1-jzivi...@suse.de> Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.c.inc | 3 ++

[PATCH v2 3/3] hw/nvme: default for namespace EUI-64

2021-06-11 Thread Heinrich Schuchardt
On machines with version > 6.0 replace a missing EUI-64 by a generated value. Signed-off-by: Heinrich Schuchardt --- v2: new patch --- docs/system/nvme.rst | 2 ++ hw/core/machine.c| 1 + hw/nvme/ns.c | 9 + hw/nvme/nvme.h | 2 ++ 4 files changed, 14 insertions(

[PATCH v2 0/3] hw/nvme: namespace parameter for EUI-64

2021-06-11 Thread Heinrich Schuchardt
The EUI-64 field is the only identifier for NVMe namespaces in UEFI device paths. Add a new namespace property "eui64", that provides the user the option to specify the EUI-64. v2: include patch for hw_compat_6_0 add a patch to implement default values for the EUI-64 Heinrich Schu

[PULL 25/34] util/osdep: Add qemu_mprotect_rw

2021-06-11 Thread Richard Henderson
For --enable-tcg-interpreter on Windows, we will need this. Reviewed-by: Alex Bennée Reviewed-by: Luis Pires Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/qemu/osdep.h | 1 + util/osdep.c | 9 + 2 files changed, 10 insertions(+) diff --git a

[PULL 33/34] softfloat: Fix tp init in float32_exp2

2021-06-11 Thread Richard Henderson
Typo in the conversion to FloatParts64. Fixes: 572c4d862ff2 Fixes: Coverity CID 1457457 Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée Message-Id: <20210607223812.110596-1-richard.hender...@linaro.org> Signed-off-by: Richard Henderson --- fpu/softfloat.c | 2 +- 1 file changed, 1 in

[PULL 29/34] tcg: Move tcg_init_ctx and tcg_ctx from accel/tcg/

2021-06-11 Thread Richard Henderson
These variables belong to the jit side, not the user side. Since tcg_init_ctx is no longer used outside of tcg/, move the declaration to tcg-internal.h. Reviewed-by: Alex Bennée Reviewed-by: Luis Pires Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg.

[PULL 24/34] tcg: Sink qemu_madvise call to common code

2021-06-11 Thread Richard Henderson
Move the call out of the N versions of alloc_code_gen_buffer and into tcg_region_init. Reviewed-by: Alex Bennée Reviewed-by: Luis Pires Signed-off-by: Richard Henderson --- tcg/region.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tcg/region.c b/tcg/region

[PULL 30/34] tcg: Introduce tcg_remove_ops_after

2021-06-11 Thread Richard Henderson
Introduce a function to remove everything emitted since a given point. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 10 ++ tcg/tcg.c | 13 + 2 files changed, 23 insertions(+) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h i

[PULL 22/34] tcg: Allocate code_gen_buffer into struct tcg_region_state

2021-06-11 Thread Richard Henderson
Do not mess around with setting values within tcg_init_ctx. Put the values into 'region' directly, which is where they will live for the lifetime of the program. Reviewed-by: Alex Bennée Reviewed-by: Luis Pires Signed-off-by: Richard Henderson --- tcg/region.c | 64 ++--

[PULL 21/34] tcg: Move in_code_gen_buffer and tests to region.c

2021-06-11 Thread Richard Henderson
Shortly, the full code_gen_buffer will only be visible to region.c, so move in_code_gen_buffer out-of-line. Move the debugging versions of tcg_splitwx_to_{rx,rw} to region.c as well, so that the compiler gets to see the implementation of in_code_gen_buffer. This leaves exactly one use of in_code_

[PULL 28/34] tcg: When allocating for !splitwx, begin with PROT_NONE

2021-06-11 Thread Richard Henderson
There's a change in mprotect() behaviour [1] in the latest macOS on M1 and it's not yet clear if it's going to be fixed by Apple. In this case, instead of changing permissions of N guard pages, we change permissions of N rwx regions. The same number of syscalls are required either way. [1] https

[PULL 18/34] tcg: Rename region.start to region.after_prologue

2021-06-11 Thread Richard Henderson
Give the field a name reflecting its actual meaning. Reviewed-by: Luis Pires Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/region.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tcg/region.c b/tcg/region.c index 7a34c96d74..b143eaf69c 1

[PULL 26/34] tcg: Round the tb_size default from qemu_get_host_physmem

2021-06-11 Thread Richard Henderson
If qemu_get_host_physmem returns an odd number of pages, then physmem / 8 will not be a multiple of the page size. The following was observed on a gitlab runner: ERROR qtest-arm/boot-serial-test - Bail out! ERROR:../util/osdep.c:80:qemu_mprotect__osdep: \ assertion failed: (!(size & ~qemu_real_

[PULL 27/34] tcg: Merge buffer protection and guard page protection

2021-06-11 Thread Richard Henderson
Do not handle protections on a case-by-case basis in the various alloc_code_gen_buffer instances; do it within a single loop in tcg_region_init. Reviewed-by: Alex Bennée Reviewed-by: Luis Pires Signed-off-by: Richard Henderson --- tcg/region.c | 45 +++--

[PULL 13/34] accel/tcg: Use MiB in tcg_init_machine

2021-06-11 Thread Richard Henderson
Reviewed-by: Alex Bennée Reviewed-by: Luis Pires Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/tcg-all.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index e990180c4b..1ee89902c3 100644 ---

[PULL 16/34] tcg: Move MAX_CODE_GEN_BUFFER_SIZE to tcg-target.h

2021-06-11 Thread Richard Henderson
Remove the ifdef ladder and move each define into the appropriate header file. Reviewed-by: Luis Pires Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.h | 1 + tcg/arm/tcg-target.h | 1 + tcg/i386/tcg-target.h| 2 ++ tcg/mips/tcg-target.h| 6

[PULL 20/34] tcg: Tidy split_cross_256mb

2021-06-11 Thread Richard Henderson
Return output buffer and size via output pointer arguments, rather than returning size via tcg_ctx->code_gen_buffer_size. Reviewed-by: Luis Pires Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/region.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-

[PULL 23/34] tcg: Return the map protection from alloc_code_gen_buffer

2021-06-11 Thread Richard Henderson
Change the interface from a boolean error indication to a negative error vs a non-negative protection. For the moment this is only interface change, not making use of the new data. Reviewed-by: Alex Bennée Reviewed-by: Luis Pires Signed-off-by: Richard Henderson --- tcg/region.c | 63

[PULL 12/34] accel/tcg: Merge tcg_exec_init into tcg_init_machine

2021-06-11 Thread Richard Henderson
There is only one caller, and shortly we will need access to the MachineState, which tcg_init_machine already has. Reviewed-by: Luis Pires Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- accel/tcg/internal.h | 2 ++ include/sysemu/tcg.h | 2 -- accel/tcg/tcg-all.c

[PULL 17/34] tcg: Replace region.end with region.total_size

2021-06-11 Thread Richard Henderson
A size is easier to work with than an end point, particularly during initial buffer allocation. Reviewed-by: Luis Pires Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/region.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git

[PULL 14/34] accel/tcg: Pass down max_cpus to tcg_init

2021-06-11 Thread Richard Henderson
Start removing the include of hw/boards.h from tcg/. Pass down the max_cpus value from tcg_init_machine, where we have the MachineState already. Reviewed-by: Luis Pires Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 2 +

[PULL 07/34] tcg: Split out region.c

2021-06-11 Thread Richard Henderson
Reviewed-by: Luis Pires Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tcg-internal.h | 37 +++ tcg/region.c | 572 + tcg/tcg.c | 547 +-- tcg/meson.build| 1 + 4 files c

[PULL 19/34] tcg: Tidy tcg_n_regions

2021-06-11 Thread Richard Henderson
Compute the value using straight division and bounds, rather than a loop. Pass in tb_size rather than reading from tcg_init_ctx.code_gen_buffer_size, Reviewed-by: Luis Pires Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/region.c | 29 - 1 file c

[PULL 09/34] accel/tcg: Move alloc_code_gen_buffer to tcg/region.c

2021-06-11 Thread Richard Henderson
Buffer management is integral to tcg. Do not leave the allocation to code outside of tcg/. This is code movement, with further cleanups to follow. Reviewed-by: Luis Pires Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 2 +- accel/tcg/translate-all

[PULL 08/34] accel/tcg: Inline cpu_gen_init

2021-06-11 Thread Richard Henderson
It consists of one function call and has only one caller. Reviewed-by: Luis Pires Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/translate-all.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/accel/tcg/tra

[PULL 15/34] tcg: Introduce tcg_max_ctxs

2021-06-11 Thread Richard Henderson
Finish the divorce of tcg/ from hw/, and do not take the max cpu value from MachineState; just remember what we were passed in tcg_init. Reviewed-by: Luis Pires Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tcg-internal.h | 3 ++- tcg/r

[PULL 03/34] tcg: Re-order tcg_region_init vs tcg_prologue_init

2021-06-11 Thread Richard Henderson
Instead of delaying tcg_region_init until after tcg_prologue_init is complete, do tcg_region_init first and let tcg_prologue_init shrink the first region by the size of the generated prologue. Reviewed-by: Luis Pires Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- accel/tcg/tcg-a

[PULL 04/34] tcg: Remove error return from tcg_region_initial_alloc__locked

2021-06-11 Thread Richard Henderson
All callers immediately assert on error, so move the assert into the function itself. Reviewed-by: Luis Pires Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tcg.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-)

[PULL 31/34] tcg: Fix documentation for tcg_constant_* vs tcg_temp_free_*

2021-06-11 Thread Richard Henderson
At some point during the development of tcg_constant_*, I changed my mind about whether such temps should be able to be passed to tcg_temp_free_*. The final version committed allows this, but the commentary was not updated to match. Fixes: c0522136adf Reported-by: Peter Maydell Reviewed-by: Alex

[PULL 06/34] tcg: Split out tcg_region_prologue_set

2021-06-11 Thread Richard Henderson
This has only one user, but will make more sense after some code motion. Always leave the tcg_init_ctx initialized to the first region, in preparation for tcg_prologue_init(). This also requires that we don't re-allocate the region for the first cpu, lest we hit the assertion for total number of

[PULL 00/34] tcg patch queue

2021-06-11 Thread Richard Henderson
#x27; into staging (2021-06-11 09:21:48 +0100) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20210611 for you to fetch changes up to 60afaddc208d34f6dc86dd974f6e02724fba6eb6: docs/devel: Explain in more detail the TB chaining mechanisms (2021-06-11

[PULL 11/34] tcg: Create tcg_init

2021-06-11 Thread Richard Henderson
Perform both tcg_context_init and tcg_region_init. Do not leave this split to the caller. Reviewed-by: Luis Pires Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 3 +-- tcg/tcg-internal.h| 1 + accel/tcg/translate-all.c | 3 +-- tcg/tcg.c

[PULL 02/34] meson: Split out fpu/meson.build

2021-06-11 Thread Richard Henderson
Reviewed-by: Luis Pires Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- meson.build | 4 +--- fpu/meson.build | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) create mode 100644 fpu/meson.build diff --git a/meson.build b/meson.buil

[PULL 05/34] tcg: Split out tcg_region_initial_alloc

2021-06-11 Thread Richard Henderson
This has only one user, and currently needs an ifdef, but will make more sense after some code motion. Reviewed-by: Luis Pires Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tcg.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tcg/tcg.c b/

[PULL 01/34] meson: Split out tcg/meson.build

2021-06-11 Thread Richard Henderson
Reviewed-by: Luis Pires Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- meson.build | 8 +--- tcg/meson.build | 13 + 2 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 tcg/meson.build diff --git a/meson

[PULL 10/34] accel/tcg: Rename tcg_init to tcg_init_machine

2021-06-11 Thread Richard Henderson
We shortly want to use tcg_init for something else. Since the hook is called init_machine, match that. Reviewed-by: Luis Pires Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/tcg-all.c | 4 ++-- 1 file changed, 2 insertions(+), 2 del

[PATCH 3/8] util: Use real functions for thread-posix QemuRecMutex

2021-06-11 Thread Richard Henderson
From: Richard Henderson Move the declarations from thread-win32.h into thread.h and remove the macro redirection from thread-posix.h. This will be required by following cleanups. Signed-off-by: Richard Henderson --- include/qemu/thread-posix.h | 4 include/qemu/thread-win32.h | 6 --

Re: [PATCH 2/2] nbd: Add new qemu:joint-allocation metadata context

2021-06-11 Thread Nir Soffer
On Wed, Jun 9, 2021 at 9:01 PM Eric Blake wrote: > > When trying to reconstruct a qcow2 chain using information provided > over NBD, ovirt had been relying on an unsafe assumption that any > portion of the qcow2 file advertised as sparse would defer to the > backing image; this worked with what qe

[PATCH 8/8] configure: Remove probe for _Static_assert

2021-06-11 Thread Richard Henderson
From: Richard Henderson _Static_assert is part of C11, which is now required. Signed-off-by: Richard Henderson --- configure | 18 -- include/qemu/compiler.h | 11 --- 2 files changed, 29 deletions(-) diff --git a/configure b/configure index 0489864667..d

[PATCH 6/8] include/qemu/lockable: Use _Generic instead of QEMU_GENERIC

2021-06-11 Thread Richard Henderson
From: Richard Henderson This is both more and less complicated than our expansion using __builtin_choose_expr and __builtin_types_compatible_p. The expansion through QEMU_MAKE_LOCKABLE_ doesn't work because we're not emumerating all of the types within the same _Generic, which results in errors

[PATCH 5/8] util: Use unique type for QemuRecMutex in thread-posix.h

2021-06-11 Thread Richard Henderson
From: Richard Henderson We will shortly convert lockable.h to _Generic, and we cannot have two compatible types in the same expansion. Wrap QemuMutex in a struct, and unwrap in qemu-thread-posix.c. Signed-off-by: Richard Henderson --- include/qemu/thread-posix.h | 10 -- util/qemu-thr

[PATCH 7/8] qemu/compiler: Remove QEMU_GENERIC

2021-06-11 Thread Richard Henderson
From: Richard Henderson All previous users now use C11 _Generic. Signed-off-by: Richard Henderson --- include/qemu/compiler.h | 40 1 file changed, 40 deletions(-) diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index 091c45248b..5766d61

Re: [PATCH 0/8] configure: Change to -std=gnu11

2021-06-11 Thread Richard Henderson
On 6/11/21 4:33 PM, Richard Henderson wrote: Now that we assume gcc 7.5 as a minimum, we have the option of changing to a newer C standard. The two major ones that I think apply are _Generic and _Static_assert. Poor editing there. How about s/ones/new features/. r~

[PATCH 1/8] configure: Use -std=gnu11

2021-06-11 Thread Richard Henderson
From: Richard Henderson Now that the minimum gcc version is 7.5, we can use C11. This will allow lots of cleanups to the code, currently hidden behind macros in include/qemu/compiler.h. Signed-off-by: Richard Henderson --- configure | 4 ++-- meson.build | 2 +- 2 files changed, 3 insertions

[PATCH 2/8] softfloat: Use _Generic instead of QEMU_GENERIC

2021-06-11 Thread Richard Henderson
From: Richard Henderson Signed-off-by: Richard Henderson --- fpu/softfloat.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 1cb162882b..6f4aea7dee 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -686,11 +686,13

[PATCH 4/8] util: Pass file+line to qemu_rec_mutex_unlock_impl

2021-06-11 Thread Richard Henderson
From: Richard Henderson Create macros for file+line expansion in qemu_rec_mutex_unlock like we have for qemu_mutex_unlock. Signed-off-by: Richard Henderson --- include/qemu/thread.h| 10 +- util/qemu-thread-posix.c | 4 ++-- util/qemu-thread-win32.c | 2 +- 3 files changed, 12 in

[PATCH 0/8] configure: Change to -std=gnu11

2021-06-11 Thread Richard Henderson
Now that we assume gcc 7.5 as a minimum, we have the option of changing to a newer C standard. The two major ones that I think apply are _Generic and _Static_assert. While Paolo created a remarkably functional replacement for _Generic using builtins, the error messages that you get out of the key

[RFC] EventListener design for Python Async QMP library

2021-06-11 Thread John Snow
Hi all: I am continuing work on my asyncio-based QMP library for Python, which adds support for OOB executions, multiple simultaneous pending executions, and truly asynchronous event handling. The library is what will fundamentally power the new qmp-shell that Niteesh is working on for his GSo

Re: [PATCH] qemu-{img,nbd}: Don't report zeroed cluster as a hole

2021-06-11 Thread Eric Blake
On Sat, Jun 12, 2021 at 12:23:06AM +0300, Nir Soffer wrote: > > Otherwise, you do have a point: "depth":1 in isolation is ambiguous > > between "not allocated anywhere in this 1-element chain" and > > "allocated at the first backing file in this chain of length 2 or > > more". At which point you c

Re: [PATCH] qemu-{img,nbd}: Don't report zeroed cluster as a hole

2021-06-11 Thread Nir Soffer
On Fri, Jun 11, 2021 at 9:34 PM Eric Blake wrote: > > On Fri, Jun 11, 2021 at 08:35:01PM +0300, Nir Soffer wrote: > > On Fri, Jun 11, 2021 at 4:28 PM Eric Blake wrote: > > > > > > On Fri, Jun 11, 2021 at 10:09:09AM +0200, Kevin Wolf wrote: > > > > > Yes, that might work as well. But we didn't pr

Re: [PATCH 00/11] python: move /scripts/qmp/gemu-ga-client.py to qemu.qmp package

2021-06-11 Thread John Snow
On 6/4/21 11:55 AM, John Snow wrote: Delint and type the qemu-ga-client and move it over into /python/qemu/qmp/qemu_ga_client.py. Based-on: <20210603003719.1321369-1-js...@redhat.com> GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-package-qga CI: https://gitlab.com/jsnow/qemu/-/pipelines

[PATCH v2] s390x/css: Selectively copy sense data to IRB

2021-06-11 Thread Eric Farman
The SCHIB.PMCW.CSENSE bit is used to determine whether the IRB should be set up with sense data, but that bit only indicates whether sense data is requested, not if it was provided by the device. For virtual devices, this is fine. For passthrough devices, hardware would present sense data in IRB.E

Re: [PATCH 7/7] vhost-user-blk: Implement reconnection during realize

2021-06-11 Thread Raphael Norwitz
On Wed, Jun 09, 2021 at 05:46:58PM +0200, Kevin Wolf wrote: > Commit dabefdd6 removed code that was supposed to try reconnecting > during .realize(), but actually just crashed and had several design > problems. > > This adds the feature back without the crash in simple cases while also > fixing so

Re: [PATCH 6/7] vhost-user-blk: Factor out vhost_user_blk_realize_connect()

2021-06-11 Thread Raphael Norwitz
On Wed, Jun 09, 2021 at 05:46:57PM +0200, Kevin Wolf wrote: > This function is the part that we will want to retry if the connection > is lost during initialisation, so factor it out to keep the following > patch simpler. > > The error path for vhost_dev_get_config() forgot disconnecting the > cha

Re: [PATCH 5/7] vhost: Distinguish errors in vhost_dev_get_config()

2021-06-11 Thread Raphael Norwitz
On Wed, Jun 09, 2021 at 05:46:56PM +0200, Kevin Wolf wrote: > Instead of just returning 0/-1 and letting the caller make up a > meaningless error message, add an Error parameter to allow reporting the > real error and switch to 0/-errno so that different kind of errors can > be distinguished in the

Re: [Virtio-fs] [PATCH v2 7/9] virtiofsd: Add inodes_by_handle hash table

2021-06-11 Thread Vivek Goyal
On Wed, Jun 09, 2021 at 05:55:49PM +0200, Max Reitz wrote: > Currently, lo_inode.fhandle is always NULL and so always keep an O_PATH > FD in lo_inode.fd. Therefore, when the respective inode is unlinked, > its inode ID will remain in use until we drop our lo_inode (and > lo_inode_put() thus closes

Re: [PATCH 4/7] vhost-user-blk: Add Error parameter to vhost_user_blk_start()

2021-06-11 Thread Raphael Norwitz
On Wed, Jun 09, 2021 at 05:46:55PM +0200, Kevin Wolf wrote: > Instead of letting the caller make up a meaningless error message, add > an Error parameter to allow reporting the real error. > > Signed-off-by: Kevin Wolf Reviewed-by: Raphael Norwitz > --- > hw/block/vhost-user-blk.c | 31 ++

Re: [PATCH 3/7] vhost: Return 0/-errno in vhost_dev_init()

2021-06-11 Thread Raphael Norwitz
On Wed, Jun 09, 2021 at 05:46:54PM +0200, Kevin Wolf wrote: > Instead of just returning 0/-1 and letting the caller make up a > meaningless error message, switch to 0/-errno so that different kinds of > errors can be distinguished in the caller. > > This involves changing a few more callbacks in V

Re: QEMU | USB Ethernet device (RNDIS) does not work on several tested operating systems (#198)

2021-06-11 Thread Paul Zimmerman
I will take a look. Might take me a couple of days to get to it though. On Fri, Jun 11, 2021 at 4:10 AM Philippe Mathieu-Daudé wrote: > > Cc'ing Paul Zimmerman for the hcd-dwc2 model. > > On Thu, Jun 10, 2021 at 2:10 PM programmingkidx (@programmingkidx) wrote: > > 虎游 commented: > > > > The same

Re: [PATCH V3 12/22] vfio-pci: cpr part 1

2021-06-11 Thread Steven Sistare
On 6/11/2021 2:15 PM, Steven Sistare wrote: > On 5/24/2021 2:29 PM, Steven Sistare wrote: >> On 5/21/2021 6:24 PM, Alex Williamson wrote:> On Fri, 7 May 2021 05:25:10 >> -0700 >>> Steve Sistare wrote: >>> [...] diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 7a4fb6c..f7ac9f03 100

Re: [PATCH 2/7] vhost: Distinguish errors in vhost_backend_init()

2021-06-11 Thread Raphael Norwitz
On Wed, Jun 09, 2021 at 05:46:53PM +0200, Kevin Wolf wrote: > Instead of just returning 0/-1 and letting the caller make up a > meaningless error message, add an Error parameter to allow reporting the > real error and switch to 0/-errno so that different kind of errors can > be distinguished in the

Re: [PATCH v2 0/9] virtiofsd: Allow using file handles instead of O_PATH FDs

2021-06-11 Thread Vivek Goyal
On Wed, Jun 09, 2021 at 05:55:42PM +0200, Max Reitz wrote: > Hi, > > v1 cover letter for an overview: > https://listman.redhat.com/archives/virtio-fs/2021-June/msg00033.html Hi Max, What's the impact of these patches on performance? Just trying to get some idea what to expect. Performance remai

Re: [PATCH 1/7] vhost: Add Error parameter to vhost_dev_init()

2021-06-11 Thread Raphael Norwitz
On Wed, Jun 09, 2021 at 05:46:52PM +0200, Kevin Wolf wrote: > This allows callers to return better error messages instead of making > one up while the real error ends up on stderr. Most callers can > immediately make use of this because they already have an Error > parameter themselves. The others

[PATCH] target/arm: Implement MTE3

2021-06-11 Thread Peter Collingbourne
MTE3 introduces an asymmetric tag checking mode, in which loads are checked synchronously and stores are checked asynchronously. Add support for it. Signed-off-by: Peter Collingbourne --- target/arm/cpu64.c | 2 +- target/arm/mte_helper.c | 83 ++--- 2 f

[PATCH v2 2/1] qemu-img: Add "backing":true to unallocated map segments

2021-06-11 Thread Eric Blake
To save the user from having to check 'qemu-img info --backing-chain' or other followup command to determine which "depth":n goes beyond the chain, add a boolean field "backing" that is set only for unallocated portions of the disk. Signed-off-by: Eric Blake --- Touches the same iotest output as

[PATCH] docs: Add '-device intel-iommu' entry

2021-06-11 Thread Peter Xu
The parameters of intel-iommu device are non-trivial to understand. Add an entry for it so that people can reference to it when using. There're actually a few more options there, but I hide them explicitly because they shouldn't be used by normal QEMU users. Cc: Chao Yang Cc: Lei Yang Cc: Jing

[PATCH v4 5/6] ACPI ERST: qtest for ERST

2021-06-11 Thread 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 --- tests/qtest/erst-test.c | 109 tests/qtest/meson.build | 2 + 2 files changed, 111 insertions(+

[PATCH v4 4/6] ACPI ERST: create ACPI ERST table for pc/x86 machines.

2021-06-11 Thread Eric DeVolder
This change exposes ACPI ERST support for x86 guests. Signed-off-by: Eric DeVolder --- hw/i386/acpi-build.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index de98750..d8cae69 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@

[PATCH v4 3/6] ACPI ERST: support for ACPI ERST feature

2021-06-11 Thread Eric DeVolder
This change implements the support for the ACPI ERST feature[1,2]. To utilize ACPI ERST, a memory-backend-file object and acpi-erst device must be created, for example: qemu ... -object memory-backend-file,id=erstram,mem-path=acpi-erst.backing, size=0x1,shared=on -device acpi-erst,memdev

[PATCH v4 1/6] ACPI ERST: bios-tables-test.c steps 1 and 2

2021-06-11 Thread 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 --- tests/data/acpi/microvm/ERST

[PATCH v4 6/6] ACPI ERST: step 6 of bios-tables-test.c

2021-06-11 Thread Eric DeVolder
Following the guidelines in tests/qtest/bios-tables-test.c, this is step 6, the re-generated ACPI tables binary blobs. Signed-off-by: Eric DeVolder --- tests/data/acpi/pc/ERST | Bin 0 -> 976 bytes tests/data/acpi/q35/ERST| Bin 0 -> 976 bytes tests/qtest/

Re: [PATCH] qemu-{img,nbd}: Don't report zeroed cluster as a hole

2021-06-11 Thread Eric Blake
On Fri, Jun 11, 2021 at 08:35:01PM +0300, Nir Soffer wrote: > On Fri, Jun 11, 2021 at 4:28 PM Eric Blake wrote: > > > > On Fri, Jun 11, 2021 at 10:09:09AM +0200, Kevin Wolf wrote: > > > > Yes, that might work as well. But we didn't previously document > > > > depth to be optional. Removing somet

[PATCH v4 2/6] ACPI ERST: header file for ERST

2021-06-11 Thread Eric DeVolder
This change introduces the defintions for ACPI ERST. Signed-off-by: Eric DeVolder --- include/hw/acpi/erst.h | 79 ++ 1 file changed, 79 insertions(+) create mode 100644 include/hw/acpi/erst.h diff --git a/include/hw/acpi/erst.h b/include/hw/acpi

[PATCH v4 0/6] acpi: Error Record Serialization Table, ERST, support for QEMU

2021-06-11 Thread Eric DeVolder
This patchset introduces support for the ACPI Error Record Serialization Table, ERST. Linux uses the persistent storage filesystem, pstore, to record information (eg. dmesg tail) upon panics and shutdowns. Pstore is independent of, and runs before, kdump. In certain scenarios (ie. hosts/guests w

Re: [PATCH v3 0/7] tests/acceptance: Handle tests with "cpu" tag

2021-06-11 Thread Wainer dos Santos Moschetta
Ping. Only patches 06 and 07 did not get any review. The series touches many files and it was last rebased months ago, so likely I will need to resolve rebase conflicts. But I would like to have the reviews of those patches before. Thanks! - Wainer On 4/30/21 10:34 AM, Wainer dos Santos Mo

Re: tb_flush() calls causing long Windows XP boot times

2021-06-11 Thread Alex Bennée
Paolo Bonzini writes: > On 11/06/21 17:01, Programmingkid wrote: >> Hello Alex, >> The good news is the source code to Windows XP is available >> online:https://github.com/cryptoAlgorithm/nt5src > > It's leaked, so I doubt anybody who's paid to work on Linux or QEMU > would touch that with a te

Re: [PATCH V3 12/22] vfio-pci: cpr part 1

2021-06-11 Thread Steven Sistare
On 5/24/2021 2:29 PM, Steven Sistare wrote: > On 5/21/2021 6:24 PM, Alex Williamson wrote:> On Fri, 7 May 2021 05:25:10 > -0700 >> Steve Sistare wrote: >> >>>[...] >>> diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c >>> index 7a4fb6c..f7ac9f03 100644 >>> --- a/hw/vfio/pci.c >>> +++ b/hw/vfio/pci.c >>

Re: [PATCH v2] qemu-img: Make unallocated part of backing chain obvious in map

2021-06-11 Thread Nir Soffer
On Fri, Jun 11, 2021 at 5:59 PM Eric Blake wrote: > > On Fri, Jun 11, 2021 at 05:35:12PM +0300, Vladimir Sementsov-Ogievskiy wrote: > > > An obvious solution is to make 'qemu-img map --output=json' > > > distinguish between clusters that have a local allocation from those > > > that are found nowh

Re: [PATCH v4 1/8] hw/intc: GICv3 ITS initial framework

2021-06-11 Thread Eric Auger
Hi, On 6/2/21 8:00 PM, Shashi Mallela wrote: > Added register definitions relevant to ITS,implemented overall > ITS device framework with stubs for ITS control and translater > regions read/write,extended ITS common to handle mmio init between > existing kvm device and newer qemu device. > > Sign

Re: [PATCH] qemu-{img,nbd}: Don't report zeroed cluster as a hole

2021-06-11 Thread Nir Soffer
On Fri, Jun 11, 2021 at 4:28 PM Eric Blake wrote: > > On Fri, Jun 11, 2021 at 10:09:09AM +0200, Kevin Wolf wrote: > > > Yes, that might work as well. But we didn't previously document > > > depth to be optional. Removing something from output risks breaking > > > more downstream tools that expec

Re: [RFC PATCH 0/5] ebpf: Added ebpf helper for libvirtd.

2021-06-11 Thread Daniel P . Berrangé
On Fri, Jun 11, 2021 at 07:49:21PM +0300, Andrew Melnichenko wrote: > Hi, > > > So I think the series is for unprivileged_bpf disabled. If I'm not > > wrong, I guess the policy is to grant CAP_BPF but do fine grain checks > > via LSM. > > > > The main idea is to run eBPF RSS with qemu without any

Re: [PATCH v4 1/8] hw/intc: GICv3 ITS initial framework

2021-06-11 Thread Shashi Mallela
On Jun 11 2021, at 12:21 pm, Eric Auger wrote: > Hi, > > On 6/2/21 8:00 PM, Shashi Mallela wrote: > > Added register definitions relevant to ITS,implemented overall > > ITS device framework with stubs for ITS control and translater > > regions read/write,extended ITS common to handle mmio init b

Re: [PATCH v4 00/32] block/nbd: rework client connection

2021-06-11 Thread Vladimir Sementsov-Ogievskiy
11.06.2021 18:55, Eric Blake wrote: On Thu, Jun 10, 2021 at 01:07:30PM +0300, Vladimir Sementsov-Ogievskiy wrote: v4: Now based on new Paolo's patch: Based-on: <20210609122234.544153-1-pbonz...@redhat.com> Also, I've dropped patch 33 for now, it's too much for this series. I'll resend it later

Re: [RFC PATCH 4/5] qmp: Added qemu-ebpf-rss-path command.

2021-06-11 Thread Daniel P . Berrangé
On Fri, Jun 11, 2021 at 09:15:52AM -0500, Eric Blake wrote: > On Wed, Jun 09, 2021 at 01:04:56PM +0300, Andrew Melnychenko wrote: > > New qmp command to query ebpf helper. > > It's crucial that qemu and helper are in sync and in touch. > > Technically helper should pass eBPF fds that qemu may accep

Re: [PATCH 2/6] qapi/parser: Allow empty QAPIDoc Sections

2021-06-11 Thread John Snow
On 6/11/21 10:40 AM, Markus Armbruster wrote: John Snow writes: On 5/21/21 1:35 AM, Markus Armbruster wrote: Does not fire for qga/qapi-schema.json. Can you help? Odd. I did: if self._section: ... else: raise QAPIWhicheverErrorItWas(...) and then did a full build and found it

Re: [PATCH 0/4] modules: add support for target-specific modules.

2021-06-11 Thread Paolo Bonzini
On 11/06/21 10:29, Gerd Hoffmann wrote: Are there any pending patches to handle the remaining tcg dependencies in qemu? When trying to build tcg modular (more than only tcg-accel-ops*) I get lots of unresolved symbols to tcg bits which are referenced directly (in cpu.c, gdbstub.c, monitor, ...)

Re: tb_flush() calls causing long Windows XP boot times

2021-06-11 Thread Paolo Bonzini
On 11/06/21 17:01, Programmingkid wrote: Hello Alex, The good news is the source code to Windows XP is available online:https://github.com/cryptoAlgorithm/nt5src It's leaked, so I doubt anybody who's paid to work on Linux or QEMU would touch that with a ten-foot pole. Paolo

  1   2   >