[PATCH for-8.0 v3 32/45] tcg: Introduce tcg_out_addi_ptr

2022-11-11 Thread Richard Henderson
Implement the function for arm, i386, and s390x, which will use it. Add stubs for all other backends. Signed-off-by: Richard Henderson --- tcg/tcg.c| 2 ++ tcg/aarch64/tcg-target.c.inc | 7 +++ tcg/arm/tcg-target.c.inc | 20 tcg/i386

[PATCH for-8.0 v3 29/45] tcg: Define TCG_TYPE_I128 and related helper macros

2022-11-11 Thread Richard Henderson
Begin staging in support for TCGv_i128 with Int128. Define the type enumerator, the typedef, and the helper-head.h macros. This cannot yet be used, because you can't allocate temporaries of this new type. Signed-off-by: Richard Henderson --- include/exec/helper-head.h | 7 +++ include/tcg/

[PATCH for-8.0 v3 30/45] tcg: Handle dh_typecode_i128 with TCG_CALL_{RET, ARG}_NORMAL

2022-11-11 Thread Richard Henderson
Many hosts pass and return 128-bit quantities like sequential 64-bit quantities. Treat this just like we currently break down 64-bit quantities for a 32-bit host. Signed-off-by: Richard Henderson --- tcg/tcg.c | 33 + 1 file changed, 29 insertions(+), 4 deletions

[PATCH for-8.0 v3 43/45] tcg: Add guest load/store primitives for TCGv_i128

2022-11-11 Thread Richard Henderson
These are not yet considering atomicity of the 16-byte value; this is a direct replacement for the current target code which uses a pair of 8-byte operations. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 10 +++ include/tcg/tcg-op.h| 2 + accel/tcg/cputlb.c | 112 ++

[PATCH for-8.0 v3 26/45] tcg: Move ffi_cif pointer into TCGHelperInfo

2022-11-11 Thread Richard Henderson
Instead of requiring a separate hash table lookup, put a pointer to the CIF into TCGHelperInfo. Signed-off-by: Richard Henderson --- tcg/tcg-internal.h | 7 +++ tcg/tcg.c | 129 + 2 files changed, 78 insertions(+), 58 deletions(-) diff --gi

[PATCH for-8.0 v3 20/45] accel/tcg/plugin: Avoid duplicate copy in copy_call

2022-11-11 Thread Richard Henderson
We copied all of the arguments in copy_op_nocheck. We only need to replace the one argument that we change. Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index 9e359c006a..77e6823d6

[PATCH for-8.0 v3 41/45] tcg: Add temp allocation for TCGv_i128

2022-11-11 Thread Richard Henderson
This enables allocation of i128. The type is not yet usable, as we have not yet added data movement ops. Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 32 + tcg/tcg.c | 60 +-- 2 files changed, 74 insertions(

[PATCH for-8.0 v2 07/13] target/s390x: Use Int128 for return from CKSM

2022-11-11 Thread Richard Henderson
Acked-by: Ilya Leoshkevich Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/s390x/helper.h | 2 +- target/s390x/tcg/mem_helper.c | 7 +++ target/s390x/tcg/translate.c | 6 -- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/target/s3

Re: [PATCH v2 13/18] tests: add migration tests of TLS with x509 credentials

2022-11-11 Thread Thomas Huth
On 10/03/2022 18.18, Daniel P. Berrangé wrote: This validates that we correctly handle migration success and failure scenarios when using TLS with x509 certificates. There are quite a few different scenarios that matter in relation to hostname validation. Signed-off-by: Daniel P. Berrangé ---

[PATCH for-8.0 v2 13/13] target/s390x: Implement CC_OP_NZ in gen_op_calc_cc

2022-11-11 Thread Richard Henderson
This case is trivial to implement inline. Signed-off-by: Richard Henderson --- target/s390x/tcg/translate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 480c89dae3..f8a6f29d9c 100644 --- a/target/s390x/tcg/translate.c ++

[PATCH for-8.0 v3 45/45] tcg: Split out tcg_gen_nonatomic_cmpxchg_i{32, 64}

2022-11-11 Thread Richard Henderson
Normally this is automatically handled by the CF_PARALLEL checks with in tcg_gen_atomic_cmpxchg_i{32,64}, but x86 has a special case of !PREFIX_LOCK where it always wants the non-atomic version. Split these out so that x86 does not have to roll its own. Signed-off-by: Richard Henderson --- incl

[PATCH for-8.0 v3 34/45] tcg: Introduce tcg_target_call_oarg_reg

2022-11-11 Thread Richard Henderson
Replace the flat array tcg_target_call_oarg_regs[] with a function call including the TCGCallReturnKind. Signed-off-by: Richard Henderson --- tcg/tcg.c| 9 ++--- tcg/aarch64/tcg-target.c.inc | 10 +++--- tcg/arm/tcg-target.c.inc | 10 +++--- tcg/i

[PATCH for-8.0 v3 37/45] tcg/i386: Add TCG_TARGET_CALL_{RET, ARG}_I128

2022-11-11 Thread Richard Henderson
Fill in the parameters for the host ABI for Int128. Adjust tcg_target_call_oarg_reg for _WIN64, and tcg_out_call for i386 sysv. Allow TCG_TYPE_V128 stores without AVX enabled. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.h | 10 ++ tcg/i386/tcg-target.c.inc | 30

[PATCH for-8.0 v2 10/13] target/s390x: Use Int128 for returning float128

2022-11-11 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- v2: Remove extraneous return_low128. --- target/s390x/helper.h| 22 +++--- target/s390x/tcg/fpu_helper.c| 29 +- target/s390x/tcg/translate.c | 51 +---

[PATCH for-8.0 v3 18/45] tcg: Use TCG_CALL_ARG_EVEN for TCI special case

2022-11-11 Thread Richard Henderson
Change 32-bit tci TCG_TARGET_CALL_ARG_I32 to TCG_CALL_ARG_EVEN, to force 32-bit values to be aligned to 64-bit. With a small reorg to the argument processing loop, this neatly replaces an ifdef for CONFIG_TCG_INTERPRETER. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson ---

[PATCH for-8.0 v3 13/45] tcg: Move TCG_TYPE_COUNT outside enum

2022-11-11 Thread Richard Henderson
The count is not itself an enumerator. Move it outside to prevent the compiler from considering it with -Wswitch-enum. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/tcg/tc

[PATCH for-8.0 v2 00/13] target/s390x: Use TCGv_i128

2022-11-11 Thread Richard Henderson
Changes for v2: * Fix the div bugs found by Ilya. * Convert CDSG * Improve CC resolution for CDSG+IPM. Turned out the best testing so far for TCGv_i128 was CDSG, especially for 32-bit x86 host, where we have only 6 regs available for 13 parameters. Whee! r~ Based-on: 2022074101.20694

Re: [PATCH v6 05/10] vdpa: move SVQ vring features check to net/

2022-11-11 Thread Eugenio Perez Martin
On Fri, Nov 11, 2022 at 8:34 AM Jason Wang wrote: > > > 在 2022/11/10 21:09, Eugenio Perez Martin 写道: > > On Thu, Nov 10, 2022 at 6:40 AM Jason Wang wrote: > >> > >> 在 2022/11/9 01:07, Eugenio Pérez 写道: > >>> The next patches will start control SVQ if possible. However, we don't > >>> know if that

[PATCH for-8.0 v3 05/45] tcg/arm: Use register pair allocation for qemu_{ld, st}_i64

2022-11-11 Thread Richard Henderson
Although we still can't use ldrd and strd for all operations, increase the chances by getting the register allocation correct. Signed-off-by: Richard Henderson --- tcg/arm/tcg-target-con-set.h | 7 --- tcg/arm/tcg-target-con-str.h | 2 ++ tcg/arm/tcg-target.c.inc | 28 +

Re: [PATCH v6 10/10] vdpa: Always start CVQ in SVQ mode

2022-11-11 Thread Jason Wang
在 2022/11/11 00:07, Eugenio Perez Martin 写道: On Thu, Nov 10, 2022 at 7:25 AM Jason Wang wrote: 在 2022/11/9 01:07, Eugenio Pérez 写道: Isolate control virtqueue in its own group, allowing to intercept control commands but letting dataplane run totally passthrough to the guest. I think we nee

[PATCH for-8.0 v2 06/13] target/s390x: Use Int128 for return from CLST

2022-11-11 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Acked-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- target/s390x/helper.h | 2 +- target/s390x/tcg/mem_helper.c | 11 --- target/s390x/tcg/translate.c | 8 ++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git

Re: [PATCH for-7.2] Fix several typos in documentation (found by codespell)

2022-11-11 Thread Thomas Huth
On 10/11/2022 21.10, Peter Maydell wrote: On Thu, 10 Nov 2022 at 19:09, Stefan Weil via wrote: Those typos are in files which are used to generate the QEMU manual. Signed-off-by: Stefan Weil --- I did not fix memory_region_init_resizeable_ram. That might be done after 7.2. Stefan docs/d

[PATCH for-8.0 v2 02/13] tests/tcg/s390x: Add clst.c

2022-11-11 Thread Richard Henderson
From: Ilya Leoshkevich Add a basic test to prevent regressions. Signed-off-by: Ilya Leoshkevich Message-Id: <20221025213008.2209006-2-...@linux.ibm.com> Signed-off-by: Richard Henderson --- tests/tcg/s390x/clst.c | 82 + tests/tcg/s390x/Makefile.target

[PATCH for-8.0 v3 14/45] tcg: Introduce tcg_type_size

2022-11-11 Thread Richard Henderson
Add a helper function for computing the size of a type. Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 16 tcg/tcg.c | 26 -- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index f2

[PATCH for-8.0 v2 03/13] tests/tcg/s390x: Add long-double.c

2022-11-11 Thread Richard Henderson
Acked-by: Ilya Leoshkevich Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tests/tcg/s390x/long-double.c | 24 tests/tcg/s390x/Makefile.target | 1 + 2 files changed, 25 insertions(+) create mode 100644 tests/tcg/s390x/long-double.c diff --

[PATCH for-8.0 v3 00/45] tcg: Support for Int128 with helpers

2022-11-11 Thread Richard Henderson
This is working toward improving atomicity within TCG, especially with respect to Arm FEAT_LSE2, which guarantees that any operation that does not cross a 16-byte boundary is treated atomically. (Incidentally, I've also stumbled across language in the Intel SDM that shows the feature is required t

[PATCH for-8.0 v2 04/13] target/s390x: Use a single return for helper_divs32/u32

2022-11-11 Thread Richard Henderson
Pack the quotient and remainder into a single uint64_t. Signed-off-by: Richard Henderson --- v2: Fix operand ordering; use tcg_extr32_i64. --- target/s390x/helper.h | 2 +- target/s390x/tcg/int_helper.c | 26 +- target/s390x/tcg/translate.c | 8 3 file

Re: [PATCH v6 05/10] vdpa: move SVQ vring features check to net/

2022-11-11 Thread Jason Wang
On Fri, Nov 11, 2022 at 3:56 PM Eugenio Perez Martin wrote: > > On Fri, Nov 11, 2022 at 8:34 AM Jason Wang wrote: > > > > > > 在 2022/11/10 21:09, Eugenio Perez Martin 写道: > > > On Thu, Nov 10, 2022 at 6:40 AM Jason Wang wrote: > > >> > > >> 在 2022/11/9 01:07, Eugenio Pérez 写道: > > >>> The next p

[PATCH for-8.0 v3 03/45] tcg: Introduce paired register allocation

2022-11-11 Thread Richard Henderson
There are several instances where we need to be able to allocate a pair of registers to related inputs/outputs. Add 'p' and 'm' register constraints for this, in order to be able to allocate the even/odd register first or second. Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 2 + tc

[PATCH for-8.0 v2 05/13] target/s390x: Use a single return for helper_divs64/u64

2022-11-11 Thread Richard Henderson
Pack the quotient and remainder into a single Int128. Use the divu128 primitive to remove the cpu_abort on 32-bit hosts. Reviewed-by: Philippe Mathieu-Daudé Acked-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- v2: Extended div test case to cover these insns. --- target/s390x/helper.

[PATCH for-8.0 v3 17/45] tcg: Replace TCG_TARGET_EXTEND_ARGS with TCG_TARGET_CALL_ARG_I32

2022-11-11 Thread Richard Henderson
For 64-bit hosts that had TCG_TARGET_EXTEND_ARGS, set TCG_TARGET_CALL_ARG_I32 to TCG_CALL_ARG_EXTEND. Otherwise, use TCG_CALL_ARG_NORMAL. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.h | 1 + tcg/arm/tcg-target.h | 1 + tcg/i386/t

[PATCH for-8.0 v2 11/13] target/s390x: Use Int128 for passing float128

2022-11-11 Thread Richard Henderson
Signed-off-by: Richard Henderson --- v2: Fix SPEC_in1_x1. --- target/s390x/helper.h| 32 ++-- target/s390x/tcg/fpu_helper.c| 88 ++-- target/s390x/tcg/translate.c | 76 ++- target/s390x/tcg/insn-data.h.inc | 30 +-

[PATCH for-8.0 v3 35/45] tcg: Add TCG_CALL_RET_BY_VEC

2022-11-11 Thread Richard Henderson
This will be used by _WIN64 to return i128. Not yet used, because allocation is not yet enabled. Signed-off-by: Richard Henderson --- tcg/tcg-internal.h | 1 + tcg/tcg.c | 19 +++ 2 files changed, 20 insertions(+) diff --git a/tcg/tcg-internal.h b/tcg/tcg-internal.h i

[PATCH for-8.0 v2 08/13] target/s390x: Use Int128 for return from TRE

2022-11-11 Thread Richard Henderson
Acked-by: Ilya Leoshkevich Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/s390x/helper.h | 2 +- target/s390x/tcg/mem_helper.c | 7 +++ target/s390x/tcg/translate.c | 7 +-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/target/s

[PATCH for-8.0 v3 09/45] tcg: Move TCG_{LOW,HIGH} to tcg-internal.h

2022-11-11 Thread Richard Henderson
Move the error-generating fallback from tcg-op.c, and replace "_link_error" with modern QEMU_ERROR markup. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg-op.h | 33 + include/tcg/tcg.h| 12 tcg/tcg-intern

[PATCH for-8.0 v2 01/13] tests/tcg/s390x: Add div.c

2022-11-11 Thread Richard Henderson
From: Ilya Leoshkevich Add a basic test to prevent regressions. Signed-off-by: Ilya Leoshkevich Message-Id: <2022110300.2539919-1-...@linux.ibm.com> Signed-off-by: Richard Henderson --- tests/tcg/s390x/div.c | 40 + tests/tcg/s390x/Makefile.target

[PATCH for-8.0 v2 12/13] target/s390x: Use tcg_gen_atomic_cmpxchg_i128 for CDSG

2022-11-11 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/helper.h| 2 -- target/s390x/tcg/mem_helper.c| 52 --- target/s390x/tcg/translate.c | 60 target/s390x/tcg/insn-data.h.inc | 2 +- 4 files changed, 38 insertions(+), 78

[PATCH for-8.0 v2 09/13] target/s390x: Copy wout_x1 to wout_x1_P

2022-11-11 Thread Richard Henderson
Make a copy of wout_x1 before modifying it, as wout_x1_P emphasizing that it operates on the out/out2 pair. The insns that use x1_P are data movement that will not change to Int128. Acked-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- target/s390x/tcg/translate.c | 8

Re: [PATCH v9 4/8] KVM: Use gfn instead of hva for mmu_notifier_retry

2022-11-11 Thread Chao Peng
On Thu, Nov 10, 2022 at 08:06:33PM +, Sean Christopherson wrote: > On Tue, Oct 25, 2022, Chao Peng wrote: > > @@ -715,15 +715,9 @@ static void kvm_mmu_notifier_change_pte(struct > > mmu_notifier *mn, > > kvm_handle_hva_range(mn, address, address + 1, pte, kvm_set_spte_gfn); > > } > > >

[PATCH] acpi/tests/avocado/bits: some misc fixes and spelling corrections

2022-11-11 Thread Ani Sinha
Most of the changes are cosmetic. The bits test timeout has now been increased to 90 seconds in order to accommodate slower systems and fewer unnecessary failures. One spelling correction in docs along with removal of the reference to non-existent README file. CC: Thomas Huth CC: qemu-triv...@non

Re: [PATCH] acpi/tests/avocado/bits: some misc fixes and spelling corrections

2022-11-11 Thread Thomas Huth
On 11/11/2022 09.52, Ani Sinha wrote: Most of the changes are cosmetic. The bits test timeout has now been increased to 90 seconds in order to accommodate slower systems and fewer unnecessary failures. One spelling correction in docs along with removal of the reference to non-existent README file

Re: [PATCH v2 04/19] osdep.h: Introduce a QEMU file descriptor type

2022-11-11 Thread Daniel P . Berrangé
On Fri, Nov 11, 2022 at 12:22:10PM +0800, Bin Meng wrote: > Introduce a new QemuFd_t type to represent a file descriptor for > different platforms. On POSIX platforms, this is a file descriptor > On Windows, this is a file handle. Can we not use _open_osfhandle() to obtain a C runtime file descri

Re: [PATCH v2 13/18] tests: add migration tests of TLS with x509 credentials

2022-11-11 Thread Daniel P . Berrangé
On Fri, Nov 11, 2022 at 08:56:20AM +0100, Thomas Huth wrote: > On 10/03/2022 18.18, Daniel P. Berrangé wrote: > > This validates that we correctly handle migration success and failure > > scenarios when using TLS with x509 certificates. There are quite a few > > different scenarios that matter in r

Re: [PATCH v3] qapi/qom: Memory backend property prealloc-threads doc fix

2022-11-11 Thread Igor Mammedov
On Fri, 11 Nov 2022 07:47:16 +0100 Markus Armbruster wrote: > Gavin Shan writes: > > > Hi Zhenyu, > > > > On 11/11/22 11:05 AM, Zhenyu Zhang wrote: > >> Commit ffac16fab3 "hostmem: introduce "prealloc-threads" property" > >> (v5.0.0) changed the default number of threads from number of CPUs >

Re: [PATCH v2 04/19] osdep.h: Introduce a QEMU file descriptor type

2022-11-11 Thread Bin Meng
Hi Daniel, On Fri, Nov 11, 2022 at 5:08 PM Daniel P. Berrangé wrote: > > On Fri, Nov 11, 2022 at 12:22:10PM +0800, Bin Meng wrote: > > Introduce a new QemuFd_t type to represent a file descriptor for > > different platforms. On POSIX platforms, this is a file descriptor > > On Windows, this is a

Re: [PATCH v2 04/19] osdep.h: Introduce a QEMU file descriptor type

2022-11-11 Thread Daniel P . Berrangé
On Fri, Nov 11, 2022 at 05:23:58PM +0800, Bin Meng wrote: > Hi Daniel, > > On Fri, Nov 11, 2022 at 5:08 PM Daniel P. Berrangé > wrote: > > > > On Fri, Nov 11, 2022 at 12:22:10PM +0800, Bin Meng wrote: > > > Introduce a new QemuFd_t type to represent a file descriptor for > > > different platform

Re: [PATCH v3] qapi/qom: Memory backend property prealloc-threads doc fix

2022-11-11 Thread Gavin Shan
On 11/11/22 5:13 PM, Igor Mammedov wrote: On Fri, 11 Nov 2022 07:47:16 +0100 Markus Armbruster wrote: Gavin Shan writes: On 11/11/22 11:05 AM, Zhenyu Zhang wrote: Commit ffac16fab3 "hostmem: introduce "prealloc-threads" property" (v5.0.0) changed the default number of threads from number of

Re: [PULL v4 44/83] acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device descriptors

2022-11-11 Thread Igor Mammedov
On Thu, 10 Nov 2022 09:28:44 + Peter Maydell wrote: > On Wed, 9 Nov 2022 at 21:42, Michael S. Tsirkin wrote: > > > > > diff --git a/hw/display/meson.build b/hw/display/meson.build > > > > index adc53dd8b6..7a725ed80e 100644 > > > > --- a/hw/display/meson.build > > > > +++ b/hw/display/meson

Re: [PATCH for-7.2] block/blkio: Set BlockDriver::has_variable_length to false

2022-11-11 Thread Kevin Wolf
Am 10.11.2022 um 22:01 hat Stefan Hajnoczi geschrieben: > On Tue, 8 Nov 2022 at 09:45, Alberto Faria wrote: > > > > Setting it to true can cause the device size to be queried from libblkio > > in otherwise fast paths, degrading performance. Set it to false and > > require users to refresh the devi

[PULL 0/1] ppc queue

2022-11-11 Thread Daniel Henrique Barboza
The following changes since commit 2ccad61746ca7de5dd3e25146062264387e43bd4: Merge tag 'pull-tcg-20221109' of https://gitlab.com/rth7680/qemu into staging (2022-11-09 13:26:45 -0500) are available in the Git repository at: https://gitlab.com/danielhb/qemu.git tags/pull-ppc-202

[PULL 1/1] hw/pci-host/pnv_phb: Avoid quitting QEMU if hotplug of pnv-phb-root-port fails

2022-11-11 Thread Daniel Henrique Barboza
From: Thomas Huth Currently QEMU terminates if you try to hotplug pnv-phb-root-port in an environment where it is not supported, e.g. if doing this: echo "device_add pnv-phb-root-port" | \ ./qemu-system-ppc64 -monitor stdio -M powernv9 To avoid this problem, the pnv_phb_root_port_realize() fu

Re: [PATCH] libdecnumber/dpd/decimal64: Fix compiler warning from Clang 15

2022-11-11 Thread Philippe Mathieu-Daudé
On 11/11/22 08:43, Thomas Huth wrote: On 10/11/2022 21.00, Philippe Mathieu-Daudé wrote: On 10/11/22 14:11, Thomas Huth wrote: Clang 15 from Fedora 37 complains:   ../libdecnumber/dpd/decimal64.c:620:8: error: variable 'n' set but   not used [-Werror,-Wunused-but-set-variable]     Int  n; 

Re: [RFC PATCH] tests/plugins: add a new vcpu state tracking plugin

2022-11-11 Thread Philippe Mathieu-Daudé
On 8/11/22 17:49, Alex Bennée wrote: Although we call qemu_plugin_register_vcpu_idle_cb() in the bb test we don't really exercise the rest of the state change callbacks. Add a new test that tests the whole API. [AJB: I wrote this in an attempt to flush out a reproducer for #1195 although so far

Re: [PATCH] util/qemu-config: Fix "query-command-line-options" to provide the right values

2022-11-11 Thread Thomas Huth
On 09/11/2022 09.44, Thomas Huth wrote: The "query-command-line-options" command uses a hand-crafted list of options that should be returned for the "machine" parameter. This is pretty much out of sync with reality, for example settings like "kvm_shadow_mem" or "accel" are not parameters for the

Re: [PULL v4 44/83] acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device descriptors

2022-11-11 Thread Igor Mammedov
On Fri, 11 Nov 2022 10:43:30 +0100 Igor Mammedov wrote: > On Thu, 10 Nov 2022 09:28:44 + > Peter Maydell wrote: > > > On Wed, 9 Nov 2022 at 21:42, Michael S. Tsirkin wrote: > > > > > > > diff --git a/hw/display/meson.build b/hw/display/meson.build > > > > > index adc53dd8b6..7a725ed80e

Re: [PATCH v2 17/19] hw/9pfs: Update synth fs driver for Windows

2022-11-11 Thread Philippe Mathieu-Daudé
On 11/11/22 05:22, Bin Meng wrote: From: Guohuai Shi Adapt synth fs driver for Windows in preparation to running qtest 9p testing on Windows. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- (no changes since v1) hw/9pfs/9p-synth.c | 5 - 1 file changed, 4 insertions(+), 1 del

[PULL 0/8] Misc fixes

2022-11-11 Thread Thomas Huth
Hi Stefan! The following changes since commit 2ccad61746ca7de5dd3e25146062264387e43bd4: Merge tag 'pull-tcg-20221109' of https://gitlab.com/rth7680/qemu into staging (2022-11-09 13:26:45 -0500) are available in the Git repository at: https://gitlab.com/thuth/qemu.git tags/pull-request-202

[PULL 5/8] libdecnumber/dpd/decimal64: Fix compiler warning from Clang 15

2022-11-11 Thread Thomas Huth
Clang 15 from Fedora 37 complains: ../libdecnumber/dpd/decimal64.c:620:8: error: variable 'n' set but not used [-Werror,-Wunused-but-set-variable] Int n; /* output bunch counter */ ^ 1 error generated. Remove the unused variable to silence the compiler warning.

[PULL 8/8] Fix several typos in documentation (found by codespell)

2022-11-11 Thread Thomas Huth
From: Stefan Weil Those typos are in files which are used to generate the QEMU manual. Signed-off-by: Stefan Weil Message-Id: <20221110190825.879620-1...@weilnetz.de> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Ani Sinha Reviewed-by: Peter Maydell Acked-by: Michael S. Tsirkin [thuth: u

[PULL 6/8] qga: Allow building of the guest agent without system emulators or tools

2022-11-11 Thread Thomas Huth
If configuring with "--disable-system --disable-user --enable-guest-agent" the linking currently fails with: qga/qemu-ga.p/commands.c.o: In function `qmp_command_info': build/../../home/thuth/devel/qemu/qga/commands.c:70: undefined reference to `qmp_command_name' build/../../home/thuth/devel/qemu

[PULL 2/8] tulip: Remove unused variable

2022-11-11 Thread Thomas Huth
From: Miroslav Rezanina Variable n used in tulip_idblock_crc function is only incremented but never read. This causes 'Unused but set variable' warning on Clang 15.0.1 compiler. Removing the variable to prevent the warning. Signed-off-by: Miroslav Rezanina Reviewed-by: Thomas Huth Message-Id

[PULL 7/8] net: Replace TAB indentations with spaces

2022-11-11 Thread Thomas Huth
From: Ahmed Abouzied Replaces TABs with spaces, making sure to have a consistent coding style of 4 space indentations in the net subsystem. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/377 Signed-off-by: Ahmed Abouzied Message-Id: <20210614183849.20622-1-em...@aabouzied.com> Reviewed

[PULL 3/8] qemu-img: remove unused variable

2022-11-11 Thread Thomas Huth
From: Miroslav Rezanina Variable block_count used in img_dd function is only incremented but never read. This causes 'Unused but set variable' warning on Clang 15.0.1 compiler. Removing the variable to prevent the warning. Signed-off-by: Miroslav Rezanina Reviewed-by: Thomas Huth Message-Id:

Re: How about increasing max_cpus for q35 ?

2022-11-11 Thread Igor Mammedov
On Wed, 9 Nov 2022 13:36:07 + Dario Faggioli wrote: > Hello, > > Sorry for the potentially naive question, but I'm not clear what the > process would be if, say, I'd like to raise the number of maximum CPUs > a q35 VM can have. > > So, right now we have: > > void pc_q35_2_7_machine_options

[PULL 4/8] host-libusb: Remove unused variable

2022-11-11 Thread Thomas Huth
From: Miroslav Rezanina Variable unconnected used in usb_host_auto_check function is only incremented but never read as line where it is read was disabled since introducing the code. This causes 'Unused but set variable' warning on Clang 15.0.1 compiler. Removing the variable and disabled code t

[PULL 1/8] rtl8139: Remove unused variable

2022-11-11 Thread Thomas Huth
From: Miroslav Rezanina Variable send_count used in rtl8139_cplus_transmit_one function is only incremented but never read. This causes 'Unused but set variable' warning on Clang 15.0.1 compiler. Removing the variable to prevent the warning. Signed-off-by: Miroslav Rezanina Reviewed-by: Thomas

Re: How about increasing max_cpus for q35 ?

2022-11-11 Thread Daniel P . Berrangé
On Wed, Nov 09, 2022 at 01:36:07PM +, Dario Faggioli wrote: > Hello, > > Sorry for the potentially naive question, but I'm not clear what the > process would be if, say, I'd like to raise the number of maximum CPUs > a q35 VM can have. > > So, right now we have: > > void pc_q35_2_7_machine_o

Re: [PATCH v2 1/3] accel: introduce accelerator blocker API

2022-11-11 Thread Paolo Bonzini
On 11/10/22 17:48, Emanuele Giuseppe Esposito wrote: +/* + * QEMU accel blocker class "Lock to inhibit accelerator ioctls" + * + * Copyright (c) 2014 Red Hat Inc. 2022, you can also add an Author line. +static int accel_in_ioctls(void) Return bool (and return early if ret becomes true).

Re: [PATCH v2 2/3] KVM: keep track of running ioctls

2022-11-11 Thread Paolo Bonzini
On 11/10/22 17:48, Emanuele Giuseppe Esposito wrote: diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index f9fdd46b9d..8d6a4b1b65 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -237,6 +237,7 @@ static void cpu_common_initfn(Object *obj) cpu->nr_threads = 1;

Re: [BUG] hw/i386/pc.c: CXL Fixed Memory Window should not reserve e820 in bios

2022-11-11 Thread Igor Mammedov
On Tue, 8 Nov 2022 12:21:11 +0100 Gerd Hoffmann wrote: > > >> > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > > >> > index 566accf7e6..5bf5465a21 100644 > > >> > --- a/hw/i386/pc.c > > >> > +++ b/hw/i386/pc.c > > >> > @@ -1061,7 +1061,6 @@ void pc_memory_init(PCMachineState *pcms, > > >> >

Re: [PATCH v3] qapi/qom: Memory backend property prealloc-threads doc fix

2022-11-11 Thread Igor Mammedov
On Fri, 11 Nov 2022 17:34:04 +0800 Gavin Shan wrote: > On 11/11/22 5:13 PM, Igor Mammedov wrote: > > On Fri, 11 Nov 2022 07:47:16 +0100 > > Markus Armbruster wrote: > >> Gavin Shan writes: > >>> On 11/11/22 11:05 AM, Zhenyu Zhang wrote: > Commit ffac16fab3 "hostmem: introduce "preal

Re: [PATCH v2 3/3] kvm: Atomic memslot updates

2022-11-11 Thread Paolo Bonzini
On 11/10/22 17:48, Emanuele Giuseppe Esposito wrote: +/* Remove all memslots before adding the new ones. */ +QSIMPLEQ_FOREACH_SAFE(u1, &kml->transaction_del, next, u2) { +kvm_set_phys_mem(kml, u1->section, false); +memory_region_unref(u1->section->mr); + +QSIMPLEQ

Re: [PATCH v2 1/2] file-posix: fix Linux alignment probing when EIO is returned

2022-11-11 Thread Kevin Wolf
Am 03.11.2022 um 19:36 hat Stefan Hajnoczi geschrieben: > Linux v6.0 dm-crypt returns errno EIO from unaligned O_DIRECT pread(2) > calls. Alignment probing fails on dm-crypt devices because the code > expects EINVAL. This is a kernel regression that is expected to be fixed > upstream: > https://lor

Re: should ioapic_service really be modelling cpu writes?

2022-11-11 Thread Paolo Bonzini
On 11/10/22 23:42, Peter Xu wrote: I think it shouldn't? Normally the irq will be in MSI format (IOAPIC will translate to an MSI in QEMU, per ioapic_entry_parse()). I had a feeling that it'll just go the shortcut here (MSI always starts with 0xfeeX so definitely bigger than 0xfff): Note t

Re: biosbits test failing on origin/master

2022-11-11 Thread Ani Sinha
On Fri, Nov 11, 2022 at 9:52 AM Ani Sinha wrote: > > On Thu, Nov 10, 2022 at 11:37 PM John Snow wrote: > > > > Hiya, on today's origin/master > > (2ccad61746ca7de5dd3e25146062264387e43bd4) I'm finding that "make > > check-avocado" is failing on the new biosbits test on my local > > development ma

Re: [PATCH 02/13] test-bdrv-drain: Don't yield in .bdrv_co_drained_begin/end()

2022-11-11 Thread Emanuele Giuseppe Esposito
Am 08/11/2022 um 13:37 schrieb Kevin Wolf: > We want to change .bdrv_co_drained_begin/end() back to be non-coroutine > callbacks, so in preparation, avoid yielding in their implementation. > > This does almost the same as the existing logic in bdrv_drain_invoke(), > by creating and entering coro

Re: [PATCH 01/13] qed: Don't yield in bdrv_qed_co_drain_begin()

2022-11-11 Thread Emanuele Giuseppe Esposito
Am 08/11/2022 um 13:37 schrieb Kevin Wolf: > We want to change .bdrv_co_drained_begin() back to be a non-coroutine > callback, so in preparation, avoid yielding in its implementation. > > Because we increase bs->in_flight and bdrv_drained_begin() polls, the > behaviour is unchanged. > > Signed-o

Re: [PATCH 03/13] block: Revert .bdrv_drained_begin/end to non-coroutine_fn

2022-11-11 Thread Emanuele Giuseppe Esposito
Am 08/11/2022 um 13:37 schrieb Kevin Wolf: > Polling during bdrv_drained_end() can be problematic (and in the future, > we may get cases for bdrv_drained_begin() where polling is forbidden, > and we don't care about already in-flight requests, but just want to > prevent new requests from arrivin

Re: [PATCH 04/13] block: Remove drained_end_counter

2022-11-11 Thread Emanuele Giuseppe Esposito
Am 08/11/2022 um 13:37 schrieb Kevin Wolf: > drained_end_counter is unused now, nobody changes its value any more. It > can be removed. > > In cases where we had two almost identical functions that only differed > in whether the caller passes drained_end_counter, or whether they would > poll for

Re: [PATCH 05/13] block: Inline bdrv_drain_invoke()

2022-11-11 Thread Emanuele Giuseppe Esposito
Am 08/11/2022 um 13:37 schrieb Kevin Wolf: > bdrv_drain_invoke() has now two entirely separate cases that share no > code any more and are selected depending on a bool parameter. Each case > has only one caller. Just inline the function. > > Signed-off-by: Kevin Wolf > Reviewed-by: Emanuele G

Re: [PATCH v3 1/2] hw/nvme: fix incorrect use of errp/local_err

2022-11-11 Thread Markus Armbruster
Klaus Jensen writes: > On Nov 11 07:55, Markus Armbruster wrote: >> Klaus Jensen writes: >> >> > On Nov 11 07:36, Markus Armbruster wrote: >> >> Klaus Jensen writes: >> >> >> >> > From: Klaus Jensen >> >> > >> >> > Remove an unnecessary local Error value in nvme_realize(). In the >> >> > pro

Re: [PATCH 12/13] block: Don't poll in bdrv_replace_child_noperm()

2022-11-11 Thread Emanuele Giuseppe Esposito
Am 08/11/2022 um 13:37 schrieb Kevin Wolf: > In order to make sure that bdrv_replace_child_noperm() doesn't have to > poll any more, get rid of the bdrv_parent_drained_begin_single() call. > > This is possible now because we can require that the child is already > drained when the function is c

Re: [PATCH v2 2/2] file-posix: add statx(STATX_DIOALIGN) support

2022-11-11 Thread Kevin Wolf
Am 03.11.2022 um 19:36 hat Stefan Hajnoczi geschrieben: > Linux v6.1 commit 825cf206ed51 ("statx: add direct I/O alignment > information") added an interface to fetch O_DIRECT alignment values for > block devices and file systems. > > Prefer STATX_DIOALIGN to older interfaces and probing, but keep

Re: [PATCH 00/13] block: Simplify drain

2022-11-11 Thread Emanuele Giuseppe Esposito
Am 08/11/2022 um 13:37 schrieb Kevin Wolf: > I'm aware that exactly nobody has been looking forward to a series with > this title, but it has to be. The way drain works means that we need to > poll in bdrv_replace_child_noperm() and that makes things rather messy > with Emanuele's multiqueue wor

Re: Is bdrv_poll_co() IO_CODE()?

2022-11-11 Thread Paolo Bonzini
On 11/10/22 22:25, Stefan Hajnoczi wrote: Hi, bdrv_coroutine_enter() is IO_CODE but is called from any coroutine wrapper function. When there is an IOThread and main loop code calls a coroutine wrapper function then I think bdrv_coroutine_enter() is called from outside IO_CODE? No, I think bdrv

Re: [PATCH] Add missing pixman dependecy

2022-11-11 Thread Paolo Bonzini
On 11/9/22 16:34, mreza...@redhat.com wrote: From: Miroslav Rezanina Commit cfead31326 'acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device descriptors' added a new file - acpi-vga.c. This file (indirectly) includes pixman.h file so we need to ensure pixman is available when file is

Re: [PATCH] Add missing pixman dependecy

2022-11-11 Thread Philippe Mathieu-Daudé
On 11/11/22 12:24, Paolo Bonzini wrote: On 11/9/22 16:34, mreza...@redhat.com wrote: From: Miroslav Rezanina Commit cfead31326 'acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device descriptors' added a new file - acpi-vga.c. This file (indirectly) includes pixman.h file so we need t

Re: [PATCH v3 2/2] hw/nvme: cleanup error reporting in nvme_init_pci()

2022-11-11 Thread Philippe Mathieu-Daudé
On 10/11/22 23:08, Klaus Jensen wrote: From: Klaus Jensen Replace the local Error variable with errp and ERRP_GUARD() and change the return value to bool. Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) @@ -

[PATCH for-7.2 1/2] target/i386: fix cmpxchg with 32-bit register destination

2022-11-11 Thread Richard Henderson
From: Paolo Bonzini Unlike the memory case, where "the destination operand receives a write cycle without regard to the result of the comparison", rm must not be touched altogether if the write fails, including not zero-extending it on 64-bit processors. This is not how the movcond currently wor

[PATCH for-7.2 0/2] target/i386: misc tcg patches

2022-11-11 Thread Richard Henderson
While poking at cmpxchg{8,16}b this week, I remembered there was a fix for cmpxchgl floating around. I pulled these two fixes out of Paolo's i386 branch and added a test case. r~ Paolo Bonzini (2): target/i386: fix cmpxchg with 32-bit register destination target/i386: hardcode R_EAX as des

[PATCH for-7.2 2/2] target/i386: hardcode R_EAX as destination register for LAHF/SAHF

2022-11-11 Thread Richard Henderson
From: Paolo Bonzini When translating code that is using LAHF and SAHF in combination with the REX prefix, the instructions should not use any other register than AH; however, QEMU selects SPL (SP being register 4, just like AH) if the REX prefix is present. To fix this, use deposit directly with

Re: [BUG] hw/i386/pc.c: CXL Fixed Memory Window should not reserve e820 in bios

2022-11-11 Thread Gerd Hoffmann
On Fri, Nov 11, 2022 at 11:51:23AM +0100, Igor Mammedov wrote: > On Tue, 8 Nov 2022 12:21:11 +0100 > Gerd Hoffmann wrote: > > > > >> > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > > > >> > index 566accf7e6..5bf5465a21 100644 > > > >> > --- a/hw/i386/pc.c > > > >> > +++ b/hw/i386/pc.c > > > >> > @@

Re: [PATCH] tests/stream-under-throttle: New test

2022-11-11 Thread Kevin Wolf
Am 10.11.2022 um 17:09 hat Hanna Reitz geschrieben: > Test streaming a base image into the top image underneath two throttle > nodes. This was reported to make qemu 7.1 hang > (https://gitlab.com/qemu-project/qemu/-/issues/1215), so this serves as > a regression test. > > Signed-off-by: Hanna Rei

Re: [PATCH 1/8] virtio_queue_aio_attach_host_notifier: remove AioContext lock

2022-11-11 Thread Emanuele Giuseppe Esposito
Am 08/11/2022 um 22:19 schrieb Stefan Hajnoczi: > From: Emanuele Giuseppe Esposito > > virtio_queue_aio_attach_host_notifier() and > virtio_queue_aio_attach_host_notifier_nopoll() run always in the > main loop, so there is no need to protect them with AioContext > lock. > > On the other side, v

Re: [PATCH 2/8] block-backend: enable_write_cache should be atomic

2022-11-11 Thread Emanuele Giuseppe Esposito
Am 08/11/2022 um 22:19 schrieb Stefan Hajnoczi: > From: Emanuele Giuseppe Esposito > > It is read from IO_CODE and written with BQL held, > so setting it as atomic should be enough. > > Also remove the aiocontext lock that was sporadically > taken around the set. > > Signed-off-by: Emanuele Giu

Re: [PATCH] acpi/tests/avocado/bits: some misc fixes and spelling corrections

2022-11-11 Thread Ani Sinha
On Fri, Nov 11, 2022 at 2:36 PM Thomas Huth wrote: > > On 11/11/2022 09.52, Ani Sinha wrote: > > Most of the changes are cosmetic. The bits test timeout has now been > > increased > > to 90 seconds in order to accommodate slower systems and fewer unnecessary > > failures. One spelling correction

Re: [PATCH 3/8] virtio: categorize callbacks in GS

2022-11-11 Thread Emanuele Giuseppe Esposito
Am 08/11/2022 um 22:19 schrieb Stefan Hajnoczi: > From: Emanuele Giuseppe Esposito > > All the callbacks below are always running in the main loop. > > The callbacks are the following: > - start/stop_ioeventfd: these are the callbacks where > blk_set_aio_context(iothread) is done, so they are

Re: [PATCH 4/8] virtio-blk: mark GLOBAL_STATE_CODE functions

2022-11-11 Thread Emanuele Giuseppe Esposito
Am 08/11/2022 um 22:19 schrieb Stefan Hajnoczi: > From: Emanuele Giuseppe Esposito > > Just as done in the block API, mark functions in virtio-blk > that are always called in the main loop with BQL held. > > We know such functions are GS because they all are callbacks > from virtio.c API that h

[PATCH] hw/intc: sifive_plic: Renumber the S irqs for numa support

2022-11-11 Thread Frédéric Pétrot
Commit 40244040 changed the way the S irqs are numbered. This breaks when using numa configuration, e.g.: ./qemu-system-riscv64 -nographic -machine virt,dumpdtb=numa-tree.dtb \ -m 2G -smp cpus=16 \ -object memory-backend-ram,id=mem0,size=512M \

Re: [PATCH 5/8] virtio-blk: mark IO_CODE functions

2022-11-11 Thread Emanuele Giuseppe Esposito
Am 08/11/2022 um 22:19 schrieb Stefan Hajnoczi: > From: Emanuele Giuseppe Esposito > > Just as done in the block API, mark functions in virtio-blk > that are called also from iothread(s). > > We know such functions are IO because many are blk_* callbacks, > running always in the device iothread

  1   2   3   >