Re: [PATCH v3 8/9] meson: Replace CONFIG_SOFTMMU -> CONFIG_SYSTEM_ONLY

2023-06-13 Thread Richard Henderson
On 6/13/23 15:33, Philippe Mathieu-Daudé wrote: Since we*might* have user emulation with softmmu, use the clearer 'CONFIG_SYSTEM_ONLY' key to check for system emulation. Signed-off-by: Philippe Mathieu-Daudé --- meson.build| 4 ++-- accel/qtest/meson.build

Re: [PATCH v3 7/9] meson: Alias CONFIG_SOFTMMU -> CONFIG_SYSTEM_ONLY

2023-06-13 Thread Richard Henderson
On 6/13/23 15:33, Philippe Mathieu-Daudé wrote: We use the CONFIG_USER_ONLY key to describe user emulation, and the CONFIG_SOFTMMU key to describe system emulation. Alias it as 'CONFIG_SYSTEM_ONLY' for parity with user emulation. Signed-off-by: Philippe Mathieu-Daudé --- meson.build | 1 + 1

Re: [PATCH v3 1/9] target/i386: Simplify i386_tr_init_disas_context()

2023-06-13 Thread Richard Henderson
On 6/13/23 15:33, Philippe Mathieu-Daudé wrote: Since cpu_mmu_index() is well-defined for user-only, we can remove the surrounding #ifdef'ry entirely. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/i386/tcg/translate.c | 3 --- 1 file changed, 3 deletions(-)

Re: [PULL 00/17] Misc patches for 2023-06-13

2023-06-13 Thread Richard Henderson
) are available in the Git repository at: https://github.com/philmd/qemu.git tags/misc-20230613 for you to fetch changes up to b0182e537e5aba38031a5009cb16d5e924342458: exec/memory: Introduce RAM_NAMED_FILE flag (2023-06-13 11:28:58 +0200

Re: [PATCH v3 2/9] target/tricore: Remove pointless CONFIG_SOFTMMU guard

2023-06-13 Thread Bastian Koppelmann
On Tue, Jun 13, 2023 at 03:33:40PM +0200, Philippe Mathieu-Daudé wrote: > We don't build any user emulation target for Tricore, > only the system emulation. No need to check for it as > it is always defined. > > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Richard Henderson > --- >

Re: [PATCH v2 05/20] qemu_file: Use a stat64 for qemu_file_transferred

2023-06-13 Thread Juan Quintela
Peter Xu wrote: > On Tue, May 30, 2023 at 08:39:26PM +0200, Juan Quintela wrote: >> This way we can read it from any thread. >> I checked that it gives the same value than the current one. We never >> use to qemu_files at the same time. >> >> Signed-off-by: Juan Quintela > > The follow up

Re: [PATCH v2 04/20] qemu-file: We only call qemu_file_transferred_* on the sending side

2023-06-13 Thread Juan Quintela
Peter Xu wrote: > On Tue, May 30, 2023 at 08:39:25PM +0200, Juan Quintela wrote: >> Remove the increase in qemu_file_fill_buffer() and add asserts to >> qemu_file_transferred* functions. >> >> Signed-off-by: Juan Quintela > > The read side accounting does look a bit weird and never caught my

Re: [PATCH v5 00/16] iotests: use vm.cmd()

2023-06-13 Thread Vladimir Sementsov-Ogievskiy
ping. 03-16 are still applicable to master with "git am -3" and very small conflict in "iotests: QemuStorageDaemon: add cmd() method like in QEMUMachine." On 15.02.23 16:25, Vladimir Sementsov-Ogievskiy wrote: Hi all! Let's get rid of pattern result = self.vm.qmp(...)

[PATCH v3 8/9] meson: Replace CONFIG_SOFTMMU -> CONFIG_SYSTEM_ONLY

2023-06-13 Thread Philippe Mathieu-Daudé
Since we *might* have user emulation with softmmu, use the clearer 'CONFIG_SYSTEM_ONLY' key to check for system emulation. Signed-off-by: Philippe Mathieu-Daudé --- meson.build| 4 ++-- accel/qtest/meson.build| 2 +- accel/stubs/meson.build| 2 +-

[PATCH v3 7/9] meson: Alias CONFIG_SOFTMMU -> CONFIG_SYSTEM_ONLY

2023-06-13 Thread Philippe Mathieu-Daudé
We use the CONFIG_USER_ONLY key to describe user emulation, and the CONFIG_SOFTMMU key to describe system emulation. Alias it as 'CONFIG_SYSTEM_ONLY' for parity with user emulation. Signed-off-by: Philippe Mathieu-Daudé --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v3 9/9] meson: Replace softmmu_ss -> system_ss

2023-06-13 Thread Philippe Mathieu-Daudé
We use the user_ss[] array to hold the user emulation sources, and the softmmu_ss[] array to hold the system emulation ones. Hold the latter in the 'system_ss[]' array for parity with user emulation. Mechanical change doing: $ sed -i -e s/softmmu_ss/system_ss/g $(git grep -l softmmu_ss)

[PATCH v3 6/9] accel/tcg: Check for USER_ONLY definition instead of SOFTMMU one

2023-06-13 Thread Philippe Mathieu-Daudé
Since we *might* have user emulation with softmmu, replace the system emulation check by !user emulation one. Invert some if() ladders for clarity. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- accel/tcg/internal.h | 6 +++--- accel/tcg/cpu-exec.c | 4 ++-- 2 files

[PATCH v3 5/9] hw/core/cpu: Check for USER_ONLY definition instead of SOFTMMU one

2023-06-13 Thread Philippe Mathieu-Daudé
Since we *might* have user emulation with softmmu, replace the system emulation check by !user emulation one. Invert the #ifdef'ry in TCGCPUOps structure for clarity. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- include/hw/core/cpu.h | 4 +-

[PATCH v3 2/9] target/tricore: Remove pointless CONFIG_SOFTMMU guard

2023-06-13 Thread Philippe Mathieu-Daudé
We don't build any user emulation target for Tricore, only the system emulation. No need to check for it as it is always defined. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/tricore/helper.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH v3 4/9] target/ppc: Check for USER_ONLY definition instead of SOFTMMU one

2023-06-13 Thread Philippe Mathieu-Daudé
Since we *might* have user emulation with softmmu, replace the system emulation check by !user emulation one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/ppc/cpu_init.c| 20 ++-- target/ppc/helper_regs.c | 6 ++ 2 files changed, 12

[PATCH v3 3/9] target/m68k: Check for USER_ONLY definition instead of SOFTMMU one

2023-06-13 Thread Philippe Mathieu-Daudé
Since we *might* have user emulation with softmmu, replace the system emulation check by !user emulation one. Invert some if() ladders for clarity. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/m68k/helper.h| 2 +- target/m68k/cpu.c | 14

[PATCH v3 1/9] target/i386: Simplify i386_tr_init_disas_context()

2023-06-13 Thread Philippe Mathieu-Daudé
Since cpu_mmu_index() is well-defined for user-only, we can remove the surrounding #ifdef'ry entirely. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/i386/tcg/translate.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/i386/tcg/translate.c

[PATCH v3 0/9] bulk: Replace CONFIG_SOFTMMU by !CONFIG_USER_ONLY/CONFIG_SYSTEM_ONLY

2023-06-13 Thread Philippe Mathieu-Daudé
Missing review: 1, 7, 8 Since v2: - Rebased - Added R-b tags - Rework i386_tr_init_disas_context() patch (Richard) - Dropped RFC prefix This series aims to clarify the CONFIG_[USER|SYSTEM] vs CONFIG_SOFTMMU confusion [*] by using explicit definitions, removing mentions of CONFIG_SOFTMMU in

Re: [RFC 0/6] Migration deprecated parts

2023-06-13 Thread Jiri Denemark
On Mon, Jun 12, 2023 at 21:33:38 +0200, Juan Quintela wrote: > Hi this series describe the migration parts that have to be deprecated. > > - It is an rfc because I doubt that I did the deprecation process right. > Hello Markus O:-) > > - skipped field: It is older than me, I have never know

[PULL 00/17] Misc patches for 2023-06-13

2023-06-13 Thread Philippe Mathieu-Daudé
/philmd/qemu.git tags/misc-20230613 for you to fetch changes up to b0182e537e5aba38031a5009cb16d5e924342458: exec/memory: Introduce RAM_NAMED_FILE flag (2023-06-13 11:28:58 +0200) Misc patches queue - user emulation: Preserve

[PULL 05/17] accel/hvf: Report HV_DENIED error

2023-06-13 Thread Philippe Mathieu-Daudé
From: Antonio Caggiano On MacOS 11 and subsequent versions, in case the resulting binary is not signed with the proper entitlement, handle and report the HV_DENIED error. Signed-off-by: Antonio Caggiano Message-Id: <20230608123014.28715-1-quic_acagg...@quicinc.com> Signed-off-by: Philippe

[PULL 07/17] target/i386/helper: Remove do_cpu_sipi() stub for user-mode emulation

2023-06-13 Thread Philippe Mathieu-Daudé
Since commit 604664726f ("target/i386: Restrict cpu_exec_interrupt() handler to sysemu"), do_cpu_sipi() isn't called anymore on user emulation. Remove the now pointless stub. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id:

[PULL 13/17] hw/char/parallel: Export struct ParallelState

2023-06-13 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Exporting ParallelState is a precondition for exporing TYPE_ISA_PARALLEL to be performed in the next patch. Suggested-by: Mark Cave-Ayland Signed-off-by: Bernhard Beschow Reviewed-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PULL 02/17] cocoa: Fix warnings about invalid prototype declarations

2023-06-13 Thread Philippe Mathieu-Daudé
Fix the following Cocoa trivial warnings: C compiler for the host machine: cc (clang 14.0.0 "Apple clang version 14.0.0 (clang-1400.0.29.202)") Objective-C compiler for the host machine: clang (clang 14.0.0) [100/334] Compiling Objective-C object libcommon.fa.p/net_vmnet-bridged.m.o

[PULL 12/17] hw/scsi/megasas: Silent GCC duplicated-cond warning

2023-06-13 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé GCC9 is confused when building with CFLAG -O3: hw/scsi/megasas.c: In function ‘megasas_scsi_realize’: hw/scsi/megasas.c:2387:26: error: duplicated ‘if’ condition [-Werror=duplicated-cond] 2387 | } else if (s->fw_sge >= 128 - MFI_PASS_FRAME_SIZE) {

[PULL 04/17] util/cacheflush: Avoid possible redundant dcache flush on Darwin

2023-06-13 Thread Philippe Mathieu-Daudé
describes sys_icache_invalidate() as "equivalent to sys_cache_control(kCacheFunctionPrepareForExecution)", having kCacheFunctionPrepareForExecution defined as: /* Prepare memory for execution. This should be called * after writing machine instructions to memory, before * executing them.

[PULL 11/17] hw/ide/ahci: Remove stray backslash

2023-06-13 Thread Philippe Mathieu-Daudé
From: Niklas Cassel This backslash obviously does not belong here, so remove it. Signed-off-by: Niklas Cassel Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: John Snow Message-Id: <20230601134434.519805-2-...@flawful.org> Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/ahci.c | 2 +- 1

[PULL 14/17] hw/char/parallel-isa: Export struct ISAParallelState

2023-06-13 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Allows the struct to be embedded directly into device models without additional allocation. Suggested-by: Mark Cave-Ayland Signed-off-by: Bernhard Beschow Reviewed-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PULL 08/17] target/i386/helper: Shuffle do_cpu_init()

2023-06-13 Thread Philippe Mathieu-Daudé
Move the #ifdef'ry inside do_cpu_init() instead of declaring an empty stub for user emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230602224628.59546-3-phi...@linaro.org> --- target/i386/helper.c | 12 1 file changed, 4

[PULL 06/17] target/hppa/meson: Only build int_helper.o with system emulation

2023-06-13 Thread Philippe Mathieu-Daudé
int_helper.c only contains system emulation code: remove the #ifdef'ry and move the file to the meson softmmu source set. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230602223016.58647-1-phi...@linaro.org> --- target/hppa/int_helper.c | 3 ---

[PULL 15/17] exec/ram_addr: Return number of dirty pages in cpu_physical_memory_set_dirty_lebitmap()

2023-06-13 Thread Philippe Mathieu-Daudé
From: Joao Martins In preparation for including the number of dirty pages in the vfio_get_dirty_bitmap() tracepoint, return the number of dirty pages in cpu_physical_memory_set_dirty_lebitmap() similar to cpu_physical_memory_sync_dirty_bitmap(). To avoid counting twice when GLOBAL_DIRTY_RATE is

[PULL 03/17] util/cacheflush: Use declarations from on Darwin

2023-06-13 Thread Philippe Mathieu-Daudé
Per the cache(3) man page, sys_icache_invalidate() and sys_dcache_flush() are declared in . Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230605175647.88395-2-phi...@linaro.org> --- util/cacheflush.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PULL 09/17] target/i386: Rename helper template headers as '.h.inc'

2023-06-13 Thread Philippe Mathieu-Daudé
Since commit 139c1837db ("meson: rename included C source files to .c.inc"), QEMU standard procedure for included C files is to use *.c.inc. Besides, since commit 6a0057aa22 ("docs/devel: make a statement about includes") this is documented as the Coding Style: If you do use template header

[PULL 16/17] hw/vfio: Add number of dirty pages to vfio_get_dirty_bitmap tracepoint

2023-06-13 Thread Philippe Mathieu-Daudé
From: Joao Martins Include the number of dirty pages on the vfio_get_dirty_bitmap tracepoint. These are fetched from the newly added return value in cpu_physical_memory_set_dirty_lebitmap(). Signed-off-by: Joao Martins Reviewed-by: Cédric Le Goater Reviewed-by: Philippe Mathieu-Daudé

[PULL 01/17] linux-user, bsd-user: Preserve incoming order of environment variables in the target

2023-06-13 Thread Philippe Mathieu-Daudé
From: Andreas Schwab Do not reverse the order of environment variables in the target environ array relative to the incoming environ order. Some testsuites depend on a specific order, even though it is not defined by any standard. Signed-off-by: Andreas Schwab Reviewed-by: Warner Losh

[PULL 17/17] exec/memory: Introduce RAM_NAMED_FILE flag

2023-06-13 Thread Philippe Mathieu-Daudé
From: Steve Sistare migrate_ignore_shared() is an optimization that avoids copying memory that is visible and can be mapped on the target. However, a memory-backend-ram or a memory-backend-memfd block with the RAM_SHARED flag set is not migrated when migrate_ignore_shared() is true. This is

[PULL 10/17] hw/i2c: Enable an id for the pca954x devices

2023-06-13 Thread Philippe Mathieu-Daudé
From: Patrick Venture This allows the devices to be more readily found and specified. Without setting the name field, they can only be found by device type name, which doesn't let you specify the second of the same device type behind a bus. Tested: Verified that by default the device was

Re: [PATCH 5/5] cmd646: move device-specific BMDMA registers to separate memory region

2023-06-13 Thread Bernhard Beschow
On Tue, Jun 13, 2023 at 12:39 AM Philippe Mathieu-Daudé wrote: > On 12/6/23 21:28, Bernhard Beschow wrote: > > > > > > Am 9. Juni 2023 18:51:19 UTC schrieb Mark Cave-Ayland < > mark.cave-ayl...@ilande.co.uk>: > >> The aim here is to eliminate any device-specific registers from the > main BMDMA >

Re: [RFC 1/4] docs/qcow2: add the zoned format feature

2023-06-13 Thread Sam Li
Stefan Hajnoczi 于2023年6月13日周二 15:04写道: > > On Mon, Jun 05, 2023 at 06:41:05PM +0800, Sam Li wrote: > > Add the specs for the zoned format feature of the qcow2 driver. Once > > the zoned_profile is set to `zbc`, then the qcow2 file can be taken > > as zoned devices and passed through by virtio-blk

Re: [RFC 1/4] docs/qcow2: add the zoned format feature

2023-06-13 Thread Stefan Hajnoczi
On Mon, Jun 05, 2023 at 06:41:05PM +0800, Sam Li wrote: > Add the specs for the zoned format feature of the qcow2 driver. Once > the zoned_profile is set to `zbc`, then the qcow2 file can be taken > as zoned devices and passed through by virtio-blk device to the guest. > > Signed-off-by: Sam Li