Re: [PATCH 10/16] qapi/error: add g_autoptr(Error) support

2022-05-04 Thread Paolo Bonzini
This was rejected before on the grounds that propagating or printing the error is usually the right thing to do, and neither needs an autoptr: https://patchew.org/QEMU/20210912124834.503032-1-pbonz...@redhat.com/ So while I do agree with the patch, for it to be accepted some Error* functions wo

Re: [PATCH 0/2] Upgrade mingw base packages

2022-05-04 Thread Thomas Huth
On 03/05/2022 22.05, Yonggang Luo wrote: v1. upgrade both cirrus and gitlab-ci to the newest mingw base release Yonggang Luo (2): cirrus/win32: upgrade mingw base packages gitlab-ci: Upgrade mingw base package. .cirrus.yml | 2 +- .gitlab-ci.d/windows.yml | 2 +- 2 files

Re: [PATCH] linux-user: Add PowerPC ISA 3.1 and MMA to hwcap

2022-05-04 Thread Joel Stanley
On Wed, 27 Apr 2022 at 20:51, Daniel Henrique Barboza wrote: > > > > On 4/27/22 03:42, Joel Stanley wrote: > > These are new hwcap bits added for power10. > > > > Signed-off-by: Joel Stanley > > --- > > MMA support for TCG is on the list so I think it makes sense for this to > > land after those

Re: [RFC PATCH 0/7] VSX MMA Implementation

2022-05-04 Thread Joel Stanley
On Wed, 27 Apr 2022 at 07:10, Cédric Le Goater wrote: > > Hello, > > On 4/27/22 08:21, Joel Stanley wrote: > > On Tue, 26 Apr 2022 at 12:51, Lucas Mateus Castro(alqotel) > > wrote: > >> > >> From: "Lucas Mateus Castro (alqotel)" > >> > >> This patch series is an RFC of the Matrix-Multiply Assist

Re: [PATCH v11 3/7] migration: Add zero-copy-send parameter for QMP/HMP for Linux

2022-05-04 Thread Markus Armbruster
Leonardo Bras writes: > Add property that allows zero-copy migration of memory pages > on the sending side, and also includes a helper function > migrate_use_zero_copy_send() to check if it's enabled. > > No code is introduced to actually do the migration, but it allow > future implementations to

Re: [PATCH v9 07/17] vfio-user: define vfio-user-server object

2022-05-04 Thread Markus Armbruster
Jag Raman writes: >> On May 4, 2022, at 7:45 AM, Markus Armbruster wrote: >> >> Jagannathan Raman writes: >> >>> Define vfio-user object which is remote process server for QEMU. Setup >>> object initialization functions and properties necessary to instantiate >>> the object >>> >>> Signed-of

Re: [PATCH qemu] spapr: Use address from elf parser for kernel address

2022-05-04 Thread Alexey Kardashevskiy
On 5/5/22 14:16, Joel Stanley wrote: On Thu, 5 May 2022 at 03:31, Alexey Kardashevskiy wrote: On 5/5/22 05:16, Fabiano Rosas wrote: Alexey Kardashevskiy writes: tl;dr: This allows Big Endian zImage booting via -kernel + x-vof=on. QEMU loads the kernel at 0x40 by default which wor

Re: [PATCH v11 2/7] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-05-04 Thread Leonardo Bras Soares Passos
On Wed, May 4, 2022 at 4:53 PM Peter Xu wrote: > > On Wed, May 04, 2022 at 04:18:31PM -0300, Leonardo Bras wrote: > > +/* > > + * Zero-copy defines bellow are included to avoid breaking builds on > > systems > > + * that don't support MSG_ZEROCOPY, while keeping the functions more > > readable >

Re: [PATCH qemu] spapr: Use address from elf parser for kernel address

2022-05-04 Thread Joel Stanley
On Thu, 5 May 2022 at 03:31, Alexey Kardashevskiy wrote: > > > > On 5/5/22 05:16, Fabiano Rosas wrote: > > Alexey Kardashevskiy writes: > > > >> tl;dr: This allows Big Endian zImage booting via -kernel + x-vof=on. > >> > >> QEMU loads the kernel at 0x40 by default which works most of > >> the

Re: [PATCH qemu] spapr: Use address from elf parser for kernel address

2022-05-04 Thread Alexey Kardashevskiy
On 5/5/22 05:16, Fabiano Rosas wrote: Alexey Kardashevskiy writes: tl;dr: This allows Big Endian zImage booting via -kernel + x-vof=on. QEMU loads the kernel at 0x40 by default which works most of the time as Linux kernels are relocatable, 64bit and compiled with "-pie" (position indep

[PATCH] target/arm: fix s2mmu input size check

2022-05-04 Thread mkei
From: Keisuke Iida The maximum IPA size('inputsize') is constrained by the implemented PA size that is specified by ID_AA64MMFR0_EL1.PARange. Please reference Arm Architecture Reference Manual for A-profile architecture "Supported IPA size" on page D5-4788. Signed-off-by: Keisuke Iida --- ta

Re: [PATCH 1/2] acpi/nvdimm: Create _LS{I,R,W} method for NVDIMM device

2022-05-04 Thread Robert Hoo
On Tue, 2022-05-03 at 10:27 +0200, Igor Mammedov wrote: > On Fri, 29 Apr 2022 17:01:47 +0800 > Robert Hoo wrote: > > > On Wed, 2022-04-27 at 16:34 +0200, Igor Mammedov wrote: > > > On Tue, 12 Apr 2022 14:57:52 +0800 > > > Robert Hoo wrote: > > > > > > > Since ACPI 6.2, previous NVDIMM/_DSM fu

Re: [PATCH] linux-user: Expose risc-v V and H isa bit in get_elf_hwcap()

2022-05-04 Thread nihui
Ah, I admit that I haven't tested the availability of the H extension, I could update the new patch to only add the V extension. Regarding the motivation for this modification, the ncnn project uses the risc-v vector extension to optimize the efficiency of nn inference. I am very happy to find th

Re: [PATCH] mos6522: fix linking error when CONFIG_MOS6522 is not set

2022-05-04 Thread Murilo Opsfelder Araújo
Hi, Mark. On 5/4/22 11:32, Mark Cave-Ayland wrote: On 04/05/2022 14:16, Murilo Opsfelder Araújo wrote: Hi, Mark. On 5/4/22 04:10, Mark Cave-Ayland wrote: On 02/05/2022 14:36, Murilo Opsfelder Araújo wrote: Hi, Mark. Thanks for reviewing.  Comments below. On 5/2/22 06:43, Mark Cave-Ayland

Re: [PATCH] hw/dma: Add Xilinx AXI CDMA

2022-05-04 Thread Frank Chang
On Thu, May 5, 2022 at 4:50 AM Edgar E. Iglesias wrote: > > On Tue, May 3, 2022 at 7:12 PM Edgar E. Iglesias > wrote: > >> On Tue, May 3, 2022 at 5:06 PM Frank Chang >> wrote: >> >>> On Tue, May 3, 2022 at 5:35 PM Edgar E. Iglesias < >>> edgar.igles...@gmail.com> wrote: >>> On Tue, May 3,

PING: [PATCH] KVM: HWPoison: Fix memory address&size during remap

2022-05-04 Thread zhenwei pi
Hi, Paolo I would appreciate it if you could review patch. On 4/20/22 14:45, zhenwei pi wrote: qemu exits during reset with log: qemu-system-x86_64: Could not remap addr: 1000@22001000 Currently, after MCE on RAM of a guest, qemu records a ram_addr only, remaps this address with a fixed size(T

Re: [PATCH] vhost-user: Use correct macro name TARGET_PPC64g

2022-05-04 Thread Raphael Norwitz
On Tue, May 03, 2022 at 03:01:08PM -0300, Murilo Opsfelder Araujo wrote: > The correct name of the macro is TARGET_PPC64. > > Fixes: 27598393a232 ("Lift max memory slots limit imposed by vhost-user") > Reported-by: Fabiano Rosas > Signed-off-by: Murilo Opsfelder Araujo > Cc: Raphael Norwitz > C

Re: [PATCH v2 0/2] ppc/xive: Update for guest interrupt handling

2022-05-04 Thread Daniel Henrique Barboza
On 4/29/22 04:16, Frederic Barrat wrote: This short series fixes a couple of issues about interrupt handling found when running a KVM guest on the powernv9 and powernv10 models. I split a patch I previously sent. Changlog: v2: - update comment on patch 1 - picked up Cedric's reviewed-by o

Re: [PATCH v2] hw/openrisc: use right OMPIC size variable

2022-05-04 Thread Stafford Horne
On Wed, May 04, 2022 at 01:10:04PM +0200, Jason A. Donenfeld wrote: > On Tue, May 3, 2022 at 10:22 PM Stafford Horne wrote: > > > > On Tue, May 03, 2022 at 11:45:33AM +0200, Jason A. Donenfeld wrote: > > > This appears to be a copy and paste error. The UART size was used > > > instead of the much

Re: [PATCH] vhost-user: Use correct macro name TARGET_PPC64

2022-05-04 Thread Daniel Henrique Barboza
On 5/4/22 17:59, Michael S. Tsirkin wrote: On Tue, May 03, 2022 at 03:01:08PM -0300, Murilo Opsfelder Araujo wrote: The correct name of the macro is TARGET_PPC64. Fixes: 27598393a232 ("Lift max memory slots limit imposed by vhost-user") Reported-by: Fabiano Rosas Signed-off-by: Murilo Opsfe

[PATCH v4 20/22] target/ppc: Remove msr_de macro

2022-05-04 Thread Víctor Colombo
msr_de macro hides the usage of env->msr, which is a bad behavior. Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo --- v4: Add this patch as an usage of msr_de was added in another patch https://

[PATCH v4 22/22] target/ppc: Change MSR_* to follow POWER ISA numbering convention

2022-05-04 Thread Víctor Colombo
Today we have the issue where MSR_* values are the 'inverted order' bit numbers from what the ISA specifies. e.g. MSR_LE is bit 63 but is defined as 0 in QEMU. Add a macro to be used to convert from QEMU order to ISA order. This solution requires less changes than to use the already defined PPC_B

[PATCH v4 16/22] target/ppc: Remove msr_ep macro

2022-05-04 Thread Víctor Colombo
msr_ep macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h | 2 +- target/ppc/helper

[PATCH v4 21/22] target/ppc: Add unused msr bits FIELDs

2022-05-04 Thread Víctor Colombo
Add FIELDs macros for msr bits that had an unused msr_* before. Signed-off-by: Víctor Colombo Acked-by: Richard Henderson --- v4: Don't add a FIELD for MSR_DE anymore as it was already added in patch 20 Signed-off-by: Víctor Colombo --- target/ppc/cpu.h | 25 + 1

[PATCH v4 19/22] target/ppc: Remove msr_hv macro

2022-05-04 Thread Víctor Colombo
msr_hv macro hides the usage of env->msr, which is a bad behavior. Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- v4: Some context lines Signed-off-by: Víctor Col

[PATCH v4 14/22] target/ppc: Remove msr_ir macro

2022-05-04 Thread Víctor Colombo
msr_ir macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h | 2 +- target/ppc/helpe

[PATCH v4 18/22] target/ppc: Remove msr_ts macro

2022-05-04 Thread Víctor Colombo
msr_ts macro hides the usage of env->msr, which is a bad behavior. Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- v4: patch is the same, changed some context line

[PATCH v4 15/22] target/ppc: Remove msr_dr macro

2022-05-04 Thread Víctor Colombo
msr_dr macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h | 2 +- target/ppc/helpe

[PATCH v4 17/22] target/ppc: Remove msr_fe0 and msr_fe1 macros

2022-05-04 Thread Víctor Colombo
msr_fe0 and msr_fe1 macros hide the usage of env->msr, which is a bad behavior. Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- v4: this patch is pretty much the s

[PATCH v4 13/22] target/ppc: Remove msr_cm macro

2022-05-04 Thread Víctor Colombo
msr_cm macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h| 2 +- target/ppc/mmu_com

[PATCH v4 12/22] target/ppc: Remove msr_fp macro

2022-05-04 Thread Víctor Colombo
msr_fp macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h | 2 +- target/ppc/excp_

[PATCH v4 10/22] target/ppc: Remove msr_me macro

2022-05-04 Thread Víctor Colombo
msr_me macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h | 2 +- target/ppc/excp_

[PATCH v4 09/22] target/ppc: Remove msr_pow macro

2022-05-04 Thread Víctor Colombo
msr_pow macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h | 2 +- target/ppc/excp

[PATCH v4 11/22] target/ppc: Remove msr_gs macro

2022-05-04 Thread Víctor Colombo
msr_gs macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h | 2 +- target/ppc/helper

[PATCH v4 03/22] target/ppc: Remove msr_pr macro

2022-05-04 Thread Víctor Colombo
msr_pr macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- hw/ppc/pegasos2.c| 2 +- hw/ppc/spapr.c

[PATCH v4 06/22] target/ppc: Remove msr_ile macro

2022-05-04 Thread Víctor Colombo
msr_ile macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h | 4 ++-- 1 file changed, 2 inse

[PATCH v4 08/22] target/ppc: Remove msr_ce macro

2022-05-04 Thread Víctor Colombo
msr_ce macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h | 2 +- target/ppc/excp_h

[PATCH v4 02/22] target/ppc: Remove unused msr_* macros

2022-05-04 Thread Víctor Colombo
Some msr_* macros are not used anywhere. Remove them as part of the work to remove all hidden usage of *env. Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Víctor Colombo --- v4: an usage of msr_de was added by a recent patch that was not in master yet. Re-a

[PATCH v4 05/22] target/ppc: Remove msr_ds macro

2022-05-04 Thread Víctor Colombo
msr_ds macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h| 2 +- target/ppc/mmu_com

[PATCH v4 07/22] target/ppc: Remove msr_ee macro

2022-05-04 Thread Víctor Colombo
msr_ee macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h | 2 +- target/ppc/cpu_i

[PATCH v4 01/22] target/ppc: Remove fpscr_* macros from cpu.h

2022-05-04 Thread Víctor Colombo
fpscr_* defined macros are hiding the usage of *env behind them. Substitute the usage of these macros with `env->fpscr & FP_*` to make the code cleaner. Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Víctor Colombo --- target/ppc/cpu.c| 2 +- target/ppc/

[PATCH v4 04/22] target/ppc: Remove msr_le macro

2022-05-04 Thread Víctor Colombo
msr_le macro hides the usage of env->msr, which is a bad behavior Substitute it with FIELD_EX64 calls that explicitly use env->msr as a parameter. Suggested-by: Richard Henderson Signed-off-by: Víctor Colombo Reviewed-by: Richard Henderson --- target/ppc/cpu.h| 2 +- target/ppc/cpu_in

[PATCH v4 00/22] target/ppc: Remove hidden usages of *env

2022-05-04 Thread Víctor Colombo
By running the grep command `git grep -nr 'define \(fpscr\|msr\)_[a-z0-9]\+\>'` we can find multiple macros that use `env->fpscr` and `env->msr` but doesn't take *env as a parameter. Richard Henderson said [1] that these macros hiding the usage of *env "are evil". This patch series remove them an

[PULL 19/25] build: move vhost-vsock configuration to Kconfig

2022-05-04 Thread Paolo Bonzini
vhost-vsock and vhost-user-vsock are two devices of their own; it should be possible to enable/disable them with --without-default-devices, not --without-default-features. Compute their default value in Kconfig to obtain the more intuitive behavior. Reviewed-by: Marc-André Lureau Signed-off-by:

[PATCH 3/5] net: slirp: switch to slirp_new

2022-05-04 Thread Paolo Bonzini
Replace slirp_init with slirp_new, so that a more recent cfg.version can be specified. Signed-off-by: Paolo Bonzini --- net/slirp.c | 27 +-- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/net/slirp.c b/net/slirp.c index f1e25d741f..b3a92d6e38 100644 --- a

[PULL v4 00/25] Misc patches for 2022-04-29

2022-05-04 Thread Paolo Bonzini
The following changes since commit f5643914a9e8f79c606a76e6a9d7ea82a3fc3e65: Merge tag 'pull-9p-20220501' of https://github.com/cschoenebeck/qemu into staging (2022-05-01 07:48:11 -0700) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you t

[PATCH 1/5] slirp: bump submodule to 4.7 release

2022-05-04 Thread Paolo Bonzini
Version 4.7 of slirp provides a new timer API that works better with CFI, together with several other improvements: * Allow disabling the internal DHCP server !22 * Support Unix sockets in hostfwd !103 * IPv6 DNS proxying support !110 * bootp: add support for UEFI HTTP boot !111 and bugfixes. Si

[PATCH 5/5] net: slirp: allow CFI with libslirp >= 4.7

2022-05-04 Thread Paolo Bonzini
slirp 4.7 introduces a new CFI-friendly timer callback that does not pass function pointers within libslirp as callbacks for timers. Check the version number and, if it is new enough, allow using CFI even with a system libslirp. Signed-off-by: Paolo Bonzini --- meson.build | 31 +

[PATCH 0/5] net: support for CFI with libslirp >= 4.7

2022-05-04 Thread Paolo Bonzini
Up until now, a CFI-enabled build would require slirp to be compiled as a static library, using the version that is bundled together with QEMU. This is because slirp registers functions as callbacks for QEMU Timers and, when using a system-wide shared libslirp, the type information for the callback

[PATCH 2/5] net: slirp: introduce a wrapper struct for QemuTimer

2022-05-04 Thread Paolo Bonzini
This struct will be extended in the next few patches to support the new slirp_handle_timer() call. For that we need to store an additional "int" for each SLIRP timer, in addition to the cb_opaque. Signed-off-by: Paolo Bonzini --- net/slirp.c | 19 ++- 1 file changed, 14 insertio

[PATCH 4/5] net: slirp: add support for CFI-friendly timer API

2022-05-04 Thread Paolo Bonzini
libslirp 4.7 introduces a CFI-friendly version of the .timer_new callback. The new callback replaces the function pointer with an enum; invoking the callback is done with a new function slirp_handle_timer. Support the new API so that CFI can be made compatible with using a system libslirp. Signed

Re: [PATCH] vhost-user: Use correct macro name TARGET_PPC64

2022-05-04 Thread Michael S. Tsirkin
On Tue, May 03, 2022 at 03:01:08PM -0300, Murilo Opsfelder Araujo wrote: > The correct name of the macro is TARGET_PPC64. > > Fixes: 27598393a232 ("Lift max memory slots limit imposed by vhost-user") > Reported-by: Fabiano Rosas > Signed-off-by: Murilo Opsfelder Araujo > Cc: Raphael Norwitz > C

Re: [PATCH] hw/dma: Add Xilinx AXI CDMA

2022-05-04 Thread Edgar E. Iglesias
On Tue, May 3, 2022 at 7:12 PM Edgar E. Iglesias wrote: > On Tue, May 3, 2022 at 5:06 PM Frank Chang wrote: > >> On Tue, May 3, 2022 at 5:35 PM Edgar E. Iglesias < >> edgar.igles...@gmail.com> wrote: >> >>> On Tue, May 3, 2022 at 3:16 AM Frank Chang >>> wrote: >>> On Mon, May 2, 2022 at 6:

Re: [PULL 00/15] s390x patches

2022-05-04 Thread Richard Henderson
On 5/4/22 06:05, Thomas Huth wrote: The following changes since commit 2e3408b3cc7de4e87a9adafc8c19bfce3abec947: Merge tag 'misc-pull-request' of gitlab.com:marcandre.lureau/qemu into staging (2022-05-03 09:13:17 -0700) are available in the Git repository at: https://gitlab.com/thuth/qe

Re: [PATCH] vhost-user: Use correct macro name TARGET_PPC64

2022-05-04 Thread Daniel Henrique Barboza
Michael, I'll send a PR in the next few days. This change seems trivial enough to me to push via the PPC64 tree. Let me know if you're ok with that or if you want to pick it via the vhost tree. Thanks, Daniel On 5/3/22 15:01, Murilo Opsfelder Araujo wrote: The correct name of the macro i

Re: [PATCH v3 00/21] target/ppc: Remove hidden usages of *env

2022-05-04 Thread Daniel Henrique Barboza
I asked Victor to rebase this series on top of ppc-next at: gitlab.com/danielhb/qemu/tree/ppc-next Because of "[PATCH v2] target/ppc: Fix BookE debug interrupt generation​" that added new occurrences of the msr_de macro that wasn't being handled. I believe that the changes needed are not remov

[PATCH] checkpatch: fix g_malloc check

2022-05-04 Thread Paolo Bonzini
Use the string equality operator "eq", and ensure that $1 is defined by using "(try|)" instead of "(try)?". The alternative "((?:try)?)" is longer and less readable. Signed-off-by: Paolo Bonzini --- scripts/checkpatch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sc

Re: [PATCH RFC 04/10] intel_iommu: Second Stage Access Dirty bit support

2022-05-04 Thread Peter Xu
Hi, Joao, On Thu, Apr 28, 2022 at 10:13:45PM +0100, Joao Martins wrote: > +/* Get the content of a spte located in @base_addr[@index] */ > +static uint64_t vtd_set_slpte(dma_addr_t base_addr, uint32_t index, > + uint64_t slpte) > +{ > + > +if (dma_memory_write(&add

Re: [PATCH v11 2/7] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-05-04 Thread Peter Xu
On Wed, May 04, 2022 at 04:18:31PM -0300, Leonardo Bras wrote: > +/* > + * Zero-copy defines bellow are included to avoid breaking builds on systems > + * that don't support MSG_ZEROCOPY, while keeping the functions more readable > + * (without a lot of ifdefs). > + */ > +#ifndef MSG_ZEROCOPY > +#d

iotests and python dependencies

2022-05-04 Thread John Snow
Howdy! So, I want to finally delete python/qemu/qmp from qemu.git, and this creates a small problem -- namely, iotests needs access to it in order to run the python-based tests. What I think needs to happen is that we create a virtual environment that installs python/qemu/. The reason this cannot

RE: [PATCH 5/9] hw/9pfs: Add a 'local' file system backend driver for Windows

2022-05-04 Thread Shi, Guohuai
> -Original Message- > From: Christian Schoenebeck > Sent: Thursday, May 5, 2022 02:02 > To: qemu-devel@nongnu.org > Cc: Greg Kurz ; Meng, Bin ; Shi, > Guohuai ; Bin Meng > Subject: Re: [PATCH 5/9] hw/9pfs: Add a 'local' file system backend driver > for Windows > > [Please note: This

[PATCH v11 7/7] multifd: Implement zero copy write in multifd migration (multifd-zero-copy)

2022-05-04 Thread Leonardo Bras
Implement zero copy send on nocomp_send_write(), by making use of QIOChannel writev + flags & flush interface. Change multifd_send_sync_main() so flush_zero_copy() can be called after each iteration in order to make sure all dirty pages are sent before a new iteration is started. It will also flus

[PATCH v11 3/7] migration: Add zero-copy-send parameter for QMP/HMP for Linux

2022-05-04 Thread Leonardo Bras
Add property that allows zero-copy migration of memory pages on the sending side, and also includes a helper function migrate_use_zero_copy_send() to check if it's enabled. No code is introduced to actually do the migration, but it allow future implementations to enable/disable this feature. On n

[PATCH v11 2/7] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-05-04 Thread Leonardo Bras
For CONFIG_LINUX, implement the new zero copy flag and the optional callback io_flush on QIOChannelSocket, but enables it only when MSG_ZEROCOPY feature is available in the host kernel, which is checked on qio_channel_socket_connect_sync() qio_channel_socket_flush() was implemented by counting how

[PATCH v11 5/7] multifd: multifd_send_sync_main now returns negative on error

2022-05-04 Thread Leonardo Bras
Even though multifd_send_sync_main() currently emits error_reports, it's callers don't really check it before continuing. Change multifd_send_sync_main() to return -1 on error and 0 on success. Also change all it's callers to make use of this change and possibly fail earlier. (This change is impo

[PATCH v11 4/7] migration: Add migrate_use_tls() helper

2022-05-04 Thread Leonardo Bras
A lot of places check parameters.tls_creds in order to evaluate if TLS is in use, and sometimes call migrate_get_current() just for that test. Add new helper function migrate_use_tls() in order to simplify testing for TLS usage. Signed-off-by: Leonardo Bras Reviewed-by: Juan Quintela Reviewed-b

[PATCH v11 1/7] QIOChannel: Add flags on io_writev and introduce io_flush callback

2022-05-04 Thread Leonardo Bras
Add flags to io_writev and introduce io_flush as optional callback to QIOChannelClass, allowing the implementation of zero copy writes by subclasses. How to use them: - Write data using qio_channel_writev*(...,QIO_CHANNEL_WRITE_FLAG_ZERO_COPY), - Wait write completion with qio_channel_flush(). No

[PATCH v11 6/7] multifd: Send header packet without flags if zero-copy-send is enabled

2022-05-04 Thread Leonardo Bras
Since d48c3a0445 ("multifd: Use a single writev on the send side"), sending the header packet and the memory pages happens in the same writev, which can potentially make the migration faster. Using channel-socket as example, this works well with the default copying mechanism of sendmsg(), but with

[PATCH v11 0/7] MSG_ZEROCOPY + multifd

2022-05-04 Thread Leonardo Bras
This patch series intends to enable MSG_ZEROCOPY in QIOChannel, and make use of it for multifd migration performance improvement, by reducing cpu usage. Patch #1 creates new callbacks for QIOChannel, allowing the implementation of zero copy writing. Patch #2 implements io_writev flags and io_flus

Re: [PATCH qemu] spapr: Use address from elf parser for kernel address

2022-05-04 Thread Fabiano Rosas
Alexey Kardashevskiy writes: > tl;dr: This allows Big Endian zImage booting via -kernel + x-vof=on. > > QEMU loads the kernel at 0x40 by default which works most of > the time as Linux kernels are relocatable, 64bit and compiled with "-pie" > (position independent code). This works for a litt

Re: [PATCH v2 1/1] hw/arm/aspeed: Add fby35 machine type

2022-05-04 Thread Peter Delevoryas
> On May 4, 2022, at 9:34 AM, Peter Delevoryas wrote: > >> >> On May 4, 2022, at 12:39 AM, Cédric Le Goater wrote: >> >> On 5/4/22 00:59, Peter Delevoryas wrote: >>> Add the 'fby35-bmc' machine type based on the kernel DTS[1] and userspace >>> i2c setup scripts[2]. Undefined values are inhe

Re: [PATCH for-7.1 v2 0/1] use dc->vmsd with spapr devices vmstate

2022-05-04 Thread Daniel Henrique Barboza
Ping On 4/9/22 09:09, Daniel Henrique Barboza wrote: Hi, This v2 contains only the last patch from v1, patch 4, given that all other patches are breaking backward migration due to how qdev_set_legacy_instance_id() works when vmstate_register() is passing an id to the vmsds. Changes from v1: -

Re: [PATCH v2 0/1] Coverity fixes in hw/ppc/spapr_nvdimm.c

2022-05-04 Thread Daniel Henrique Barboza
Ping On 4/9/22 17:08, Daniel Henrique Barboza wrote: Changes from v1: - clarified in the commit message which kind of errors we aim to prevent - changed the H_HARDWARE return to g_assert() exit - v1 link: https://lists.gnu.org/archive/html/qemu-devel/2022-04/msg00569.html Daniel Henrique Barboz

Re: [PATCH 04/16] compiler.h: add QEMU_{BEGIN, END}_IGNORE_INITIALIZER_OVERRIDES

2022-05-04 Thread Peter Maydell
On Wed, 4 May 2022 at 18:36, wrote: > > From: Marc-André Lureau > > clang has this default warning which QEMU codes triggers in many > situations. However, other projects in general may not want to disable > globally the warning but only in limited specific code blocks. > > Signed-off-by: Marc-An

Re: [PATCH 03/16] tests: make libqmp buildable for win32

2022-05-04 Thread Thomas Huth
On 04/05/2022 19.30, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- tests/qtest/libqmp.h | 2 ++ tests/qtest/libqmp.c | 35 +-- 2 files changed, 31 insertions(+), 6 deletions(-) Reviewed-by: Thomas Huth

Re: [PATCH 9/9] hw/9p: win32: Translate Windows error number to Linux value

2022-05-04 Thread Christian Schoenebeck
On Montag, 25. April 2022 16:27:05 CEST Bin Meng wrote: > From: Guohuai Shi > > Some of Windows error numbers have different value from Linux ones. > For example, ENOTEMPTY is defined to 39 in Linux, but is defined to > 41 in Windows. So deleting a directory from a Linux guest on top > of QEMU fr

Re: [PATCH 06/16] include: adjust header guards after renaming

2022-05-04 Thread Stefan Weil via
Am 04.05.22 um 19:30 schrieb marcandre.lur...@redhat.com: From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- include/qemu/help-texts.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qemu/help-texts.h b/include/qemu/help-texts.h index ba32cc8b1f39.

Re: [PATCH 02/16] util/win32: simplify qemu_get_local_state_dir()

2022-05-04 Thread Stefan Weil via
Am 04.05.22 um 19:30 schrieb marcandre.lur...@redhat.com: From: Marc-André Lureau SHGetFolderPath() is a deprecated API: https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetfolderpatha It is a wrapper for SHGetKnownFolderPath() and CSIDL_COMMON_PATH is mapped to

Re: [PATCH 5/9] hw/9pfs: Add a 'local' file system backend driver for Windows

2022-05-04 Thread Christian Schoenebeck
On Montag, 25. April 2022 16:27:01 CEST Bin Meng wrote: > From: Guohuai Shi > > Add a 9p local file system backend driver to support Windows, > including open, read, write, close, rename, remove, etc. > > All security models are supported. The mapped (mapped-xattr) > security model is implemente

Re: [PATCH 4/9] fsdev: Add missing definitions for Windows in file-op-9p.h

2022-05-04 Thread Christian Schoenebeck
On Montag, 25. April 2022 16:27:00 CEST Bin Meng wrote: > From: Guohuai Shi > > Add uid_t, gid_t and struct statfs definitions, which are currently > missing from Windows headers, but are required when we add 9p file > system support for Windows in later patches. > > Signed-off-by: Guohuai Shi

[PATCH 14/16] qga/wixl: require Mingw_bin

2022-05-04 Thread marcandre . lureau
From: Marc-André Lureau No clear reason to make guesses here. Signed-off-by: Marc-André Lureau --- qga/installer/qemu-ga.wxs | 9 - 1 file changed, 9 deletions(-) diff --git a/qga/installer/qemu-ga.wxs b/qga/installer/qemu-ga.wxs index 8a19aa165651..651db6e51cda 100644 --- a/qga/insta

[PATCH 13/16] qga/wixl: prefer variables over environment

2022-05-04 Thread marcandre . lureau
From: Marc-André Lureau No need to setup an environment or to check if the variable is undefined manually. Signed-off-by: Marc-André Lureau --- qga/installer/qemu-ga.wxs | 30 +- qga/meson.build | 9 - 2 files changed, 13 insertions(+), 26 deletio

[PATCH 12/16] test/qga: use G_TEST_DIR to locate os-release test file

2022-05-04 Thread marcandre . lureau
From: Marc-André Lureau This a more accurate way to lookup the test data, and will allow to move the test in a subproject. Signed-off-by: Marc-André Lureau --- tests/unit/test-qga.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/unit/test-qga.c b/tests/un

[PATCH 11/16] qga: replace qemu_open_old() with qemu_open_cloexec()

2022-05-04 Thread marcandre . lureau
From: Marc-André Lureau qemu_open_old() uses qemu_open_internal() which handles special "/dev/fdset/" path for monitor fd sets, set CLOEXEC, and uses Error reporting (and some O_DIRECT special error casing). The monitor fdset handling is unnecessary for qga, use qemu_open_cloexec() instead. Sig

[PATCH 15/16] qga/wixl: simplify some pre-processing

2022-05-04 Thread marcandre . lureau
From: Marc-André Lureau Sadly, wixl doesn't have 'elif'. Signed-off-by: Marc-André Lureau --- qga/installer/qemu-ga.wxs | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/qga/installer/qemu-ga.wxs b/qga/installer/qemu-ga.wxs index 651db6e51cda..e5b0958e18

[PATCH 09/16] qga: use qemu_open_cloexec() for safe_open_or_create()

2022-05-04 Thread marcandre . lureau
From: Marc-André Lureau The function takes care of setting CLOEXEC, and reporting error. Signed-off-by: Marc-André Lureau --- qga/commands-posix.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 98d481a58485..974

[PATCH 07/16] qga: flatten safe_open_or_create()

2022-05-04 Thread marcandre . lureau
From: Marc-André Lureau There is a bit too much branching in the function, this can be simplified a bit, and have a common exit point thanks to ERRP_PROPAGATE. This also helps with the following error handling changes. Signed-off-by: Marc-André Lureau --- qga/commands-posix.c | 126 ++

[PATCH 10/16] qapi/error: add g_autoptr(Error) support

2022-05-04 Thread marcandre . lureau
From: Marc-André Lureau Sometime, ERRP_GUARD() isn't what you are looking for, because the function doesn't throw errors, yet auto-cleaning is nice to have. Signed-off-by: Marc-André Lureau --- include/qapi/error.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/qapi/error.h b/in

[PATCH 06/16] include: adjust header guards after renaming

2022-05-04 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- include/qemu/help-texts.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qemu/help-texts.h b/include/qemu/help-texts.h index ba32cc8b1f39..4f265fed8df1 100644 --- a/include/qemu/help-texts.h +++ b/incl

[PATCH 16/16] qga/wixl: replace QEMU_GA_MSI_MINGW_BIN_PATH with glib bindir

2022-05-04 Thread marcandre . lureau
From: Marc-André Lureau Use more conventional variables to set the location of pre-built DLL/bin. Signed-off-by: Marc-André Lureau --- configure | 9 ++--- meson.build | 5 - qga/installer/qemu-ga.wxs | 24 qga/meson.build

[PATCH 05/16] qobject/json-lexer: disable -Winitializer-overrides warnings

2022-05-04 Thread marcandre . lureau
From: Marc-André Lureau Silence the clang warning when building the code with default clang, outside of QEMU. Signed-off-by: Marc-André Lureau --- qobject/json-lexer.c | 4 1 file changed, 4 insertions(+) diff --git a/qobject/json-lexer.c b/qobject/json-lexer.c index 632320d72d5d..955ce0

[PATCH 02/16] util/win32: simplify qemu_get_local_state_dir()

2022-05-04 Thread marcandre . lureau
From: Marc-André Lureau SHGetFolderPath() is a deprecated API: https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetfolderpatha It is a wrapper for SHGetKnownFolderPath() and CSIDL_COMMON_PATH is mapped to FOLDERID_ProgramData: https://docs.microsoft.com/en-us/windo

[PATCH 04/16] compiler.h: add QEMU_{BEGIN, END}_IGNORE_INITIALIZER_OVERRIDES

2022-05-04 Thread marcandre . lureau
From: Marc-André Lureau clang has this default warning which QEMU codes triggers in many situations. However, other projects in general may not want to disable globally the warning but only in limited specific code blocks. Signed-off-by: Marc-André Lureau --- include/qemu/compiler.h | 11 +

[PATCH 08/16] osdep: export qemu_open_cloexec()

2022-05-04 Thread marcandre . lureau
From: Marc-André Lureau Used in the next patch, to simplify qga code. Signed-off-by: Marc-André Lureau --- include/qemu/osdep.h | 1 + util/osdep.c | 10 -- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 67cc465

[PATCH 03/16] tests: make libqmp buildable for win32

2022-05-04 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- tests/qtest/libqmp.h | 2 ++ tests/qtest/libqmp.c | 35 +-- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/tests/qtest/libqmp.h b/tests/qtest/libqmp.h index 94aa97328a17..772f18b73ba3

[PATCH 01/16] include: move qemu_*_exec_dir() to cutils

2022-05-04 Thread marcandre . lureau
From: Marc-André Lureau The function is required by get_relocated_path() (already in cutils), and used by qemu-ga and may be generally useful. Signed-off-by: Marc-André Lureau --- include/qemu/cutils.h| 7 ++ include/qemu/osdep.h | 8 -- qemu-io.c

[PATCH 00/16] Misc cleanups

2022-05-04 Thread marcandre . lureau
From: Marc-André Lureau Hi, Perhaps the last series of preliminary patches before I propose a longer series to add qemu-common & qga meson subprojects. That's why they are mostly QGA-related cleanups. Thanks for the reviews! Marc-André Lureau (16): include: move qemu_*_exec_dir() to cutils

Re: [PATCH v9 3/7] migration: Add zero-copy-send parameter for QMP/HMP for Linux

2022-05-04 Thread Leonardo Bras Soares Passos
On Wed, May 4, 2022 at 7:48 AM Markus Armbruster wrote: > > Leonardo Bras writes: > > > Add property that allows zero-copy migration of memory pages > > on the sending side, and also includes a helper function > > migrate_use_zero_copy_send() to check if it's enabled. > > > > No code is introduce

Re: [PATCH 0/9] 9pfs: Add 9pfs support for Windows host

2022-05-04 Thread Christian Schoenebeck
On Dienstag, 3. Mai 2022 05:42:03 CEST Bin Meng wrote: > On Tue, Apr 26, 2022 at 9:41 AM Bin Meng wrote: > > +Mark > > > > On Mon, Apr 25, 2022 at 10:27 PM Bin Meng wrote: > > > At present there is no Windows support for 9p file system. > > > This series adds initial Windows support for 9p file

Re: [PATCH v2 10/50] dino: return PCIBus from dino_init() using qdev_get_child_bus()

2022-05-04 Thread Richard Henderson
On 5/4/22 02:25, Mark Cave-Ayland wrote: This allows access to the PCI bus without having to reference parent_obj directly. Signed-off-by: Mark Cave-Ayland Acked-by: Helge Deller --- hw/hppa/dino.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/hppa/dino.c b/

  1   2   3   4   >