[PATCH v2 4/8] hw/intc/loongarch_pch: Rename LoongArchPCHPIC with LoongArchPICCommonState

2024-09-17 Thread Bibo Mao
With pic vmstate, rename structure name vmstate_loongarch_pch_pic with vmstate_loongarch_pic_common, and with pic property rename loongarch_pch_pic_properties with loongarch_pic_common_properties. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c | 52 +++--

[PATCH v2 2/8] include: Move struct LoongArchPCHPIC to loongarch_pic_common header file

2024-09-17 Thread Bibo Mao
Move structure LoongArchPCHPIC from header file loongarch_pch_pic.h to file loongarch_pic_common.h, and rename structure name with LoongArchPICCommonState. Signed-off-by: Bibo Mao --- include/hw/intc/loongarch_pch_pic.h| 27 + include/hw/intc/loongarch_pic_common.h |

[PATCH v2 5/8] hw/intc/loongarch_pch: Move some functions to file loongarch_pic_common

2024-09-17 Thread Bibo Mao
Move some common functions to file loongarch_pic_common.c, the common functions include loongarch_pic_common_realize(), property structure loongarch_pic_common_properties and vmstate structure vmstate_loongarch_pic_common. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c| 37 +

[PATCH v2 7/8] hw/intc/loongarch_pch: Add pre_save and post_load interfaces

2024-09-17 Thread Bibo Mao
Add vmstate pre_save and post_load interfaces, which can be used by pic kvm driver in future. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pic_common.c | 26 ++ include/hw/intc/loongarch_pic_common.h | 2 ++ 2 files changed, 28 insertions(+) diff --git a/hw/int

[PATCH v2 6/8] hw/intc/loongarch_pch: Inherit from loongarch_pic_common

2024-09-17 Thread Bibo Mao
Set TYPE_LOONGARCH_PIC inherit from TYPE_LOONGARCH_PIC_COMMON object, it shares vmsate and property of TYPE_LOONGARCH_PIC_COMMON, and has its own realize() function. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c| 38 -- hw/intc/loongarch_pic_common.c

[PATCH v2 1/8] include: Add loongarch_pic_common header file

2024-09-17 Thread Bibo Mao
Add common header file hw/intc/loongarch_pic_common.h, and move some macro definition from hw/intc/loongarch_pch_pic.h to the common header file. Signed-off-by: Bibo Mao --- include/hw/intc/loongarch_pch_pic.h| 36 +++--- include/hw/intc/loongarch_pic_common.h | 42 ++

[PATCH v2 8/8] hw/intc/loongarch_pch: Code cleanup about loongarch_pch_pic

2024-09-17 Thread Bibo Mao
Remove definition about LoongArchPCHPIC and LOONGARCH_PCH_PIC, and replace them with LoongArchPICCommonState and LOONGARCH_PIC_COMMON separately. Also remove unnecessary header files. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c | 24 ++-- hw/loongarch/virt

[PATCH v2 0/8] hw/intc/loongarch_pch: Split into pic common and pic

2024-09-17 Thread Bibo Mao
In order to support irqchip_in_kenrel method, split loongarch pch pic driver into two parts, pic common and pic TCG driver. LoongArch pic common driver includes vmstate and property interface, also vmstate load and store interface is defined in pic common driver. In future LoongArch pic kvm driver

[PATCH v2 3/8] hw/intc/loongarch_pch: Merge instance_init() into realize()

2024-09-17 Thread Bibo Mao
Memory region is created in instance_init(), merge it into function realize(). There is no special class_init() for loongarch_pch object. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/hw/intc/loongarch

[PATCH v3] memory: notify hypervisor of all eventfds during listener (de)registration

2024-09-17 Thread Ani Sinha
When a new listener for an address space is registered, the hypervisor must be informed of all existing eventfds for that address space by calling eventfd_add() for that listener. Similarly, when a listener is de-registered from an address space, the hypervisor must be informed of all existing even

Re: [PATCH v2] memory: notify hypervisor of all eventfds during listener (de)registration

2024-09-17 Thread Ani Sinha
> On 18 Sep 2024, at 12:28 AM, Peter Xu wrote: > > Hi, Ani, > > On Tue, Sep 10, 2024 at 05:31:00PM +0530, Ani Sinha wrote: >> When a new listener for an address space is registered, the hypervisor must >> be >> informed of all existing eventfds for that address space by calling >> eventfd_ad

Re: [PATCH 1/1] target/riscv: enable floating point unit

2024-09-17 Thread Andrew Jones
On Tue, Sep 17, 2024 at 06:45:21PM GMT, Heinrich Schuchardt wrote: ... > When thinking about the migration of virtual machines shouldn't QEMU be in > control of the initial state of vcpus instead of KVM? > Thinking about this more, I'm inclined to agree. Initial state and reset state should be tra

Re: [PATCH 2/3] migration: Remove unused zero-blocks capability

2024-09-17 Thread Markus Armbruster
d...@treblig.org writes: > From: "Dr. David Alan Gilbert" > > migrate_zero_blocks is unused since > eef0bae3a7 ("migration: Remove block migration") > > Remove it. > That whole zero-blocks capability was just for old-school > block migration anyway. > > Remove the capability as well. > > Signed

Re: [PULL 3/6] migration/multifd: Fix loop conditions in multifd_zstd_send_prepare and multifd_zstd_recv

2024-09-17 Thread Stefan Weil via
Am 17.09.24 um 23:55 schrieb Peter Xu: From: Stefan Weil via How can I avoid that my author name/email is changed so often? Will this be fixed automatically before the commit is merged? Stefan

Re: [PATCH 0/1] plugins: add API to read guest CPU memory from hwaddr

2024-09-17 Thread Rowan Hart
> > See: > > tests/tcg/i386/system/boot.S > tests/tcg/alpha/system/boot.S > tests/tcg/loongarch64/system/boot.S > tests/tcg/aarch64/system/boot.S > tests/tcg/x86_64/system/boot.S > tests/tcg/arm/system/boot.S > > for what is needed (basically a MMU-enabled flat memory map and some >

Re: [PATCH v4 02/12] tcg/riscv: Add basic support for vector

2024-09-17 Thread LIU Zhiwei
On 2024/9/12 2:41, Richard Henderson wrote: On 9/11/24 06:26, LIU Zhiwei wrote: From: Swung0x48 The RISC-V vector instruction set utilizes the LMUL field to group multiple registers, enabling variable-length vector registers. This implementation uses only the first register number of each gro

Re: [PATCH v4 01/12] util: Add RISC-V vector extension probe in cpuinfo

2024-09-17 Thread LIU Zhiwei
On 2024/9/12 2:34, Richard Henderson wrote: On 9/11/24 06:26, LIU Zhiwei wrote: While the compiler doesn't support RISCV_HWPROBE_EXT_ZVE64X, we use RISCV_HWPROBE_IMA_V instead. Language is incorrect here.  The compiler has nothing to do with it. Perhaps "If the installed kernel header files

Re: [PATCH v2 2/2] net: move backend cleanup to NIC cleanup

2024-09-17 Thread Si-Wei Liu
On 9/12/2024 9:54 AM, Eugenio Pérez wrote: Commit a0d7215e33 ("vhost-vdpa: do not cleanup the vdpa/vhost-net structures if peer nic is present") effectively delayed the backend cleanup, allowing the frontend or the guest to access it resources as long as the frontend is still visible to the gu

[PATCH v3 0/2] Add FDT table support with acpi ged pm register

2024-09-17 Thread Bibo Mao
ACPI ged is used for power management on LoongArch virt platform, in general it is parsed from acpi table. However if system boot directly from elf kernel, no UEFI bios is provided and acpi table cannot be used also. Here acpi ged pm register is exposed with FDT table, it is compatbile with syscon

[PATCH v3 1/2] acpi: ged: Add macro for acpi sleep control register

2024-09-17 Thread Bibo Mao
Macro definition is added for acpi sleep control register, ged emulation driver can use the macro , also it can be used in FDT table if ged is exposed with FDT table. Signed-off-by: Bibo Mao --- hw/acpi/generic_event_device.c | 6 +++--- include/hw/acpi/generic_event_device.h | 7 +--

[PATCH v3 2/2] hw/loongarch/virt: Add FDT table support with acpi ged pm register

2024-09-17 Thread Bibo Mao
ACPI ged is used for power management on LoongArch virt platform, in general it is parsed from acpi table. However if system boot directly from elf kernel, no UEFI bios is provided and acpi table cannot be used also. Here acpi ged pm register is exposed with FDT table, it is compatbile with syscon

Re: [PATCH v2 1/2] acpi: ged: Add macro for acpi sleep control register

2024-09-17 Thread maobibo
On 2024/9/17 下午3:44, Igor Mammedov wrote: On Sat, 14 Sep 2024 10:25:45 +0800 maobibo wrote: On 2024/9/13 下午8:41, Igor Mammedov wrote: On Wed, 11 Sep 2024 11:09:21 +0800 Bibo Mao wrote: Macro definition is added for acpi sleep control register, so that ged emulation driver can use thi

[PATCH] q35: Remove unused mch_mcfg_base

2024-09-17 Thread dave
From: "Dr. David Alan Gilbert" mch_mcfg_base has been unused since it was added by 6f1426ab0f ("ich9: APIs for pc guest info") back in 2013. Remove it. Signed-off-by: Dr. David Alan Gilbert --- hw/pci-host/q35.c | 10 -- include/hw/pci-host/q35.h | 2 -- 2 files changed, 12

[PATCH] envlist: Remove unused envlist_parse

2024-09-17 Thread dave
From: "Dr. David Alan Gilbert" envlist_parse, envlist_parse_set, envlist_parse_unset were added in 2009 but never used, see: 04a6dfebb6 ("linux-user: Add generic env variable handling") Remove them. Signed-off-by: Dr. David Alan Gilbert --- include/qemu/envlist.h | 2 -- util/envlist.c

[PATCH 3/3] migration: Remove unused socket_send_channel_create_sync

2024-09-17 Thread dave
From: "Dr. David Alan Gilbert" socket_send_channel_create_sync only use was removed by d0edb8a173 ("migration: Create the postcopy preempt channel asynchronously") Remove it. Signed-off-by: Dr. David Alan Gilbert --- migration/socket.c | 18 -- migration/socket.h | 1 - 2 f

[PATCH 1/3] migration: Remove migrate_cap_set

2024-09-17 Thread dave
From: "Dr. David Alan Gilbert" migrate_cap_set has been unused since 18d154f575 ("migration: Remove 'blk/-b' option from migrate commands") Remove it. Signed-off-by: Dr. David Alan Gilbert --- migration/options.c | 20 migration/options.h | 1 - 2 files changed, 21 del

[PATCH 2/3] migration: Remove unused zero-blocks capability

2024-09-17 Thread dave
From: "Dr. David Alan Gilbert" migrate_zero_blocks is unused since eef0bae3a7 ("migration: Remove block migration") Remove it. That whole zero-blocks capability was just for old-school block migration anyway. Remove the capability as well. Signed-off-by: Dr. David Alan Gilbert --- migratio

[PATCH 0/3] Migration deadcode removal

2024-09-17 Thread dave
From: "Dr. David Alan Gilbert" Hi, This is a set of deadcode removal around migration found by looking for unused symbols. Note this does remove the old zero-blocks capability, but it's been meaningless anyway since block migration went. Dave Dr. David Alan Gilbert (3): migration: Remove

Re: [PATCH] hw: fix memory leak in IRQState allocation

2024-09-17 Thread Brian Cain
On 9/17/2024 1:47 PM, Matheus Tavares Bernardino wrote: At e72a7f65c1 (hw: Move declaration of IRQState to header and add init function, 2024-06-29), we've changed qemu_allocate_irq() to use a combination of g_new() + object_initialize() instead of IRQ(object_new()). The latter sets obj->free,

Re: [PATCH] hw: fix memory leak in IRQState allocation

2024-09-17 Thread BALATON Zoltan
On Tue, 17 Sep 2024, Matheus Tavares Bernardino wrote: At e72a7f65c1 (hw: Move declaration of IRQState to header and add init function, 2024-06-29), we've changed qemu_allocate_irq() to use a combination of g_new() + object_initialize() instead of IRQ(object_new()). The latter sets obj->free, so

[PULL 3/6] migration/multifd: Fix loop conditions in multifd_zstd_send_prepare and multifd_zstd_recv

2024-09-17 Thread Peter Xu
From: Stefan Weil via GitHub's CodeQL reports four critical errors which are fixed by this commit: Unsigned difference expression compared to zero An expression (u - v > 0) with unsigned values u, v is only false if u == v, so all changed expressions did not work as expected. Signed-off-by

[PULL 4/6] softmmu/physmem.c: Keep transaction attribute in address_space_map()

2024-09-17 Thread Peter Xu
From: "Fea.Wang" The follow-up transactions may use the data in the attribution, so keep the value of attribution from the function parameter just as flatview_translate() above. Signed-off-by: Fea.Wang Cc: qemu-sta...@nongnu.org Fixes: f26404fbee ("Make address_space_map() take a MemTxAttrs arg

[PULL 5/6] migration/savevm: Remove extra load cleanup calls

2024-09-17 Thread Peter Xu
From: Fabiano Rosas There are two qemu_loadvm_state_cleanup() calls that were introduced when qemu_loadvm_state_setup() was still called before loading the configuration section, so there was state to be cleaned up if the header checks failed. However, commit 9e14b84908 ("migration/savevm: load_

[PULL 6/6] migration/multifd: Fix rb->receivedmap cleanup race

2024-09-17 Thread Peter Xu
From: Fabiano Rosas Fix a segmentation fault in multifd when rb->receivedmap is cleared too early. After commit 5ef7e26bdb ("migration/multifd: solve zero page causing multiple page faults"), multifd started using the rb->receivedmap bitmap, which belongs to ram.c and is initialized and *freed*

[PULL 2/6] migration/multifd: Fix build for qatzip

2024-09-17 Thread Peter Xu
The qatzip series was based on an older commit, it applied cleanly even though it has conflicts. Neither CI nor myself found the build will break as it's skipped by default when qatzip library was missing. Fix the build issues. No need to copy stable as it just landed 9.2. Cc: Yichen Wang Cc:

[PULL 1/6] tests/qtest/migration: Move a couple of slow tests under g_test_slow

2024-09-17 Thread Peter Xu
From: Fabiano Rosas The xbzrel and vcpu_dirty_limit are the two slowest tests from migration-test. Move them under g_test_slow() to save about 40s per run. Signed-off-by: Fabiano Rosas Link: https://lore.kernel.org/r/20240911145204.17692-1-faro...@suse.de Signed-off-by: Peter Xu --- tests/qte

[PULL 0/6] Migration 20240917 patches

2024-09-17 Thread Peter Xu
The following changes since commit 2b81c046252fbfb375ad30632362fc16e6e22bd5: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2024-09-17 14:02:18 +0100) are available in the Git repository at: https://gitlab.com/peterx/qemu.git tags/migration-202

Re: [PULL 14/18] virtio-pci: Add lookup subregion of VirtIOPCIRegion MR

2024-09-17 Thread Peter Xu
On Wed, Sep 11, 2024 at 09:52:08AM -0400, Michael S. Tsirkin wrote: > From: Gao Shiyuan > > Now virtio_address_space_lookup only lookup common/isr/device/notify > MR and exclude their subregions. > > When VHOST_USER_PROTOCOL_F_HOST_NOTIFIER enable, the notify MR has > host-notifier subregions an

Re: [PATCH 0/2] migration/multifd: Fix rb->receivedmap cleanup race

2024-09-17 Thread Peter Xu
On Tue, Sep 17, 2024 at 03:58:00PM -0300, Fabiano Rosas wrote: > v2: Keep skipping the cpu_synchronize_all_post_init() call if the > postcopy listen thread is live. Don't copy stable on the first patch. > > CI run: https://gitlab.com/farosas/qemu/-/pipelines/1457418838 > > v1: > https://lore.

Re: [RFC] Virtualizing tagged disaggregated memory capacity (app specific, multi host shared)

2024-09-17 Thread Jonathan Cameron
On Tue, 17 Sep 2024 19:37:21 + Jonathan Cameron wrote: > Plan is currently to meet at lpc registration desk 2pm tomorrow Wednesday and > we will find a room. > And now the internet maybe knows my phone number (serves me right for using my company mobile app that auto added a signature) I mi

[PATCH] tests/qemu-iotests/testenv: Use the "r2d" machine for sh4/sh4eb

2024-09-17 Thread Thomas Huth
Commit 0ea0538fae516f9b4 removed the default machine of the sh4 binaries, so a lot of iotests are failing now without such a default machine. Teach the iotest harness to use the "r2d" machine instead to fix this problem. Signed-off-by: Thomas Huth --- tests/qemu-iotests/testenv.py | 2 ++ 1 file

RE: [RFC] Virtualizing tagged disaggregated memory capacity (app specific, multi host shared)

2024-09-17 Thread Jonathan Cameron via
Plan is currently to meet at lpc registration desk 2pm tomorrow Wednesday and we will find a room. J Jonathan Cameron Mobile: +44-7870588074 Mail: jonathan.came...@huawei.com From:Jonathan Cameron mailto:jonathan.came...@huawei.com>> To:John Groves mailto:j.

[PATCH] tests/qemu-iotests/testenv: Use the "virt" machine for or1k

2024-09-17 Thread Thomas Huth
When compiling QEMU just with "--target-list=or1k-softmmu", there are 8 iotests failing that try to use PCI devices - but the default or1k machine does not have a PCI bus. The "virt" machine is better suited for running the iotests than the or1k default machine since it provides PCI and thus e.g. s

Re: [PATCH 2/2] migration/multifd: Fix rb->receivedmap cleanup race

2024-09-17 Thread Fabiano Rosas
Peter Xu writes: > On Tue, Sep 17, 2024 at 03:58:02PM -0300, Fabiano Rosas wrote: >> Fix a segmentation fault in multifd when rb->receivedmap is cleared >> too early. >> >> After commit 5ef7e26bdb ("migration/multifd: solve zero page causing >> multiple page faults"), multifd started using the r

Re: [PATCH 1/2] migration/savevm: Remove extra load cleanup calls

2024-09-17 Thread Fabiano Rosas
Peter Xu writes: > On Tue, Sep 17, 2024 at 03:58:01PM -0300, Fabiano Rosas wrote: >> There are two qemu_loadvm_state_cleanup() calls that were introduced >> when qemu_loadvm_state_setup() was still called before loading the >> configuration section, so there was state to be cleaned up if the >> h

Re: [PATCH 2/2] migration/multifd: Fix rb->receivedmap cleanup race

2024-09-17 Thread Peter Xu
On Tue, Sep 17, 2024 at 03:58:02PM -0300, Fabiano Rosas wrote: > Fix a segmentation fault in multifd when rb->receivedmap is cleared > too early. > > After commit 5ef7e26bdb ("migration/multifd: solve zero page causing > multiple page faults"), multifd started using the rb->receivedmap > bitmap, w

Re: [PATCH 1/2] migration/savevm: Remove extra load cleanup calls

2024-09-17 Thread Peter Xu
On Tue, Sep 17, 2024 at 03:58:01PM -0300, Fabiano Rosas wrote: > There are two qemu_loadvm_state_cleanup() calls that were introduced > when qemu_loadvm_state_setup() was still called before loading the > configuration section, so there was state to be cleaned up if the > header checks failed. > >

Re: [PATCH v2] memory: notify hypervisor of all eventfds during listener (de)registration

2024-09-17 Thread Peter Xu
Hi, Ani, On Tue, Sep 10, 2024 at 05:31:00PM +0530, Ani Sinha wrote: > When a new listener for an address space is registered, the hypervisor must be > informed of all existing eventfds for that address space by calling > eventfd_add() for that listener. Similarly, when a listener is de-registered

[PATCH 2/2] migration/multifd: Fix rb->receivedmap cleanup race

2024-09-17 Thread Fabiano Rosas
Fix a segmentation fault in multifd when rb->receivedmap is cleared too early. After commit 5ef7e26bdb ("migration/multifd: solve zero page causing multiple page faults"), multifd started using the rb->receivedmap bitmap, which belongs to ram.c and is initialized and *freed* from the ram SaveVMHan

[PATCH 1/2] migration/savevm: Remove extra load cleanup calls

2024-09-17 Thread Fabiano Rosas
There are two qemu_loadvm_state_cleanup() calls that were introduced when qemu_loadvm_state_setup() was still called before loading the configuration section, so there was state to be cleaned up if the header checks failed. However, commit 9e14b84908 ("migration/savevm: load_header before load_set

[PATCH 0/2] migration/multifd: Fix rb->receivedmap cleanup race

2024-09-17 Thread Fabiano Rosas
v2: Keep skipping the cpu_synchronize_all_post_init() call if the postcopy listen thread is live. Don't copy stable on the first patch. CI run: https://gitlab.com/farosas/qemu/-/pipelines/1457418838 v1: https://lore.kernel.org/r/20240913220542.18305-1-faro...@suse.de This fixes the crash we'

[PATCH] hw: fix memory leak in IRQState allocation

2024-09-17 Thread Matheus Tavares Bernardino
At e72a7f65c1 (hw: Move declaration of IRQState to header and add init function, 2024-06-29), we've changed qemu_allocate_irq() to use a combination of g_new() + object_initialize() instead of IRQ(object_new()). The latter sets obj->free, so that that the memory is properly cleaned when the object

[Stable-9.0.3 74/82] crypto: check gnutls & gcrypt support the requested pbkdf hash

2024-09-17 Thread Michael Tokarev
From: Daniel P. Berrangé Both gnutls and gcrypt can be configured to exclude support for certain algorithms via a runtime check against system crypto policies. Thus it is not sufficient to have a compile time test for hash support in their pbkdf implementations. Reviewed-by: Philippe Mathieu-Dau

[Stable-9.0.3 80/82] hw/intc/arm_gic: fix spurious level triggered interrupts

2024-09-17 Thread Michael Tokarev
From: Jan Klötzke On GICv2 and later, level triggered interrupts are pending when either the interrupt line is asserted or the interrupt was made pending by a GICD_ISPENDRn write. Making a level triggered interrupt pending by software persists until either the interrupt is acknowledged or cleared

[Stable-9.0.3 71/82] target/ppc: Fix migration of CPUs with TLB_EMB TLB type

2024-09-17 Thread Michael Tokarev
From: Arman Nabiev In vmstate_tlbemb a cut-and-paste error meant we gave this vmstate subsection the same "cpu/tlb6xx" name as the vmstate_tlb6xx subsection. This breaks migration load for any CPU using the TLB_EMB CPU type, because when we see the "tlb6xx" name in the incoming data we try to int

[Stable-9.0.3 79/82] hw/audio/virtio-sound: fix heap buffer overflow

2024-09-17 Thread Michael Tokarev
From: Volker Rümelin Currently, the guest may write to the device configuration space, whereas the virtio sound device specification in chapter 5.14.4 clearly states that the fields in the device configuration space are driver-read-only. Remove the set_config function from the virtio_snd class.

[Stable-9.0.3 81/82] ui/sdl2: set swap interval explicitly when OpenGL is enabled

2024-09-17 Thread Michael Tokarev
From: Gert Wollny Before 176e3783f2ab (ui/sdl2: OpenGL window context) SDL_CreateRenderer was called unconditionally setting the swap interval to 0. Since SDL_CreateRenderer is now no longer called when OpenGL is enabled, the swap interval is no longer set explicitly and vsync handling depends on

[Stable-9.0.3 73/82] crypto: run qcrypto_pbkdf2_count_iters in a new thread

2024-09-17 Thread Michael Tokarev
From: Tiago Pasqualini CPU time accounting in the kernel has been demonstrated to have a sawtooth pattern[1][2]. This can cause the getrusage system call to not be as accurate as we are expecting, which can cause this calculation to stall. The kernel discussions shows that this inaccuracy happen

[Stable-8.2.7 64/65] ui/sdl2: set swap interval explicitly when OpenGL is enabled

2024-09-17 Thread Michael Tokarev
From: Gert Wollny Before 176e3783f2ab (ui/sdl2: OpenGL window context) SDL_CreateRenderer was called unconditionally setting the swap interval to 0. Since SDL_CreateRenderer is now no longer called when OpenGL is enabled, the swap interval is no longer set explicitly and vsync handling depends on

[Stable-9.0.3 70/82] gitlab: migrate the s390x custom machine to 22.04

2024-09-17 Thread Michael Tokarev
From: Alex Bennée 20.04 is dead (from QEMU's point of view), long live 22.04! Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Message-ID: <20240426153938.1707723-3-alex.ben...@linaro.org> Signed-off-by: Thomas Huth (cherry picked from commit 108d99742af1fa6e977dcfac9d4151b7915e33a3) Signe

[Stable-9.0.3 78/82] tests/docker: update debian i686 and mipsel images to bookworm

2024-09-17 Thread Michael Tokarev
From: Alex Bennée Whatever issues there were which stopped these being updates when the rest were have now been resolved. However mips64el continues to be broken so don't update it here. Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240

[Stable-9.0.3 77/82] tests/docker: remove debian-armel-cross

2024-09-17 Thread Michael Tokarev
From: Alex Bennée As debian-11 transitions to LTS we are starting to have problems building the image. While we could update to a later Debian building a 32 bit QEMU without modern floating point is niche host amongst the few remaining 32 bit hosts we regularly build for. For now we still have ar

[Stable-9.0.3 82/82] gitlab: fix logic for changing docker tag on stable branches

2024-09-17 Thread Michael Tokarev
From: Daniel P. Berrangé This fixes: commit e28112d00703abd136e2411d23931f4f891c9244 Author: Daniel P. Berrangé Date: Thu Jun 8 17:40:16 2023 +0100 gitlab: stable staging branches publish containers in a separate tag Due to a copy+paste mistake, that commit included "QEMU_JOB_SKIP

[Stable-9.0.3 75/82] crypto: avoid leak of ctx when bad cipher mode is given

2024-09-17 Thread Michael Tokarev
From: Daniel P. Berrangé Fixes: Coverity CID 1546884 Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Daniel P. Berrangé (cherry picked from commit 586ac2c67d707c2588766c5195d94fa553cc25af) Signed-off-by: Michael Tokarev diff --git a/crypto/cipher-nettle.c.inc b/

[Stable-9.0.3 76/82] hw/display/vhost-user-gpu.c: fix vhost_user_gpu_chr_read()

2024-09-17 Thread Michael Tokarev
From: Haoran Zhang fix vhost_user_gpu_chr_read() where `size` was incorrectly passed to `msg->flags`. Fixes: 267f664658 ("hw/display: add vhost-user-vga & gpu-pci") Signed-off-by: Haoran Zhang Reviewed-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Si

[Stable-8.2.7 54/65] gitlab: migrate the s390x custom machine to 22.04

2024-09-17 Thread Michael Tokarev
From: Alex Bennée 20.04 is dead (from QEMU's point of view), long live 22.04! Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Message-ID: <20240426153938.1707723-3-alex.ben...@linaro.org> Signed-off-by: Thomas Huth (cherry picked from commit 108d99742af1fa6e977dcfac9d4151b7915e33a3) Signe

[Stable-9.0.3 72/82] softmmu/physmem: fix memory leak in dirty_memory_extend()

2024-09-17 Thread Michael Tokarev
From: David Hildenbrand As reported by Peter, we might be leaking memory when removing the highest RAMBlock (in the weird ram_addr_t space), and adding a new one. We will fail to realize that we already allocated bitmaps for more dirty memory blocks, and effectively discard the pointers to them.

[Stable-9.0.3 v2 00/82] Patch Round-up for stable 9.0.3, freeze on 2024-09-16 (frozen)

2024-09-17 Thread Michael Tokarev
The following patches are queued for QEMU stable v9.0.3: https://gitlab.com/qemu-project/qemu/-/commits/staging-9.0 Patch freeze is 2024-09-16 (frozen), and the release is planned for 2024-09-18: https://wiki.qemu.org/Planning/9.0 Please respond here or CC qemu-sta...@nongnu.org on any addi

[Stable-8.2.7 65/65] gitlab: fix logic for changing docker tag on stable branches

2024-09-17 Thread Michael Tokarev
From: Daniel P. Berrangé This fixes: commit e28112d00703abd136e2411d23931f4f891c9244 Author: Daniel P. Berrangé Date: Thu Jun 8 17:40:16 2023 +0100 gitlab: stable staging branches publish containers in a separate tag Due to a copy+paste mistake, that commit included "QEMU_JOB_SKIP

[Stable-8.2.7 60/65] tests/docker: remove debian-armel-cross

2024-09-17 Thread Michael Tokarev
From: Alex Bennée As debian-11 transitions to LTS we are starting to have problems building the image. While we could update to a later Debian building a 32 bit QEMU without modern floating point is niche host amongst the few remaining 32 bit hosts we regularly build for. For now we still have ar

[Stable-8.2.7 61/65] tests/docker: update debian i686 and mipsel images to bookworm

2024-09-17 Thread Michael Tokarev
From: Alex Bennée Whatever issues there were which stopped these being updates when the rest were have now been resolved. However mips64el continues to be broken so don't update it here. Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240

[Stable-8.2.7 62/65] hw/audio/virtio-sound: fix heap buffer overflow

2024-09-17 Thread Michael Tokarev
From: Volker Rümelin Currently, the guest may write to the device configuration space, whereas the virtio sound device specification in chapter 5.14.4 clearly states that the fields in the device configuration space are driver-read-only. Remove the set_config function from the virtio_snd class.

[Stable-8.2.7 57/65] crypto: run qcrypto_pbkdf2_count_iters in a new thread

2024-09-17 Thread Michael Tokarev
From: Tiago Pasqualini CPU time accounting in the kernel has been demonstrated to have a sawtooth pattern[1][2]. This can cause the getrusage system call to not be as accurate as we are expecting, which can cause this calculation to stall. The kernel discussions shows that this inaccuracy happen

[Stable-8.2.7 59/65] hw/display/vhost-user-gpu.c: fix vhost_user_gpu_chr_read()

2024-09-17 Thread Michael Tokarev
From: Haoran Zhang fix vhost_user_gpu_chr_read() where `size` was incorrectly passed to `msg->flags`. Fixes: 267f664658 ("hw/display: add vhost-user-vga & gpu-pci") Signed-off-by: Haoran Zhang Reviewed-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Si

[Stable-8.2.7 63/65] hw/intc/arm_gic: fix spurious level triggered interrupts

2024-09-17 Thread Michael Tokarev
From: Jan Klötzke On GICv2 and later, level triggered interrupts are pending when either the interrupt line is asserted or the interrupt was made pending by a GICD_ISPENDRn write. Making a level triggered interrupt pending by software persists until either the interrupt is acknowledged or cleared

[Stable-8.2.7 58/65] crypto: check gnutls & gcrypt support the requested pbkdf hash

2024-09-17 Thread Michael Tokarev
From: Daniel P. Berrangé Both gnutls and gcrypt can be configured to exclude support for certain algorithms via a runtime check against system crypto policies. Thus it is not sufficient to have a compile time test for hash support in their pbkdf implementations. Reviewed-by: Philippe Mathieu-Dau

[Stable-8.2.7 v2 00/65] Patch Round-up for stable 8.2.7, freeze on 2024-09-16 (frozen)

2024-09-17 Thread Michael Tokarev
I'm extending support for qemu 8.2 series for a little longer, in a way how 7.2 series is handled, - let's see how it works. The following patches are queued for QEMU stable v8.2.7: https://gitlab.com/qemu-project/qemu/-/commits/staging-8.2 Patch freeze is 2024-09-16 (frozen), and the release

[Stable-8.2.7 56/65] softmmu/physmem: fix memory leak in dirty_memory_extend()

2024-09-17 Thread Michael Tokarev
From: David Hildenbrand As reported by Peter, we might be leaking memory when removing the highest RAMBlock (in the weird ram_addr_t space), and adding a new one. We will fail to realize that we already allocated bitmaps for more dirty memory blocks, and effectively discard the pointers to them.

[Stable-8.2.7 55/65] target/ppc: Fix migration of CPUs with TLB_EMB TLB type

2024-09-17 Thread Michael Tokarev
From: Arman Nabiev In vmstate_tlbemb a cut-and-paste error meant we gave this vmstate subsection the same "cpu/tlb6xx" name as the vmstate_tlb6xx subsection. This breaks migration load for any CPU using the TLB_EMB CPU type, because when we see the "tlb6xx" name in the incoming data we try to int

[Stable-7.2.14 43/47] crypto: run qcrypto_pbkdf2_count_iters in a new thread

2024-09-17 Thread Michael Tokarev
From: Tiago Pasqualini CPU time accounting in the kernel has been demonstrated to have a sawtooth pattern[1][2]. This can cause the getrusage system call to not be as accurate as we are expecting, which can cause this calculation to stall. The kernel discussions shows that this inaccuracy happen

[Stable-7.2.14 44/47] crypto: check gnutls & gcrypt support the requested pbkdf hash

2024-09-17 Thread Michael Tokarev
From: Daniel P. Berrangé Both gnutls and gcrypt can be configured to exclude support for certain algorithms via a runtime check against system crypto policies. Thus it is not sufficient to have a compile time test for hash support in their pbkdf implementations. Reviewed-by: Philippe Mathieu-Dau

[Stable-7.2.14 47/47] hw/intc/arm_gic: fix spurious level triggered interrupts

2024-09-17 Thread Michael Tokarev
From: Jan Klötzke On GICv2 and later, level triggered interrupts are pending when either the interrupt line is asserted or the interrupt was made pending by a GICD_ISPENDRn write. Making a level triggered interrupt pending by software persists until either the interrupt is acknowledged or cleared

[Stable-7.2.14 45/47] hw/display/vhost-user-gpu.c: fix vhost_user_gpu_chr_read()

2024-09-17 Thread Michael Tokarev
From: Haoran Zhang fix vhost_user_gpu_chr_read() where `size` was incorrectly passed to `msg->flags`. Fixes: 267f664658 ("hw/display: add vhost-user-vga & gpu-pci") Signed-off-by: Haoran Zhang Reviewed-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev Si

[Stable-7.2.14 46/47] tests/docker: remove debian-armel-cross

2024-09-17 Thread Michael Tokarev
From: Alex Bennée As debian-11 transitions to LTS we are starting to have problems building the image. While we could update to a later Debian building a 32 bit QEMU without modern floating point is niche host amongst the few remaining 32 bit hosts we regularly build for. For now we still have ar

[Stable-7.2.14 41/47] gitlab: migrate the s390x custom machine to 22.04

2024-09-17 Thread Michael Tokarev
From: Alex Bennée 20.04 is dead (from QEMU's point of view), long live 22.04! Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Message-ID: <20240426153938.1707723-3-alex.ben...@linaro.org> Signed-off-by: Thomas Huth (cherry picked from commit 108d99742af1fa6e977dcfac9d4151b7915e33a3) Signe

[Stable-7.2.14 v2 00/47] Patch Round-up for stable 7.2.14, freeze on 2024-09-16 (frozen)

2024-09-17 Thread Michael Tokarev
The following patches are queued for QEMU stable v7.2.14: https://gitlab.com/qemu-project/qemu/-/commits/staging-7.2 Patch freeze is 2024-09-16 (frozen), and the release is planned for 2024-09-18: https://wiki.qemu.org/Planning/7.2 Please respond here or CC qemu-sta...@nongnu.org on any add

[Stable-7.2.14 42/47] softmmu/physmem: fix memory leak in dirty_memory_extend()

2024-09-17 Thread Michael Tokarev
From: David Hildenbrand As reported by Peter, we might be leaking memory when removing the highest RAMBlock (in the weird ram_addr_t space), and adding a new one. We will fail to realize that we already allocated bitmaps for more dirty memory blocks, and effectively discard the pointers to them.

Re: [PATCH v2 12/17] migration/multifd: Device state transfer support - send side

2024-09-17 Thread Peter Xu
On Tue, Sep 17, 2024 at 07:07:10PM +0200, Cédric Le Goater wrote: > [ ... ] > > > > > I as a patch writer always like to do that when it's essential. > > > > Normally > > > > the case is I don't have enough reviewer resources to help me get a > > > > better > > > > design, or discuss about it.

Re: [PATCH v4 1/4] KVM: Dynamic sized kvm memslots array

2024-09-17 Thread Fabiano Rosas
Peter Xu writes: > Zhiyi reported an infinite loop issue in VFIO use case. The cause of that > was a separate discussion, however during that I found a regression of > dirty sync slowness when profiling. > > Each KVMMemoryListerner maintains an array of kvm memslots. Currently it's > statically

Re: [PATCH 2/2] migration/multifd: Fix rb->receivedmap cleanup race

2024-09-17 Thread Fabiano Rosas
Peter Xu writes: > On Fri, Sep 13, 2024 at 07:05:42PM -0300, Fabiano Rosas wrote: >> Fix a segmentation fault in multifd when rb->receivedmap is cleared >> too early. >> >> After commit 5ef7e26bdb ("migration/multifd: solve zero page causing >> multiple page faults"), multifd started using the r

Re: [PATCH 1/2] migration/savevm: Remove extra load cleanup calls

2024-09-17 Thread Fabiano Rosas
Peter Xu writes: > On Fri, Sep 13, 2024 at 07:05:41PM -0300, Fabiano Rosas wrote: >> There are two qemu_loadvm_state_cleanup() calls that were introduced >> when qemu_loadvm_state_setup() was still called before loading the >> configuration section, so there was state to be cleaned up if the >> h

Re: [PATCH v2 12/17] migration/multifd: Device state transfer support - send side

2024-09-17 Thread Cédric Le Goater
[ ... ] I as a patch writer always like to do that when it's essential. Normally the case is I don't have enough reviewer resources to help me get a better design, or discuss about it. Right, but we can't keep providing a moving target. See the thread pool discussion for an example. It's hard

Re: [PATCH 2/2] migration/multifd: Fix rb->receivedmap cleanup race

2024-09-17 Thread Peter Xu
On Fri, Sep 13, 2024 at 07:05:42PM -0300, Fabiano Rosas wrote: > Fix a segmentation fault in multifd when rb->receivedmap is cleared > too early. > > After commit 5ef7e26bdb ("migration/multifd: solve zero page causing > multiple page faults"), multifd started using the rb->receivedmap > bitmap, w

Re: [PATCH 1/1] target/riscv: enable floating point unit

2024-09-17 Thread Heinrich Schuchardt
On 17.09.24 16:49, Andrew Jones wrote: On Tue, Sep 17, 2024 at 03:28:42PM GMT, Heinrich Schuchardt wrote: On 17.09.24 14:13, Andrew Jones wrote: On Mon, Sep 16, 2024 at 08:16:33PM GMT, Heinrich Schuchardt wrote: OpenSBI enables the floating point in mstatus. For consistency QEMU/KVM should do

Re: [PATCH 1/2] migration/savevm: Remove extra load cleanup calls

2024-09-17 Thread Peter Xu
On Fri, Sep 13, 2024 at 07:05:41PM -0300, Fabiano Rosas wrote: > There are two qemu_loadvm_state_cleanup() calls that were introduced > when qemu_loadvm_state_setup() was still called before loading the > configuration section, so there was state to be cleaned up if the > header checks failed. > >

Re: [PATCH 0/1] hw/nvme: add atomic write support

2024-09-17 Thread alan . adamson
On 9/17/24 9:21 AM, alan.adam...@oracle.com wrote: On 9/17/24 12:59 AM, Klaus Jensen wrote: On Aug 20 09:11, Alan Adamson wrote: Since there is work in the Linux NVMe Driver community to add Atomic Write support, it would be desirable to be able to test it with qemu nvme emulation.   This p

[PATCH v4 2/4] KVM: Define KVM_MEMSLOTS_NUM_MAX_DEFAULT

2024-09-17 Thread Peter Xu
Make the default max nr_slots a macro, it's only used when KVM reports nothing. Reviewed-by: David Hildenbrand Signed-off-by: Peter Xu --- accel/kvm/kvm-all.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index e0430f08ea..0b66c

[PATCH v4 4/4] KVM: Rename KVMState->nr_slots to nr_slots_max

2024-09-17 Thread Peter Xu
This value used to reflect the maximum supported memslots from KVM kernel. Rename it to be clearer. Reviewed-by: David Hildenbrand Signed-off-by: Peter Xu --- include/sysemu/kvm_int.h | 4 ++-- accel/kvm/kvm-all.c | 12 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff -

[PATCH v4 1/4] KVM: Dynamic sized kvm memslots array

2024-09-17 Thread Peter Xu
Zhiyi reported an infinite loop issue in VFIO use case. The cause of that was a separate discussion, however during that I found a regression of dirty sync slowness when profiling. Each KVMMemoryListerner maintains an array of kvm memslots. Currently it's statically allocated to be the max suppo

[PATCH v4 3/4] KVM: Rename KVMMemoryListener.nr_used_slots to nr_slots_used

2024-09-17 Thread Peter Xu
This will make all nr_slots counters to be named in the same manner. Reviewed-by: David Hildenbrand Signed-off-by: Peter Xu --- include/sysemu/kvm_int.h | 2 +- accel/kvm/kvm-all.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/sysemu/kvm_int.h b/include

  1   2   3   >