Re: [PATCH] scripts/xml-preprocess: Make sure this script is invoked via the right Python

2023-10-09 Thread Paolo Bonzini
Queued, thanks. Paolo

vIOMMU - PCI pass through to Layer 2 VMs (Nested Virtualization)

2023-10-09 Thread Markus Frank
Hello, I have already sent this email to qemu-discuss but I did not get a reply. https://lists.nongnu.org/archive/html/qemu-discuss/2023-09/msg00034.html Maybe someone here could help me and reply to this email or the one on qemu-discuss? I would like to pass through PCI devices to Layer-2 VMs

Re: [PATCH v17 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-10-09 Thread Marc-André Lureau
On Fri, Oct 6, 2023 at 5:09 AM Gurchetan Singh wrote: > > This adds initial support for gfxstream and cross-domain. Both > features rely on virtio-gpu blob resources and context types, which > are also implemented in this patch. > > gfxstream has a long and illustrious history in Android graphics

Re: [PATCH v17 0/9] gfxstream + rutabaga_gfx

2023-10-09 Thread Marc-André Lureau
Hi On Fri, Oct 6, 2023 at 5:08 AM Gurchetan Singh wrote: > > From: Gurchetan Singh > > Branch containing changes: > > https://gitlab.com/gurchetansingh/qemu/-/commits/qemu-gfxstream-v17 > > Changes since v16: > > - Fixed typo mentioned here: > > https://lists.gnu.org/archive/html/qemu-devel/2023

Re: [PATCH 0/2] topic: meson: add more compiler hardening flags

2023-10-09 Thread Thomas Huth
On 05/10/2023 19.38, Daniel P. Berrangé wrote: ... I also tested enabling -ftrapv, to change signed integer overflow from wrapping, to trapping instead. This exposed a bug in the string-input-visitor which overflows when parsing ranges, and exposed the test-int128 code as (harmlessly) overflowin

Re: [PATCH] hw/ppc: Add nest1 chiplet control scoms

2023-10-09 Thread Cédric Le Goater
Hello Chalapathi, On 10/6/23 18:34, Chalapathi V wrote: -Create nest1 chiplet model and add nest1 chiplet control scoms. -Implementation of chiplet control scoms are put in pnv_pervasive.c as control scoms are common for all chiplets. I don't really understand the need for this pnv_pervasive

Re: [PATCH 1/2] meson: mitigate against ROP exploits with -fzero-call-used-regs

2023-10-09 Thread Thomas Huth
On 05/10/2023 19.38, Daniel P. Berrangé wrote: To quote wikipedia: "Return-oriented programming (ROP) is a computer security exploit technique that allows an attacker to execute code in the presence of security defenses such as executable space protection and code signing. In

Re: [PATCH v4 3/4] qcow2: add zoned emulation capability

2023-10-09 Thread Sam Li
Eric Blake 于2023年9月29日周五 03:17写道: > > On Mon, Sep 18, 2023 at 05:53:12PM +0800, Sam Li wrote: > > By adding zone operations and zoned metadata, the zoned emulation > > capability enables full emulation support of zoned device using > > a qcow2 file. The zoned device metadata includes zone type, >

Re: [PATCH 2/2] meson: mitigate against use of uninitialize stack for exploits

2023-10-09 Thread Thomas Huth
On 05/10/2023 19.38, Daniel P. Berrangé wrote: When variables are used without being initialized, there is potential to take advantage of data that was pre-existing on the stack from an earlier call, to drive an exploit. It is good practice to always initialize variables, and the compiler can wa

virtio via external shared ram

2023-10-09 Thread Janne Karhunen
Hi, I have created an experimental setup for Linux where all the virtio data structures and traffic can be allocated by the guest from a ram blob outside of the guest default ram space. That ram blob can be hotplugged to the guest or defined via the guests device tree.This is done as some hypervis

Re: [v3] Help wanted for enabling -Wshadow=local

2023-10-09 Thread Thomas Huth
On 06/10/2023 21.08, Warner Losh wrote: On Fri, Oct 6, 2023, 11:55 AM Thomas Huth > wrote: On 06/10/2023 18.18, Thomas Huth wrote: > On 06/10/2023 16.45, Markus Armbruster wrote: >> Local variables shadowing other local variables or parameters make the

[PATCH 00/44] Raspberry Pi 4B machine

2023-10-09 Thread Ben Dooks
Hi, is there an git tree with this series or a newer one available please? -- Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius https://www.codethink.co.uk/privacy.html

[PATCH] memory: drop needless argument

2023-10-09 Thread marcandre . lureau
From: Marc-André Lureau The argument is unused since commit bdc44640c ("cpu: Use QTAILQ for CPU list"). Signed-off-by: Marc-André Lureau --- softmmu/memory_mapping.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/softmmu/memory_mapping.c b/softmmu/memory_mapping.c inde

[PATCH] memory: follow Error API guidelines

2023-10-09 Thread marcandre . lureau
From: Marc-André Lureau Return true/false on success/failure. Signed-off-by: Marc-André Lureau --- include/hw/core/cpu.h | 4 +++- include/hw/core/sysemu-cpu-ops.h | 2 +- include/sysemu/memory_mapping.h | 2 +- target/i386/cpu.h | 2 +- hw/core/cpu-sysemu.c

Re: [PATCH] target/riscv: deprecate capital 'Z' CPU properties

2023-10-09 Thread Andrew Jones
On Sat, Oct 07, 2023 at 02:14:27PM -0300, Daniel Henrique Barboza wrote: > At this moment there are eleven CPU extension properties that starts > with capital 'Z': Zifencei, Zicsr, Zihintntl, Zihintpause, Zawrs, Zfa, > Zfh, Zfhmin, Zve32f, Zve64f and Zve64d. All other extensions are named > with lo

Re: [Virtio-fs] (no subject)

2023-10-09 Thread Hanna Czenczek
On 06.10.23 22:49, Alex Bennée wrote: Hanna Czenczek writes: On 06.10.23 17:17, Alex Bennée wrote: Hanna Czenczek writes: On 06.10.23 12:34, Michael S. Tsirkin wrote: On Fri, Oct 06, 2023 at 11:47:55AM +0200, Hanna Czenczek wrote: On 06.10.23 11:26, Michael S. Tsirkin wrote: On Fri, Oct

Re: [PATCH] hw/virtio/virtio-gpu: Fix compiler warning when compiling with -Wshadow

2023-10-09 Thread Thomas Huth
On 08/10/2023 10.57, Michael S. Tsirkin wrote: On Fri, Oct 06, 2023 at 06:45:08PM +0200, Thomas Huth wrote: Avoid using trivial variable names in macros, otherwise we get the following compiler warning when compiling with -Wshadow=local: In file included from ../../qemu/hw/display/virtio-gpu-vi

Re: [PATCH v4 10/15] vfio/ccw: Use vfio_[attach/detach]_device

2023-10-09 Thread Eric Auger
Hi Zhenzhong, On 10/9/23 03:25, Duan, Zhenzhong wrote: > >> -Original Message- >> From: Eric Auger >> Sent: Monday, October 9, 2023 1:46 AM >> Subject: Re: [PATCH v4 10/15] vfio/ccw: Use vfio_[attach/detach]_device >> >> Hi Zhenzhong, >> On 10/8/23 12:21, Duan, Zhenzhong wrote: >>> Hi Eri

Re: [PATCH] memory: follow Error API guidelines

2023-10-09 Thread Philippe Mathieu-Daudé
On 9/10/23 09:53, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Return true/false on success/failure. Signed-off-by: Marc-André Lureau --- include/hw/core/cpu.h | 4 +++- include/hw/core/sysemu-cpu-ops.h | 2 +- include/sysemu/memory_mapping.h | 2 +- targe

Re: [PATCH] memory: drop needless argument

2023-10-09 Thread Philippe Mathieu-Daudé
On 9/10/23 09:52, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau The argument is unused since commit bdc44640c ("cpu: Use QTAILQ for CPU list"). 10 years =) Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Marc-André Lureau --- softmmu/memory_mapping.c | 4 ++-- 1 file c

Re: [PATCH v7 05/15] python/qemu: rename command() to cmd()

2023-10-09 Thread Cédric Le Goater
On 10/6/23 17:41, Vladimir Sementsov-Ogievskiy wrote: Use a shorter name. We are going to move in iotests from qmp() to command() where possible. But command() is longer than qmp() and don't look better. Let's rename. You can simply grep for '\.command(' and for 'def command(' to check that ever

Re: [Virtio-fs] (no subject)

2023-10-09 Thread Hanna Czenczek
On 07.10.23 04:22, Yajun Wu wrote: On 10/6/2023 6:34 PM, Michael S. Tsirkin wrote: External email: Use caution opening links or attachments On Fri, Oct 06, 2023 at 11:47:55AM +0200, Hanna Czenczek wrote: On 06.10.23 11:26, Michael S. Tsirkin wrote: On Fri, Oct 06, 2023 at 11:15:55AM +0200,

Re: [PATCH RESEND 11/15] ppc: spapr: Implement nested PAPR hcall - H_GUEST_[GET|SET]_STATE

2023-10-09 Thread Harsh Prateek Bora
On 9/7/23 09:00, Nicholas Piggin wrote: On Wed Sep 6, 2023 at 2:33 PM AEST, Harsh Prateek Bora wrote: L1 can reuest to get/set state of any of the supported Guest State Buffer (GSB) elements using h_guest_[get|set]_state hcalls. These hcalls needs to do some necessary validation check for eac

RE: [PATCH v4 10/15] vfio/ccw: Use vfio_[attach/detach]_device

2023-10-09 Thread Duan, Zhenzhong
Hi Eric, >-Original Message- >From: qemu-devel-bounces+zhenzhong.duan=intel@nongnu.org devel-bounces+zhenzhong.duan=intel@nongnu.org> On Behalf Of Eric >Auger >Sent: Monday, October 9, 2023 4:15 PM >Subject: Re: [PATCH v4 10/15] vfio/ccw: Use vfio_[attach/detach]_device > >Hi Zhenz

Re: [PATCH 0/2] topic: meson: add more compiler hardening flags

2023-10-09 Thread Daniel P . Berrangé
On Mon, Oct 09, 2023 at 09:21:01AM +0200, Thomas Huth wrote: > On 05/10/2023 19.38, Daniel P. Berrangé wrote: > ... > > > > I also tested enabling -ftrapv, to change signed integer > > overflow from wrapping, to trapping instead. This exposed a > > bug in the string-input-visitor which overflows w

[PATCH v2] contrib/vhost-user-gpu: Fix compiler warning when compiling with -Wshadow

2023-10-09 Thread Thomas Huth
Rename some variables to avoid compiler warnings when compiling with -Wshadow=local. Signed-off-by: Thomas Huth --- v2: Renamed the variable to something more unique contrib/vhost-user-gpu/vugpu.h | 8 contrib/vhost-user-gpu/vhost-user-gpu.c | 6 +++--- 2 files changed, 7 ins

[PATCH v2] hw/virtio/virtio-gpu: Fix compiler warning when compiling with -Wshadow

2023-10-09 Thread Thomas Huth
Avoid using trivial variable names in macros, otherwise we get the following compiler warning when compiling with -Wshadow=local: In file included from ../../qemu/hw/display/virtio-gpu-virgl.c:19: ../../home/thuth/devel/qemu/hw/display/virtio-gpu-virgl.c: In function ‘virgl_cmd_submit_3d’: ../../

[PATCH RFC v4 2/9] target/loongarch: Define some kvm_arch interfaces

2023-10-09 Thread xianglai li
From: Tianrui Zhao Define some functions in target/loongarch/kvm.c, such as kvm_arch_put_registers, kvm_arch_get_registers and kvm_arch_handle_exit, etc. which are needed by kvm/kvm-all.c. Now the most functions has no content and they will be implemented in the next patches. Cc: "Michael S. Tsi

[PATCH RFC v4 6/9] target/loongarch: Implement kvm_arch_init_vcpu

2023-10-09 Thread xianglai li
From: Tianrui Zhao Implement kvm_arch_init_vcpu interface for loongarch, in this function, we register VM change state handler. And when VM state changes to running, the counter value should be put into kvm to keep consistent with kvm, and when state change to stop, counter value should be refres

[PATCH RFC v4 5/9] target/loongarch: Implement kvm_arch_init function

2023-10-09 Thread xianglai li
From: Tianrui Zhao Implement the kvm_arch_init of loongarch, in the function, the KVM_CAP_MP_STATE cap is checked by kvm ioctl. Cc: "Michael S. Tsirkin" Cc: Cornelia Huck Cc: Paolo Bonzini Cc: "Marc-André Lureau" Cc: "Daniel P. Berrangé" Cc: Thomas Huth Cc: "Philippe Mathieu-Daudé" Cc: Ri

[PATCH RFC v4 9/9] target/loongarch: Add loongarch kvm into meson build

2023-10-09 Thread xianglai li
From: Tianrui Zhao Add kvm.c and kvm-stub.c into meson.build to compile it when kvm is configed. Meanwhile in meson.build, we set the kvm_targets to loongarch64-softmmu when the cpu is loongarch. Cc: "Michael S. Tsirkin" Cc: Cornelia Huck Cc: Paolo Bonzini Cc: "Marc-André Lureau" Cc: "Daniel

[PATCH RFC v4 8/9] target/loongarch: Implement set vcpu intr for kvm

2023-10-09 Thread xianglai li
From: Tianrui Zhao Implement loongarch kvm set vcpu interrupt interface, when a irq is set in vcpu, we use the KVM_INTERRUPT ioctl to set intr into kvm. Cc: "Michael S. Tsirkin" Cc: Cornelia Huck Cc: Paolo Bonzini Cc: "Marc-André Lureau" Cc: "Daniel P. Berrangé" Cc: Thomas Huth Cc: "Philip

[PATCH RFC v4 4/9] target/loongarch: Implement kvm get/set registers

2023-10-09 Thread xianglai li
From: Tianrui Zhao Implement kvm_arch_get/set_registers interfaces, many regs can be get/set in the function, such as core regs, csr regs, fpu regs, mp state, etc. Cc: "Michael S. Tsirkin" Cc: Cornelia Huck Cc: Paolo Bonzini Cc: "Marc-André Lureau" Cc: "Daniel P. Berrangé" Cc: Thomas Huth

[PATCH RFC v4 3/9] target/loongarch: Supplement vcpu env initial when vcpu reset

2023-10-09 Thread xianglai li
From: Tianrui Zhao Supplement vcpu env initial when vcpu reset, including init vcpu CSR_CPUID,CSR_TID to cpu->cpu_index. The two regs will be used in kvm_get/set_csr_ioctl. Cc: "Michael S. Tsirkin" Cc: Cornelia Huck Cc: Paolo Bonzini Cc: "Marc-André Lureau" Cc: "Daniel P. Berrangé" Cc: Thom

[PATCH RFC v4 7/9] target/loongarch: Implement kvm_arch_handle_exit

2023-10-09 Thread xianglai li
From: Tianrui Zhao Implement kvm_arch_handle_exit for loongarch. In this function, the KVM_EXIT_LOONGARCH_IOCSR is handled, we read or write the iocsr address space by the addr, length and is_write argument in kvm_run. Cc: "Michael S. Tsirkin" Cc: Cornelia Huck Cc: Paolo Bonzini Cc: "Marc-And

[PATCH RFC v4 1/9] linux-headers: Add KVM headers for loongarch

2023-10-09 Thread xianglai li
From: Tianrui Zhao This patch is only a placeholder now, which is used to show some kvm structures and macros for reviewers. And it will be replaced by using update-linux-headers.sh when the linux loongarch kvm patches are accepted. Cc: "Michael S. Tsirkin" Cc: Cornelia Huck Cc: Paolo Bonzini

[PATCH RFC v4 0/9] Add loongarch kvm accel support

2023-10-09 Thread xianglai li
This series add loongarch kvm support, mainly implement some interfaces used by kvm such as kvm_arch_get/set_regs, kvm_arch_handle_exit, kvm_loongarch_set_interrupt, etc. Currently, we are able to boot LoongArch KVM Linux Guests. In loongarch VM, mmio devices and iocsr devices are emulated in user

Re: [PATCH 1/3] via-ide: Fix legacy mode emulation

2023-10-09 Thread Bernhard Beschow
Am 8. Oktober 2023 11:08:58 UTC schrieb BALATON Zoltan : >On Sun, 8 Oct 2023, Mark Cave-Ayland wrote: >> On 05/10/2023 23:13, BALATON Zoltan wrote: >> >>> The initial value for BARs were set in reset method for emulating >>> legacy mode at start but this does not work because PCI code resets >>> B

Re: [Virtio-fs] (no subject)

2023-10-09 Thread Hanna Czenczek
On 09.10.23 10:21, Hanna Czenczek wrote: On 07.10.23 04:22, Yajun Wu wrote: [...] The main motivation of adding VHOST_USER_SET_STATUS is to let backend DPDK know when DRIVER_OK bit is valid. It's an indication of all VQ configuration has sent, otherwise DPDK has to rely on first queue pair i

[PATCH] cpus: Remove unused smp_cores/smp_threads declarations

2023-10-09 Thread Philippe Mathieu-Daudé
Commit a5e0b33119 ("vl.c: Replace smp global variables with smp machine properties") removed the last uses of the smp_cores / smp_threads variables but forgot to remove their declarations. Do it now. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/cpus.h | 7 --- 1 file changed, 7 d

[PATCH v5 02/15] linux-headers: Add iommufd.h

2023-10-09 Thread Eric Auger
From: Zhenzhong Duan Since commit da3c22c74a3c ("linux-headers: Update to Linux v6.6-rc1"), linux-headers has been updated to v6.6-rc1. As previous patch added iommufd.h to update-linux-headers.sh, run the script again against TAG v6.6-rc1 to have iommufd.h included. Signed-off-by: Zhenzhong Du

[PATCH v5 00/15] Prerequisite changes for IOMMUFD support

2023-10-09 Thread Eric Auger
Hi All, This is the v5 respin of the IOMMUFD prerequisite series. This applies on top of vfio-next: https://github.com/legoater/qemu/, branch vfio-next. Per Cédric's suggestion, the IOMMUFD patchset v1[1] is now split into two series, this prerequisite series and the new IOMMUFD backend introduct

[PATCH v5 04/15] vfio/common: Propagate KVM_SET_DEVICE_ATTR error if any

2023-10-09 Thread Eric Auger
In the VFIO_SPAPR_TCE_v2_IOMMU container case, when KVM_SET_DEVICE_ATTR fails, we currently don't propagate the error as we do on the vfio_spapr_create_window() failure case. Let's align the code. Take the opportunity to reword the error message and make it more explicit. Signed-off-by: Eric Auger

[PATCH v5 08/15] vfio/platform: Use vfio_[attach/detach]_device

2023-10-09 Thread Eric Auger
Let the vfio-platform device use vfio_attach_device() and vfio_detach_device(), hence hiding the details of the used IOMMU backend. Drop the trace event for vfio-platform as we have similar one in vfio_attach_device. Signed-off-by: Eric Auger Signed-off-by: Yi Liu Signed-off-by: Zhenzhong Duan

[PATCH v5 03/15] vfio/common: Move IOMMU agnostic helpers to a separate file

2023-10-09 Thread Eric Auger
From: Yi Liu Move low-level iommu agnostic helpers to a separate helpers.c file. They relate to regions, interrupts, device/region capabilities and etc. Signed-off-by: Eric Auger Signed-off-by: Yi Sun Signed-off-by: Yi Liu Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater --- v3

[PATCH v5 05/15] vfio/common: Introduce vfio_container_add|del_section_window()

2023-10-09 Thread Eric Auger
Introduce helper functions that isolate the code used for VFIO_SPAPR_TCE_v2_IOMMU. Those helpers hide implementation details beneath the container object and make the vfio_listener_region_add/del() implementations more readable. No code change intended. Signed-off-by: Eric Auger Signed-off-by: Y

[PATCH v5 06/15] vfio/common: Extract out vfio_kvm_device_[add/del]_fd

2023-10-09 Thread Eric Auger
From: Zhenzhong Duan Introduce two new helpers, vfio_kvm_device_[add/del]_fd which take as input a file descriptor which can be either a group fd or a cdev fd. This uses the new KVM_DEV_VFIO_FILE VFIO KVM device group, which aliases to the legacy KVM_DEV_VFIO_GROUP. vfio_kvm_device_[add/del]_gro

[PATCH v5 01/15] scripts/update-linux-headers: Add iommufd.h

2023-10-09 Thread Eric Auger
Update the script to import iommufd.h Signed-off-by: Eric Auger Signed-off-by: Yi Liu Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater --- scripts/update-linux-headers.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/update-linux-headers.sh b/scripts

[PATCH v5 15/15] vfio/common: Move legacy VFIO backend code into separate container.c

2023-10-09 Thread Eric Auger
From: Yi Liu Move all the code really dependent on the legacy VFIO container/group into a separate file: container.c. What does remain in common.c is the code related to VFIOAddressSpace, MemoryListeners, migration and all other general operations. Signed-off-by: Eric Auger Signed-off-by: Yi Li

[PATCH v5 14/15] vfio/common: Introduce a global VFIODevice list

2023-10-09 Thread Eric Auger
From: Zhenzhong Duan Some functions iterate over all the VFIODevices. This is currently achieved by iterating over all groups/devices. Let's introduce a global list of VFIODevices simplifying that scan. This will also be useful while migrating to IOMMUFD by hiding the group specificity. Signed-

[PATCH v5 07/15] vfio/pci: Introduce vfio_[attach/detach]_device

2023-10-09 Thread Eric Auger
We want the VFIO devices to be able to use two different IOMMU backends, the legacy VFIO one and the new iommufd one. Introduce vfio_[attach/detach]_device which aim at hiding the underlying IOMMU backend (IOCTLs, datatypes, ...). Once vfio_attach_device completes, the device is attached to a sec

[PATCH v5 13/15] vfio/common: Store the parent container in VFIODevice

2023-10-09 Thread Eric Auger
From: Zhenzhong Duan let's store the parent contaienr within the VFIODevice. This simplifies the logic in vfio_viommu_preset() and brings the benefice to hide the group specificity which is useful for IOMMUFD migration. Signed-off-by: Eric Auger Signed-off-by: Zhenzhong Duan --- v4 -> v5: - r

[PATCH v5 12/15] vfio/common: Introduce a per container device list

2023-10-09 Thread Eric Auger
From: Zhenzhong Duan Several functions need to iterate over the VFIO devices attached to a given container. This is currently achieved by iterating over the groups attached to the container and then over the devices in the group. Let's introduce a per container device list that simplifies this s

Re: [Virtio-fs] (no subject)

2023-10-09 Thread Hanna Czenczek
On 09.10.23 11:07, Hanna Czenczek wrote: On 09.10.23 10:21, Hanna Czenczek wrote: On 07.10.23 04:22, Yajun Wu wrote: [...] The main motivation of adding VHOST_USER_SET_STATUS is to let backend DPDK know when DRIVER_OK bit is valid. It's an indication of all VQ configuration has sent, otherw

[PATCH v5 10/15] vfio/ccw: Use vfio_[attach/detach]_device

2023-10-09 Thread Eric Auger
Let the vfio-ccw device use vfio_attach_device() and vfio_detach_device(), hence hiding the details of the used IOMMU backend. Note that the migration reduces the following trace "vfio: subchannel %s has already been attached" (featuring cssid.ssid.devid) into "device is already attached" Also no

[PATCH v5 09/15] vfio/ap: Use vfio_[attach/detach]_device

2023-10-09 Thread Eric Auger
Let the vfio-ap device use vfio_attach_device() and vfio_detach_device(), hence hiding the details of the used IOMMU backend. We take the opportunity to use g_path_get_basename() which is prefered, as suggested by 3e015d815b ("use g_path_get_basename instead of basename") Signed-off-by: Eric Auge

[PATCH v5 11/15] vfio/common: Move VFIO reset handler registration to a group agnostic function

2023-10-09 Thread Eric Auger
From: Zhenzhong Duan Move the reset handler registration/unregistration to a place that is not group specific. vfio_[get/put]_address_space are the best places for that purpose. Signed-off-by: Eric Auger Signed-off-by: Yi Liu Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater --- h

[PATCH] buildsys: Only display Objective-C information when Objective-C is used

2023-10-09 Thread Philippe Mathieu-Daudé
When configuring with '--disable-cocoa --disable-coreaudio' on Darwin, we get: meson.build:4081:58: ERROR: Tried to access compiler for language "objc", not specified for host machine. meson.build:4097:47: ERROR: Tried to access unknown option 'objc_args'. Instead of unconditionally display Ob

Re: [PATCH] buildsys: Only display Objective-C information when Objective-C is used

2023-10-09 Thread Akihiko Odaki
On 2023/10/09 18:13, Philippe Mathieu-Daudé wrote: When configuring with '--disable-cocoa --disable-coreaudio' on Darwin, we get: meson.build:4081:58: ERROR: Tried to access compiler for language "objc", not specified for host machine. meson.build:4097:47: ERROR: Tried to access unknown opt

Re: [PATCH v4 2/4] qcow2: add configurations for zoned format extension

2023-10-09 Thread Sam Li
Hello Eric, Eric Blake 于2023年9月28日周四 23:15写道: > > On Mon, Sep 18, 2023 at 05:53:11PM +0800, Sam Li wrote: > > To configure the zoned format feature on the qcow2 driver, it > > requires settings as: the device size, zone model, zone size, > > zone capacity, number of conventional zones, limits on

[PATCH] hw/mips/malta: Use sdram_type enum from 'hw/i2c/smbus_eeprom.h'

2023-10-09 Thread Philippe Mathieu-Daudé
Since commit 93198b6cad ("i2c: Split smbus into parts") the SDRAM types are enumerated as sdram_type in "hw/i2c/smbus_eeprom.h". Using the enum removes this global shadow warning: hw/mips/malta.c:209:12: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] enum {

[PATCH] target/sparc: Clean up global variable shadowing

2023-10-09 Thread Philippe Mathieu-Daudé
Fix: target/sparc/translate.c:2823:66: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static void gen_load_trap_state_at_tl(TCGv_ptr r_tsptr, TCGv_env tcg_env) ^ include/tcg/tcg.h:579:17: note:

Re: [PATCH] memory: drop needless argument

2023-10-09 Thread David Hildenbrand
On 09.10.23 09:52, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau The argument is unused since commit bdc44640c ("cpu: Use QTAILQ for CPU list"). Signed-off-by: Marc-André Lureau --- Reviewed-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH] memory: follow Error API guidelines

2023-10-09 Thread David Hildenbrand
On 09.10.23 09:53, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Return true/false on success/failure. Signed-off-by: Marc-André Lureau --- Reviewed-by: David Hildenbrand -- Cheers, David / dhildenb

Re: [PATCH v2 03/21] preallocate: Don't poll during permission updates

2023-10-09 Thread Denis V. Lunev
On 10/6/23 20:10, Vladimir Sementsov-Ogievskiy wrote: On 06.10.23 11:56, Kevin Wolf wrote: Am 05.10.2023 um 21:55 hat Vladimir Sementsov-Ogievskiy geschrieben: On 11.09.23 12:46, Kevin Wolf wrote: When the permission related BlockDriver callbacks are called, we are in the middle of an operatio

Re: vIOMMU - PCI pass through to Layer 2 VMs (Nested Virtualization)

2023-10-09 Thread Eric Auger
Hi Markus, On 10/9/23 09:06, Markus Frank wrote: > Hello, > > I have already sent this email to qemu-discuss but I did not get a reply. > https://lists.nongnu.org/archive/html/qemu-discuss/2023-09/msg00034.html > Maybe someone here could help me and reply to this email or the one on > qemu-discus

[PATCH] system/vl: Use global &bdo_queue in configure_blockdev()

2023-10-09 Thread Philippe Mathieu-Daudé
Commit d11bf9bf0f ("vl: Factor configure_blockdev() out of main()") passed &bdo_queue as argument, but this isn't really necessary since there is only one call, so we still use the global variable. Dropping the &bdo_queue argument allows to silence this global shadow warning: softmmu/vl.c:678:5

[PATCH v2] buildsys: Only display Objective-C information when Objective-C is used

2023-10-09 Thread Philippe Mathieu-Daudé
When configuring with '--disable-cocoa --disable-coreaudio' on Darwin, we get: meson.build:4081:58: ERROR: Tried to access compiler for language "objc", not specified for host machine. meson.build:4097:47: ERROR: Tried to access unknown option 'objc_args'. Instead of unconditionally display Ob

Re: [PATCH v2] buildsys: Only display Objective-C information when Objective-C is used

2023-10-09 Thread Akihiko Odaki
On 2023/10/09 18:38, Philippe Mathieu-Daudé wrote: When configuring with '--disable-cocoa --disable-coreaudio' on Darwin, we get: meson.build:4081:58: ERROR: Tried to access compiler for language "objc", not specified for host machine. meson.build:4097:47: ERROR: Tried to access unknown opt

[PATCH v2 08/10] blockjob: query driver-specific info via a new 'query' driver method

2023-10-09 Thread Fiona Ebner
Signed-off-by: Fiona Ebner --- No changes in v2. blockjob.c | 4 include/block/blockjob_int.h | 5 + 2 files changed, 9 insertions(+) diff --git a/blockjob.c b/blockjob.c index f8cf6e58e2..7e8cfad0fd 100644 --- a/blockjob.c +++ b/blockjob.c @@ -376,6 +376,7 @@ BlockJ

[PATCH v2 06/10] qapi/block-core: use JobType for BlockJobInfo's type

2023-10-09 Thread Fiona Ebner
In preparation to turn BlockJobInfo into a union with @type as the discriminator. That requires it to be an enum. No functional change is intended. Signed-off-by: Fiona Ebner Reviewed-by: Vladimir Sementsov-Ogievskiy --- No changes in v2. block/monitor/block-hmp-cmds.c | 4 ++-- blockjob.c

[PATCH v2 07/10] qapi/block-core: turn BlockJobInfo into a union

2023-10-09 Thread Fiona Ebner
In preparation to additionally return job-type-specific information. Signed-off-by: Fiona Ebner Reviewed-by: Vladimir Sementsov-Ogievskiy --- No changes in v2. qapi/block-core.json | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-co

[PATCH v2 04/10] block/mirror: determine copy_to_target only once

2023-10-09 Thread Fiona Ebner
In preparation to allow changing the copy_mode via QMP. When running in an iothread, it could be that copy_mode is changed from the main thread in between reading copy_mode in bdrv_mirror_top_pwritev() and reading copy_mode in bdrv_mirror_top_do_write(), so they might end up disagreeing about wheth

[PATCH 1/6] hw/core/cpu: Clean up global variable shadowing

2023-10-09 Thread Philippe Mathieu-Daudé
Fix: hw/core/machine.c:1302:22: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] const CPUArchId *cpus = possible_cpus->cpus; ^ hw/core/numa.c:69:17: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] ui

[PATCH v2 00/10] mirror: allow switching from background to active mode

2023-10-09 Thread Fiona Ebner
Changes in v2: * move bitmap to filter which allows to avoid draining when changing the copy mode * add patch to determine copy_to_target only once * drop patches returning redundant information upon query * update QEMU version in QAPI * update indentation in QAPI * up

[PATCH v2 01/10] blockjob: introduce block-job-change QMP command

2023-10-09 Thread Fiona Ebner
which will allow changing job-type-specific options after job creation. In the JobVerbTable, the same allow bits as for set-speed are used, because set-speed can be considered an existing change command. Signed-off-by: Fiona Ebner --- Changes in v2: * update QEMU version in QAPI * fix t

[PATCH 6/6] hw/s390x: Clean up global variable shadowing in quiesce_powerdown_req()

2023-10-09 Thread Philippe Mathieu-Daudé
Fix: hw/s390x/sclpquiesce.c:90:22: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] QuiesceNotifier *qn = container_of(n, QuiesceNotifier, notifier); ^ hw/s390x/sclpquiesce.c:86:3: note: previous declaration is here } qn; ^ Signe

[PATCH v2 03/10] block/mirror: move dirty bitmap to filter

2023-10-09 Thread Fiona Ebner
In preparation to allow switching to active mode without draining. Initialization of the bitmap in mirror_dirty_init() still happens with the original/backing BlockDriverState, which should be fine, because the mirror top has the same length. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-

[PATCH 3/6] hw/display/vga: Clean up global variable shadowing

2023-10-09 Thread Philippe Mathieu-Daudé
Fix: hw/display/vga.c:2307:29: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] MemoryRegion *address_space_io, bool init_vga_ports) ^ include/exec/address-spaces.h:35:21: note: previous declaration is here extern Addre

[PATCH v2 10/10] iotests: adapt test output for new mirror query property

2023-10-09 Thread Fiona Ebner
Signed-off-by: Fiona Ebner --- New in v2. tests/qemu-iotests/109.out | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/qemu-iotests/109.out b/tests/qemu-iotests/109.out index 2611d6a40f..965c9a6a0a 100644 --- a/tests/qemu-iotests/109.out +++ b/

[PATCH 5/6] hw/pci: Clean up global variable shadowing of address_space_io variable

2023-10-09 Thread Philippe Mathieu-Daudé
Fix: hw/pci/pci.c:504:54: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] MemoryRegion *address_space_io, ^ hw/pci/pci.c:533:38: error: declaration shadows a variable i

[PATCH v2 09/10] mirror: return mirror-specific information upon query

2023-10-09 Thread Fiona Ebner
To start out, only actively-synced is returned. For example, this is useful for jobs that started out in background mode and switched to active mode. Once actively-synced is true, it's clear that the mode switch has been completed. Note that completion of the switch might happen much earlier, e.g.

[PATCH 0/6] hw: Clean up global variables shadowing

2023-10-09 Thread Philippe Mathieu-Daudé
Clean up global variables shadowing in hw/ in order to be able to use -Wshadow with Clang. Philippe Mathieu-Daudé (6): hw/core/cpu: Clean up global variable shadowing hw/loader: Clean up global variable shadowing in rom_add_file() hw/display/vga: Clean up global variable shadowing hw/acpi/

[PATCH 2/6] hw/loader: Clean up global variable shadowing in rom_add_file()

2023-10-09 Thread Philippe Mathieu-Daudé
Fix: hw/core/loader.c:1073:27: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] bool option_rom, MemoryRegion *mr, ^ include/sysemu/sysemu.h:57:22: note: previous declaration is here extern QEMUOptionRom option_r

[PATCH v2 05/10] mirror: implement mirror_change method

2023-10-09 Thread Fiona Ebner
which allows switching the @copy-mode from 'background' to 'write-blocking'. This is useful for management applications, so they can start out in background mode to avoid limiting guest write speed and switch to active mode when certain criteria are fulfilled. Signed-off-by: Fiona Ebner --- Cha

[PATCH 4/6] hw/acpi/pcihp: Clean up global variable shadowing in acpi_pcihp_init()

2023-10-09 Thread Philippe Mathieu-Daudé
Fix: hw/acpi/pcihp.c:499:36: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] MemoryRegion *address_space_io, ^ include/exec/address-spaces.h:35:21: note: previous declaration is here extern AddressSpace

[PATCH v2 02/10] block/mirror: set actively_synced even after the job is ready

2023-10-09 Thread Fiona Ebner
In preparation to allow switching from background to active mode. This ensures that setting actively_synced will not be missed when the switch happens after the job is ready. Signed-off-by: Fiona Ebner Reviewed-by: Vladimir Sementsov-Ogievskiy --- No changes in v2. block/mirror.c | 6 +++---

Re: [PATCH 6/6] hw/s390x: Clean up global variable shadowing in quiesce_powerdown_req()

2023-10-09 Thread Thomas Huth
On 09/10/2023 11.47, Philippe Mathieu-Daudé wrote: Fix: hw/s390x/sclpquiesce.c:90:22: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] QuiesceNotifier *qn = container_of(n, QuiesceNotifier, notifier); ^ hw/s390x/sclpquiesce.c:86:3

Re: [PATCH 6/6] hw/s390x: Clean up global variable shadowing in quiesce_powerdown_req()

2023-10-09 Thread David Hildenbrand
On 09.10.23 11:47, Philippe Mathieu-Daudé wrote: Fix: hw/s390x/sclpquiesce.c:90:22: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] QuiesceNotifier *qn = container_of(n, QuiesceNotifier, notifier); ^ hw/s390x/sclpquiesce.c:86:3:

Re: [PATCH v7 05/15] python/qemu: rename command() to cmd()

2023-10-09 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > Use a shorter name. We are going to move in iotests from qmp() to > command() where possible. But command() is longer than qmp() and don't > look better. Let's rename. I feel your pain O:-) > You can simply grep for '\.command(' and for 'def command(' to che

qemu-devel@nongnu.org

2023-10-09 Thread Alex Bennée
A lot of our vhost-user stubs are large chunks of boilerplate that do (mostly) the same thing. This series continues the cleanups by splitting the vhost-user-base and vhost-user-generic implementations. After adding a new vq_size property the rng, gpio and i2c vhost-user devices become simple speci

[PATCH v4 5/6] hw/virtio: add vhost-user-snd and virtio-snd-pci devices

2023-10-09 Thread Alex Bennée
From: Manos Pitsidianakis Tested with rust-vmm vhost-user-sound daemon: RUST_LOG=trace cargo run --bin vhost-user-sound -- --socket /tmp/snd.sock --backend null Invocation: qemu-system-x86_64 \ -qmp unix:./qmp-sock,server,wait=off \ -m 4096 \ -num

[PATCH v4 4/6] hw/virtio: derive vhost-user-i2c from vhost-user-base

2023-10-09 Thread Alex Bennée
Now we can take advantage of the new base class and make vhost-user-i2c a much simpler boilerplate wrapper. Also as this doesn't require any target specific hacks we only need to build the stubs once. Message-Id: <20230418162140.373219-13-alex.ben...@linaro.org> Acked-by: Mark Cave-Ayland Signed-

[PATCH v4 2/6] hw/virtio: derive vhost-user-rng from vhost-user-base

2023-10-09 Thread Alex Bennée
Now we can take advantage of our new base class and make vhost-user-rng a much simpler boilerplate wrapper. Also as this doesn't require any target specific hacks we only need to build the stubs once. Message-Id: <20230418162140.373219-10-alex.ben...@linaro.org> Acked-by: Mark Cave-Ayland Signed-

[PATCH v4 3/6] hw/virtio: derive vhost-user-gpio from vhost-user-base

2023-10-09 Thread Alex Bennée
Now the new base class supports config handling we can take advantage and make vhost-user-gpio a much simpler boilerplate wrapper. Also as this doesn't require any target specific hacks we only need to build the stubs once. Message-Id: <20230418162140.373219-12-alex.ben...@linaro.org> Signed-off-b

[PATCH v4 6/6] docs/system: add a basic enumeration of vhost-user devices

2023-10-09 Thread Alex Bennée
Make it clear the vhost-user-device is intended for expert use only. Signed-off-by: Alex Bennée --- v2 - make clear vhost-user-device for expert use --- docs/system/devices/vhost-user-rng.rst | 2 ++ docs/system/devices/vhost-user.rst | 41 ++ 2 files changed, 43

[PATCH v4 1/6] virtio: split into vhost-user-base and vhost-user-device

2023-10-09 Thread Alex Bennée
Lets keep a cleaner split between the base class and the derived vhost-user-device which we can use for generic vhost-user stubs. This includes an update to introduce the vq_size property so the number of entries in a virtq can be defined. Signed-off-by: Alex Bennée --- v1 - merge and re-base,

[PATCH 01/10] system/qtest: Clean up global variable shadowing in qtest_server_init()

2023-10-09 Thread Philippe Mathieu-Daudé
Rename the variable to fix: softmmu/qtest.c:869:13: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] Object *qtest; ^ softmmu/qtest.c:53:15: note: previous declaration is here static QTest *qtest; ^ Signed-off-by: Philippe Mat

[PATCH 09/10] tests/aio-multithread: Clean up global variable shadowing

2023-10-09 Thread Philippe Mathieu-Daudé
Rename the argument to avoid: tests/unit/test-aio-multithread.c:226:37: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static void test_multi_co_mutex(int threads, int seconds) ^ tests/unit/test-aio-multithread.c:401:34: er

[PATCH 02/10] tests/throttle: Clean up global variable shadowing

2023-10-09 Thread Philippe Mathieu-Daudé
Follow all other tests pattern from this file, use the global 'cfg' variable to fix: tests/unit/test-throttle.c:621:20: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] ThrottleConfig cfg; ^ tests/unit/test-throttle.c:28:23: note: previou

  1   2   3   4   >