Re: [RFC PATCH v3 12/36] i386/tdx: Add property sept-ve-disable for tdx-guest object

2022-03-23 Thread Xiaoyao Li
On 3/22/2022 5:02 PM, Gerd Hoffmann wrote: On Thu, Mar 17, 2022 at 09:58:49PM +0800, Xiaoyao Li wrote: Add sept-ve-disable property for tdx-guest object. It's used to configure bit 28 of TD attributes. What is this? It seems this bit doesn't show up in the public spec yet. Bit 28 (SEPT_VE_D

Re: [RFC PATCH v3 17/36] pflash_cfi01/tdx: Introduce ram_mode of pflash for TDVF

2022-03-23 Thread Xiaoyao Li
On 3/22/2022 5:29 PM, Daniel P. Berrangé wrote: On Tue, Mar 22, 2022 at 10:21:41AM +0100, Gerd Hoffmann wrote: Hi, If you don't need a pflash device, don't use it: simply map your nvram region as ram in your machine. No need to clutter the pflash model like that. Using the pflash device f

Re: Address mapping for vIOMMU

2022-03-23 Thread Jason Wang
On Thu, Mar 24, 2022 at 12:15 PM leohou wrote: > > hi all, > When I use DPDK in guestOS and configering the VM with vIOMMU, I found that > sending the gVA to the hardware device , the hardware device can't find the > real data. > But sending the gPA to the hardware device, the hardware devic

Address mapping for vIOMMU

2022-03-23 Thread leohou
hi all, When I use DPDK in guestOS and configering the VM with vIOMMU, I found that sending the gVA to the hardware device , the hardware device can't find the real data. But sending the gPA to the hardware device, the hardware device can find the real data. Environment: OS: Linux version

[PATCH] target/i386: Return right size value after dynamic xfeature enabled

2022-03-23 Thread Yang Zhong
The kvm_arch_get_supported_cpuid() only call KVM_GET_SUPPORTED_CPUID one time, so the cpuid buffer information still keep older value. Once Qemu enable new dynamic xfeature, like XTILEDATA, the cpuid[0D,0].{EBX,ECX} still return older value. This patch can return right size value in kvm_init_xsave

Re: [PATCH 1/2] gdbstub: Set current_cpu for memory read write

2022-03-23 Thread Bin Meng
On Tue, Mar 22, 2022 at 11:56 PM Peter Maydell wrote: > > On Tue, 22 Mar 2022 at 15:43, Bin Meng wrote: > > > > When accessing the per-CPU register bank of some devices (e.g.: GIC) > > from the GDB stub context, a segfault occurs. This is due to current_cpu > > is not set, as the contect is not a

Re: [PATCH v9 13/14] disas/riscv.c: rvk: add disas support for Zbk* and Zk* instructions

2022-03-23 Thread Alistair Francis
On Fri, Mar 18, 2022 at 2:34 PM Weiwei Li wrote: > > Co-authored-by: Ruibo Lu > Co-authored-by: Zewen Ye > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang Acked-by: Alistair Francis Alistair > --- > disas/riscv.c | 173 +- > 1 file c

Re: [PATCH v9 11/14] target/riscv: rvk: add support for zksed/zksh extension

2022-03-23 Thread Alistair Francis
On Fri, Mar 18, 2022 at 2:29 PM Weiwei Li wrote: > > - add sm3p0, sm3p1, sm4ed and sm4ks instructions > > Co-authored-by: Ruibo Lu > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang > Reviewed-by: Richard Henderson Acked-by: Alistair Francis Alistair > --- > target/riscv/crypto_he

Re: [PATCH v2] hw/riscv: virt: Warn the user if -bios is provided when using KVM

2022-03-23 Thread Alistair Francis
On Thu, Mar 24, 2022 at 8:31 AM Ralf Ramsauer wrote: > > The -bios option is silently ignored if used in combination with -enable-kvm. > The reason is that the machine starts in S-Mode, and the bios typically runs > in > M-Mode. > > Warn the user that the bios won't be loaded. > > Signed-off-by:

Re: Re: Re: [PATCH v3 0/6] Support akcipher for virtio-crypto

2022-03-23 Thread zhenwei pi
On 3/24/22 02:03, Eric Biggers wrote: On Wed, Mar 23, 2022 at 03:32:37PM +0800, zhenwei pi wrote: On 3/23/22 13:17, Eric Biggers wrote: On Wed, Mar 23, 2022 at 10:49:06AM +0800, zhenwei pi wrote: v2 -> v3: - Introduce akcipher types to qapi - Add test/benchmark suite for akcipher class - Sepe

[PATCH] target/arm: Fix sve_ld1_z and sve_st1_z vs MMIO

2022-03-23 Thread Richard Henderson
Both of these functions missed handling the TLB_MMIO flag during the conversion to handle MTE. Fixes: 10a85e2c8ab6 ("target/arm: Reuse sve_probe_page for gather loads") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/925 Signed-off-by: Richard Henderson --- target/arm/sve_helper.c | 10 +

RE: [PATCH 1/1] MAINTAINERS: Update maintainers for Guest x86 HAXM CPUs

2022-03-23 Thread Wang, Wenchao
Hi, Philippe, Thanks for your reply. I once attached the patch with the mail but it was dropped during forwarding. I have pasted it as below again. Thanks a lot. From 2257272c08291006bad5e9a44f48e7365f330640 Mon Sep 17 00:00:00 2001 From: Wenchao Wang Date: Tue, 15 Mar 2022 20:51:22 +0800 Subj

Re: [PATCH RESEND 1/2] hw/vfio/pci-quirks: Resolve redundant property getters

2022-03-23 Thread Bernhard Beschow
Am 21. März 2022 13:06:29 UTC schrieb "Philippe Mathieu-Daudé" : >On 21/3/22 11:57, Bernhard Beschow wrote: >> Am 1. März 2022 22:52:19 UTC schrieb Bernhard Beschow : >>> The QOM API already provides getters for uint64 and uint32 values, so reuse >>> them. >>> >>> Signed-off-by: Bernhard Beschow

[PATCH v4 1/2] qemu-binfmt-conf.sh: allow elf EI_ABIVERSION=1 for mips

2022-03-23 Thread Andreas K . Hüttel
With the command line flag -mplt and a recent toolchain, ELF binaries generated by gcc can obtain EI_ABIVERSION=1, see below, which makes, e.g., gcc three-stage bootstrap in a mips-unknown-linux-gnu qemu-user chroot fail since the binfmt-misc magic does not match anymore. qemu executes these binar

[PATCH v4 2/2] qemu-binfmt-conf.sh: Extend magic to distinguish mips o32 and n32 ABI

2022-03-23 Thread Andreas K . Hüttel
This information is given by the EF_MIPS_ABI2 (0x20) bit in the e_flags field of the ELF header (a 4-byte value at offset 0x24 for the here applicable ELFCLASS32). See-also: https://www.mail-archive.com/qemu-devel@nongnu.org/msg732572.html Signed-off-by: Andreas K. Hüttel --- scripts/qemu-binfmt

qemu-binfmt-conf.sh: improvements for mips

2022-03-23 Thread Andreas K . Hüttel
Re-sending v3 unchanged as requested. The first patch has already been submitted earlier and is unchanged from v2. The second patch extends it and resolves issue 843, "duplicate magic mips patterns". Tested with various self-bootstrapped Gentoo chroots and in production on the Gentoo release eng

Re: Memory leak in via_isa_realize()

2022-03-23 Thread Bernhard Beschow
Am 22. März 2022 08:23:09 UTC schrieb Mark Cave-Ayland : >On 21/03/2022 20:35, Peter Maydell wrote: > >> On Mon, 21 Mar 2022 at 18:55, Cédric Le Goater wrote: >>> I introduced quite a few of these calls, >>> >>> hw/ppc/pnv_lpc.c:irqs = qemu_allocate_irqs(handler, lpc, >>> ISA_NUM_IRQS);

Re: [PATCH v4 13/13] softmmu/cpus: Free cpu->halt_cond in generic_destroy_vcpu_thread()

2022-03-23 Thread Richard Henderson
On 3/23/22 10:17, Philippe Mathieu-Daudé wrote: From: Mark Kanda vCPU hotunplug related leak reported by Valgrind: ==102631== 56 bytes in 1 blocks are definitely lost in loss record 5,089 of 8,555 ==102631==at 0x4C3ADBB: calloc (vg_replace_malloc.c:1117) ==102631==by 0x69EE4CD

Re: [PATCH v4 12/13] softmmu/cpus: Free cpu->thread in generic_destroy_vcpu_thread()

2022-03-23 Thread Richard Henderson
On 3/23/22 10:17, Philippe Mathieu-Daudé wrote: static void common_vcpu_thread_destroy(CPUState *cpu) { +g_free(cpu->thread); } Missing free of halt_cond. r~

Re: [PATCH v4 11/13] accel/tcg: Add rr_destroy_vcpu_thread_precheck()

2022-03-23 Thread Richard Henderson
On 3/23/22 10:17, Philippe Mathieu-Daudé wrote: +bool rr_destroy_vcpu_thread_precheck(CPUState *cpu) +{ +if (single_tcg_cpu_thread) { +single_tcg_cpu_thread = NULL; +return true; +} +return false; +} This would become void rr_destroy_vcpu_thread(CPUState *cpu) {

[PATCH v2] hw/riscv: virt: Warn the user if -bios is provided when using KVM

2022-03-23 Thread Ralf Ramsauer
The -bios option is silently ignored if used in combination with -enable-kvm. The reason is that the machine starts in S-Mode, and the bios typically runs in M-Mode. Warn the user that the bios won't be loaded. Signed-off-by: Ralf Ramsauer --- hw/riscv/virt.c | 4 1 file changed, 4 inserti

Re: [EXT] Re: [PATCH] hw/riscv: virt: Warn the user if -bios is provided when using KVM

2022-03-23 Thread Ralf Ramsauer
On 23/03/2022 22:05, Alistair Francis wrote: On Thu, Mar 24, 2022 at 3:13 AM Ralf Ramsauer wrote: The -bios option is silently ignored if used in combination with -enable-kvm. The reason is that the machine starts in S-Mode, and the bios typically runs in M-Mode. Warn the user that the bio

Re: [PATCH v4 10/13] accel-ops: Introduce common_vcpu_thread_destroy() and .precheck handler

2022-03-23 Thread Richard Henderson
On 3/23/22 10:17, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Introduce an empty common_vcpu_thread_destroy() function, and provide a AccelOpsClass::destroy_vcpu_thread_precheck() callback so accelerators can choose whether to call common_vcpu_thread_destroy. Signed-off-by: Phil

Re: [PATCH v4 07/13] accel-ops: Introduce create_vcpu_thread_precheck / postcheck handlers

2022-03-23 Thread Richard Henderson
On 3/23/22 10:17, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Introduce precheck/postcheck handlers which will help to refactor code common to the various create_vcpu_thread() implementations. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/accel-ops.h | 4 sof

Re: [PATCH v4 09/13] accel/all: Extract common_vcpu_thread_create()

2022-03-23 Thread Richard Henderson
On 3/23/22 10:17, Philippe Mathieu-Daudé wrote: +void rr_create_vcpu_thread_postcheck(CPUState *cpu) { -char thread_name[VCPU_THREAD_NAME_SIZE]; static QemuCond *single_tcg_halt_cond; -static QemuThread *single_tcg_cpu_thread; - -if (!single_tcg_cpu_thread) { -cpu->thr

Re: [PATCH v4 09/13] accel/all: Extract common_vcpu_thread_create()

2022-03-23 Thread Richard Henderson
On 3/23/22 10:17, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé All accelerators implement a very similar create_vcpu_thread() handler. Extract the common part as common_vcpu_thread_create(), which only requires the AccelOpsClass::vcpu_thread_fn() routine and the accelerator AccelO

Re: [PATCH 01/10] python/aqmp: add explicit GPLv2 license to legacy.py

2022-03-23 Thread John Snow
On Mon, Mar 21, 2022 at 5:08 PM John Snow wrote: > > The legacy.py module is heavily based on the QMP module by Luiz > Capitulino (et al) which is licensed as explicit GPLv2-only. The async > QMP package is currently licensed similarly, but I intend to relicense > the async package to the more fle

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

2022-03-23 Thread Daniel Henrique Barboza
On 3/22/22 22:49, David Gibson wrote: On Tue, Mar 22, 2022 at 03:38:50PM -0300, Daniel Henrique Barboza wrote: Hi, This short series converts some spapr devices to use the dc->vmsd interface to register the vmstate. For most of them it was needed to use qdev_set_legacy_instance_id() to keep

Re: [PATCH for-7.1 2/4] hw/ppc: use qdev to register physical DRC vmstates

2022-03-23 Thread Daniel Henrique Barboza
On 3/22/22 22:48, David Gibson wrote: On Tue, Mar 22, 2022 at 03:38:52PM -0300, Daniel Henrique Barboza wrote: Similar to logical DRCs, let's convert physical DRCs to register their vmstates using dc->vmsd. The same constraints with instance_id being set to spapr_drc_index() also applies in

Re: Question about vmstate_register(), dc->vmsd and instance_id

2022-03-23 Thread Daniel Henrique Barboza
On 3/17/22 13:29, Dr. David Alan Gilbert wrote: * Peter Maydell (peter.mayd...@linaro.org) wrote: On Thu, 17 Mar 2022 at 14:03, Daniel Henrique Barboza wrote: I've been looking into converting some vmstate_register() calls to use dc->vmsd, using as a base the docs in docs/devel/migration.rs

Re: [PATCH v4 06/13] accel/tcg: Reorganize tcg_accel_ops_init()

2022-03-23 Thread Richard Henderson
On 3/23/22 10:17, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Reorg TCG AccelOpsClass initialization to emphasis icount mode share more code with single-threaded TCG. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tcg-accel-ops.c | 15 --- 1 file changed, 8 in

Re: [PATCH v4 05/13] accel/tcg: Init TCG cflags in vCPU thread handler

2022-03-23 Thread Richard Henderson
On 3/23/22 10:17, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Move TCG cflags initialization to thread handler. Remove the duplicated assert checks. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tcg-accel-ops-mttcg.c | 5 ++--- accel/tcg/tcg-accel-ops-rr.c| 7 +++

Re: [PATCH 09/10] python: rename qemu.aqmp to qemu.qmp

2022-03-23 Thread John Snow
On Wed, Mar 23, 2022 at 2:20 PM Hanna Reitz wrote: > > On 21.03.22 22:08, John Snow wrote: > > Now that we are fully switched over to the new QMP library, move it back > > over the old namespace. This is being done primarily so that we may > > upload this package simply as "qemu.qmp" without intro

Re: [PATCH v4 03/13] target/i386/hvf: Free resources when vCPU is destroyed

2022-03-23 Thread Richard Henderson
On 3/23/22 10:17, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Both xsave_buf and hvf_caps are allocated in hvf_arch_init_vcpu(), free them in hvf_arch_vcpu_destroy(). Reported-by: Mark Kanda Suggested-by: Igor Mammedov Signed-off-by: Philippe Mathieu-Daudé --- target/i386/hvf/h

Re: [PATCH v4 02/13] target/i386/kvm: Free xsave_buf when destroying vCPU

2022-03-23 Thread Richard Henderson
On 3/23/22 10:17, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Fix vCPU hot-unplug related leak reported by Valgrind: ==132362== 4,096 bytes in 1 blocks are definitely lost in loss record 8,440 of 8,549 ==132362==at 0x4C3B15F: memalign (vg_replace_malloc.c:1265) ==13

Re: [PATCH 26/32] include: move os_*() to os-foo.h

2022-03-23 Thread Philippe Mathieu-Daudé
On 23/3/22 16:57, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau For consistency with other os_ functions that do not have POSIX implementation, declare an inline function for the stub in os-win32.h. Signed-off-by: Marc-André Lureau --- include/qemu-common.h | 4 inclu

Re: [PATCH] hw/riscv: virt: Warn the user if -bios is provided when using KVM

2022-03-23 Thread Alistair Francis
On Thu, Mar 24, 2022 at 3:13 AM Ralf Ramsauer wrote: > > The -bios option is silently ignored if used in combination with -enable-kvm. > The reason is that the machine starts in S-Mode, and the bios typically runs > in > M-Mode. > > Warn the user that the bios won't be loaded. > > Signed-off-by:

Re: [PATCH 31/32] RFC: Simplify softmmu/main.c

2022-03-23 Thread Akihiko Odaki
Reviewed-by: Akihiko Odaki On 2022/03/24 0:57, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Move qemu_main() declaration to a new header. Simplify main.c since both cocoa & sdl cannot be enabled together. (there might be some small conflict with the RFC patch "cocoa: run qemu_

Re: [PULL for-7.1 08/36] *: Use fprintf between qemu_log_lock/unlock

2022-03-23 Thread Richard Henderson
On 3/23/22 10:22, Alex Bennée wrote: Richard Henderson writes: Inside qemu_log, we perform qemu_log_lock/unlock, which need not be done if we have already performed the lock beforehand. Always check the result of qemu_log_lock -- only checking qemu_loglevel_mask races with the acquisition of

[PATCH v3 for-7.1] vfio/common: remove spurious tpm-crb-cmd misalignment warning

2022-03-23 Thread Eric Auger
The CRB command buffer currently is a RAM MemoryRegion and given its base address alignment, it causes an error report on vfio_listener_region_add(). This region could have been a RAM device region, easing the detection of such safe situation but this option was not well received. So let's add a he

Re: [PATCH v1 8/9] aspeed: Add an AST1030 eval board

2022-03-23 Thread Patrick Venture
On Mon, Mar 21, 2022 at 7:59 PM Jamin Lin wrote: > From: Steven Lee > > The image should be supplied with ELF binary. > $ qemu-system-arm -M ast1030-evb -kernel zephyr.elf -nographic > > Signed-off-by: Troy Lee > Signed-off-by: Jamin Lin > Signed-off-by: Steven Lee > Reviewed-by: Patrick Vent

Re: [PATCH v1 7/8] migration: analyze-migration script changed

2022-03-23 Thread Nikita Lapshin
On 3/23/22 16:57, Vladimir Sementsov-Ogievskiy wrote: 23.03.2022 13:53, Nikita Lapshin wrote: From: Nikita Lapshin This script is used for RAM capabilities test. But it cannot work in case of no vm description in migration stream. So new flag is added to allow work this script with ram-only mig

Re: [PATCH 06/10] python/aqmp: copy qmp docstrings to qemu.aqmp.legacy

2022-03-23 Thread John Snow
On Wed, Mar 23, 2022 at 2:24 PM Hanna Reitz wrote: > > On 21.03.22 22:08, John Snow wrote: > > Copy the docstrings out of qemu.qmp, adjusting them as necessary to > > more accurately reflect the current state of this class. > > > > (Licensing: This is copying and modifying GPLv2-only licensed docs

Re: [PATCH v4 01/13] cpu: Free cpu->cpu_ases in cpu_address_space_destroy()

2022-03-23 Thread Mark Kanda
On 3/23/2022 1:56 PM, Philippe Mathieu-Daudé wrote: On 23/3/22 18:17, Philippe Mathieu-Daudé wrote: From: Mark Kanda Create cpu_address_space_destroy() to free a CPU's cpu_ases list. This seems incorrect... vCPU hotunplug related leak reported by Valgrind: ==132362== 216 bytes in 1 blocks

Re: [PULL for 7.0 0/8] i386, docs, gitlab fixes

2022-03-23 Thread Alex Bennée
Peter Maydell writes: > On Wed, 23 Mar 2022 at 11:27, Alex Bennée wrote: >> >> The following changes since commit 15ef89d2a1a7b93845a6b09c2ee8e1979f6eb30b: >> >> Update version for v7.0.0-rc1 release (2022-03-22 22:58:44 +) >> >> are available in the Git repository at: >> >> https://gi

Re: [PATCH v4 01/13] cpu: Free cpu->cpu_ases in cpu_address_space_destroy()

2022-03-23 Thread Philippe Mathieu-Daudé
On 23/3/22 18:17, Philippe Mathieu-Daudé wrote: From: Mark Kanda Create cpu_address_space_destroy() to free a CPU's cpu_ases list. This seems incorrect... vCPU hotunplug related leak reported by Valgrind: ==132362== 216 bytes in 1 blocks are definitely lost in loss record 7,119 of 8,549 =

Re: [PATCH v8 23/46] hw/cxl/component: Implement host bridge MMIO (8.2.5, table 142)

2022-03-23 Thread Jonathan Cameron via
On Sat, 19 Mar 2022 08:35:54 + Mark Cave-Ayland wrote: > On 18/03/2022 15:06, Jonathan Cameron wrote: > > > From: Ben Widawsky > > > > CXL host bridges themselves may have MMIO. Since host bridges don't have > > a BAR they are treated as special for MMIO. This patch includes > > i386/pc s

Re: [PATCH 30/32] qga: remove explicit environ argument from exec/spawn

2022-03-23 Thread Richard Henderson
On 3/23/22 08:57, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Environment is implicitly inherited from the current process "environ" variable for execl() or g_spawn_sync(), no need to be explicit about it. Signed-off-by: Marc-André Lureau --- meson.build | 2 -- qga/

Re: [PATCH 29/32] Move fcntl_setfl() to oslib-posix

2022-03-23 Thread Richard Henderson
On 3/23/22 08:57, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau It is only implemented for POSIX anyway. Signed-off-by: Marc-André Lureau --- include/qemu/cutils.h | 1 - include/sysemu/os-posix.h | 2 ++ util/cutils.c | 17 - util/oslib-posix

Re: [PATCH 26/32] include: move os_*() to os-foo.h

2022-03-23 Thread Richard Henderson
On 3/23/22 08:57, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau For consistency with other os_ functions that do not have POSIX implementation, declare an inline function for the stub in os-win32.h. Signed-off-by: Marc-André Lureau --- include/qemu-common.h | 4 include

Re: [PATCH 24/32] include: move progress API to qemu-progress.h

2022-03-23 Thread Richard Henderson
On 3/23/22 08:57, marcandre.lur...@redhat.com wrote: +++ b/include/qemu/qemu-progress.h @@ -0,0 +1,8 @@ +#ifndef QEMU_PROGRESS_H All files must have copyright header. r~

Re: [PATCH 23/32] include: move target page bits declaration to page-vary.h

2022-03-23 Thread Richard Henderson
On 3/23/22 08:57, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Since the implementation unit is page-vary.c. Signed-off-by: Marc-André Lureau --- include/exec/page-vary.h | 18 ++ include/qemu-common.h| 17 - page-vary.c | 2 +-

Re: [PATCH 06/10] python/aqmp: copy qmp docstrings to qemu.aqmp.legacy

2022-03-23 Thread Hanna Reitz
On 21.03.22 22:08, John Snow wrote: Copy the docstrings out of qemu.qmp, adjusting them as necessary to more accurately reflect the current state of this class. (Licensing: This is copying and modifying GPLv2-only licensed docstrings into a GPLv2-only file.) Signed-off-by: John Snow Reviewed-b

Re: [PATCH 14/32] util: rename qemu-error.c to match its header name

2022-03-23 Thread Richard Henderson
On 3/23/22 08:57, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau The header name is more appropriate. Signed-off-by: Marc-André Lureau --- util/{qemu-error.c => error-report.c} | 0 util/meson.build | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) re

Re: [PATCH v3 1/5] hw/arm/realview: replace 'qemu_split_irq' with 'TYPE_SPLIT_IRQ'

2022-03-23 Thread Peter Maydell
On Wed, 23 Mar 2022 at 17:36, Zongyuan Li wrote: > > Signed-off-by: Zongyuan Li > --- > hw/arm/realview.c | 41 - > 1 file changed, 32 insertions(+), 9 deletions(-) > > diff --git a/hw/arm/realview.c b/hw/arm/realview.c > index 7b424e94a5..97ace560bf 10064

Re: [PATCH v3 2/5] hw/arm/stellaris: replace 'qemu_split_irq' with 'TYPE_SPLIT_IRQ'

2022-03-23 Thread Peter Maydell
On Wed, 23 Mar 2022 at 17:36, Zongyuan Li wrote: > > Signed-off-by: Zongyuan Li > --- > hw/arm/stellaris.c | 17 +++-- > 1 file changed, 15 insertions(+), 2 deletions(-) > > diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c > index b6c8a5d609..ccc2d5def2 100644 > --- a/hw/arm/stel

Re: [PATCH 09/10] python: rename qemu.aqmp to qemu.qmp

2022-03-23 Thread Hanna Reitz
On 21.03.22 22:08, John Snow wrote: Now that we are fully switched over to the new QMP library, move it back over the old namespace. This is being done primarily so that we may upload this package simply as "qemu.qmp" without introducing confusion over whether or not "aqmp" is a new protocol or n

Re: [PATCH v8 17/46] hw/cxl/device: Add a memory device (8.2.8.5)

2022-03-23 Thread Jonathan Cameron via
On Sat, 19 Mar 2022 08:32:29 + Mark Cave-Ayland wrote: > On 18/03/2022 15:06, Jonathan Cameron via wrote: > > > From: Ben Widawsky > > > > A CXL memory device (AKA Type 3) is a CXL component that contains some > > combination of volatile and persistent memory. It also implements the > > pr

Re: [PATCH v3 4/5] hw/intc/exynos4210_gic: replace 'qemu_split_irq' with 'TYPE_SPLIT_IRQ'

2022-03-23 Thread Peter Maydell
On Wed, 23 Mar 2022 at 17:36, Zongyuan Li wrote: > > Signed-off-by: Zongyuan Li > --- > hw/intc/exynos4210_gic.c | 25 ++--- > 1 file changed, 22 insertions(+), 3 deletions(-) > Same comments apply here as for patch 3 -- this is a device, so it needs to handle the sub-device

Re: [PATCH v3 5/5] hw/core/irq: remove unused 'qemu_irq_split' function

2022-03-23 Thread Peter Maydell
On Wed, 23 Mar 2022 at 17:37, Zongyuan Li wrote: > > Signed-off-by: Zongyuan Li > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/811 Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v3 3/5] hw/intc/exynos4210_combiner: replace 'qemu_split_irq' with 'TYPE_SPLIT_IRQ'

2022-03-23 Thread Peter Maydell
On Wed, 23 Mar 2022 at 17:36, Zongyuan Li wrote: > > Signed-off-by: Zongyuan Li > --- > hw/intc/exynos4210_combiner.c | 32 +--- > 1 file changed, 25 insertions(+), 7 deletions(-) > > diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c > index 4

Re: [PATCH 10/32] tests: replace free_all() usage with g_auto

2022-03-23 Thread Richard Henderson
On 3/23/22 08:57, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Use more idiomatic glib/auto-style code. Signed-off-by: Marc-André Lureau --- tests/unit/check-qobject.c | 127 - 1 file changed, 40 insertions(+), 87 deletions(-) Reviewed-by:

Re: [PATCH 09/32] include/qapi: add g_autoptr support for qobject types

2022-03-23 Thread Richard Henderson
On 3/23/22 08:57, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Need wrappers for qobject_unref() calls, which is a macro. Signed-off-by: Marc-André Lureau --- include/qapi/qmp/qbool.h | 4 include/qapi/qmp/qdict.h | 4 include/qapi/qmp/qlist.h | 4 includ

Re: [PATCH 1/1] MAINTAINERS: Update maintainers for Guest x86 HAXM CPUs

2022-03-23 Thread Philippe Mathieu-Daudé
Hi Wenchao, On 16/3/22 01:47, Wang, Wenchao wrote: diff --git a/MAINTAINERS b/MAINTAINERS index f2e9ce1da2..36f877cf74 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -492,7 +492,6 @@ Guest CPU Cores (HAXM) - X86 HAXM CPUs M: Wenchao Wang -M: Colin Xu L: haxm-t...@in

Re: [PULL for 7.0 0/8] i386, docs, gitlab fixes

2022-03-23 Thread Peter Maydell
On Wed, 23 Mar 2022 at 11:27, Alex Bennée wrote: > > The following changes since commit 15ef89d2a1a7b93845a6b09c2ee8e1979f6eb30b: > > Update version for v7.0.0-rc1 release (2022-03-22 22:58:44 +) > > are available in the Git repository at: > > https://github.com/stsquad/qemu.git tags/pull-

Re: Re: [PATCH v3 0/6] Support akcipher for virtio-crypto

2022-03-23 Thread Eric Biggers
On Wed, Mar 23, 2022 at 03:32:37PM +0800, zhenwei pi wrote: > > On 3/23/22 13:17, Eric Biggers wrote: > > On Wed, Mar 23, 2022 at 10:49:06AM +0800, zhenwei pi wrote: > > > v2 -> v3: > > > - Introduce akcipher types to qapi > > > - Add test/benchmark suite for akcipher class > > > - Seperate 'virti

[PATCH v3 4/5] hw/intc/exynos4210_gic: replace 'qemu_split_irq' with 'TYPE_SPLIT_IRQ'

2022-03-23 Thread Zongyuan Li
Signed-off-by: Zongyuan Li --- hw/intc/exynos4210_gic.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/hw/intc/exynos4210_gic.c b/hw/intc/exynos4210_gic.c index bc73d1f115..d8ecb9fae3 100644 --- a/hw/intc/exynos4210_gic.c +++ b/hw/intc/exynos4210_gi

[PATCH v3 3/5] hw/intc/exynos4210_combiner: replace 'qemu_split_irq' with 'TYPE_SPLIT_IRQ'

2022-03-23 Thread Zongyuan Li
Signed-off-by: Zongyuan Li --- hw/intc/exynos4210_combiner.c | 32 +--- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c index 4534ee248d..18dade35d3 100644 --- a/hw/intc/exynos4210_combiner.c

[PATCH v3 2/5] hw/arm/stellaris: replace 'qemu_split_irq' with 'TYPE_SPLIT_IRQ'

2022-03-23 Thread Zongyuan Li
Signed-off-by: Zongyuan Li --- hw/arm/stellaris.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index b6c8a5d609..ccc2d5def2 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -9,6 +9,7 @@ #include "qemu/

[PATCH v3 1/5] hw/arm/realview: replace 'qemu_split_irq' with 'TYPE_SPLIT_IRQ'

2022-03-23 Thread Zongyuan Li
Signed-off-by: Zongyuan Li --- hw/arm/realview.c | 41 - 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/hw/arm/realview.c b/hw/arm/realview.c index 7b424e94a5..97ace560bf 100644 --- a/hw/arm/realview.c +++ b/hw/arm/realview.c @@ -13,9 +13,11

[PATCH v3 5/5] hw/core/irq: remove unused 'qemu_irq_split' function

2022-03-23 Thread Zongyuan Li
Signed-off-by: Zongyuan Li Resolves: https://gitlab.com/qemu-project/qemu/-/issues/811 --- hw/core/irq.c| 15 --- include/hw/irq.h | 5 - 2 files changed, 20 deletions(-) diff --git a/hw/core/irq.c b/hw/core/irq.c index 741219277b..3623f711fe 100644 --- a/hw/core/irq.c +++ b

Re: [PATCH v4 12/13] softmmu/cpus: Free cpu->thread in generic_destroy_vcpu_thread()

2022-03-23 Thread Mark Kanda
Thanks Philippe, In the patch subject, 'generic_destroy_vcpu_thread()' should be changed to 'common_vcpu_thread_destroy()'. Same goes for the next patch (Free cpu->halt_cond). Thanks/regards, -Mark On 3/23/2022 12:17 PM, Philippe Mathieu-Daudé wrote: From: Mark Kanda Free cpu->thread in a

[PATCH v3 0/5] Replace 'qemu_irq_split' with 'TYPE_SPLIT_IRQ'

2022-03-23 Thread Zongyuan Li
This patch set tries to replace 'qemu_irq_split' function with QOM object 'TYPE_SPLIT_IRQ' and totally remove this call. If this patch set is applied, issue: https://gitlab.com/qemu-project/qemu/-/issues/811 can be closed. Changes since rfc v2: 1. Replace all 'qemu_irq_split' calls in multiple

Re: [PULL for-7.1 15/36] util/log: Use qemu_log_lock/unlock in qemu_log

2022-03-23 Thread Alex Bennée
Richard Henderson writes: > Avoid using QemuLogFile and RCU directly. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

[PATCH v4 13/13] softmmu/cpus: Free cpu->halt_cond in generic_destroy_vcpu_thread()

2022-03-23 Thread Philippe Mathieu-Daudé
From: Mark Kanda vCPU hotunplug related leak reported by Valgrind: ==102631== 56 bytes in 1 blocks are definitely lost in loss record 5,089 of 8,555 ==102631==at 0x4C3ADBB: calloc (vg_replace_malloc.c:1117) ==102631==by 0x69EE4CD: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.5600.4)

[PATCH v4 11/13] accel/tcg: Add rr_destroy_vcpu_thread_precheck()

2022-03-23 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé TCG/RR is special and creates a single vCPU. It only have to release its resources once. Implement the .precheck() for that purpose. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tcg-accel-ops-rr.c | 9 + accel/tcg/tcg-accel-ops.c| 1 + 2 files ch

[PATCH v4 09/13] accel/all: Extract common_vcpu_thread_create()

2022-03-23 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé All accelerators implement a very similar create_vcpu_thread() handler. Extract the common part as common_vcpu_thread_create(), which only requires the AccelOpsClass::vcpu_thread_fn() routine and the accelerator AccelOpsClass::thread_name for debugging purpose. The s

Re: [PULL for-7.1 07/36] hw/xen: Split out xen_pv_output_msg

2022-03-23 Thread Alex Bennée
Richard Henderson writes: > Do not replicate the individual logging statements. > Use qemu_log_lock/unlock instead of qemu_log directly. > > Signed-off-by: Richard Henderson I don't know why Xen wants to have it's own special handling for errors. It seems a lot of the xen_pv_printf's of level

[PATCH v4 06/13] accel/tcg: Reorganize tcg_accel_ops_init()

2022-03-23 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Reorg TCG AccelOpsClass initialization to emphasis icount mode share more code with single-threaded TCG. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tcg-accel-ops.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/accel/tc

Re: [PULL for-7.1 08/36] *: Use fprintf between qemu_log_lock/unlock

2022-03-23 Thread Alex Bennée
Richard Henderson writes: > Inside qemu_log, we perform qemu_log_lock/unlock, which need > not be done if we have already performed the lock beforehand. > > Always check the result of qemu_log_lock -- only checking > qemu_loglevel_mask races with the acquisition of the lock > on the logfile. I

[PATCH v4 12/13] softmmu/cpus: Free cpu->thread in generic_destroy_vcpu_thread()

2022-03-23 Thread Philippe Mathieu-Daudé
From: Mark Kanda Free cpu->thread in a new AccelOpsClass::destroy_vcpu_thread() handler generic_destroy_vcpu_thread(). vCPU hotunplug related leak reported by Valgrind: ==102631== 8 bytes in 1 blocks are definitely lost in loss record 1,037 of 8,555 ==102631==at 0x4C3ADBB: calloc (vg_r

[PATCH v4 07/13] accel-ops: Introduce create_vcpu_thread_precheck / postcheck handlers

2022-03-23 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Introduce precheck/postcheck handlers which will help to refactor code common to the various create_vcpu_thread() implementations. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/accel-ops.h | 4 softmmu/cpus.c | 8 +++- 2 files change

[PATCH v4 03/13] target/i386/hvf: Free resources when vCPU is destroyed

2022-03-23 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Both xsave_buf and hvf_caps are allocated in hvf_arch_init_vcpu(), free them in hvf_arch_vcpu_destroy(). Reported-by: Mark Kanda Suggested-by: Igor Mammedov Signed-off-by: Philippe Mathieu-Daudé --- target/i386/hvf/hvf.c | 2 ++ 1 file changed, 2 insertions(+) d

[PATCH v4 10/13] accel-ops: Introduce common_vcpu_thread_destroy() and .precheck handler

2022-03-23 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Introduce an empty common_vcpu_thread_destroy() function, and provide a AccelOpsClass::destroy_vcpu_thread_precheck() callback so accelerators can choose whether to call common_vcpu_thread_destroy. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/accel-ops.

[PATCH v4 05/13] accel/tcg: Init TCG cflags in vCPU thread handler

2022-03-23 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Move TCG cflags initialization to thread handler. Remove the duplicated assert checks. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tcg-accel-ops-mttcg.c | 5 ++--- accel/tcg/tcg-accel-ops-rr.c| 7 +++ 2 files changed, 5 insertions(+), 7 deletions(-)

[PATCH v4 00/13] accel: Fix vCPU memory leaks

2022-03-23 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Hi, This is a respin of Mark 'vCPU hotunplug related memory leaks' v3: https://lore.kernel.org/qemu-devel/20220321141409.3112932-1-mark.ka...@oracle.com/ Instead I refactored to extract the common common_vcpu_thread_create() from all accelerators (except TCG/RR, whi

[PATCH v4 08/13] accel/tcg: Extract rr_create_vcpu_thread_precheck()

2022-03-23 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé We are going to extract common pattern from rr_start_vcpu_thread(). First extract the rr_create_vcpu_thread_precheck() helper. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tcg-accel-ops-rr.c | 7 +++ accel/tcg/tcg-accel-ops-rr.h | 1 + 2 files changed, 8

[PATCH v4 04/13] accel/hvf: Remove pointless assertion

2022-03-23 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Both the comment and the hvf_enabled() check are duplicated at the beginning of hvf_cpu_thread_fn(), which is the thread callback created by hvf_start_vcpu_thread(). Remove. Signed-off-by: Philippe Mathieu-Daudé --- accel/hvf/hvf-accel-ops.c | 6 -- 1 file chan

[PATCH v4 02/13] target/i386/kvm: Free xsave_buf when destroying vCPU

2022-03-23 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Fix vCPU hot-unplug related leak reported by Valgrind: ==132362== 4,096 bytes in 1 blocks are definitely lost in loss record 8,440 of 8,549 ==132362==at 0x4C3B15F: memalign (vg_replace_malloc.c:1265) ==132362==by 0x4C3B288: posix_memalign (vg_replace_m

[PATCH v4 01/13] cpu: Free cpu->cpu_ases in cpu_address_space_destroy()

2022-03-23 Thread Philippe Mathieu-Daudé
From: Mark Kanda Create cpu_address_space_destroy() to free a CPU's cpu_ases list. vCPU hotunplug related leak reported by Valgrind: ==132362== 216 bytes in 1 blocks are definitely lost in loss record 7,119 of 8,549 ==132362==at 0x4C3ADBB: calloc (vg_replace_malloc.c:1117) ==132362==by

Re: [PATCH 08/32] osdep: poison {HOST,TARGET}_WORDS_BIGENDIAN

2022-03-23 Thread Richard Henderson
On 3/23/22 08:57, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Signed-off-by: Marc-André Lureau Suggested-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- include/qemu/osdep.h | 12 1 file changed, 12 insertions(+) diff --git a/include/qemu/osdep.h

Re: [PATCH 06/32] Replace config-time define HOST_WORDS_BIGENDIAN

2022-03-23 Thread Richard Henderson
On 3/23/22 08:57, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Replace a config-time define with a compile time condition define (compatible with clang and gcc) that must be declared prior to its usage. This avoids having a global configure time define, but also prevents from bad u

Re: [PATCH v4 10/11] tests/tcg/s390x: Tests for Vector Enhancements Facility 2

2022-03-23 Thread Thomas Huth
On 22/03/2022 11.31, Thomas Huth wrote: On 22/03/2022 09.53, David Hildenbrand wrote: On 22.03.22 01:04, David Miller wrote: [...] diff --git a/tests/tcg/s390x/Makefile.target b/tests/tcg/s390x/Makefile.target index 8c9b6a13ce..921a056dd1 100644 --- a/tests/tcg/s390x/Makefile.target +++ b/tes

[PATCH] hw/riscv: virt: Warn the user if -bios is provided when using KVM

2022-03-23 Thread Ralf Ramsauer
The -bios option is silently ignored if used in combination with -enable-kvm. The reason is that the machine starts in S-Mode, and the bios typically runs in M-Mode. Warn the user that the bios won't be loaded. Signed-off-by: Ralf Ramsauer --- hw/riscv/virt.c | 3 +++ 1 file changed, 3 insertio

Re: [PATCH 07/32] Replace TARGET_WORDS_BIGENDIAN

2022-03-23 Thread Richard Henderson
On 3/23/22 08:57, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Convert the TARGET_WORDS_BIGENDIAN macro, similarly to what was done with HOST_BIG_ENDIAN. The new TARGET_BIG_ENDIAN macro is either 0 or 1, and thus should always be defined to prevent misuse. Signed-off-by: Marc-Andr

Re: [PATCH 06/32] Replace config-time define HOST_WORDS_BIGENDIAN

2022-03-23 Thread Richard Henderson
On 3/23/22 08:57, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Replace a config-time define with a compile time condition define (compatible with clang and gcc) that must be declared prior to its usage. This avoids having a global configure time define, but also prevents from bad u

Re: [EXT] Re: QEMU+KVM on RISC-V + Hypervisor Extension

2022-03-23 Thread Ralf Ramsauer
On 21/03/2022 21:47, Palmer Dabbelt wrote: On Sun, 20 Mar 2022 22:43:07 PDT (-0700), alistai...@gmail.com wrote: On Thu, Mar 17, 2022 at 7:46 PM Peter Maydell wrote: On Wed, 16 Mar 2022 at 22:23, Alistair Francis wrote: > Hmm... This seems like a bug. We shouldn't allow the user to spec

Re: [PULL for-7.1 05/36] util/log: Move qemu_log_lock, qemu_log_unlock out of line

2022-03-23 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH-for-7.0] target/i386/hvf: Free ressources when vCPU is destroyed

2022-03-23 Thread Philippe Mathieu-Daudé
Typo s/ressources/resources/ in subject. On 22/3/22 20:07, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Both xsave_buf and hvf_caps are allocated in hvf_arch_init_vcpu(), free them in hvf_arch_vcpu_destroy(). Reported-by: Mark Kanda Suggested-by: Igor Mammedov Signed-off-by: P

Re: [PULL for-7.1 06/36] util/log: Treat qemu_log_lock like trylock

2022-03-23 Thread Alex Bennée
Richard Henderson writes: > Do not require qemu_log_unlock to be called when > qemu_log_lock returns NULL. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

  1   2   3   >