[PATCH 08/10] tests/aio: Clean up global variable shadowing

2023-10-09 Thread Philippe Mathieu-Daudé
Rename the argument to fix: tests/unit/test-aio.c:130:44: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static void set_event_notifier(AioContext *ctx, EventNotifier *notifier, ^ tests/unit/test-aio.c:22:20: note: p

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

2023-10-09 Thread Philippe Mathieu-Daudé
Rename the global variable to avoid: tests/unit/test-coroutine.c:430:11: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] bool *done = opaque; ^ tests/unit/test-coroutine.c:438:10: error: declaration shadows a variable in the global scope [-Werro

[PATCH 06/10] tests/rtl8139: Clean up global variable shadowing

2023-10-09 Thread Philippe Mathieu-Daudé
Rename the variable to fix: tests/qtest/rtl8139-test.c:28:33: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static void save_fn(QPCIDevice *dev, int devfn, void *data) ^ tests/qtest/rtl8139-test.c:37:17: error: declaration sha

[PATCH 05/10] tests/hd-geo-test: Clean up global variable shadowing

2023-10-09 Thread Philippe Mathieu-Daudé
Rename the variable to fix: tests/qtest/hd-geo-test.c:610:11: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] char *img_file_name; ^ tests/qtest/hd-geo-test.c:80:14: note: previous declaration is here static char *img_file_name[backend_last];

[PATCH 00/10] tests: Clean up global variables shadowing

2023-10-09 Thread Philippe Mathieu-Daudé
Clean up global variables shadowing in tests/ in order to be able to use -Wshadow with Clang. Philippe Mathieu-Daudé (10): system/qtest: Clean up global variable shadowing in qtest_server_init() tests/throttle: Clean up global variable shadowing tests/virtio-scsi: Clean up global variabl

[PATCH 07/10] tests/npcm7xx_adc: Clean up global variable shadowing

2023-10-09 Thread Philippe Mathieu-Daudé
Rename the global 'adc' variable in order to avoid: tests/qtest/npcm7xx_adc-test.c:98:58: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static uint32_t adc_read_con(QTestState *qts, const ADC *adc) ^ t

[PATCH 03/10] tests/virtio-scsi: Clean up global variable shadowing

2023-10-09 Thread Philippe Mathieu-Daudé
Rename the (unused) 'allow' argument, following the pattern used by the other tests in this file. This fixes: tests/qtest/virtio-scsi-test.c:159:61: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static void hotplug(void *obj, void *data, QGuestAllocator *alloc)

[PATCH 04/10] tests/cdrom-test: Clean up global variable shadowing in prepare_image()

2023-10-09 Thread Philippe Mathieu-Daudé
Rename the variable to fix: tests/qtest/cdrom-test.c:40:50: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static int prepare_image(const char *arch, char *isoimage) ^ tests/qtest/cdrom-test.c:18:13: note: prev

Re: [PATCH 05/10] tests/hd-geo-test: Clean up global variable shadowing

2023-10-09 Thread Philippe Mathieu-Daudé
On 9/10/23 12:02, Philippe Mathieu-Daudé wrote: Rename the variable to fix: tests/qtest/hd-geo-test.c:610:11: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] char *img_file_name; ^ tests/qtest/hd-geo-test.c:80:14: note: previous declaration

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

2023-10-09 Thread Alberto Garcia
On Mon 09 Oct 2023 12:02:43 PM +02, Philippe Mathieu-Daudé wrote: > 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

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

2023-10-09 Thread Thomas Huth
On 09/10/2023 09.44, Thomas Huth wrote: 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 init

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

2023-10-09 Thread Laszlo Ersek
On 10/9/23 08:32, marcandre.lur...@redhat.com wrote: > 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

Re: [PATCH v2] target/riscv: Use a direct cast for better performance

2023-10-09 Thread Philippe Mathieu-Daudé
Hi Richard, On 8/10/23 23:50, Richard W.M. Jones wrote: RISCV_CPU(cs) uses a checked cast. When QOM cast debugging is enabled this adds about 5% total overhead when emulating RV64 on x86-64 host. Using a RISC-V guest with 16 vCPUs, 16 GB of guest RAM, virtio-blk disk. The guest has a copy of

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

2023-10-09 Thread Markus Frank
Hi Eric, thanks for the quick answer. On 10/9/23 11:29, Eric Auger wrote: 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 h

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

2023-10-09 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > 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 gl

Re: [Virtio-fs] (no subject)

2023-10-09 Thread German Maglione
On Sat, Oct 7, 2023 at 4:23 AM 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 F

[PATCH] memory: initialize 'fv' in MemoryRegionCache to make Coverity happy

2023-10-09 Thread Ilya Maximets
Coverity scan reports multiple false-positive "defects" for the following series of actions in virtio.c: MemoryRegionCache indirect_desc_cache; address_space_cache_init_empty(&indirect_desc_cache); address_space_cache_destroy(&indirect_desc_cache); For some reason it's unable to recognize t

Re: [PATCH 0/7] audio: redo default audio backend creation

2023-10-09 Thread Marc-André Lureau
On Thu, Oct 5, 2023 at 5:01 PM Paolo Bonzini wrote: > > Currently, AUD_register_card picks the audio backend from either: > > - the first audiodev that was created > > - the audio_prio_list[] array, which can be customized at > configure time > > This series instead extends -audio to define a de

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

2023-10-09 Thread Viresh Kumar
On 09-10-23, 10:59, Alex Bennée wrote: > 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: <2023041816

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

2023-10-09 Thread Viresh Kumar
On 09-10-23, 10:59, Alex Bennée wrote: > 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

[PATCH 4/6] target/xtensa: Use env_archcpu() in update_c[compare|count]()

2023-10-09 Thread Philippe Mathieu-Daudé
When CPUArchState* is available (here CPUXtensaState*), we can use the fast env_archcpu() macro to get ArchCPU* (here XtensaCPU*). The QOM cast XTENSA_CPU() macro will be slower when building with --enable-qom-cast-debug. Signed-off-by: Philippe Mathieu-Daudé --- target/xtensa/op_helper.c | 4 ++

[PATCH 3/6] target/s390x: Use env_archcpu() in handle_diag_308()

2023-10-09 Thread Philippe Mathieu-Daudé
When CPUArchState* is available (here CPUS390XState*), we can use the fast env_archcpu() macro to get ArchCPU* (here S390CPU*). The QOM cast S390_CPU() macro will be slower when building with --enable-qom-cast-debug. Signed-off-by: Philippe Mathieu-Daudé --- target/s390x/diag.c | 2 +- 1 file ch

[PATCH 0/6] target: Use env_archcpu() instead of ARCH_CPU(env_cpu(env))

2023-10-09 Thread Philippe Mathieu-Daudé
When we have a CPUArchState* pointer we can directly get the corresponding ArchCPU* pointer with env_archcpu(). No need to use QOM cast which is slower due when building with --enable-qom-cast-debug. This series replace ARCH_CPU(env_cpu(env)) by env_archcpu(env) when possible. Philippe Mathieu-Da

[PATCH 6/6] target/i386: Use env_archcpu() in simulate_[rdmsr/wrmsr]()

2023-10-09 Thread Philippe Mathieu-Daudé
When CPUArchState* is available (here CPUX86State*), we can use the fast env_archcpu() macro to get ArchCPU* (here X86CPU*). The QOM cast X86_CPU() macro will be slower when building with --enable-qom-cast-debug. Pass CPUX86State* as argument to simulate_rdmsr / simulate_wrmsr instead of a CPUStat

[PATCH 2/6] target/riscv: Use env_archcpu() in [check_]nanbox()

2023-10-09 Thread Philippe Mathieu-Daudé
When CPUArchState* is available (here CPURISCVState*), we can use the fast env_archcpu() macro to get ArchCPU* (here RISCVCPU*). The QOM cast RISCV_CPU() macro will be slower when building with --enable-qom-cast-debug. Inspired-by: Richard W.M. Jones Signed-off-by: Philippe Mathieu-Daudé --- ta

[PATCH 5/6] target/i386/hvf: Use x86_cpu in simulate_[rdmsr|wrmsr]()

2023-10-09 Thread Philippe Mathieu-Daudé
We already have 'x86_cpu = X86_CPU(cpu)'. Use the variable instead of doing another QOM cast with X86_CPU(). Signed-off-by: Philippe Mathieu-Daudé --- target/i386/hvf/x86_emu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386/hvf/x86_emu.c b/target/i386/hvf/x86

[PATCH] qapi: Belatedly update CompatPolicy documentation for unstable

2023-10-09 Thread Markus Armbruster
Commit 57df0dff1a1 (qapi: Extend -compat to set policy for unstable interfaces) neglected to update the "Limitation" paragraph to mention feature 'unstable' in addition to feature 'deprecated'. Do that now. Signed-off-by: Markus Armbruster --- qapi/compat.json | 4 ++-- 1 file changed, 2 insert

[PATCH 1/6] target/ppc: Use env_archcpu() in helper_book3s_msgsndp()

2023-10-09 Thread Philippe Mathieu-Daudé
When CPUArchState* is available (here CPUPPCState*), we can use the fast env_archcpu() macro to get ArchCPU* (here PowerPCCPU*). The QOM cast POWERPC_CPU() macro will be slower when building with --enable-qom-cast-debug. Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/excp_helper.c | 2 +-

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

2023-10-09 Thread Daniel P . Berrangé
On Mon, Oct 09, 2023 at 12:15:17PM +0200, Thomas Huth wrote: > On 09/10/2023 09.44, Thomas Huth wrote: > > 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 fr

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

2023-10-09 Thread Daniel Henrique Barboza
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 lower-case letters. We want all properties to be named with lower-case letters sin

[PATCH v2 0/1] riscv: deprecate capital 'Z' CPU properties

2023-10-09 Thread Daniel Henrique Barboza
Hi, This second version of the patch fixes a 'with with' typo in the deprecated.rst document. No other changes made. Patch already acked. Changes from v1: - remove 'with with' from docs/about/deprecated.rst - v1 link: https://lore.kernel.org/qemu-riscv/20231007171427.1210117-1-dbarb...@ventanam

[PATCH V3 00/10] Add architecture agnostic code to support vCPU Hotplug

2023-10-09 Thread Salil Mehta via
Virtual CPU hotplug support is being added across various architectures[1][3]. This series adds various code bits common across all architectures: 1. vCPU creation and Parking code refactor [Patch 1] 2. Update ACPI GED framework to support vCPU Hotplug [Patch 4,6,7] 3. ACPI CPUs AML code change [P

[PATCH V3 01/10] accel/kvm: Extract common KVM vCPU {creation, parking} code

2023-10-09 Thread Salil Mehta via
KVM vCPU creation is done once during the initialization of the VM when Qemu thread is spawned. This is common to all the architectures. Hot-unplug of vCPU results in destruction of the vCPU object in QOM but the corresponding KVM vCPU object in the Host KVM is not destroyed and its representative

[PATCH V3 03/10] hw/acpi: Add ACPI CPU hotplug init stub

2023-10-09 Thread Salil Mehta via
ACPI CPU hotplug related initialization should only happen if ACPI_CPU_HOTPLUG support has been enabled for particular architecture. Add cpu_hotplug_hw_init() stub to avoid compilation break. Signed-off-by: Salil Mehta Reviewed-by: Jonathan Cameron Reviewed-by: Gavin Shan --- hw/acpi/acpi-cpu-

[PATCH V3 06/10] hw/acpi: Update GED _EVT method AML with CPU scan

2023-10-09 Thread Salil Mehta via
OSPM evaluates _EVT method to map the event. The CPU hotplug event eventually results in start of the CPU scan. Scan figures out the CPU and the kind of event(plug/unplug) and notifies it back to the guest. Update the GED AML _EVT method with the call to \\_SB.CPUS.CSCN Also, macro CPU_SCAN_METHOD

[PATCH V3 05/10] hw/acpi: Update CPUs AML with cpu-(ctrl)dev change

2023-10-09 Thread Salil Mehta via
CPUs Control device(\\_SB.PCI0) register interface for the x86 arch is based on PCI and is IO port based and hence existing CPUs AML code assumes _CRS objects would evaluate to a system resource which describes IO Port address. But on ARM arch CPUs control device(\\_SB.PRES) register interface is m

[PATCH V3 02/10] hw/acpi: Move CPU ctrl-dev MMIO region len macro to common header file

2023-10-09 Thread Salil Mehta via
CPU ctrl-dev MMIO region length could be used in ACPI GED and various other architecture specific places. Move ACPI_CPU_HOTPLUG_REG_LEN macro to more appropriate common header file. Signed-off-by: Salil Mehta Reviewed-by: Alex Bennée Reviewed-by: Jonathan Cameron Reviewed-by: Gavin Shan --- h

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

2023-10-09 Thread Daniel Henrique Barboza
On 10/8/23 22:39, Alistair Francis wrote: On Sun, Oct 8, 2023 at 3:15 AM 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 othe

[PATCH V3 08/10] physmem: Add helper function to destroy CPU AddressSpace

2023-10-09 Thread Salil Mehta via
Virtual CPU Hot-unplug leads to unrealization of a CPU object. This also involves destruction of the CPU AddressSpace. Add common function to help destroy the CPU AddressSpace. Signed-off-by: Salil Mehta --- include/exec/cpu-common.h | 8 include/hw/core/cpu.h | 1 + softmmu/physm

Re: [PATCH] qapi: Belatedly update CompatPolicy documentation for unstable

2023-10-09 Thread Philippe Mathieu-Daudé
On 9/10/23 13:04, Markus Armbruster wrote: Commit 57df0dff1a1 (qapi: Extend -compat to set policy for unstable interfaces) neglected to update the "Limitation" paragraph to mention With retrospective, 'experimental' seems more meaningful. Anyway, too late. feature 'unstable' in addition to f

[PATCH V3 04/10] hw/acpi: Init GED framework with cpu hotplug events

2023-10-09 Thread Salil Mehta via
ACPI GED(as described in the ACPI 6.2 spec) can be used to generate ACPI events when OSPM/guest receives an interrupt listed in the _CRS object of GED. OSPM then maps or demultiplexes the event by evaluating _EVT method. This change adds the support of cpu hotplug event initialization in the exist

[PATCH V3 09/10] gdbstub: Add helper function to unregister GDB register space

2023-10-09 Thread Salil Mehta via
Add common function to help unregister the GDB Register Space. This shall be done in context to the CPU unrealization. Signed-off-by: Salil Mehta --- gdbstub/gdbstub.c | 15 +++ include/exec/gdbstub.h | 5 + 2 files changed, 20 insertions(+) diff --git a/gdbstub/gdbstub.c

[PATCH V3 07/10] hw/acpi: Update ACPI GED framework to support vCPU Hotplug

2023-10-09 Thread Salil Mehta via
ACPI GED shall be used to convey to the guest kernel about any CPU hot-(un)plug events. Therefore, existing ACPI GED framework inside QEMU needs to be enhanced to support CPU hotplug state and events. Co-developed-by: Keqian Zhu Signed-off-by: Keqian Zhu Signed-off-by: Salil Mehta Reviewed-by:

[PATCH V3 10/10] target/arm/kvm: Write CPU state back to KVM on reset

2023-10-09 Thread Salil Mehta via
From: Jean-Philippe Brucker When a KVM vCPU is reset following a PSCI CPU_ON call, its power state is not synchronized with KVM at the moment. Because the vCPU is not marked dirty, we miss the call to kvm_arch_put_registers() that writes to KVM's MP_STATE. Force mp_state synchronization. Signed-

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

2023-10-09 Thread Markus Armbruster
Thomas Huth writes: > On 29/09/2023 17.06, Bernhard Beschow wrote: >> Am 21. September 2023 23:44:42 UTC schrieb Gurchetan Singh >> : >>> On Tue, Sep 19, 2023 at 3:07 PM Akihiko Odaki >>> wrote: >>> On 2023/09/20 3:36, Bernhard Beschow wrote: > > > Am 15. September 2023 02:38:0

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

2023-10-09 Thread BALATON Zoltan
On Mon, 9 Oct 2023, Bernhard Beschow wrote: 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

Re: [PATCH 2/6] target/riscv: Use env_archcpu() in [check_]nanbox()

2023-10-09 Thread Daniel Henrique Barboza
On 10/9/23 08:02, Philippe Mathieu-Daudé wrote: When CPUArchState* is available (here CPURISCVState*), we can use the fast env_archcpu() macro to get ArchCPU* (here RISCVCPU*). The QOM cast RISCV_CPU() macro will be slower when building with --enable-qom-cast-debug. Inspired-by: Richard W.M.

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

2023-10-09 Thread Michael S. Tsirkin
On Mon, Oct 09, 2023 at 10:37:25AM +0200, Thomas Huth wrote: > 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 ---

Re: [PATCH] qapi: Belatedly update CompatPolicy documentation for unstable

2023-10-09 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 9/10/23 13:04, Markus Armbruster wrote: >> Commit 57df0dff1a1 (qapi: Extend -compat to set policy for unstable >> interfaces) neglected to update the "Limitation" paragraph to mention > > With retrospective, 'experimental' seems more meaningful. Anyway, > too

Re: [PATCH 1/6] target/ppc: Use env_archcpu() in helper_book3s_msgsndp()

2023-10-09 Thread Daniel Henrique Barboza
On 10/9/23 08:02, Philippe Mathieu-Daudé wrote: When CPUArchState* is available (here CPUPPCState*), we can use the fast env_archcpu() macro to get ArchCPU* (here PowerPCCPU*). The QOM cast POWERPC_CPU() macro will be slower when building with --enable-qom-cast-debug. Signed-off-by: Philippe

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

2023-10-09 Thread Philippe Mathieu-Daudé
On 9/10/23 12:26, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: 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_que

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

2023-10-09 Thread BALATON Zoltan
On Mon, 9 Oct 2023, Philippe Mathieu-Daudé wrote: 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. T

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

2023-10-09 Thread Eric Auger
Hi, On 10/9/23 12:25, Markus Frank wrote: > Hi Eric, > > thanks for the quick answer. > > On 10/9/23 11:29, Eric Auger wrote: >> 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://list

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

2023-10-09 Thread Ani Sinha
> On 09-Oct-2023, at 3:17 PM, Philippe Mathieu-Daudé wrote: > > Fix: > > hw/acpi/pcihp.c:499:36: error: declaration shadows a variable in the global > scope [-Werror,-Wshadow] > MemoryRegion *address_space_io, > ^ > include/exec/add

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

2023-10-09 Thread Thomas Huth
On 09/10/2023 13.45, Michael S. Tsirkin wrote: On Mon, Oct 09, 2023 at 10:37:25AM +0200, Thomas Huth wrote: 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-u

Re: [PATCH] memory: initialize 'fv' in MemoryRegionCache to make Coverity happy

2023-10-09 Thread David Hildenbrand
On 09.10.23 12:43, Ilya Maximets wrote: Coverity scan reports multiple false-positive "defects" for the following series of actions in virtio.c: MemoryRegionCache indirect_desc_cache; address_space_cache_init_empty(&indirect_desc_cache); address_space_cache_destroy(&indirect_desc_cache)

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

Re: [PATCH V3 01/10] accel/kvm: Extract common KVM vCPU {creation,parking} code

2023-10-09 Thread David Hildenbrand
On 09.10.23 13:28, Salil Mehta wrote: KVM vCPU creation is done once during the initialization of the VM when Qemu thread is spawned. This is common to all the architectures. Hot-unplug of vCPU results in destruction of the vCPU object in QOM but the corresponding KVM vCPU object in the Host KVM

Re: [PATCH V3 02/10] hw/acpi: Move CPU ctrl-dev MMIO region len macro to common header file

2023-10-09 Thread David Hildenbrand
On 09.10.23 13:28, Salil Mehta wrote: CPU ctrl-dev MMIO region length could be used in ACPI GED and various other architecture specific places. Move ACPI_CPU_HOTPLUG_REG_LEN macro to more appropriate common header file. Signed-off-by: Salil Mehta Reviewed-by: Alex Bennée Reviewed-by: Jonathan

Re: [PATCH V3 03/10] hw/acpi: Add ACPI CPU hotplug init stub

2023-10-09 Thread David Hildenbrand
On 09.10.23 13:28, Salil Mehta wrote: ACPI CPU hotplug related initialization should only happen if ACPI_CPU_HOTPLUG support has been enabled for particular architecture. Add cpu_hotplug_hw_init() stub to avoid compilation break. Signed-off-by: Salil Mehta Reviewed-by: Jonathan Cameron Reviewe

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

2023-10-09 Thread Ani Sinha
> On 09-Oct-2023, at 3:17 PM, Philippe Mathieu-Daudé wrote: > > 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/sysem

Re: [PATCH v3 3/4] migration/qapi: Replace @MigrateSetParameters with @MigrationParameters

2023-10-09 Thread Markus Armbruster
I apologize for the late reply. Peter Xu writes: > On Tue, Sep 26, 2023 at 10:40:27PM +0200, Markus Armbruster wrote: >> Peter Xu writes: >> >> > Quotting from Markus in his replies: >> >> Quoting >> >> Suggest something like "Markus recently wrote:" > > Will do. > >> >> > migrate-set-par

Re: [PATCH V3 04/10] hw/acpi: Init GED framework with cpu hotplug events

2023-10-09 Thread David Hildenbrand
On 09.10.23 13:28, Salil Mehta wrote: ACPI GED(as described in the ACPI 6.2 spec) can be used to generate ACPI events when OSPM/guest receives an interrupt listed in the _CRS object of GED. OSPM then maps or demultiplexes the event by evaluating _EVT method. This change adds the support of cpu h

Re: [PATCH v2 1/3] qom: new object to associate device to numa node

2023-10-09 Thread Jonathan Cameron via
On Sun, 8 Oct 2023 01:47:38 +0530 wrote: > From: Ankit Agrawal > > The CPU cache coherent device memory can be added as NUMA nodes > distinct from the system memory nodes. These nodes are associated > with the device and Qemu needs a way to maintain this link. Hi Ankit, I'm not sure I'm convi

Re: [PATCH v2 3/3] qom: Link multiple numa nodes to device using a new object

2023-10-09 Thread Jonathan Cameron via
On Sun, 8 Oct 2023 01:47:40 +0530 wrote: > From: Ankit Agrawal > > NVIDIA GPU's support MIG (Mult-Instance GPUs) feature [1], which allows > partitioning of the GPU device resources (including device memory) into > several (upto 8) isolated instances. Each of the partitioned memory needs > a de

Re: [PATCH v2] target/riscv: Use a direct cast for better performance

2023-10-09 Thread LIU Zhiwei
On 2023/10/9 5:50, Richard W.M. Jones wrote: RISCV_CPU(cs) uses a checked cast. When QOM cast debugging is enabled this adds about 5% total overhead when emulating RV64 on x86-64 host. Using a RISC-V guest with 16 vCPUs, 16 GB of guest RAM, virtio-blk disk. The guest has a copy of the qemu s

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

2023-10-09 Thread Markus Armbruster
Thomas Huth writes: > On 09/10/2023 13.45, Michael S. Tsirkin wrote: >> On Mon, Oct 09, 2023 at 10:37:25AM +0200, Thomas Huth wrote: >>> Rename some variables to avoid compiler warnings when compiling >>> with -Wshadow=local. >>> >>> Signed-off-by: Thomas Huth >>> --- >>> v2: Renamed the varia

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

2023-10-09 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 9/10/23 12:26, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >> >>> 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 sti

Re: [PATCH 2/6] target/riscv: Use env_archcpu() in [check_]nanbox()

2023-10-09 Thread LIU Zhiwei
On 2023/10/9 19:02, Philippe Mathieu-Daudé wrote: When CPUArchState* is available (here CPURISCVState*), we can use the fast env_archcpu() macro to get ArchCPU* (here RISCVCPU*). The QOM cast RISCV_CPU() macro will be slower when building with --enable-qom-cast-debug. Inspired-by: Richard W.M.

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

2023-10-09 Thread BALATON Zoltan
On Mon, 9 Oct 2023, Philippe Mathieu-Daudé wrote: 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

[PATCH v3] target/riscv: Use env_archcpu for better performance

2023-10-09 Thread Richard W.M. Jones
In v3: - Use env_archcpu - Rerun the benchmark to get new "after" figures Rich.

[PATCH v3] target/riscv: Use env_archcpu for better performance

2023-10-09 Thread Richard W.M. Jones
RISCV_CPU(cs) uses a checked cast. When QOM cast debugging is enabled this adds about 5% total overhead when emulating RV64 on x86-64 host. Using a RISC-V guest with 16 vCPUs, 16 GB of guest RAM, virtio-blk disk. The guest has a copy of the qemu source tree. The test involves compiling the qemu

Re: [PATCH v2] target/riscv: Use a direct cast for better performance

2023-10-09 Thread Richard W.M. Jones
On Mon, Oct 09, 2023 at 08:36:28PM +0800, LIU Zhiwei wrote: > > On 2023/10/9 5:50, Richard W.M. Jones wrote: > >RISCV_CPU(cs) uses a checked cast. When QOM cast debugging is enabled > >this adds about 5% total overhead when emulating RV64 on x86-64 host. > > > >Using a RISC-V guest with 16 vCPUs,

Re: [PATCH 2/6] target/riscv: Use env_archcpu() in [check_]nanbox()

2023-10-09 Thread Richard W.M. Jones
On Mon, Oct 09, 2023 at 01:02:35PM +0200, Philippe Mathieu-Daudé wrote: > When CPUArchState* is available (here CPURISCVState*), we > can use the fast env_archcpu() macro to get ArchCPU* (here > RISCVCPU*). The QOM cast RISCV_CPU() macro will be slower > when building with --enable-qom-cast-debug.

Re: [PATCH v2 3/3] qom: Link multiple numa nodes to device using a new object

2023-10-09 Thread David Hildenbrand
On 09.10.23 14:30, Jonathan Cameron wrote: On Sun, 8 Oct 2023 01:47:40 +0530 wrote: From: Ankit Agrawal NVIDIA GPU's support MIG (Mult-Instance GPUs) feature [1], which allows partitioning of the GPU device resources (including device memory) into several (upto 8) isolated instances. Each of

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

2023-10-09 Thread Cédric Le Goater
On 10/9/23 11:09, Eric Auger wrote: 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

Re: [PATCH v2] target/riscv: Use a direct cast for better performance

2023-10-09 Thread LIU Zhiwei
On 2023/10/9 20:53, Richard W.M. Jones wrote: On Mon, Oct 09, 2023 at 08:36:28PM +0800, LIU Zhiwei wrote: On 2023/10/9 5:50, Richard W.M. Jones wrote: RISCV_CPU(cs) uses a checked cast. When QOM cast debugging is enabled this adds about 5% total overhead when emulating RV64 on x86-64 host.

[PULL 1/2] migration/calc-dirty-rate: millisecond-granularity period

2023-10-09 Thread Hyman Huang
From: Andrei Gudkov via This patch allows to measure dirty page rate for sub-second intervals of time. An optional argument is introduced -- calc-time-unit. For example: {"execute": "calc-dirty-rate", "arguments": {"calc-time": 500, "calc-time-unit": "millisecond"} } Millisecond granularity al

[PULL 0/2] Dirty page rate and dirty page limit 20231009 patches

2023-10-09 Thread Hyman Huang
dirtylimit-dirtyrate-pull-request-20231009 for you to fetch changes up to 84719f6d0b75448400068adb78d85000e884f0cd: migration/dirtyrate: use QEMU_CLOCK_HOST to report start-time (2023-10-08 15:06:12 +0800) Dirtylimit and dirtyrat

[PULL 2/2] migration/dirtyrate: use QEMU_CLOCK_HOST to report start-time

2023-10-09 Thread Hyman Huang
From: Andrei Gudkov via Currently query-dirty-rate uses QEMU_CLOCK_REALTIME as the source for start-time field. This translates to clock_gettime(CLOCK_MONOTONIC), i.e. number of seconds since host boot. This is not very useful. The only reasonable use case of start-time I can imagine is to check

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. Applied on vfio-next. Thanks, C.

Re: [PATCH v4 01/15] hw/pci: Add a pci_setup_iommu_ops() helper

2023-10-09 Thread Cédric Le Goater
On 10/6/23 19:59, Joao Martins wrote: On 06/10/2023 18:09, Cédric Le Goater wrote: Getting acks from everyone will be difficultsince some PHBs are orphans. [...] This is what gets me a bit hesitant orphans shouldn't be an issue, nor the PPC emulated machines. We will see what other maintaine

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

2023-10-09 Thread BALATON Zoltan
On Mon, 9 Oct 2023, Bernhard Beschow wrote: 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

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

2023-10-09 Thread Manos Pitsidianakis
On Mon, 09 Oct 2023 12:59, Alex Bennée wrote: diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build index 51c3f97c2d..d0b963199c 100644 --- a/hw/virtio/meson.build +++ b/hw/virtio/meson.build @@ -18,8 +18,15 @@ if have_vhost # fixme - this really should be generic specific_virtio_ss

Re: [PATCH v11 10/10] migration: modify test_multifd_tcp_none() to use new QAPI syntax.

2023-10-09 Thread Het Gala
On 10/4/2023 8:55 PM, Fabiano Rosas wrote: Het Gala writes: modify multifd tcp common test to incorporate the new QAPI syntax defined. Suggested-by: Aravind Retnakaran Signed-off-by: Het Gala Reviewed-by: Daniel P. Berrangé --- tests/qtest/migration-test.c | 7 ++- 1 file changed, 6 i

Re: [PATCH v11 00/10] migration: Modify 'migrate' and 'migrate-incoming' QAPI commands for migration

2023-10-09 Thread Het Gala
On 10/4/2023 9:02 PM, Fabiano Rosas wrote: Fabiano Rosas writes: Het Gala writes: On 04/10/23 7:03 pm, Fabiano Rosas wrote: Het Gala writes: This is v11 patchset of modified 'migrate' and 'migrate-incoming' QAPI design for upstream review. Update: Daniel has reviewed all patches and i

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

2023-10-09 Thread Eric Auger
On 10/9/23 14:58, Cédric Le Goater wrote: > On 10/9/23 11:09, Eric Auger wrote: >> 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 patch

RE: [PATCH V3 01/10] accel/kvm: Extract common KVM vCPU {creation,parking} code

2023-10-09 Thread Salil Mehta via
Hi David, Thanks for the review. > From: David Hildenbrand > Sent: Monday, October 9, 2023 1:21 PM > To: Salil Mehta ; qemu-devel@nongnu.org; > qemu-...@nongnu.org > Cc: m...@kernel.org; jean-phili...@linaro.org; Jonathan Cameron > ; lpieral...@kernel.org; > peter.mayd...@linaro.org; richard.hen

RE: [PATCH V3 02/10] hw/acpi: Move CPU ctrl-dev MMIO region len macro to common header file

2023-10-09 Thread Salil Mehta via
> From: David Hildenbrand > Sent: Monday, October 9, 2023 1:22 PM > To: Salil Mehta ; qemu-devel@nongnu.org; qemu- > a...@nongnu.org > Cc: m...@kernel.org; jean-phili...@linaro.org; Jonathan Cameron > ; lpieral...@kernel.org; > peter.mayd...@linaro.org; richard.hender...@linaro.org; > imamm...@red

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

2023-10-09 Thread Manos Pitsidianakis
On Mon, 09 Oct 2023 12:59, Alex Bennée wrote: diff --git a/docs/system/devices/vhost-user.rst b/docs/system/devices/vhost-user.rst index a80e95a48a..0f9eec3f00 100644 --- a/docs/system/devices/vhost-user.rst +++ b/docs/system/devices/vhost-user.rst @@ -15,6 +15,47 @@ to the guest. The code is m

Re: [PULL 0/2] Dirty page rate and dirty page limit 20231009 patches

2023-10-09 Thread Philippe Mathieu-Daudé
ository at: https://github.com/newfriday/qemu.git tags/dirtylimit-dirtyrate-pull-request-20231009 for you to fetch changes up to 84719f6d0b75448400068adb78d85000e884f0cd: migration/dirtyrate: use QEMU_CLOCK_HOST to report start-time (2023-10-08 15:0

Re: [PATCH v3] target/riscv: Use env_archcpu for better performance

2023-10-09 Thread Philippe Mathieu-Daudé
On 9/10/23 14:48, Richard W.M. Jones wrote: RISCV_CPU(cs) uses a checked cast. When QOM cast debugging is enabled this adds about 5% total overhead when emulating RV64 on x86-64 host. Using a RISC-V guest with 16 vCPUs, 16 GB of guest RAM, virtio-blk disk. The guest has a copy of the qemu sour

RE: [PATCH V3 03/10] hw/acpi: Add ACPI CPU hotplug init stub

2023-10-09 Thread Salil Mehta via
> From: David Hildenbrand > Sent: Monday, October 9, 2023 1:23 PM > To: Salil Mehta ; qemu-devel@nongnu.org; qemu- > a...@nongnu.org > Cc: m...@kernel.org; jean-phili...@linaro.org; Jonathan Cameron > ; lpieral...@kernel.org; > peter.mayd...@linaro.org; richard.hender...@linaro.org; > imamm...@red

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

2023-10-09 Thread Alex Bennée
Manos Pitsidianakis writes: > On Mon, 09 Oct 2023 12:59, Alex Bennée wrote: >>diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build >>index 51c3f97c2d..d0b963199c 100644 >>--- a/hw/virtio/meson.build >>+++ b/hw/virtio/meson.build >>@@ -18,8 +18,15 @@ if have_vhost >> # fixme - this re

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

2023-10-09 Thread Cédric Le Goater
On 10/9/23 15:38, Eric Auger wrote: On 10/9/23 14:58, Cédric Le Goater wrote: On 10/9/23 11:09, Eric Auger wrote: 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,

Re: [PATCH v2 1/1] tests/avocado: update firmware to enable OpenBSD test on sbsa-ref

2023-10-09 Thread Alex Bennée
Marcin Juszkiewicz writes: > Update prebuilt firmware images: > - Neoverse V1/N2 cpu support > - non-secure EL2 virtual timer > - XHCI controller in DSDT > > With those changes we can now run OpenBSD as part of sbsa-ref tests. > > Signed-off-by: Marcin Juszkiewicz Queued to maintainer/october

Re: [PATCH V3 03/10] hw/acpi: Add ACPI CPU hotplug init stub

2023-10-09 Thread David Hildenbrand
On 09.10.23 15:49, Salil Mehta wrote: From: David Hildenbrand Sent: Monday, October 9, 2023 1:23 PM To: Salil Mehta ; qemu-devel@nongnu.org; qemu- a...@nongnu.org Cc: m...@kernel.org; jean-phili...@linaro.org; Jonathan Cameron ; lpieral...@kernel.org; peter.mayd...@linaro.org; richard.hender...@

Re: [PATCH V3 01/10] accel/kvm: Extract common KVM vCPU {creation,parking} code

2023-10-09 Thread David Hildenbrand
On 09.10.23 15:42, Salil Mehta wrote: Hi David, Thanks for the review. From: David Hildenbrand Sent: Monday, October 9, 2023 1:21 PM To: Salil Mehta ; qemu-devel@nongnu.org; qemu-...@nongnu.org Cc: m...@kernel.org; jean-phili...@linaro.org; Jonathan Cameron ; lpieral...@kernel.org; peter.mayd

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

2023-10-09 Thread Ani Sinha
> On 09-Oct-2023, at 3:17 PM, Philippe Mathieu-Daudé wrote: > > 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/e

RE: [PATCH V3 04/10] hw/acpi: Init GED framework with cpu hotplug events

2023-10-09 Thread Salil Mehta via
> From: David Hildenbrand > Sent: Monday, October 9, 2023 1:27 PM > To: Salil Mehta ; qemu-devel@nongnu.org; qemu- > a...@nongnu.org > Cc: m...@kernel.org; jean-phili...@linaro.org; Jonathan Cameron > ; lpieral...@kernel.org; > peter.mayd...@linaro.org; richard.hender...@linaro.org; > imamm...@red

<    1   2   3   4   >