[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:

[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 {

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

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

[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

[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 ---

[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

[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

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,

[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

[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: -

[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.

[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

[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

[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

[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.

[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:

[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 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 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

[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

[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

[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

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

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 >>>

[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

[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:

[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 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:

[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 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:

[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:

[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:

[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

[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.

[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 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

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

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

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

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 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

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

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 +-

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

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

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,

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

[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

[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

[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

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

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

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

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 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.

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

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)

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: > >

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

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] scripts/xml-preprocess: Make sure this script is invoked via the right Python

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

RE: [PATCH 0/3] vfio: memory leak fix and code cleanup

2023-10-09 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Monday, October 9, 2023 2:32 PM >Subject: Re: [PATCH 0/3] vfio: memory leak fix and code cleanup > >On 10/9/23 04:20, Zhenzhong Duan wrote: >> Hi, >> >> This trivial patchset fixes a incremental memory leak in rare case, >> and some

[PULL 2/6] vfio/pci: rename vfio_put_device to vfio_pci_put_device

2023-10-09 Thread Cédric Le Goater
From: Zhenzhong Duan vfio_put_device() is a VFIO PCI specific function, rename it with 'vfio_pci' prefix to avoid confusing. No functional change. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Signed-off-by: Cédric Le Goater --- hw/vfio/pci.c | 4 ++-- 1 file changed, 2

[PULL 3/6] vfio/pci: detect the support of dynamic MSI-X allocation

2023-10-09 Thread Cédric Le Goater
From: Jing Liu Kernel provides the guidance of dynamic MSI-X allocation support of passthrough device, by clearing the VFIO_IRQ_INFO_NORESIZE flag to guide user space. Fetch the flags from host to determine if dynamic MSI-X allocation is supported. Originally-by: Reinette Chatre

[PULL 5/6] vfio/pci: use an invalid fd to enable MSI-X

2023-10-09 Thread Cédric Le Goater
From: Jing Liu Guests typically enable MSI-X with all of the vectors masked in the MSI-X vector table. To match the guest state of device, QEMU enables MSI-X by enabling vector 0 with userspace triggering and immediately release. However the release function actually does not release it due to

[PULL 4/6] vfio/pci: enable vector on dynamic MSI-X allocation

2023-10-09 Thread Cédric Le Goater
From: Jing Liu The vector_use callback is used to enable vector that is unmasked in guest. The kernel used to only support static MSI-X allocation. When allocating a new interrupt using "static MSI-X allocation" kernels, QEMU first disables all previously allocated vectors and then re-allocates

[PULL 6/6] vfio/pci: enable MSI-X in interrupt restoring on dynamic allocation

2023-10-09 Thread Cédric Le Goater
From: Jing Liu During migration restoring, vfio_enable_vectors() is called to restore enabling MSI-X interrupts for assigned devices. It sets the range from 0 to nr_vectors to kernel to enable MSI-X and the vectors unmasked in guest. During the MSI-X enabling, all the vectors within the range

[PULL 1/6] vfio/display: Fix missing update to set backing fields

2023-10-09 Thread Cédric Le Goater
From: Alex Williamson The below referenced commit renames scanout_width/height to backing_width/height, but also promotes these fields in various portions of the egl interface. Meanwhile vfio dmabuf support has never used the previous scanout fields and is therefore missed in the update. This

[PULL v2 0/6] vfio queue

2023-10-09 Thread Cédric Le Goater
-20231009 for you to fetch changes up to eaadba6f9b14823e52ee154d0052d69907deee8a: vfio/pci: enable MSI-X in interrupt restoring on dynamic allocation (2023-10-05 22:04:51 +0200) vfio queue: * Fix for VFIO display when using Intel

Re: [PULL 00/21] vfio queue

2023-10-09 Thread Cédric Le Goater
On 10/6/23 12:33, Cédric Le Goater wrote: On 10/6/23 08:19, Cédric Le Goater wrote: The following changes since commit 2f3913f4b2ad74baeb5a6f1d36efbd9ecdf1057d:    Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2023-10-05 09:01:01 -0400) are

Re: [PATCH v2 3/3] target/hexagon: avoid shadowing globals

2023-10-09 Thread Philippe Mathieu-Daudé
On 9/10/23 08:09, Philippe Mathieu-Daudé wrote: Hi Brian, On 6/10/23 00:22, Brian Cain wrote: The typedef `vaddr` is shadowed by `vaddr` identifiers, so we rename the identifiers to avoid shadowing the type name. This one surprises me, since we have other occurences:

[PULL v2 00/25] Audio, source reorg, HVF changes for 2023-10-06

2023-10-09 Thread Paolo Bonzini
The following changes since commit 2f3913f4b2ad74baeb5a6f1d36efbd9ecdf1057d: Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2023-10-05 09:01:01 -0400) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream

[PULL 16/25] system: Rename softmmu/ directory as system/

2023-10-09 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The softmmu/ directory contains files specific to system emulation. Rename it as system/. Update meson rules, the MAINTAINERS file and all the documentation and comments. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20231004090629.37473-14-phi...@linaro.org>

[PULL 09/25] tcg: Correct invalid mentions of 'softmmu' by 'system-mode'

2023-10-09 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20231004090629.37473-6-phi...@linaro.org> Signed-off-by: Paolo Bonzini --- accel/tcg/user-exec.c | 2 +- docs/devel/testing.rst | 2 +- include/qemu/atomic128.h

[PATCH v5 3/3] hw/vfio: add ramfb migration support

2023-10-09 Thread marcandre . lureau
From: Marc-André Lureau Add a "VFIODisplay" subsection whenever "x-ramfb-migrate" is turned on. Turn it off by default on machines <= 8.1 for compatibility reasons. Signed-off-by: Marc-André Lureau Reviewed-by: Laszlo Ersek --- hw/vfio/pci.h | 3 +++ hw/core/machine.c | 1 +

[PATCH v5 1/3] ramfb: add migration support

2023-10-09 Thread marcandre . lureau
From: Marc-André Lureau Implementing RAMFB migration is quite straightforward. One caveat is to treat the whole RAMFBCfg as a blob, since that's what is exposed to the guest directly. This avoid having to fiddle with endianness issues if we were to migrate fields individually as integers. The

[PATCH v5 2/3] ramfb-standalone: add migration support

2023-10-09 Thread marcandre . lureau
From: Marc-André Lureau Add a "ramfb-dev" section whenever "x-migrate" is turned on. Turn it off by default on machines <= 8.1 for compatibility reasons. Signed-off-by: Marc-André Lureau Reviewed-by: Laszlo Ersek --- hw/core/machine.c | 1 + hw/display/ramfb-standalone.c | 27

[PATCH v5 0/3] ramfb: migration support

2023-10-09 Thread marcandre . lureau
From: Marc-André Lureau Hi, Implement RAMFB migration, and add properties to enable it only on >= 8.2 machines, + a few related cleanups. thanks v5: - add missing VMSTATE_END_OF_LIST - changed ramfb=off & x-mig=on user config error to a warning - add r-b tags v4: (Laszlo review and

Re: [PATCH 0/3] vfio: memory leak fix and code cleanup

2023-10-09 Thread Cédric Le Goater
On 10/9/23 04:20, Zhenzhong Duan wrote: Hi, This trivial patchset fixes a incremental memory leak in rare case, and some cleanup on ap/ccw. This patchset is based on vfio-next. Will this apply on the future v5 of Eric ? Thanks, C. Thanks Zhenzhong Zhenzhong Duan (3): vfio/pci: Fix

Re: [PATCH 3/3] vfio/ccw: Remove redundant definition of TYPE_VFIO_CCW

2023-10-09 Thread Philippe Mathieu-Daudé
On 9/10/23 04:20, Zhenzhong Duan wrote: No functional changes. Signed-off-by: Zhenzhong Duan --- include/hw/s390x/vfio-ccw.h | 2 -- 1 file changed, 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 2/3] vfio/ap: Remove pointless apdev variable

2023-10-09 Thread Philippe Mathieu-Daudé
On 9/10/23 04:20, Zhenzhong Duan wrote: No need to double-cast, call VFIO_AP_DEVICE() on DeviceState. No functional changes. Signed-off-by: Zhenzhong Duan --- hw/vfio/ap.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

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

2023-10-09 Thread Markus Armbruster
Warner Losh writes: > 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 >> >> code needlessly hard to understand. Bugs

Re: [PATCH 3/3] hw/ppc: Add emulation of AmigaOne XE board

2023-10-09 Thread Philippe Mathieu-Daudé
Hi Zoltan, On 6/10/23 00:13, BALATON Zoltan wrote: The AmigaOne is a rebranded MAI Teron board that uses U-Boot firmware with patches to support AmigaOS and is very similar to pegasos2 so can be easily emulated sharing most code with pegasos2. The reason to emulate it is that AmigaOS comes in

Re: [PATCH v3 0/3] hexagon: GETPC() fixes, shadowing fixes

2023-10-09 Thread Markus Armbruster
I applied this series to my shadow-next in my public Git repository at https://repo.or.cz/qemu/armbru.git. I don't intend to include it in pull requests, because it does more than just fix -Wshadow issues. Don't think that'll be a problem. Thanks!

Re: [PATCH v3 2/3] target/hexagon: fix some occurrences of -Wshadow=local

2023-10-09 Thread Philippe Mathieu-Daudé
On 9/10/23 00:09, Brian Cain wrote: Of the changes in this commit, the changes in `HELPER(commit_hvx_stores)()` are less obvious. They are required because of some macro invocations like SCATTER_OP_WRITE_TO_MEM(). e.g.: In file included from ../target/hexagon/op_helper.c:31:

Re: [PATCH v3 1/3] target/hexagon: move GETPC() calls to top level helpers

2023-10-09 Thread Philippe Mathieu-Daudé
On 9/10/23 00:09, Brian Cain wrote: From: Matheus Tavares Bernardino As docs/devel/loads-stores.rst states: ``GETPC()`` should be used with great care: calling it in other functions that are *not* the top level ``HELPER(foo)`` will cause unexpected behavior. Instead, the value of

Re: [PATCH v2 3/3] target/hexagon: avoid shadowing globals

2023-10-09 Thread Philippe Mathieu-Daudé
Hi Brian, On 6/10/23 00:22, Brian Cain wrote: The typedef `vaddr` is shadowed by `vaddr` identifiers, so we rename the identifiers to avoid shadowing the type name. This one surprises me, since we have other occurences: include/exec/memory.h:751:bool memory_get_xlat_addr(IOMMUTLBEntry

Re: [PATCH] hw/virtio/vhost: Silence compiler warnings in vhost code when using -Wshadow

2023-10-09 Thread Markus Armbruster
Michael Tokarev writes: > 06.10.2023 14:24, Michael S. Tsirkin: >> On Fri, Oct 06, 2023 at 01:45:51PM +0300, Michael Tokarev wrote: >>> 06.10.2023 11:55, Markus Armbruster пишет: Michael Tokarev writes: > Applied to my trivial-patches tree, thanks! > > Marcus, you picked

<    1   2   3   4