Re: add qemu_fdt_setprop_strings

2022-10-21 Thread Andrew Jones
On Fri, Oct 21, 2022 at 06:58:02AM +0100, Ben Dooks wrote: > Add a qemu_fdt_setprop_strings to set a string array into a device-tree. > > Only minor updates from v4 to fix a couple of minor patch issues. Please see the comments I made on patch 1 of the v4 series, they should be addressed. Also, I

[PATCH v2 00/36] tcg: Support for Int128 with helpers

2022-10-21 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. That goal is somewhat down the road. This patch set contains two items: paired register allocation and

[PATCH v2 11/36] tcg: Add temp_subindex to TCGTemp

2022-10-21 Thread Richard Henderson
Record the location of a TCGTemp within a larger object. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 1 + tcg/tcg.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index d207bc47be..afa18986b1

[PATCH v2 16/36] tcg: Introduce TCGCallReturnKind and TCGCallArgumentKind

2022-10-21 Thread Richard Henderson
Prepare to replace a bunch of separate ifdefs with a consistent way to describe the abi of a function call. Signed-off-by: Richard Henderson --- tcg/tcg-internal.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/tcg/tcg-internal.h b/tcg/tcg-internal.h index 2c06b5116a..f5747

[PATCH v2 03/36] tcg: Introduce paired register allocation

2022-10-21 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 v2 07/36] tcg: Remove TCG_TARGET_STACK_GROWSUP

2022-10-21 Thread Richard Henderson
The hppa host code has been removed since 2013; this should have been deleted at the same time. Fixes: 802b5081233a ("tcg-hppa: Remove tcg backend") Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.h | 1 - tcg/arm/tcg-target.h | 1 - tcg/tcg

[PATCH v2 08/36] accel/tcg: Set cflags_next_tb in cpu_common_initfn

2022-10-21 Thread Richard Henderson
While we initialize this value in cpu_common_reset, that isn't called during startup, so set it as well in init. This fixes -singlestep versus the very first TB. Fixes: 04f5b647ed07 ("accel/tcg: Handle -singlestep in curr_cflags") Signed-off-by: Richard Henderson --- hw/core/cpu-common.c | 1 +

[PATCH v2 25/36] tcg: Allocate objects contiguously in temp_allocate_frame

2022-10-21 Thread Richard Henderson
When allocating a temp to the stack frame, consider the base type and allocate all parts at once. Signed-off-by: Richard Henderson --- tcg/tcg.c | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index fdafb30579..a3538edffa

[PATCH v2 14/36] tcg: Move TCG_TYPE_COUNT outside enum

2022-10-21 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 v8 1/2] hw/intc: Convert the memops to with_attrs in LoongArch extioi

2022-10-21 Thread Xiaojuan Yang
Converting the MemoryRegionOps read/write handlers to with_attrs in LoongArch extioi emulation. Signed-off-by: Xiaojuan Yang Reviewed-by: Philippe Mathieu-Daudé --- hw/intc/loongarch_extioi.c | 31 +-- hw/intc/trace-events | 3 +-- 2 files changed, 18 insertio

[PATCH v2 22/36] tcg: Add TCGHelperInfo argument to tcg_out_call

2022-10-21 Thread Richard Henderson
This eliminates an ifdef for TCI, and will be required for expanding the call for TCGv_i128. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tcg.c| 12 ++-- tcg/aarch64/tcg-target.c.inc | 19 ++- tcg/arm/tcg-target

[PATCH v2 06/36] meson: Move CONFIG_TCG_INTERPRETER to config_host

2022-10-21 Thread Richard Henderson
Like CONFIG_TCG, the enabled method of execution is a host property not a guest property. This exposes the define to compile-once files. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- meson.build | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/m

[PATCH v2 01/36] include/qemu/atomic128: Support 16-byte atomic read/write for Intel AVX

2022-10-21 Thread Richard Henderson
Intel has now given guarantees about the atomicity of SSE read and write instructions on cpus supporting AVX. We can use these instead of the much slower cmpxchg16b. Derived from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104688 Signed-off-by: Richard Henderson --- include/qemu/atomic128.h |

[PATCH v2 13/36] tcg: Allocate TCGTemp pairs in host memory order

2022-10-21 Thread Richard Henderson
Allocate the first of a pair at the lower address, and the second of a pair at the higher address. This will make it easier to find the beginning of the larger memory block. Signed-off-by: Richard Henderson --- tcg/tcg-internal.h | 4 ++-- tcg/tcg.c | 58 ++

Re: [PATCH 2/4] vhost: toggle device callbacks using used event idx

2022-10-21 Thread Eugenio Perez Martin
On Fri, Oct 21, 2022 at 5:40 AM Jason Wang wrote: > > On Thu, Oct 20, 2022 at 11:53 PM Eugenio Pérez wrote: > > > > Actually use the new field of the used ring and tell the device if SVQ > > wants to be notified. > > > > The code is not reachable at the moment. > > > > Signed-off-by: Eugenio Pére

Re: [PATCH 00/11] fix memory leak while kset_register() fails

2022-10-21 Thread Yang Yingliang via
Hi, On 2022/10/21 13:29, Luben Tuikov wrote: On 2022-10-20 22:20, Yang Yingliang wrote: The previous discussion link: https://lore.kernel.org/lkml/0db486eb-6927-927e-3629-958f8f211...@huawei.com/T/ The very first discussion on this was here: https://www.spinics.net/lists/dri-devel/msg368077.h

[PATCH v2 10/36] tcg: Move TCG_{LOW,HIGH} to tcg-internal.h

2022-10-21 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.h | 12 tcg/tcg-internal.h | 14 ++ tcg/tcg-op.c | 10 +- 3

[PATCH v2 24/36] tcg: Add TCG_CALL_{RET,ARG}_NORMAL_4

2022-10-21 Thread Richard Henderson
These will be used by some 32-bit hosts to pass and return i128. Not yet used, because allocation is not yet enabled. Signed-off-by: Richard Henderson --- tcg/tcg-internal.h | 2 + tcg/tcg.c | 127 - 2 files changed, 128 insertions(+), 1 del

[PATCH v1 1/3] hw/loongarch: Change FDT base addr to 2 MiB

2022-10-21 Thread Xiaojuan Yang
Change FDT base addr to 2 MiB in lowmem region. Since lowmem region starts from 0, FDT base address is located at 2 MiB to avoid NULL pointer access. Signed-off-by: Xiaojuan Yang --- hw/loongarch/virt.c | 18 +++--- include/hw/loongarch/virt.h | 3 --- 2 files changed, 11 in

[PATCH v2 32/36] tcg/tci: Fix big-endian return register ordering

2022-10-21 Thread Richard Henderson
We expect the backend to require register pairs in host-endian ordering, thus for big-endian the first register of a pair contains the high part. We were forcing R0 to contain the low part for calls. Signed-off-by: Richard Henderson --- tcg/tci.c | 21 +++-- 1 file changed, 11 in

[PATCH 0/9] target/s390x: Use Int128 for float128 and retxl

2022-10-21 Thread Richard Henderson
Removing retxl seemed like the easiest test case for TCGv_i128. I don't quite get rid of retxl, because it is still used by LPQ, which will be convertable directly to generic tcg ops once I'm further along with the main improvements to atomic operations. Tested only via the little test case, but

[PATCH 4/9] target/s390x: Use Int128 for return from CKSM

2022-10-21 Thread Richard Henderson
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/s390x/helper.h b/target/s390x/helper.h index ba9ed11896..16045b6dbe

[PATCH v2 27/36] tcg: Add TCG_CALL_{RET,ARG}_BY_REF

2022-10-21 Thread Richard Henderson
These will be used by some hosts, 32 and 64-bit to pass and return i128. Not yet used, because allocation is not yet enabled. Signed-off-by: Richard Henderson --- tcg/tcg-internal.h | 10 ++-- tcg/tcg.c | 124 - 2 files changed, 129 insertio

[PATCH v2 02/36] tcg: Tidy tcg_reg_alloc_op

2022-10-21 Thread Richard Henderson
Replace goto allocate_in_reg with a boolean. Remove o_preferred_regs which isn't used, except to copy. Signed-off-by: Richard Henderson --- tcg/tcg.c | 45 + 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index c9

[PATCH v2 05/36] tcg/arm: Use register pair allocation for qemu_{ld, st}_i64

2022-10-21 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 +

[PATCH v2 34/36] tcg: Add TCG_TARGET_CALL_{RET,ARG}_I128

2022-10-21 Thread Richard Henderson
Fill in the parameters for the host ABI for Int128 for those backends which require no extra modification. Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.h | 2 ++ tcg/arm/tcg-target.h | 2 ++ tcg/loongarch64/tcg-target.h | 2 ++ tcg/mips/tcg-target.h| 2 ++

[PATCH v1 0/3] Improve FDT and support TPM for LoongArch

2022-10-21 Thread Xiaojuan Yang
This series change FDT base addr and add uart,rtc info into FDT, Add TPM device for LoongArch virt machine. Changes for v1: 1. Change FDT base addr to 2 MiB. 2. Add uart and rtc info into FDT. 3. Add TPM device support. Xiaojuan Yang (3): hw/loongarch: Change FDT base addr to 2 MiB hw/loonga

[PATCH v2 23/36] tcg: Define TCG_TYPE_I128 and related helper macros

2022-10-21 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/

Re: [PATCH v8 0/2] Fix LoongArch extioi coreisr accessing

2022-10-21 Thread Richard Henderson
On 10/21/22 11:53, Xiaojuan Yang wrote: When cpu read or write extioi COREISR reg, it should access the reg belonged to itself, so the cpu index of 's->coreisr' is current cpu number. Using MemTxAttrs' requester_id to get the cpu index. Changes for v8: 1. Move the iocsr_helper changes to the sec

[PATCH v2 28/36] tcg: Introduce tcg_target_call_oarg_reg

2022-10-21 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| 14 -- tcg/aarch64/tcg-target.c.inc | 10 +++--- tcg/arm/tcg-target.c.inc | 9 ++--- t

[PATCH 8/9] target/s390x: Use Int128 for returning float128

2022-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/helper.h | 22 +++ target/s390x/tcg/fpu_helper.c | 29 ++-- target/s390x/tcg/translate.c | 49 +++--- target/s390x/tcg/insn-data.def | 20 +++--- 4 files changed, 63 inser

[PATCH v2 33/36] tcg/tci: Add TCG_TARGET_CALL_{RET,ARG}_I128

2022-10-21 Thread Richard Henderson
Fill in the parameters for libffi for Int128. Adjust the interpreter to allow for 16-byte return values. Adjust tcg_out_call to record the return value length. Call parameters are no longer all the same size, so we cannot reuse the same call_slots array for every function. Compute it each time now

[PATCH v2 26/36] tcg: Introduce tcg_out_addi_ptr

2022-10-21 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 v2 09/36] target/sparc: Avoid TCGV_{LOW,HIGH}

2022-10-21 Thread Richard Henderson
Use the official extend/extract functions instead of routines that will shortly be internal to tcg. Cc: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/translate.c | 21 - 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/target/sparc/translat

Re: [PATCH 00/11] fix memory leak while kset_register() fails

2022-10-21 Thread Yang Yingliang via
On 2022/10/21 13:37, Greg KH wrote: On Fri, Oct 21, 2022 at 01:29:31AM -0400, Luben Tuikov wrote: On 2022-10-20 22:20, Yang Yingliang wrote: The previous discussion link: https://lore.kernel.org/lkml/0db486eb-6927-927e-3629-958f8f211...@huawei.com/T/ The very first discussion on this was her

Re: MultiFD and default channel out of order mapping on receive side.

2022-10-21 Thread manish.mishra
On 21/10/22 3:37 am, Daniel P. Berrangé wrote: On Thu, Oct 20, 2022 at 12:32:06PM -0400, Peter Xu wrote: On Thu, Oct 20, 2022 at 08:14:19PM +0530, manish.mishra wrote: I had one concern, during recover we do not send any magic. As of now we do not support multifd with postcopy so it shoul

[PATCH v2 30/36] include/qemu/int128: Use Int128 structure for TCI

2022-10-21 Thread Richard Henderson
We are about to allow passing Int128 to/from tcg helper functions, but libffi doesn't support __int128_t, so use the structure. In order for atomic128.h to continue working, we must provide a mechanism to frob between real __int128_t and the structure. Provide a new union, Int128Alias, for this.

Re: [PATCH 2/4] vhost: toggle device callbacks using used event idx

2022-10-21 Thread Michael S. Tsirkin
On Fri, Oct 21, 2022 at 09:45:14AM +0200, Eugenio Perez Martin wrote: > On Fri, Oct 21, 2022 at 5:40 AM Jason Wang wrote: > > > > On Thu, Oct 20, 2022 at 11:53 PM Eugenio Pérez wrote: > > > > > > Actually use the new field of the used ring and tell the device if SVQ > > > wants to be notified. >

[PATCH v2 12/36] tcg: Simplify calls to temp_sync vs mem_coherent

2022-10-21 Thread Richard Henderson
The first thing that temp_sync does is check mem_coherent, so there's no need for the caller to do so. Signed-off-by: Richard Henderson --- tcg/tcg.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 135d9a9a0a..9fd58e46b9 100644 --- a/tcg/tc

[PATCH v2 31/36] tcg/i386: Add TCG_TARGET_CALL_{RET,ARG}_I128

2022-10-21 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 | 32

Re: [PATCH v6 00/10] Introduce new acpi/smbios avocado tests using biosbits

2022-10-21 Thread Michael S. Tsirkin
On Fri, Oct 21, 2022 at 05:45:15AM +0530, Ani Sinha wrote: > And have multiple platform specific branches in bits that have fixes for those > platforms so that bits can run there. Plus the existing test can be enhanced > to > pull in binaries from those branches based on the platform on which it i

[PATCH v2 36/36] tcg: Add tcg_gen_extr_i128_i64, tcg_gen_concat_i64_i128

2022-10-21 Thread Richard Henderson
Add code generation functions for data movement between TCGv_i128 and TCGv_i64. Signed-off-by: Richard Henderson --- include/tcg/tcg-op.h | 3 ++ include/tcg/tcg-opc.h | 4 ++ tcg/tcg-internal.h| 12 ++ tcg/tcg-op.c | 35 ++ tcg/tcg.c | 85

[PATCH v2 15/36] tcg: Introduce tcg_type_size

2022-10-21 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 v2 29/36] tcg: Add TCG_CALL_RET_BY_VEC

2022-10-21 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 | 17 + 2 files changed, 18 insertions(+) diff --git a/tcg/tcg-internal.h b/tcg/tcg-internal.h ind

[PATCH 7/9] tests/tcg/s390x: Add long-double.c

2022-10-21 Thread Richard Henderson
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 --git a/tests/tcg/s390x/long-double.c b/tests/tcg/s390x/long-double

Re: [PATCH 01/11] kset: fix documentation for kset_register()

2022-10-21 Thread Greg KH
On Fri, Oct 21, 2022 at 04:05:18PM +0800, Yang Yingliang wrote: > > On 2022/10/21 13:34, Luben Tuikov wrote: > > On 2022-10-20 22:20, Yang Yingliang wrote: > > > kset_register() is currently used in some places without calling > > > kset_put() in error path, because the callers think it should be

Re: [PATCH 00/11] fix memory leak while kset_register() fails

2022-10-21 Thread Greg KH
On Fri, Oct 21, 2022 at 03:55:18AM -0400, Luben Tuikov wrote: > On 2022-10-21 01:37, Greg KH wrote: > > On Fri, Oct 21, 2022 at 01:29:31AM -0400, Luben Tuikov wrote: > >> On 2022-10-20 22:20, Yang Yingliang wrote: > >>> The previous discussion link: > >>> https://nam11.safelinks.protection.outlook.

[PATCH 5/9] target/s390x: Use Int128 for return from TRE

2022-10-21 Thread Richard Henderson
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/s390x/helper.h b/target/s390x/helper.h index 16045b6dbe..aaea17724

Re: [RFC PATCH v2 2/8] vdpa: Save emulated features list in vhost_vdpa

2022-10-21 Thread Eugenio Perez Martin
On Fri, Oct 21, 2022 at 4:57 AM Jason Wang wrote: > > On Thu, Oct 20, 2022 at 2:34 PM Eugenio Perez Martin > wrote: > > > > On Thu, Oct 20, 2022 at 6:23 AM Jason Wang wrote: > > > > > > On Wed, Oct 19, 2022 at 8:52 PM Eugenio Pérez wrote: > > > > > > > > At this moment only _F_LOG is added ther

[PATCH 3/9] target/s390x: Use Int128 for return from CLST

2022-10-21 Thread Richard Henderson
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 a/target/s390x/helper.h b/target/s390x/helper.h index 29986557ed.

Re: [PATCH 00/11] fix memory leak while kset_register() fails

2022-10-21 Thread Yang Yingliang via
On 2022/10/21 16:36, Greg KH wrote: On Fri, Oct 21, 2022 at 04:24:23PM +0800, Yang Yingliang wrote: On 2022/10/21 13:37, Greg KH wrote: On Fri, Oct 21, 2022 at 01:29:31AM -0400, Luben Tuikov wrote: On 2022-10-20 22:20, Yang Yingliang wrote: The previous discussion link: https://lore.kernel.

Re: [PATCH 00/11] fix memory leak while kset_register() fails

2022-10-21 Thread Greg KH
On Fri, Oct 21, 2022 at 04:24:23PM +0800, Yang Yingliang wrote: > > On 2022/10/21 13:37, Greg KH wrote: > > On Fri, Oct 21, 2022 at 01:29:31AM -0400, Luben Tuikov wrote: > > > On 2022-10-20 22:20, Yang Yingliang wrote: > > > > The previous discussion link: > > > > https://lore.kernel.org/lkml/0db4

[PATCH v2 04/36] tcg/s390x: Use register pair allocation for div and mulu2

2022-10-21 Thread Richard Henderson
Previously we hard-coded R2 and R3. Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target-con-set.h | 4 ++-- tcg/s390x/tcg-target-con-str.h | 8 +-- tcg/s390x/tcg-target.c.inc | 43 +- 3 files changed, 35 insertions(+), 20 deletions(-) diff --git a

[PATCH v2 20/36] tcg: Reorg function calls

2022-10-21 Thread Richard Henderson
Pre-compute the function call layout for each helper at startup. Drop TCG_CALL_DUMMY_ARG, as we no longer need to leave gaps in the op->args[] array. For tcg_gen_callN, loop over the arguments once. Allocate the TCGOp for the call early but delay emitting it, collecting arguments first. This allo

Re: [PATCH v3 12/26] block/vvfat: Unify the mkdir() call

2022-10-21 Thread Kevin Wolf
Am 20.10.2022 um 13:51 hat Alex Bennée geschrieben: > From: Bin Meng > > There is a difference in the mkdir() call for win32 and non-win32 > platforms, and currently is handled in the codes with #ifdefs. > > glib provides a portable g_mkdir() API and we can use it to unify > the codes without #i

[PATCH v2 21/36] tcg: Move ffi_cif pointer into TCGHelperInfo

2022-10-21 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

Re: [PATCH v13 17/17] net: stream: add QAPI events to report connection state

2022-10-21 Thread Markus Armbruster
Cc: Stefano Brivio Laurent Vivier writes: > On 10/21/22 07:48, Markus Armbruster wrote: >> Laurent Vivier writes: >> >>> The netdev reports NETDEV_STREAM_CONNECTED event when the backend >>> is connected, and NETDEV_STREAM_DISCONNECTED when it is disconnected. >> >> Use cases? > > This is aske

[PATCH 6/9] target/s390x: Copy wout_x1 to wout_x1_P

2022-10-21 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. Signed-off-by: Richard Henderson --- target/s390x/tcg/translate.c | 8 target/s390x/tcg/insn-data.def

[PATCH v2 19/36] tcg: Use TCG_CALL_ARG_EVEN for TCI special case

2022-10-21 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. Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.h | 3 ++- tcg/t

[PATCH v14 14/17] qemu-sockets: update socket_uri() and socket_parse() to be consistent

2022-10-21 Thread Laurent Vivier
To be consistent with socket_uri(), add 'tcp:' prefix for inet type in socket_parse(), by default socket_parse() use tcp when no prefix is provided (format is host:port). In socket_uri(), use 'vsock:' prefix for vsock type rather than 'tcp:' because it makes a vsock address look like an inet addre

[PATCH v14 15/17] net: stream: move to QIO to enable additional parameters

2022-10-21 Thread Laurent Vivier
Use QIOChannel, QIOChannelSocket and QIONetListener. This allows net/stream to use all the available parameters provided by SocketAddress. Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin --- net/stream.c| 492 +--- qemu-options.hx | 4

Re: [PATCH v8 2/2] hw/intc: Fix LoongArch extioi coreisr accessing

2022-10-21 Thread Philippe Mathieu-Daudé
On 21/10/22 03:53, Xiaojuan Yang wrote: 1. When cpu read or write extioi COREISR reg, it should access the reg belonged to itself, so the cpu index of 's->coreisr' is current cpu number. Using MemTxAttrs' requester_id to get the cpu index. 2. it need not to mask 0x1f when calculate the coreisr ar

[PATCH v2 35/36] tcg: Add temp allocation for TCGv_i128

2022-10-21 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 | 32 +++- 2 files changed, 59 insertions(+), 5 de

[PATCH 2/9] target/s390x: Use a single return for helper_divs64/u64

2022-10-21 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. This is the first use of Int128 as a return value. Signed-off-by: Richard Henderson --- target/s390x/helper.h | 4 ++-- target/s390x/tcg/int_helper.c | 38 +-

Re: [PATCH v9 0/5] improve error handling for module load

2022-10-21 Thread Claudio Fontana
ping, can this series move on? Thanks, Claudio On 9/29/22 11:30, Claudio Fontana wrote: > CHANGELOG: > > v8 -> v9: > > * add Signed-off-by tag for Kevin's commit > * fully reviewed, added tags. > > v7 -> v8: > > * fix a problem in module_load, where the module_name in v7 was mistakenly > f

[PATCH v14 08/17] net: stream: Don't ignore EINVAL on netdev socket connection

2022-10-21 Thread Laurent Vivier
From: Stefano Brivio Other errors are treated as failure by net_stream_client_init(), but if connect() returns EINVAL, we'll fail silently. Remove the related exception. Signed-off-by: Stefano Brivio [lvivier: applied to net/stream.c] Signed-off-by: Laurent Vivier Reviewed-by: Daniel P. Berran

[PATCH v14 06/17] qapi: net: add stream and dgram netdevs

2022-10-21 Thread Laurent Vivier
Copied from socket netdev file and modified to use SocketAddress to be able to introduce new features like unix socket. "udp" and "mcast" are squashed into dgram netdev, multicast is detected according to the IP address type. "listen" and "connect" modes are managed by stream netdev. An optional p

Re: [PATCH v6 06/10] acpi/tests/avocado/bits: disable smilatency test since it does not pass everytime

2022-10-21 Thread Ani Sinha
On Thu, Oct 20, 2022 at 11:17 PM Alex Bennée wrote: > > > Ani Sinha writes: > > > smilatency test is latency sensitive and does not pass deterministically > > when > > run in QEMU environment under biosbits. Disable the test suite for now. > > > > Example failure: > > > > SMI latency test =

[PATCH v14 09/17] net: stream: add unix socket

2022-10-21 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio Acked-by: Michael S. Tsirkin Acked-by: Markus Armbruster (QAPI schema) Reviewed-by: Philippe Mathieu-Daudé --- net/stream.c| 107 +--- qapi/net.json | 2 +- qemu-options.hx | 1 + 3

Re: [PATCH 01/11] kset: fix documentation for kset_register()

2022-10-21 Thread Yang Yingliang via
On 2022/10/21 13:34, Luben Tuikov wrote: On 2022-10-20 22:20, Yang Yingliang wrote: kset_register() is currently used in some places without calling kset_put() in error path, because the callers think it should be kset internal thing to do, but the driver core can not know what caller doing wi

Re: [PATCH 00/11] fix memory leak while kset_register() fails

2022-10-21 Thread Yang Yingliang via
On 2022/10/21 16:36, Greg KH wrote: On Fri, Oct 21, 2022 at 04:24:23PM +0800, Yang Yingliang wrote: On 2022/10/21 13:37, Greg KH wrote: On Fri, Oct 21, 2022 at 01:29:31AM -0400, Luben Tuikov wrote: On 2022-10-20 22:20, Yang Yingliang wrote: The previous discussion link: https://lore.kernel.

Re: [PATCH v13 00/17] qapi: net: add unix socket type support to netdev backend

2022-10-21 Thread Laurent Vivier
On 10/21/22 08:50, Jason Wang wrote: On Fri, Oct 21, 2022 at 2:46 PM Markus Armbruster wrote: Jason Wang writes: I've queued this version and will send pull requests shortly. Any future comment we can do patches on top. Please give Laurent and me a few hours to try to improve PATCH 17's

[PATCH v14 13/17] qemu-sockets: move and rename SocketAddress_to_str()

2022-10-21 Thread Laurent Vivier
Rename SocketAddress_to_str() to socket_uri() and move it to util/qemu-sockets.c close to socket_parse(). socket_uri() generates a string from a SocketAddress while socket_parse() generates a SocketAddress from a string. Signed-off-by: Laurent Vivier Reviewed-by: David Gibson Reviewed-by: Dr. D

Re: [PATCH v13 17/17] net: stream: add QAPI events to report connection state

2022-10-21 Thread Markus Armbruster
Laurent Vivier writes: > On 10/21/22 11:12, Markus Armbruster wrote: >> Cc: Stefano Brivio >> >> Laurent Vivier writes: >> >>> On 10/21/22 07:48, Markus Armbruster wrote: Laurent Vivier writes: > The netdev reports NETDEV_STREAM_CONNECTED event when the backend > is connecte

[PATCH v14 05/17] net: introduce qemu_set_info_str() function

2022-10-21 Thread Laurent Vivier
Embed the setting of info_str in a function. Signed-off-by: Laurent Vivier Reviewed-by: David Gibson Acked-by: Michael S. Tsirkin Reviewed-by: Philippe Mathieu-Daudé --- hw/net/xen_nic.c | 5 ++--- include/net/net.h | 1 + net/l2tpv3.c | 3 +-- net/net.c | 17

[PATCH 9/9] target/s390x: Use Int128 for passing float128

2022-10-21 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/helper.h | 32 ++--- target/s390x/tcg/fpu_helper.c | 88 ++ target/s390x/tcg/translate.c | 76 - target/s390x/tcg/insn-data.def | 30 ++-- 4 files changed, 121

[PATCH v2 18/36] tcg: Replace TCG_TARGET_EXTEND_ARGS with TCG_TARGET_CALL_ARG_I32

2022-10-21 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. Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.h | 1 + tcg/arm/tcg-target.h | 1 + tcg/i386/tcg-target.h| 1 + tcg/loonga

Re: [PATCH] MAINTAINERS: Fold "Block QAPI, monitor, ..." into "Block layer core"

2022-10-21 Thread Kevin Wolf
Am 20.10.2022 um 14:05 hat Markus Armbruster geschrieben: > Section "Block QAPI, monitor, command line" is about the external > interfaces we provide for block devices. It covers the relevant QAPI > schema parts, monitor and command line code, more or less. > > The section's files are also covere

[PATCH v14 12/17] net: dgram: add unix socket

2022-10-21 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio Reviewed-by: David Gibson Acked-by: Michael S. Tsirkin Acked-by: Markus Armbruster (QAPI schema) --- net/dgram.c | 55 - qapi/net.json | 2 +- qemu-options.hx | 1 + 3 files chang

Re: [PATCH v6 00/10] Introduce new acpi/smbios avocado tests using biosbits

2022-10-21 Thread Michael S. Tsirkin
On Fri, Oct 21, 2022 at 10:30:09AM +0100, Alex Bennée wrote: > > Ani Sinha writes: > > > On Fri, Oct 21, 2022 at 2:02 PM Michael S. Tsirkin wrote: > >> > >> On Fri, Oct 21, 2022 at 05:45:15AM +0530, Ani Sinha wrote: > >> > And have multiple platform specific branches in bits that have fixes for

Re: [PATCH v5 5/6] hw/mips: use qemu_fdt_setprop_strings()

2022-10-21 Thread Philippe Mathieu-Daudé
On 21/10/22 07:58, Ben Dooks wrote: Change to using qemu_fdt_setprop_strings() helper in hw/mips. Signed-off-by: Ben Dooks Reviewed-by: Peter Maydell --- hw/mips/boston.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v6 00/10] Introduce new acpi/smbios avocado tests using biosbits

2022-10-21 Thread Alex Bennée
Ani Sinha writes: > On Fri, Oct 21, 2022 at 2:02 PM Michael S. Tsirkin wrote: >> >> On Fri, Oct 21, 2022 at 05:45:15AM +0530, Ani Sinha wrote: >> > And have multiple platform specific branches in bits that have fixes for >> > those >> > platforms so that bits can run there. Plus the existing

[PATCH v14 02/17] net: remove the @errp argument of net_client_inits()

2022-10-21 Thread Laurent Vivier
The only caller passes &error_fatal, so use this directly in the function. It's what we do for -blockdev, -device, and -object. Suggested-by: Markus Armbruster Signed-off-by: Laurent Vivier Reviewed-by: Markus Armbruster Reviewed-by: David Gibson Acked-by: Michael S. Tsirkin --- include/net

[PATCH v14 16/17] tests/qtest: netdev: test stream and dgram backends

2022-10-21 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin --- tests/qtest/meson.build | 1 + tests/qtest/netdev-socket.c | 420 2 files changed, 421 insertions(+) create mode 100644 tests/qtest/netdev-socket.c diff --git a/tests/qtest/meson.build b/t

[PATCH v14 10/17] net: dgram: make dgram_dst generic

2022-10-21 Thread Laurent Vivier
dgram_dst is a sockaddr_in structure. To be able to use it with unix socket, use a pointer to a generic sockaddr structure. Rename it dest_addr, and store socket length in dest_len. Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio Acked-by: Michael S. Tsirkin Reviewed-by: Philippe Mat

[PATCH v14 07/17] net: socket: Don't ignore EINVAL on netdev socket connection

2022-10-21 Thread Laurent Vivier
From: Stefano Brivio Other errors are treated as failure by net_socket_connect_init(), but if connect() returns EINVAL, we'll fail silently. Remove the related exception. Signed-off-by: Stefano Brivio Signed-off-by: Laurent Vivier Reviewed-by: David Gibson Acked-by: Michael S. Tsirkin --- n

Re: [PATCH v8 2/2] hw/intc: Fix LoongArch extioi coreisr accessing

2022-10-21 Thread yangxiaojuan
在 2022/10/21 下午5:11, Philippe Mathieu-Daudé 写道: On 21/10/22 03:53, Xiaojuan Yang wrote: 1. When cpu read or write extioi COREISR reg, it should access the reg belonged to itself, so the cpu index of 's->coreisr' is current cpu number. Using MemTxAttrs' requester_id to get the cpu index. 2. it

Re: [PATCH v6 1/2] block: Ignore close() failure in get_tmp_filename()

2022-10-21 Thread Kevin Wolf
Am 10.10.2022 um 06:04 hat Bin Meng geschrieben: > The temporary file has been created and is ready for use. Checking > return value of close() does not seem useful. The file descriptor > is almost certainly closed; see close(2) under "Dealing with error > returns from close()". > > Let's simply i

[PATCH v14 04/17] qapi: net: introduce a way to bypass qemu_opts_parse_noisily()

2022-10-21 Thread Laurent Vivier
As qemu_opts_parse_noisily() flattens the QAPI structures ("type" field of Netdev structure can collides with "type" field of SocketAddress), we introduce a way to bypass qemu_opts_parse_noisily() and use directly visit_type_Netdev() to parse the backend parameters. More details from Markus: qemu

[PATCH v14 17/17] net: stream: add QAPI events to report connection state

2022-10-21 Thread Laurent Vivier
The netdev reports NETDEV_STREAM_CONNECTED event when the backend is connected, and NETDEV_STREAM_DISCONNECTED when it is disconnected. The NETDEV_STREAM_CONNECTED event includes the destination address. This allows a system manager like libvirt to detect when the server fails. For instance with

Re: [PATCH v5 09/14] target/arm: Don't shift attrs in get_phys_addr_lpae

2022-10-21 Thread Peter Maydell
On Fri, 21 Oct 2022 at 10:27, Philippe Mathieu-Daudé wrote: > > On 21/10/22 00:35, Richard Henderson wrote: > > Leave the upper and lower attributes in the place they originate > > from in the descriptor. Shifting them around is confusing, since > > one cannot read the bit numbers out of the manu

Re: [PATCH v2 0/2] Fix some problems with vvfat in R/W mode

2022-10-21 Thread Kevin Wolf
Am 10.10.2022 um 19:55 hat Hervé Poussineau geschrieben: > Hi, > > When testing vvfat in read-write mode, I came across some blocking > problems when using Windows guests. > This patchset is not here to fix all problems of vvfat, but only the > main ones I encountered. > > First patch allows sett

Re: [PATCH v13 17/17] net: stream: add QAPI events to report connection state

2022-10-21 Thread Laurent Vivier
On 10/21/22 11:12, Markus Armbruster wrote: Cc: Stefano Brivio Laurent Vivier writes: On 10/21/22 07:48, Markus Armbruster wrote: Laurent Vivier writes: The netdev reports NETDEV_STREAM_CONNECTED event when the backend is connected, and NETDEV_STREAM_DISCONNECTED when it is disconnected.

Re: [PATCH v5 10/14] target/arm: Consider GP an attribute in get_phys_addr_lpae

2022-10-21 Thread Philippe Mathieu-Daudé
On 21/10/22 00:35, Richard Henderson wrote: Both GP and DBM are in the upper attribute block. Extend the computation of attrs to include them, then simplify the setting of guarded. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/ptw.c | 6 ++ 1 file changed, 2

Re: [RFC PATCH v2 6/8] vdpa: handle VIRTIO_NET_CTRL_ANNOUNCE in vhost_vdpa_net_handle_ctrl_avail

2022-10-21 Thread Eugenio Perez Martin
On Fri, Oct 21, 2022 at 5:02 AM Jason Wang wrote: > > On Thu, Oct 20, 2022 at 3:01 PM Eugenio Perez Martin > wrote: > > > > On Thu, Oct 20, 2022 at 6:35 AM Jason Wang wrote: > > > > > > On Wed, Oct 19, 2022 at 8:52 PM Eugenio Pérez wrote: > > > > > > > > Since this capability is emulated by qem

Re: [PATCH v13 17/17] net: stream: add QAPI events to report connection state

2022-10-21 Thread Laurent Vivier
On 10/21/22 07:48, Markus Armbruster wrote: Laurent Vivier writes: The netdev reports NETDEV_STREAM_CONNECTED event when the backend is connected, and NETDEV_STREAM_DISCONNECTED when it is disconnected. Use cases? This is asked by Stefano Brivio to allow libvirt to detect if connection to

Re: [PATCH 00/11] fix memory leak while kset_register() fails

2022-10-21 Thread Yang Yingliang via
On 2022/10/21 17:08, Luben Tuikov wrote: On 2022-10-21 04:59, Yang Yingliang wrote: On 2022/10/21 16:36, Greg KH wrote: On Fri, Oct 21, 2022 at 04:24:23PM +0800, Yang Yingliang wrote: On 2022/10/21 13:37, Greg KH wrote: On Fri, Oct 21, 2022 at 01:29:31AM -0400, Luben Tuikov wrote: On 2022-

[PATCH v14 11/17] net: dgram: move mcast specific code from net_socket_fd_init_dgram()

2022-10-21 Thread Laurent Vivier
It is less complex to manage special cases directly in net_dgram_mcast_init() and net_dgram_udp_init(). Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio Acked-by: Michael S. Tsirkin --- net/dgram.c | 143 1 file changed, 76 insertio

Re: [PATCH v6 00/10] Introduce new acpi/smbios avocado tests using biosbits

2022-10-21 Thread Ani Sinha
On Fri, Oct 21, 2022 at 2:02 PM Michael S. Tsirkin wrote: > > On Fri, Oct 21, 2022 at 05:45:15AM +0530, Ani Sinha wrote: > > And have multiple platform specific branches in bits that have fixes for > > those > > platforms so that bits can run there. Plus the existing test can be > > enhanced to

Re: [PATCH 00/11] fix memory leak while kset_register() fails

2022-10-21 Thread Yang Yingliang via
On 2022/10/21 16:41, Luben Tuikov wrote: On 2022-10-21 04:24, Luben Tuikov wrote: On 2022-10-21 04:18, Greg KH wrote: On Fri, Oct 21, 2022 at 03:55:18AM -0400, Luben Tuikov wrote: On 2022-10-21 01:37, Greg KH wrote: On Fri, Oct 21, 2022 at 01:29:31AM -0400, Luben Tuikov wrote: On 2022-10-2

  1   2   3   >