Re: [PATCH v4 02/36] tcg: Handle dh_typecode_i128 with TCG_CALL_{RET, ARG}_NORMAL

2023-01-11 Thread Alex Bennée
Richard Henderson writes: > 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 Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Te

[PATCH v3 1/3] python/qmp/protocol: add open_with_socket()

2023-01-11 Thread marcandre . lureau
From: Marc-André Lureau Instead of listening for incoming connections with a SocketAddr, add a new method open_with_socket() that accepts an existing socket. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- python/qemu/qmp/protocol.py | 25 - 1 file

[PATCH v3 3/3] python/qemu/machine: use socketpair() for QMP by default

2023-01-11 Thread marcandre . lureau
From: Marc-André Lureau When no monitor address is given, establish the QMP communication through a socketpair() (API is also supported on Windows since Python 3.5) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- python/qemu/machine/machine.py | 24 ---

[PATCH v3 0/3] python/qemu/machine: fix potential hang in QMP accept

2023-01-11 Thread marcandre . lureau
From: Marc-André Lureau Hi, As reported earlier by Richard Henderson ("virgl avocado hang" thread), avocado tests may hang when QEMU exits before the QMP connection is established. v3: - after merge in https://gitlab.com/qemu-project/python-qemu-qmp - resend as requested by John Snow v2: -

[PATCH v3 2/3] python/qmp/legacy: make QEMUMonitorProtocol accept a socket

2023-01-11 Thread marcandre . lureau
From: Marc-André Lureau Teach QEMUMonitorProtocol to accept an exisiting socket. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- python/qemu/qmp/legacy.py | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/python/qemu/qmp/legacy.py b/p

Re: [PATCH] usb-ccid: make ids and descriptor configurable

2023-01-11 Thread Marc-André Lureau
Hi Klaus On Tue, Jan 10, 2023 at 7:49 PM Ripke, Klaus wrote: > > Signed-off-by: Klaus Ripke > > hw/usb/dev-smartcard-reader.c: > Set static values from env vars QEMU_CCID_VENDOR/PRODUCT_ID and > _DESCRIPTOR We don't use environment variables to configure devices. Please add properties to ccid_p

[RFC PATCH v2 4/4] bulk: Prefix '0x' to hex values displayed with HWADDR_PRIx format

2023-01-11 Thread Philippe Mathieu-Daudé
Automatic change running: $ sed -i -E \ 's/([^0][^x])%016" HWADDR_PRIx/\10x%016" HWADDR_PRIx/g' \ $(git grep -l -F '%016" HWADDR_PRIx') Signed-off-by: Philippe Mathieu-Daudé --- RFC: Maybe some non-0x prefix are justified in some cases, i.e. 'info mtree' output, or generically

[PATCH v2 3/4] bulk: Replace TARGET_FMT_plx -> HWADDR_PRIx

2023-01-11 Thread Philippe Mathieu-Daudé
The 'hwaddr' type is defined in "exec/hwaddr.h" as: hwaddr is the type of a physical address (its size can be different from 'target_ulong'). All definitions use the 'HWADDR_' prefix, except TARGET_FMT_plx: $ fgrep define include/exec/hwaddr.h #define HWADDR_H #define HWADDR_BITS 64 #

[PATCH v2 1/4] hw: Remove hardcoded tabs (code style)

2023-01-11 Thread Philippe Mathieu-Daudé
We are going to modify this code, fix its style first to avoid the following checkpatch.pl violations: ERROR: code indent should never use tabs ERROR: space prohibited between function name and open parenthesis '(' Signed-off-by: Philippe Mathieu-Daudé --- hw/dma/etraxfs_dma.c | 196 +++

[PATCH v2 0/4] bulk: Replace TARGET_FMT_plx by HWADDR_PRIx

2023-01-11 Thread Philippe Mathieu-Daudé
Since v1: - Fix checkpatch style violations - Use HWADDR_PRIx instead of HWADDR_FMT_plx (Zoltan) Supersedes: <20230110212947.34557-1-phi...@linaro.org> "bulk: Rename TARGET_FMT_plx -> HWADDR_FMT_plx" Philippe Mathieu-Daudé (4): hw: Remove hardcoded tabs (code style) bulk: Coding s

[PATCH v2 2/4] bulk: Coding style fixes

2023-01-11 Thread Philippe Mathieu-Daudé
Fix the following checkpatch.pl violation on lines using the TARGET_FMT_plx definition to avoid: WARNING: line over 80 characters Signed-off-by: Philippe Mathieu-Daudé --- hw/block/pflash_cfi01.c | 5 +++-- hw/char/digic-uart.c | 8 hw/core/sysbus.c | 3

Re: [PATCH] hw/net/lan9118: log [read|write]b when mode_16bit is enabled rather than abort

2023-01-11 Thread Philippe Mathieu-Daudé
Hi Qiang, On 11/1/23 08:05, Qiang Liu wrote: This patch replaces hw_error to guest error log for [read|write]b accesses when mode_16bit is enabled. This avoids aborting qemu. Fixes: 1248f8d4cbc3 ("hw/lan9118: Add basic 16-bit mode support.") Resolves: https://gitlab.com/qemu-project/qemu/-/issu

Re: [PATCH] hw/net/lan9118: log [read|write]b when mode_16bit is enabled rather than abort

2023-01-11 Thread Qiang Liu
On Wed, Jan 11, 2023 at 4:44 PM Philippe Mathieu-Daudé wrote: > Hi Qiang, > > On 11/1/23 08:05, Qiang Liu wrote: > > This patch replaces hw_error to guest error log for [read|write]b > > accesses when mode_16bit is enabled. This avoids aborting qemu. > > > > Fixes: 1248f8d4cbc3 ("hw/lan9118: Add

[PATCH v3 0/5] hw/i2c/bitbang_i2c: Housekeeping

2023-01-11 Thread Philippe Mathieu-Daudé
Series fully reviewed. Since v2: - Use array of const pointers to const (Richard) Since v1: - Fixed overwritten RECEIVING_BIT7 entry (Richard) - Picked R-b tags - Remove unused dummy MemoryRegion - Convert DPRINTF() to using trace events (series used as base for follow-up, better if merged via

[PATCH v3 1/5] hw/i2c/bitbang_i2c: Define TYPE_GPIO_I2C in public header

2023-01-11 Thread Philippe Mathieu-Daudé
Define TYPE_GPIO_I2C in the public "hw/i2c/bitbang_i2c.h" header and use it in hw/arm/musicpal.c. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/arm/musicpal.c| 3 ++- hw/i2c/bitbang_i2c.c | 1 - include/hw/i2c/bitbang_i2c.h | 2 ++ 3 files chang

[PATCH v3 3/5] hw/i2c/bitbang_i2c: Change state calling bitbang_i2c_set_state() helper

2023-01-11 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/i2c/bitbang_i2c.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/hw/i2c/bitbang_i2c.c b/hw/i2c/bitbang_i2c.c index e41cb63daa..bf4b781393 100644 --- a/hw/i2c/bitbang_i2c.c ++

[PATCH v3 5/5] hw/i2c/bitbang_i2c: Convert DPRINTF() to trace events

2023-01-11 Thread Philippe Mathieu-Daudé
Convert the remaining DPRINTF debug macro uses to tracepoints. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/i2c/bitbang_i2c.c | 18 ++ hw/i2c/trace-events | 4 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/hw/i2c/bitbang_i

[PATCH v3 4/5] hw/i2c/bitbang_i2c: Trace state changes

2023-01-11 Thread Philippe Mathieu-Daudé
Trace bitbang state machine changes with trace events. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/i2c/bitbang_i2c.c | 33 - hw/i2c/trace-events | 3 +++ 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/hw/i2c/bitb

[PATCH v3 2/5] hw/i2c/bitbang_i2c: Remove unused dummy MemoryRegion

2023-01-11 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/i2c/bitbang_i2c.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/i2c/bitbang_i2c.c b/hw/i2c/bitbang_i2c.c index ac84bf0262..e41cb63daa 100644 --- a/hw/i2c/bitbang_i2c.c +++ b/hw/i2c/bitbang

Re: [PATCH v14 04/11] s390x/sclp: reporting the maximum nested topology entries

2023-01-11 Thread Thomas Huth
On 05/01/2023 15.53, Pierre Morel wrote: The maximum nested topology entries is used by the guest to know how many nested topology are available on the machine. Currently, SCLP READ SCP INFO reports MNEST = 0, which is the equivalent of reporting the default value of 2. Let's use the default SCL

Re: [PATCH v14 05/11] s390x/cpu topology: resetting the Topology-Change-Report

2023-01-11 Thread Thomas Huth
On 05/01/2023 15.53, Pierre Morel wrote: During a subsystem reset the Topology-Change-Report is cleared by the machine. Let's ask KVM to clear the Modified Topology Change Report (MTCR) bit of the SCA in the case of a subsystem reset. Signed-off-by: Pierre Morel --- ... diff --git a/target/s3

Re: [PATCH 12/18] hw/arm/digic: Replace object_initialize(ARMCPU) by object_new(ARMCPU)

2023-01-11 Thread Philippe Mathieu-Daudé
On 10/1/23 17:52, Peter Maydell wrote: On Tue, 10 Jan 2023 at 16:45, Philippe Mathieu-Daudé wrote: Replace the ARMCPU field in DigicState by a reference to an allocated ARMCPU. Instead of initializing the field with object_initialize(), allocate it with object_new(). As we don't access ARMCPU

Re: intermittent hang, s390x host, bios-tables-test test, TPM

2023-01-11 Thread Daniel P . Berrangé
On Tue, Jan 10, 2023 at 05:02:58PM -0500, Stefan Berger wrote: > > > On 1/10/23 14:47, Stefan Berger wrote: > > > > > > On 1/10/23 14:27, Daniel P. Berrangé wrote: > > > On Tue, Jan 10, 2023 at 01:50:26PM -0500, Stefan Berger wrote: > > > > > > > > > > > > On 1/6/23 10:16, Stefan Berger wrote

Re: [PATCH v4 1/1] python/machine: Fix AF_UNIX path too long on macOS

2023-01-11 Thread Daniel P . Berrangé
On Tue, Jan 10, 2023 at 06:18:29PM -0500, John Snow wrote: > On Tue, Jan 10, 2023 at 3:34 AM Peter Delevoryas wrote: > > > > On macOS, private $TMPDIR's are the default. These $TMPDIR's are > > generated from a user's unix UID and UUID [1], which can create a > > relatively long path: > > > >

Re: [PATCH] remove unnecessary extern "C" blocks

2023-01-11 Thread Paolo Bonzini
On 1/10/23 11:53, Peter Maydell wrote: On Tue, 10 Jan 2023 at 09:33, Paolo Bonzini wrote: A handful of header files in QEMU are wrapped with extern "C" blocks. These are not necessary: there are C++ source files anymore in QEMU, and even where there were some, they did not include most of thes

Re: [PATCH v14 03/11] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-01-11 Thread Thomas Huth
On 10/01/2023 15.29, Thomas Huth wrote: On 05/01/2023 15.53, Pierre Morel wrote: On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel --- ... +void insert_stsi_15_1_x(S390CPU *cpu, int sel2, _

Re: [PULL 06/29] target/i386: Remove compilation errors when -Werror=maybe-uninitialized

2023-01-11 Thread Paolo Bonzini
On 1/10/23 18:19, Eric Auger wrote: Hi Paolo, On 1/10/23 17:02, Paolo Bonzini wrote: From: Eric Auger To avoid compilation errors when -Werror=maybe-uninitialized is used, replace 'case 3' by 'default'. Otherwise we get: ../target/i386/ops_sse.h: In function ‘helper_vpermdq_ymm’: ../tar

Re: [PULL 08/29] gitlab: remove redundant setting of PKG_CONFIG_PATH

2023-01-11 Thread Paolo Bonzini
On 1/10/23 17:40, Daniel P. Berrangé wrote: Signed-off-by: Daniel P. Berrang?? This has mangled my name - think your client sending mail needs to specify utf8 charset in the mail headers perhaps ? I have a "Content-type: text/plain" header added from the mimecast issues of last year, and git

Re: [PATCH v14 02/11] s390x/cpu topology: add topology entries on CPU hotplug

2023-01-11 Thread Nina Schoetterl-Glausch
On Tue, 2023-01-10 at 14:00 +0100, Thomas Huth wrote: > On 05/01/2023 15.53, Pierre Morel wrote: > > The topology information are attributes of the CPU and are > > specified during the CPU device creation. > > > > On hot plug, we gather the topology information on the core, > > creates a list of t

Re: [PULL v4 76/83] vhost-user: Support vhost_dev_start

2023-01-11 Thread Laurent Vivier
On 1/9/23 11:55, Michael S. Tsirkin wrote: On Fri, Jan 06, 2023 at 03:21:43PM +0100, Laurent Vivier wrote: Hi, it seems this patch breaks vhost-user with DPDK. See https://bugzilla.redhat.com/show_bug.cgi?id=2155173 it seems QEMU doesn't receive the expected commands sequence: Received unexp

Re: [RFC PATCH 0/4] qom: Introduce object_class_property_deprecate()

2023-01-11 Thread Philippe Mathieu-Daudé
On 10/1/23 14:02, Kevin Wolf wrote: Am 09.01.2023 um 23:54 hat Philippe Mathieu-Daudé geschrieben: Hi, There will always be a need to deprecate things. Here I'm tackling the QOM (class) properties, since they can be set from some CLI options (-object -device -global ...). As an experiment, we

Re: [PATCH 0/2] linux-user: revert previous workaround for glibc >= 2.36

2023-01-11 Thread Marc-André Lureau
Hi On Tue, Jan 10, 2023 at 9:49 PM Daniel P. Berrangé wrote: > It didn't appear that glibc was going to fix the problem > breaking includes of linux/mount.h vs sys/mount.h, so > QEMU applied a workaround copying the symbols/structs we > need into a local header. > > Since then Linux modified lin

Re: [RFC PATCH 0/4] qom: Introduce object_class_property_deprecate()

2023-01-11 Thread Daniel P . Berrangé
On Wed, Jan 11, 2023 at 10:55:47AM +0100, Philippe Mathieu-Daudé wrote: > On 10/1/23 14:02, Kevin Wolf wrote: > > Am 09.01.2023 um 23:54 hat Philippe Mathieu-Daudé geschrieben: > > > Hi, > > > > > > There will always be a need to deprecate things. Here I'm > > > tackling the QOM (class) properties

Re: [PATCH v4 03/36] tcg: Allocate objects contiguously in temp_allocate_frame

2023-01-11 Thread Alex Bennée
Richard Henderson writes: > 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/t

Re: [PATCH v5 10/14] vfio/migration: Implement VFIO migration protocol v2

2023-01-11 Thread Avihai Horon
On 10/01/2023 18:19, Cédric Le Goater wrote: External email: Use caution opening links or attachments Hello Avihai On 1/10/23 15:08, Avihai Horon wrote: On 09/01/2023 20:36, Jason Gunthorpe wrote: On Mon, Jan 09, 2023 at 06:27:21PM +0100, Cédric Le Goater wrote: also, in vfio_migration_q

Re: [PULL 06/29] target/i386: Remove compilation errors when -Werror=maybe-uninitialized

2023-01-11 Thread Philippe Mathieu-Daudé
On 10/1/23 17:02, Paolo Bonzini wrote: From: Eric Auger To avoid compilation errors when -Werror=maybe-uninitialized is used, replace 'case 3' by 'default'. Otherwise we get: ../target/i386/ops_sse.h: In function ‘helper_vpermdq_ymm’: ../target/i386/ops_sse.h:2495:13: error: ‘r3’ may

Re: [PATCH v14 07/11] target/s390x/cpu topology: activating CPU topology

2023-01-11 Thread Thomas Huth
On 05/01/2023 15.53, Pierre Morel wrote: The KVM capability, KVM_CAP_S390_CPU_TOPOLOGY is used to Remove the "," in above line? activate the S390_FEAT_CONFIGURATION_TOPOLOGY feature and the topology facility for the guest in the case the topology I'd like to suggest to add "in the host CPU

Re: [RFC PATCH 0/4] qom: Introduce object_class_property_deprecate()

2023-01-11 Thread Philippe Mathieu-Daudé
On 11/1/23 10:59, Daniel P. Berrangé wrote: On Wed, Jan 11, 2023 at 10:55:47AM +0100, Philippe Mathieu-Daudé wrote: On 10/1/23 14:02, Kevin Wolf wrote: Am 09.01.2023 um 23:54 hat Philippe Mathieu-Daudé geschrieben: Hi, There will always be a need to deprecate things. Here I'm tackling the QOM

Re: [PATCH v14 08/11] qapi/s390/cpu topology: change-topology monitor command

2023-01-11 Thread Thomas Huth
On 05/01/2023 15.53, Pierre Morel wrote: The modification of the CPU attributes are done through a monitor commands. s/commands/command/ It allows to move the core inside the topology tree to optimise the cache usage in the case the host's hypervizor previously s/hypervizor/hypervisor/ mo

Re: [PATCH 1/7] target/s390x: Fix s390_probe_access for user-only

2023-01-11 Thread David Hildenbrand
On 09.01.23 21:18, Richard Henderson wrote: In db9aab5783a2 we broke the contract of s390_probe_access, in that it no longer returned an exception code, nor set __excp_addr. Fix both. Reported-by: David Hildenbrand Signed-off-by: Richard Henderson Should we add a Fixes tag? Reviewed-by: Da

Re: [PATCH 2/7] target/s390x: Pass S390Access pointer into access_prepare

2023-01-11 Thread David Hildenbrand
On 09.01.23 21:18, Richard Henderson wrote: Passing a pointer from the caller down to access_prepare_nf eliminates a structure copy. Signed-off-by: Richard Henderson --- Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH 4/7] target/s390x: Tidy access_prepare_nf

2023-01-11 Thread David Hildenbrand
On 09.01.23 21:18, Richard Henderson wrote: Assign to access struct immediately, rather than waiting until the end of the function. This means we can pass address of haddr struct members instead of allocating extra space on the local stack. Signed-off-by: Richard Henderson Reviewed-by: David

Re: [PATCH 3/7] target/s390x: Use void* for haddr in S390Access

2023-01-11 Thread David Hildenbrand
On 09.01.23 21:18, Richard Henderson wrote: The interface from probe_access_flags is void*, and matching that will be helpful. We already rely on the gcc extension for byte arithmetic on void*. Signed-off-by: Richard Henderson --- Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PULL 08/29] gitlab: remove redundant setting of PKG_CONFIG_PATH

2023-01-11 Thread Philippe Mathieu-Daudé
On 11/1/23 10:20, Paolo Bonzini wrote: On 1/10/23 17:40, Daniel P. Berrangé wrote: Signed-off-by: Daniel P. Berrang?? This has mangled my name - think your client sending mail needs to specify utf8 charset in the mail headers perhaps ? I have a "Content-type: text/plain" header added from th

Re: [PATCH 5/7] target/s390x: Remove TLB_NOTDIRTY workarounds

2023-01-11 Thread David Hildenbrand
On 09.01.23 21:18, Richard Henderson wrote: When this code was written, it was using tlb_vaddr_to_host, which does not handle TLB_DIRTY. Since then, it has been converted to probe_access_flags, which does. Signed-off-by: Richard Henderson --- It's been a long time ... I have to trust you on

Re: [PATCH 6/7] target/s390x: Inline do_access_{get,set}_byte

2023-01-11 Thread David Hildenbrand
On 09.01.23 21:18, Richard Henderson wrote: Inline into the parent functions with a simple test to select the page, and a new define to remove ifdefs. Signed-off-by: Richard Henderson --- Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb

Re: [PATCH 7/7] target/s390x: Hoist some computation in access_memmove

2023-01-11 Thread David Hildenbrand
On 09.01.23 21:18, Richard Henderson wrote: Ensure that the total length is in a local variable across the byte loop. Compute size1 difference once. Signed-off-by: Richard Henderson --- target/s390x/tcg/mem_helper.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff -

Re: [RFC PATCH 0/4] qom: Introduce object_class_property_deprecate()

2023-01-11 Thread Daniel P . Berrangé
On Wed, Jan 11, 2023 at 11:08:05AM +0100, Philippe Mathieu-Daudé wrote: > On 11/1/23 10:59, Daniel P. Berrangé wrote: > > On Wed, Jan 11, 2023 at 10:55:47AM +0100, Philippe Mathieu-Daudé wrote: > > > On 10/1/23 14:02, Kevin Wolf wrote: > > > > Am 09.01.2023 um 23:54 hat Philippe Mathieu-Daudé gesch

[PATCH v10 0/9] support subsets of virtual memory extension

2023-01-11 Thread Weiwei Li
This patchset implements RISC-V Zc* extension v1.0.0.RC5.7 version instructions. Specification: https://github.com/riscv/riscv-code-size-reduction/tree/main/Zc-specification The port is available here: https://github.com/plctlab/plct-qemu/tree/plct-zce-upstream-v9 To test Zc* implementation, spe

[PATCH v10 9/9] disas/riscv.c: add disasm support for Zc*

2023-01-11 Thread Weiwei Li
Zcmp/Zcmt instructions will override disasm for c.fld*/c.fsd* instructions currently Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Acked-by: Alistair Francis --- disas/riscv.c | 228 +- 1 file changed, 227 insertions(+), 1 deletion(-) di

[PATCH v10 4/9] target/riscv: add support for Zcd extension

2023-01-11 Thread Weiwei Li
Separate c_fld/c_fsd from fld/fsd to add additional check for c.fld{sp}/c.fsd{sp} which is useful for zcmp/zcmt to reuse their encodings Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn16.decode

[PATCH v10 7/9] target/riscv: add support for Zcmt extension

2023-01-11 Thread Weiwei Li
Add encode, trans* functions and helper functions support for Zcmt instrutions Add support for jvt csr Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/cpu.h| 4 ++ target/riscv/cpu_bit

[PATCH v10 8/9] target/riscv: expose properties for Zc* extension

2023-01-11 Thread Weiwei Li
Expose zca,zcb,zcf,zcd,zcmp,zcmt properties Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 13 + 1 file changed, 13 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 39ab7e46d3..6df667805f 100644

[PATCH v10 1/9] target/riscv: add cfg properties for Zc* extension

2023-01-11 Thread Weiwei Li
Add properties for Zca,Zcb,Zcf,Zcd,Zcmp,Zcmt extension Add check for these properties Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 43 +++ target/riscv/cpu.h

[PATCH v10 5/9] target/riscv: add support for Zcb extension

2023-01-11 Thread Weiwei Li
Add encode and trans* functions support for Zcb instructions Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn16.decode| 24 ++ target/riscv/insn_trans/trans_rvzce.c.inc | 100 +

[PATCH v10 2/9] target/riscv: add support for Zca extension

2023-01-11 Thread Weiwei Li
Modify the check for C extension to Zca (C implies Zca) Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Reviewed-by: Wilfred Mallawa --- target/riscv/insn_trans/trans_rvi.c.inc | 4 ++-- target/riscv/translate.c

[PATCH v10 3/9] target/riscv: add support for Zcf extension

2023-01-11 Thread Weiwei Li
Separate c_flw/c_fsw from flw/fsw to add check for Zcf extension Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn16.decode | 8 target/riscv/insn_trans/trans_rvf.c.inc | 18 +

[PATCH v10 6/9] target/riscv: add support for Zcmp extension

2023-01-11 Thread Weiwei Li
Add encode, trans* functions for Zcmp instructions Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn16.decode| 18 +++ target/riscv/insn_trans/trans_rvzce.c.inc | 189 +-

Re: [RFC PATCH 0/4] qom: Introduce object_class_property_deprecate()

2023-01-11 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Wed, Jan 11, 2023 at 11:08:05AM +0100, Philippe Mathieu-Daudé wrote: >> On 11/1/23 10:59, Daniel P. Berrangé wrote: >> > On Wed, Jan 11, 2023 at 10:55:47AM +0100, Philippe Mathieu-Daudé wrote: >> > > On 10/1/23 14:02, Kevin Wolf wrote: >> > > > Am 09.01.2023 um 23:

Re: [PATCH v4 10/36] tcg/tci: Fix big-endian return register ordering

2023-01-11 Thread Philippe Mathieu-Daudé
On 8/1/23 03:36, Richard Henderson wrote: 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

Re: [PATCH v4 14/36] tcg: Add basic data movement for TCGv_i128

2023-01-11 Thread Philippe Mathieu-Daudé
On 8/1/23 03:36, Richard Henderson wrote: Add code generation functions for data movement between TCGv_i128 (mov) and to/from TCGv_i64 (concat, extract). Signed-off-by: Richard Henderson --- include/tcg/tcg-op.h | 4 tcg/tcg-internal.h | 13 + tcg/tcg-op.c | 20 +

Re: [PATCH 1/2] util: import GTree as QTree

2023-01-11 Thread Daniel P . Berrangé
On Tue, Jan 10, 2023 at 10:55:35PM -0500, Emilio Cota wrote: > The only reason to add this tree is to control the memory allocator > used. Some users (e.g. TCG) cannot work reliably in multi-threaded > environments (e.g. forking in user-mode) with GTree's allocator, GSlice. > See https://gitlab.com

Re: [RFC PATCH v2 13/19] tests: do not run test-hmp on all machines for ARM KVM-only

2023-01-11 Thread Claudio Fontana
On 1/10/23 15:02, Peter Maydell wrote: > On Tue, 10 Jan 2023 at 13:36, Fabiano Rosas wrote: >> >> Peter Maydell writes: >> >>> On Tue, 10 Jan 2023 at 13:00, Fabiano Rosas wrote: Thomas Huth writes: > On 09/01/2023 23.42, Fabiano Rosas wrote: >> From: Claudio Fontana

Re: [PATCH 2/2] tcg: use QTree instead of GTree

2023-01-11 Thread Daniel P . Berrangé
On Tue, Jan 10, 2023 at 10:55:36PM -0500, Emilio Cota wrote: > qemu-user can hang in a multi-threaded fork. One common > reason is that when creating a TB, between fork and exec > we manipulate a GTree whose memory allocator (GSlice) is > not fork-safe. > > Although POSIX does not mandate it, the

Re: [RFC PATCH v2 13/19] tests: do not run test-hmp on all machines for ARM KVM-only

2023-01-11 Thread Thomas Huth
On 11/01/2023 13.08, Claudio Fontana wrote: On 1/10/23 15:02, Peter Maydell wrote: On Tue, 10 Jan 2023 at 13:36, Fabiano Rosas wrote: Peter Maydell writes: On Tue, 10 Jan 2023 at 13:00, Fabiano Rosas wrote: Thomas Huth writes: On 09/01/2023 23.42, Fabiano Rosas wrote: From: Claudio

Re: [PATCH 0/2] fix for #285

2023-01-11 Thread Daniel P . Berrangé
On Tue, Jan 10, 2023 at 10:55:34PM -0500, Emilio Cota wrote: > Context: > https://gitlab.com/qemu-project/qemu/-/issues/285 > > So far the only fix that we have had posted on the list is > https://lists.gnu.org/archive/html/qemu-devel/2022-10/msg00391.html > by Daniel. The approach that I'm fo

Re: [PATCH 2/2] tcg: use QTree instead of GTree

2023-01-11 Thread Daniel P . Berrangé
On Tue, Jan 10, 2023 at 10:55:36PM -0500, Emilio Cota wrote: > qemu-user can hang in a multi-threaded fork. One common > reason is that when creating a TB, between fork and exec > we manipulate a GTree whose memory allocator (GSlice) is > not fork-safe. BTW, I just checked latest glib status ht

Re: [RFC PATCH v2 13/19] tests: do not run test-hmp on all machines for ARM KVM-only

2023-01-11 Thread Fabiano Rosas
Claudio Fontana writes: > On 1/10/23 15:02, Peter Maydell wrote: >> On Tue, 10 Jan 2023 at 13:36, Fabiano Rosas wrote: >>> >>> Peter Maydell writes: >>> On Tue, 10 Jan 2023 at 13:00, Fabiano Rosas wrote: > > Thomas Huth writes: > >> On 09/01/2023 23.42, Fabiano Rosas wrot

Re: intermittent hang, s390x host, bios-tables-test test, TPM

2023-01-11 Thread Stefan Berger
On 1/11/23 04:05, Daniel P. Berrangé wrote: On Tue, Jan 10, 2023 at 05:02:58PM -0500, Stefan Berger wrote: Yes, my ppc64 machine is also little endian. If the issue  was not an intermittent but a permanent failure I would look for something like that. I would think it's more some sort

Re: [PATCH] virtio-rng-pci: fix migration compat for vectors

2023-01-11 Thread Thomas Huth
On 09/01/2023 11.58, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" Fixup the migration compatibility for existing machine types so that they do not enable msi-x. Symptom: (qemu) qemu: get_pci_config_device: Bad config data: i=0x34 read: 84 device: 98 cmask: ff wmask: 0 w

Re: [PATCH v2 4/5] util/qht: use striped locks under TSAN

2023-01-11 Thread Alex Bennée
Emilio Cota writes: > On Tue, Jan 10, 2023 at 20:58:01 +, Alex Bennée wrote: >> Emilio Cota writes: > (snip) >> > +static inline void qht_do_if_first_in_stripe(const struct qht_map *map, >> > + struct qht_bucket *b, >> > +

Re: [RFC PATCH 0/4] qom: Introduce object_class_property_deprecate()

2023-01-11 Thread Philippe Mathieu-Daudé
On 11/1/23 12:29, Markus Armbruster wrote: Daniel P. Berrangé writes: On Wed, Jan 11, 2023 at 11:08:05AM +0100, Philippe Mathieu-Daudé wrote: On 11/1/23 10:59, Daniel P. Berrangé wrote: On Wed, Jan 11, 2023 at 10:55:47AM +0100, Philippe Mathieu-Daudé wrote: On 10/1/23 14:02, Kevin Wolf wrot

[PATCH] tests/qtest/tpm-emu: Avoid hangs using abort handlers closing channels

2023-01-11 Thread Stefan Berger
Install abort handlers that close the TPM control and data channels in case an abort occurs. The purpose of this is to have QEMU terminate under abnormal test case failures to resolve intermittent hangs on s390x hosts running TPM tests for QEMU/x86_64. Signed-off-by: Stefan Berger --- tests/qtes

Re: [PATCH] tests/qtest/tpm-emu: Avoid hangs using abort handlers closing channels

2023-01-11 Thread Daniel P . Berrangé
On Wed, Jan 11, 2023 at 08:30:23AM -0500, Stefan Berger wrote: > Install abort handlers that close the TPM control and data channels in > case an abort occurs. The purpose of this is to have QEMU terminate > under abnormal test case failures to resolve intermittent hangs on s390x > hosts running TP

Re: [PATCH v3 1/2] hw/arm/virt: Consolidate GIC finalize logic

2023-01-11 Thread Zenghui Yu via
On 2022/12/23 17:01, Alexander Graf wrote: Up to now, the finalize_gic_version() code open coded what is essentially a support bitmap match between host/emulation environment and desired target GIC type. This open coding leads to undesirable side effects. For example, a VM with KVM and -smp 10 w

Re: [PATCH v3 2/2] hw/arm/virt: Make accels in GIC finalize logic explicit

2023-01-11 Thread Zenghui Yu via
Hi Alexander, On 2022/12/23 17:01, Alexander Graf wrote: Let's explicitly list out all accelerators that we support when trying to determine the supported set of GIC versions. KVM was already separate, so the only missing one is HVF which simply reuses all of TCG's emulation code and thus has th

Re: [PATCH RESEND v3 00/10] migration: introduce dirtylimit capability

2023-01-11 Thread Markus Armbruster
My sincere apologies for not replying sooner. This needs a rebase now. But let me have a look at it first.

[PATCH v2] tests/qtest/tpm-emu: Avoid hangs using abort handlers closing channels

2023-01-11 Thread Stefan Berger
Install abort handlers that close the TPM control and data channels in case an abort occurs. The purpose of this is to have QEMU terminate under abnormal test case failures to resolve intermittent hangs on s390x hosts running TPM tests for QEMU/x86_64. Signed-off-by: Stefan Berger --- tests/qtes

Re: [PATCH v3 1/6] migration: Allow immutable device state to be migrated early (i.e., before RAM)

2023-01-11 Thread David Hildenbrand
On 10.01.23 21:03, Peter Xu wrote: On Tue, Jan 10, 2023 at 12:52:32PM +0100, David Hildenbrand wrote: The following seems to work, That looks much better at least from the diffstat pov (comparing to the existing patch 1+5 and the framework changes), thanks. but makes analyze-migration.py ang

Re: [PATCH v2] tests/qtest/tpm-emu: Avoid hangs using abort handlers closing channels

2023-01-11 Thread Daniel P . Berrangé
On Wed, Jan 11, 2023 at 08:45:47AM -0500, Stefan Berger wrote: > Install abort handlers that close the TPM control and data channels in > case an abort occurs. The purpose of this is to have QEMU terminate > under abnormal test case failures to resolve intermittent hangs on s390x > hosts running TP

Re: [PATCH RESEND v3 04/10] qapi/migration: Introduce x-vcpu-dirty-limit-period parameter

2023-01-11 Thread Markus Armbruster
huang...@chinatelecom.cn writes: > From: Hyman Huang(黄勇) > > Introduce "x-vcpu-dirty-limit-period" migration experimental > parameter, which is in the range of 1 to 1000ms and used to > make dirtyrate calculation period configurable. > > Currently with the "x-vcpu-dirty-limit-period" varies, the

Re: [PATCH v2 8/8] hw/cxl/events: Add in inject general media event

2023-01-11 Thread Jonathan Cameron via
> > > From an interface cleanliness point of view I'd rather see > > > all the optional fields as optional. That's done by marking them > > > with a * so > > > '*channel': 'int16' > > > > > > Then the signature of the related qmp_cxl_inject_gen_media_event > > > gains a boolean has_channel para

Re: [PATCH RESEND v3 08/10] migration: Implement dirty-limit convergence algo

2023-01-11 Thread Markus Armbruster
huang...@chinatelecom.cn writes: > From: Hyman Huang(黄勇) > > Implement dirty-limit convergence algo for live migration, > which is kind of like auto-converge algo but using dirty-limit > instead of cpu throttle to make migration convergent. > > Enable dirty page limit if dirty_rate_high_cnt great

[PATCH 0/8] hw/cxl: CXL emulation cleanups and minor fixes for upstream

2023-01-11 Thread Jonathan Cameron via
A small collection of misc fixes and tidying up pulled out from various series. I've pulled this to the top of my queue of CXL related work as they stand fine on their own and it will reduce the noise in the larger patch sets if these go upstream first. Gregory's patches were posted as part of his

[PATCH 1/8] hw/mem/cxl_type3: Improve error handling in realize()

2023-01-11 Thread Jonathan Cameron via
msix_init_exclusive_bar() can fail, so if it does cleanup the address space. Signed-off-by: Jonathan Cameron --- hw/mem/cxl_type3.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c index dae4fd89ca..252822bd82 100644 --- a/

[PATCH 2/8] hw/pci-bridge/cxl_downstream: Fix type naming mismatch

2023-01-11 Thread Jonathan Cameron via
Fix capitalization difference between struct name and typedef. Signed-off-by: Jonathan Cameron --- hw/pci-bridge/cxl_downstream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci-bridge/cxl_downstream.c b/hw/pci-bridge/cxl_downstream.c index 3d4e6b59cd..54f507318f 10064

[PATCH 3/8] hw/cxl: set cxl-type3 device type to PCI_CLASS_MEMORY_CXL

2023-01-11 Thread Jonathan Cameron via
From: Gregory Price Current code sets to STORAGE_EXPRESS and then overrides it. Signed-off-by: Gregory Price Reviewed-by: Davidlohr Bueso Signed-off-by: Jonathan Cameron --- hw/mem/cxl_type3.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/mem/cxl_type3.c b/hw/mem/c

[PATCH 4/8] hw/cxl: Add CXL_CAPACITY_MULTIPLIER definition

2023-01-11 Thread Jonathan Cameron via
From: Gregory Price Remove usage of magic numbers when accessing capacity fields and replace with CXL_CAPACITY_MULTIPLIER, matching the kernel definition. Signed-off-by: Gregory Price Reviewed-by: Davidlohr Bueso Signed-off-by: Jonathan Cameron --- hw/cxl/cxl-mailbox-utils.c | 14 ---

[PATCH 5/8] hw/i386/acpi: Drop duplicate _UID entry for CXL root bridge

2023-01-11 Thread Jonathan Cameron via
Noticed as this prevents iASL disasembling the DSDT table. Signed-off-by: Jonathan Cameron --- hw/i386/acpi-build.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 127c4e2d50..a584b62ae2 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-bui

Re: [PATCH v6 38/51] i386/xen: add monitor commands to test event injection

2023-01-11 Thread Dr. David Alan Gilbert
* David Woodhouse (dw...@infradead.org) wrote: > From: Joao Martins > > Specifically add listing, injection of event channels. > > Signed-off-by: Joao Martins > Signed-off-by: David Woodhouse > --- > hmp-commands.hx | 29 > hw/i386/kvm/meson.build | 4 ++ > hw/i386/kvm/x

[PATCH 6/8] qemu/bswap: Add const_le64()

2023-01-11 Thread Jonathan Cameron via
From: Ira Weiny Gcc requires constant versions of cpu_to_le* calls. Add a 64 bit version. Reviewed-by: Peter Maydell Signed-off-by: Ira Weiny Signed-off-by: Jonathan Cameron --- include/qemu/bswap.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/qemu/bswap.h b/inclu

Re: [PATCH v2] softmmu/physmem: Fix address of FlatView access in address_space_(read|write)_cached_slow()

2023-01-11 Thread Stefan Hajnoczi
On Fri, 2 Dec 2022 at 07:31, Alberto Faria wrote: > > On Mon, Sep 5, 2022 at 8:45 AM Paolo Bonzini wrote: > > Thanks, I will queue it. > > > > Paolo > > > > Il lun 5 set 2022, 02:00 Alberto Faria ha scritto: > >> > >> flatview_(read|write)_continue() must be called with an address in the > >> Fl

[PATCH 8/8] hw/cxl/mailbox: Use new UUID network order define for cel_uuid

2023-01-11 Thread Jonathan Cameron via
From: Ira Weiny The cel_uuid was programatically generated previously because there was no static initializer for network order UUIDs. Use the new network order initializer for cel_uuid. Adjust cxl_initialize_mailbox() because it can't fail now. Update specification reference. Signed-off-by:

[PATCH 7/8] qemu/uuid: Add UUID static initializer

2023-01-11 Thread Jonathan Cameron via
From: Ira Weiny UUID's are defined as network byte order fields. No static initializer was available for UUID's in their standard big endian format. Define a big endian initializer for UUIDs. Signed-off-by: Ira Weiny Signed-off-by: Jonathan Cameron --- include/qemu/uuid.h | 12

Re: Questions about how block devices use snapshots

2023-01-11 Thread Kevin Wolf
Am 11.01.2023 um 08:55 hat Zhiyong Ye geschrieben: > Hi Kevin, > > Thank you for your reply and detailed answers. > > In my scenario is the iSCSI SAN environment. The network storage device is > connected to the physical machine via iSCSI, and LVM is used as the middle > layer between the storage

Re: [PATCH RESEND v3 09/10] migration: Export dirty-limit time info for observation

2023-01-11 Thread Markus Armbruster
huang...@chinatelecom.cn writes: > From: Hyman Huang(黄勇) > > Export dirty limit throttle time and estimated ring full > time, through which we can observe if dirty limit take > effect during live migration. Suggest something like "Extend query-migrate to provide ..." both here and in subject. >

[RFC] Notify IRQ sources of level interrupt ack/EOI

2023-01-11 Thread David Woodhouse
This allows drivers to register a callback on a qemu_irq, which is invoked when a level-triggered IRQ is acked on the irqchip. This allows us to simulate level-triggered interrupts more efficiently, by resampling the state of the interrupt only when it actually matters. This can be used in two wa

Re: [PATCH 2/8] hw/pci-bridge/cxl_downstream: Fix type naming mismatch

2023-01-11 Thread Philippe Mathieu-Daudé
On 11/1/23 15:24, Jonathan Cameron via wrote: Fix capitalization difference between struct name and typedef. Signed-off-by: Jonathan Cameron --- hw/pci-bridge/cxl_downstream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci-bridge/cxl_downstream.c b/hw/pci-bridge/c

Re: [PATCH v6 38/51] i386/xen: add monitor commands to test event injection

2023-01-11 Thread David Woodhouse
On Wed, 2023-01-11 at 14:28 +, Dr. David Alan Gilbert wrote: > > Those \n's are hanging in for dear life :-) Ah crap, that's in the *stubs* not the real code. Really really fixed now! > Other than that, I think fromt he HMP side we're OK, so > > Acked-by: Dr. David Alan Gilbert > > cc'in

Re: [PATCH v3 3/3] tcg: add perfmap and jitdump

2023-01-11 Thread Ilya Leoshkevich
On Wed, 2023-01-11 at 02:47 +0100, Ilya Leoshkevich wrote: > Add ability to dump /tmp/perf-.map and jit-.dump. > The first one allows the perf tool to map samples to each individual > translation block. The second one adds the ability to resolve symbol > names, line numbers and inspect JITed code.

  1   2   3   >