[RFC PATCH-for-9.1 06/29] hw/i386/pc: Move pci_root_uid field to PcPciMachineClass

2024-03-28 Thread Philippe Mathieu-Daudé
The 'pci_root_uid' field is irrelevant for non-PCI machines, restrict it to the PcPciMachineClass. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 4 +++- hw/i386/acpi-build.c | 9 +++-- hw/i386/pc_piix.c| 7 +-- hw/i386/pc_q35.c | 7 +-- 4 files changed, 20

[RFC PATCH-for-9.1 03/29] hw/i386/pc: Pass base machine type as argument to DEFINE_PC_MACHINE()

2024-03-28 Thread Philippe Mathieu-Daudé
Currently PC machines are based on TYPE_PC_MACHINE. In preparation of being based on different types, pass the current type as argument. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 4 ++-- hw/i386/pc_piix.c| 9 + hw/i386/pc_q35.c | 3 ++- 3 files changed, 9

[RFC PATCH-for-9.1 04/29] hw/i386/pc: Introduce PC_PCI_MACHINE QOM type

2024-03-28 Thread Philippe Mathieu-Daudé
Introduce TYPE_PC_PCI_MACHINE for machines where PCI is expected (as opposition to the ISA-only PC machine). This type inherits from the well known TYPE_PC_MACHINE. Convert I440FX/PIIX and Q35 machines to use it. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 25

[RFC PATCH-for-9.1 01/29] hw/i386/pc: Declare CPU QOM types using DEFINE_TYPES() macro

2024-03-28 Thread Philippe Mathieu-Daudé
When multiple QOM types are registered in the same file, it is simpler to use the the DEFINE_TYPES() macro. In particular because type array declared with such macro are easier to review. In few commits we are going to add more types, so replace the type_register_static() to ease further reviews.

Re: [PATCH for-9.0 1/2] migration: Set migration error in migration_completion()

2024-03-28 Thread Avihai Horon
On 28/03/2024 17:09, Peter Xu wrote: External email: Use caution opening links or attachments On Thu, Mar 28, 2024 at 04:02:51PM +0200, Avihai Horon wrote: After commit 9425ef3f990a ("migration: Use migrate_has_error() in close_return_path_on_source()"), close_return_path_on_source()

[RFC PATCH-for-9.1 00/29] hw/i386/pc: Decouple ISA vs PCI-based machines

2024-03-28 Thread Philippe Mathieu-Daudé
Hi Igor, This is the first steps to decouple the isapc VS q35/i440fx machines. A new TYPE_PC_PCI_MACHINE is introduced to help differentiating. Fields unrelated to the legacy isapc are moved to the new PcPciMachineState structure. More work remain in hw/i386/pc_piix.c so we can build a binary

Re: [PATCH for-9.0 1/2] migration: Set migration error in migration_completion()

2024-03-28 Thread Avihai Horon
On 28/03/2024 17:21, Cédric Le Goater wrote: External email: Use caution opening links or attachments Hello Avihai, On 3/28/24 15:02, Avihai Horon wrote: After commit 9425ef3f990a ("migration: Use migrate_has_error() in close_return_path_on_source()"), close_return_path_on_source() assumes

Re: [PATCH 1/1] docs: sbsa: update specs, add dt note

2024-03-28 Thread Peter Maydell
On Tue, 26 Mar 2024 at 09:58, Marcin Juszkiewicz wrote: > > Hardware of sbsa-ref board is nowadays defined by both BSA and SBSA > specifications. Then BBR defines firmware interface. > > Added note about DeviceTree data passed from QEMU to firmware. It is > very minimal and provides only data we

[PATCH v5 0/2] Implement SSH commands in QEMU GA for Windows

2024-03-28 Thread aidan_leuck
From: aidaleuc This patch aims to implement guest-ssh-add-authorized-keys, guest-ssh-remove-authorized-keys, and guest-ssh-get-authorized-keys for Windows. This PR is based on Microsoft's OpenSSH implementation https://github.com/PowerShell/Win32-OpenSSH. The guest agents will support

[PATCH v5 2/2] Implement SSH commands in QEMU GA for Windows

2024-03-28 Thread aidan_leuck
From: aidaleuc Signed-off-by: aidaleuc --- qga/commands-windows-ssh.c | 789 + qga/commands-windows-ssh.h | 26 ++ qga/meson.build| 5 +- qga/qapi-schema.json | 17 +- 4 files changed, 826 insertions(+), 11 deletions(-) create mode

[PATCH v5 1/2] Refactor common functions between POSIX and Windows implementation

2024-03-28 Thread aidan_leuck
From: aidaleuc Signed-off-by: aidaleuc --- qga/commands-common-ssh.c | 50 ++ qga/commands-common-ssh.h | 10 qga/commands-posix-ssh.c | 51 +++ qga/meson.build | 1 + 4 files changed, 64

Re: [PATCH-for-9.0 v2] hw/i386/pc: Deprecate 64-bit CPUs on ISA-only PC machine

2024-03-28 Thread Thomas Huth
On 28/03/2024 16.12, Mark Cave-Ayland wrote: On 27/03/2024 16:54, Philippe Mathieu-Daudé wrote: Per Daniel suggestion [*]:   > isapc could arguably be restricted to just 32-bit CPU models,   > because we should not need it to support any feature that didn't   > exist prior to circa 1995. eg

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-03-28 Thread Thomas Huth
On 28/03/2024 15.59, Daniel P. Berrangé wrote: On Thu, Mar 28, 2024 at 09:54:49AM -0500, Eric Blake wrote: On Thu, Mar 28, 2024 at 03:06:03PM +0100, Thomas Huth wrote: Since version 2.66, glib has useful URI parsing functions, too. Use those instead of the QEMU-internal ones to be finally able

[PATCH] hw/intc/arm_gicv3: ICC_HPPIR* return SPURIOUS if int group is disabled

2024-03-28 Thread Peter Maydell
If the group of the highest priority pending interrupt is disabled via ICC_IGRPEN*, the ICC_HPPIR* registers should return INTID_SPURIOUS, not the interrupt ID. (See the GIC architecture specification pseudocode functions ICC_HPPIR1_EL1[] and HighestPriorityPendingInterrupt().) Make HPPIR reads

Re: [PULL 35/38] spapr: nested: Introduce H_GUEST_[GET|SET]_STATE hcalls.

2024-03-28 Thread Peter Maydell
On Wed, 27 Mar 2024 at 05:41, Harsh Prateek Bora wrote: > > > > On 3/26/24 21:32, Peter Maydell wrote: > > On Tue, 12 Mar 2024 at 17:11, Nicholas Piggin wrote: > >> > >> From: Harsh Prateek Bora > >> > >> Introduce the nested PAPR hcalls: > >> - H_GUEST_GET_STATE which is used to get state

Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-03-28 Thread Thomas Huth
On 28/03/2024 16.01, Peter Xu wrote: On Thu, Mar 28, 2024 at 11:18:04AM -0300, Fabiano Rosas wrote: Philippe Mathieu-Daudé writes: The whole RDMA subsystem was deprecated in commit e9a54265f5 ("hw/rdma: Deprecate the pvrdma device and the rdma subsystem") released in v8.2. Remove: - RDMA

Re: [PATCH v5 0/7] Live Migration With IAA

2024-03-28 Thread Peter Xu
On Thu, Mar 28, 2024 at 03:02:30AM +, Liu, Yuan1 wrote: > Yes, I will support software fallback to ensure CI testing and users can > still use qpl compression without IAA hardware. > > Although the qpl software solution will have better performance than zlib, > I still don't think it has a

Re: [PATCH for-9.0 1/2] migration: Set migration error in migration_completion()

2024-03-28 Thread Cédric Le Goater
Hello Avihai, On 3/28/24 15:02, Avihai Horon wrote: After commit 9425ef3f990a ("migration: Use migrate_has_error() in close_return_path_on_source()"), close_return_path_on_source() assumes that migration error is set if an error occurs during migration. This may not be true if migration errors

Re: [PATCH v5 5/7] migration/multifd: implement initialization of qpl compression

2024-03-28 Thread Peter Xu
On Thu, Mar 28, 2024 at 02:32:37AM +, Liu, Yuan1 wrote: > > -Original Message- > > From: Peter Xu > > Sent: Thursday, March 28, 2024 3:26 AM > > To: Liu, Yuan1 > > Cc: Daniel P. Berrangé ; faro...@suse.de; qemu- > > de...@nongnu.org; hao.xi...@bytedance.com;

Re: [PATCH-for-9.0 v2] hw/i386/pc: Deprecate 64-bit CPUs on ISA-only PC machine

2024-03-28 Thread Daniel P . Berrangé
On Wed, Mar 27, 2024 at 05:54:56PM +0100, Philippe Mathieu-Daudé wrote: > Per Daniel suggestion [*]: > > > isapc could arguably be restricted to just 32-bit CPU models, > > because we should not need it to support any feature that didn't > > exist prior to circa 1995. eg refuse to start with

Re: [PATCH-for-9.0 v2 19/19] hw/xen: Have most of Xen files become target-agnostic

2024-03-28 Thread Anthony PERARD
On Tue, Nov 14, 2023 at 03:38:15PM +0100, Philippe Mathieu-Daudé wrote: > Previous commits re-organized the target-specific bits > from Xen files. We can now build the common files once > instead of per-target. > > Only 4 files call libxen API (thus its CPPFLAGS): > - xen-hvm-common.c, > -

Re: [PATCH-for-9.0 v2] hw/i386/pc: Deprecate 64-bit CPUs on ISA-only PC machine

2024-03-28 Thread Mark Cave-Ayland
On 27/03/2024 16:54, Philippe Mathieu-Daudé wrote: Per Daniel suggestion [*]: > isapc could arguably be restricted to just 32-bit CPU models, > because we should not need it to support any feature that didn't > exist prior to circa 1995. eg refuse to start with isapc, if 'lm' > is

Re: [PATCH for-9.0 2/2] migration/postcopy: Ensure postcopy_start() sets errp if it fails

2024-03-28 Thread Peter Xu
On Thu, Mar 28, 2024 at 04:02:52PM +0200, Avihai Horon wrote: > There are several places where postcopy_start() fails without setting > errp. This can cause a null pointer de-reference, as in case of error, > the caller of postcopy_start() copies/prints the error set in errp. > > Fix it by

Re: [PATCH for-9.0 1/2] migration: Set migration error in migration_completion()

2024-03-28 Thread Peter Xu
On Thu, Mar 28, 2024 at 04:02:51PM +0200, Avihai Horon wrote: > After commit 9425ef3f990a ("migration: Use migrate_has_error() in > close_return_path_on_source()"), close_return_path_on_source() assumes > that migration error is set if an error occurs during migration. > > This may not be true if

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-03-28 Thread Eric Blake
Adjusting cc list to add upstream NBD and drop developers unrelated to this part of the qemu series... On Thu, Mar 28, 2024 at 02:13:42PM +, Richard W.M. Jones wrote: > On Thu, Mar 28, 2024 at 03:06:03PM +0100, Thomas Huth wrote: > > Since version 2.66, glib has useful URI parsing functions,

Re: [PATCH for-9.0 2/2] migration/postcopy: Ensure postcopy_start() sets errp if it fails

2024-03-28 Thread Cédric Le Goater
On 3/28/24 15:02, Avihai Horon wrote: There are several places where postcopy_start() fails without setting errp. This can cause a null pointer de-reference, as in case of error, the caller of postcopy_start() copies/prints the error set in errp. Fix it by setting errp in all of

Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-03-28 Thread Peter Xu
On Thu, Mar 28, 2024 at 11:18:04AM -0300, Fabiano Rosas wrote: > Philippe Mathieu-Daudé writes: > > > The whole RDMA subsystem was deprecated in commit e9a54265f5 > > ("hw/rdma: Deprecate the pvrdma device and the rdma subsystem") > > released in v8.2. > > > > Remove: > > - RDMA handling from

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-03-28 Thread Daniel P . Berrangé
On Thu, Mar 28, 2024 at 09:54:49AM -0500, Eric Blake wrote: > On Thu, Mar 28, 2024 at 03:06:03PM +0100, Thomas Huth wrote: > > Since version 2.66, glib has useful URI parsing functions, too. > > Use those instead of the QEMU-internal ones to be finally able > > to get rid of the latter. The

Re: [PATCH v10 16/23] hw/intc/arm_gicv3: Implement GICD_INMIR

2024-03-28 Thread Peter Maydell
On Mon, 25 Mar 2024 at 08:52, Jinjie Ruan wrote: > > Add GICD_INMIR, GICD_INMIRnE register and support access GICD_INMIR0. > > Signed-off-by: Jinjie Ruan > Reviewed-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v10 15/23] hw/intc/arm_gicv3_redist: Implement GICR_INMIR0

2024-03-28 Thread Peter Maydell
On Mon, 25 Mar 2024 at 08:52, Jinjie Ruan wrote: > > Add GICR_INMIR0 register and support access GICR_INMIR0. > > Signed-off-by: Jinjie Ruan > Reviewed-by: Richard Henderson > --- > v10: > - gicr_isuperprio -> gicr_inmir0. > v6: > - Add Reviewed-by. > v4: > - Make the GICR_INMIR0 implementation

Re: [PATCH v10 11/23] hw/intc/arm_gicv3: Add external IRQ lines for NMI

2024-03-28 Thread Peter Maydell
On Mon, 25 Mar 2024 at 08:52, Jinjie Ruan wrote: > > Augment the GICv3's QOM device interface by adding one > new set of sysbus IRQ line, to signal NMI to each CPU. > > Signed-off-by: Jinjie Ruan > Reviewed-by: Richard Henderson > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v10 14/23] hw/intc/arm_gicv3: Add irq non-maskable property

2024-03-28 Thread Peter Maydell
On Mon, 25 Mar 2024 at 08:52, Jinjie Ruan wrote: > > A SPI, PPI or SGI interrupt can have non-maskable property. So maintain > non-maskable property in PendingIrq and GICR/GICD. Since add new device > state, it also needs to be migrated, so also save NMI info in > vmstate_gicv3_cpu and

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-03-28 Thread Eric Blake
On Thu, Mar 28, 2024 at 03:06:03PM +0100, Thomas Huth wrote: > Since version 2.66, glib has useful URI parsing functions, too. > Use those instead of the QEMU-internal ones to be finally able > to get rid of the latter. The g_uri_get_host() also takes care > of removing the square brackets from

Re: [PATCH v10 17/23] hw/intc/arm_gicv3: Add NMI handling CPU interface registers

2024-03-28 Thread Peter Maydell
On Mon, 25 Mar 2024 at 08:53, Jinjie Ruan wrote: > > Add the NMIAR CPU interface registers which deal with acknowledging NMI. > > When introduce NMI interrupt, there are some updates to the semantics for the > register ICC_IAR1_EL1 and ICC_HPPIR1_EL1. For ICC_IAR1_EL1 register, it > should return

Re: [PATCH 00/19] -Werror=maybe-uninitialized fixes

2024-03-28 Thread Eric Blake
On Thu, Mar 28, 2024 at 02:20:33PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Hi, > > Depending on -Doptimization=, GCC (13.2.1 here) produces different > maybe-uninitialized warnings: > - g: produces -Werror=maybe-uninitialized errors > - 0: clean build > - 1:

Re: [PATCH 04/19] nbd: with -Werror=maybe-uninitialized false-positive

2024-03-28 Thread Eric Blake
On Thu, Mar 28, 2024 at 02:20:37PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > ../nbd/client-connection.c:419:8: error: ‘wait_co’ may be used uninitialized > [-Werror=maybe-uninitialized] > > Signed-off-by: Marc-André Lureau > --- > nbd/client-connection.c | 2 +-

Re: [PATCH v2 2/2] target/riscv: Support xtheadmaee for thead-c906

2024-03-28 Thread Christoph Müllner
On Thu, Mar 28, 2024 at 2:19 AM Alistair Francis wrote: > > On Wed, Mar 27, 2024 at 9:19 PM Conor Dooley wrote: > > > > Christoph linked here on his submission to Linux of a fix for this, so I > > am reviving this to leave a couple comments :) > > > > On Thu, Feb 15, 2024 at 02:24:02PM +1000,

Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-03-28 Thread Fabiano Rosas
Philippe Mathieu-Daudé writes: > The whole RDMA subsystem was deprecated in commit e9a54265f5 > ("hw/rdma: Deprecate the pvrdma device and the rdma subsystem") > released in v8.2. > > Remove: > - RDMA handling from migration > - dependencies on libibumad, libibverbs and librdmacm > > Keep the

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-03-28 Thread Richard W.M. Jones
On Thu, Mar 28, 2024 at 03:06:03PM +0100, Thomas Huth wrote: > Since version 2.66, glib has useful URI parsing functions, too. > Use those instead of the QEMU-internal ones to be finally able > to get rid of the latter. The g_uri_get_host() also takes care > of removing the square brackets from

Re: [PATCH for-9.1 8/9] block/ssh: Use URI parsing code from glib

2024-03-28 Thread Richard W.M. Jones
On Thu, Mar 28, 2024 at 03:06:05PM +0100, Thomas Huth wrote: > Since version 2.66, glib has useful URI parsing functions, too. > Use those instead of the QEMU-internal ones to be finally able > to get rid of the latter. > > Signed-off-by: Thomas Huth > --- > block/ssh.c | 69

Re: [PATCH for-9.0] docs/about: Mark the iaspc machine type as deprecated

2024-03-28 Thread Mark Cave-Ayland
On 27/03/2024 07:09, Gerd Hoffmann wrote: On Tue, Mar 26, 2024 at 01:30:48PM +, Mark Cave-Ayland wrote: Heh I've actually been using isapc over the past couple of weeks to fire up some old programs in a Windows 3 VM :) I'm wondering why these use cases can't simply use the 'pc' machine

[PATCH for-9.0 0/2] migration: Two migration bug fixes

2024-03-28 Thread Avihai Horon
Hello, This small series fixes two migration bugs I stumbled upon recently. Comments are welcome, thanks for reviewing. Avihai Horon (2): migration: Set migration error in migration_completion() migration/postcopy: Ensure postcopy_start() sets errp if it fails migration/migration.c | 18

[PATCH for-9.1 7/9] block/nfs: Use URI parsing code from glib

2024-03-28 Thread Thomas Huth
Since version 2.66, glib has useful URI parsing functions, too. Use those instead of the QEMU-internal ones to be finally able to get rid of the latter. Signed-off-by: Thomas Huth --- block/nfs.c | 102 ++-- 1 file changed, 52 insertions(+), 50

[PATCH for-9.1 8/9] block/ssh: Use URI parsing code from glib

2024-03-28 Thread Thomas Huth
Since version 2.66, glib has useful URI parsing functions, too. Use those instead of the QEMU-internal ones to be finally able to get rid of the latter. Signed-off-by: Thomas Huth --- block/ssh.c | 69 +++-- 1 file changed, 40 insertions(+), 29

[PATCH for-9.1 4/9] Bump minimum glib version to v2.66

2024-03-28 Thread Thomas Huth
Now that we dropped support for CentOS 8 and Ubuntu 20.04, we can look into bumping the glib version to a new minimum for further clean-ups. According to repology.org, available versions are: CentOS Stream 9: 2.66.7 Debian 11: 2.66.8 Fedora 38: 2.74.1 Freebsd:

[PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-03-28 Thread Thomas Huth
Since version 2.66, glib has useful URI parsing functions, too. Use those instead of the QEMU-internal ones to be finally able to get rid of the latter. The g_uri_get_host() also takes care of removing the square brackets from IPv6 addresses, so we can drop that part of the QEMU code now, too.

[PATCH for-9.1 9/9] util/uri: Remove the old URI parsing code

2024-03-28 Thread Thomas Huth
Now that we switched all consumers of the URI code to use the URI parsing functions from glib instead, we can remove our internal URI parsing code since it is not used anymore. Signed-off-by: Thomas Huth --- include/qemu/uri.h | 99 --- util/uri.c | 1466

[PATCH for-9.1 1/9] tests: Remove Ubuntu 20.04 container

2024-03-28 Thread Thomas Huth
Since Ubuntu 22.04 is now available since two years, we can stop actively supporting the previous LTS version of Ubuntu now. Signed-off-by: Thomas Huth --- tests/docker/dockerfiles/ubuntu2004.docker | 157 - tests/lcitool/refresh | 1 - 2 files

[PATCH for-9.1 3/9] tests: Update our CI to use CentOS Stream 9 instead of 8

2024-03-28 Thread Thomas Huth
RHEL 9 (and thus also the derivatives) are available since two years now, so according to QEMU's support policy, we can drop the active support for the previous major version 8 now. Thus upgrade our CentOS Stream container to major version 9 now. Signed-off-by: Thomas Huth ---

[PATCH for-9.1 5/9] block/gluster: Use URI parsing code from glib

2024-03-28 Thread Thomas Huth
Since version 2.66, glib has useful URI parsing functions, too. Use those instead of the QEMU-internal ones to be finally able to get rid of the latter. Cc: integrat...@gluster.org Signed-off-by: Thomas Huth --- block/gluster.c | 63 + 1 file

[PATCH for-9.1 0/9] Switch to glib URI parsing code

2024-03-28 Thread Thomas Huth
In the QEMU 9.1 development cycle, we can drop the support for Ubuntu 20.04 and CentOS 8 since the following major versions of these distributions are available since 2 years already. This allows us to bump the minimum version of glib to 2.66 which comes with a nice set of URI parsing functions.

[PATCH for-9.1 2/9] tests/lcitool/libvirt-ci: Update to the latest master branch

2024-03-28 Thread Thomas Huth
We need the latest fixes for the lcitool to be able to properly update our CentOS docker file to CentOS Stream 9. Signed-off-by: Thomas Huth --- tests/lcitool/libvirt-ci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lcitool/libvirt-ci b/tests/lcitool/libvirt-ci index

[PATCH for-9.0 2/2] migration/postcopy: Ensure postcopy_start() sets errp if it fails

2024-03-28 Thread Avihai Horon
There are several places where postcopy_start() fails without setting errp. This can cause a null pointer de-reference, as in case of error, the caller of postcopy_start() copies/prints the error set in errp. Fix it by setting errp in all of postcopy_start() error paths. Fixes: 908927db28ea

[PATCH for-9.0 1/2] migration: Set migration error in migration_completion()

2024-03-28 Thread Avihai Horon
After commit 9425ef3f990a ("migration: Use migrate_has_error() in close_return_path_on_source()"), close_return_path_on_source() assumes that migration error is set if an error occurs during migration. This may not be true if migration errors in migration_completion(). For example, if

Re: [Stable-8.2.1 61/71] linux-user/riscv: Adjust vdso signal frame cfa offsets

2024-03-28 Thread Andreas Schwab
On Mär 06 2024, Alistair Francis wrote: > On Sun, Mar 3, 2024 at 8:34 PM Andreas Schwab wrote: >> >> On Jan 28 2024, Michael Tokarev wrote: >> >> > From: Richard Henderson >> > >> > A typo in sizeof_reg put the registers at the wrong offset. >> > >> > Simplify the expressions to use positive

Re: [PATCH 0/3] target/ppc: fix tlb flushing race

2024-03-28 Thread Philippe Mathieu-Daudé
On 28/3/24 11:37, Nicholas Piggin wrote: On Thu Mar 28, 2024 at 8:15 PM AEST, Nicholas Piggin wrote: On Thu Mar 28, 2024 at 6:12 PM AEST, Nicholas Piggin wrote: On Thu Mar 28, 2024 at 3:31 PM AEST, Nicholas Piggin wrote: ppc broadcast tlb flushes should be synchronised with other vCPUs, like

Re: [PATCH 2/3] tcg/cputlb: Remove non-synced variants of global TLB flushes

2024-03-28 Thread Philippe Mathieu-Daudé
On 28/3/24 06:31, Nicholas Piggin wrote: These are no longer used. tlb_flush_all_cpus: removed in previous patch tlb_flush_page_all_cpus: removed in previous patch tlb_flush_page_bits_by_mmuidx_all_cpus: never used tlb_flush_page_by_mmuidx_all_cpus: never used

Re: [PATCH 1/3] target/ppc: Fix broadcast tlbie synchronisation

2024-03-28 Thread Philippe Mathieu-Daudé
On 28/3/24 06:31, Nicholas Piggin wrote: With mttcg, broadcast tlbie instructions do not wait until other vCPUs have been kicked out of TCG execution before they complete (including necessary subsequent tlbsync, etc., instructions). This is contrary to the ISA, and it permits other vCPUs to use

[PATCH-for-9.1 v2 3/3] block/gluster: Remove RDMA protocol handling

2024-03-28 Thread Philippe Mathieu-Daudé
GlusterFS+RDMA has been deprecated 8 years ago in commit 0552ff2465 ("block/gluster: deprecate rdma support"): gluster volfile server fetch happens through unix and/or tcp, it doesn't support volfile fetch over rdma. The rdma code may actually mislead, so to make sure things do not break,

[PATCH-for-9.1 v2 0/3] rdma: Remove RDMA subsystem and pvrdma device

2024-03-28 Thread Philippe Mathieu-Daudé
Since v1: - split in 3 (Thomas) - justify gluster removal Philippe Mathieu-Daudé (3): hw/rdma: Remove pvrdma device and rdmacm-mux helper migration: Remove RDMA protocol handling block/gluster: Remove RDMA protocol handling MAINTAINERS | 17 -

Re: [PATCH-for-9.1] rdma: Remove RDMA subsystem and pvrdma device

2024-03-28 Thread Daniel P . Berrangé
On Thu, Mar 28, 2024 at 01:57:27PM +0100, Philippe Mathieu-Daudé wrote: > On 28/3/24 10:06, Daniel P. Berrangé wrote: > > On Wed, Mar 27, 2024 at 11:55:48AM +0100, Philippe Mathieu-Daudé wrote: > > > The whole RDMA subsystem was deprecated in commit e9a54265f5 > > > ("hw/rdma: Deprecate the pvrdma

Re: [PATCH-for-9.1] rdma: Remove RDMA subsystem and pvrdma device

2024-03-28 Thread Philippe Mathieu-Daudé
On 28/3/24 10:06, Daniel P. Berrangé wrote: On Wed, Mar 27, 2024 at 11:55:48AM +0100, Philippe Mathieu-Daudé wrote: The whole RDMA subsystem was deprecated in commit e9a54265f5 ("hw/rdma: Deprecate the pvrdma device and the rdma subsystem") released in v8.2. Time to remove it. Keep the

Re: [PATCH v1] coroutine: avoid inserting duplicate coroutine to co_queue_wakeup

2024-03-28 Thread Eric Blake
On Mon, Mar 25, 2024 at 05:18:50PM +0800, zhuyangyang via wrote: > If g_main_loop_run()/aio_poll() is called in the coroutine context, > the pending coroutine may be woken up repeatedly, and the co_queue_wakeup > may be disordered. > > When the poll() syscall exited in

Re: [RFC QEMU PATCH v8 2/2] virtio-pci: implement No_Soft_Reset bit

2024-03-28 Thread Michael S. Tsirkin
On Thu, Mar 28, 2024 at 11:08:58AM +, Chen, Jiqian wrote: > On 2024/3/28 18:57, Michael S. Tsirkin wrote: > > On Thu, Mar 28, 2024 at 06:39:03PM +0800, Jiqian Chen wrote: > >> In current code, when guest does S3, virtio devices are reset due to > >> the bit No_Soft_Reset is not set. After

Re: [PATCH v2 2/2] ebpf: Fix indirections table setting

2024-03-28 Thread Andrew Melnichenko
Hi all, I've reviewed and checked - this patch is necessary! Acked-by: and...@daynix.com On Thu, Mar 28, 2024 at 11:39 AM Yuri Benditovich wrote: > > Hi Andrew, > Can you please check the indirection table copy and ack on the patch > if the fix is correct > > Thanks, > Yuri > > On Wed, Mar 27,

Re: [PATCH-for-9.1 v2 19/21] hw/i386/pc: Remove 2.3 and deprecate 2.4 to 2.7 pc-i440fx machines

2024-03-28 Thread Philippe Mathieu-Daudé
Hi Zhao, On 28/3/24 04:44, Zhao Liu wrote: Hi Philippe, On Wed, Mar 27, 2024 at 10:51:21AM +0100, Philippe Mathieu-Daudé wrote: Date: Wed, 27 Mar 2024 10:51:21 +0100 From: Philippe Mathieu-Daudé Subject: [PATCH-for-9.1 v2 19/21] hw/i386/pc: Remove 2.3 and deprecate 2.4 to 2.7 pc-i440fx

Ideas on dealing with mttcg_enabled/use_icount globals

2024-03-28 Thread Anton Johansson via
Hi Phil, I've been staring myself blind trying to deal with qemu_tcg_mttcg_enabled()/icount_enabled() and I'm wondering if you have an ideas. I'm leaning towards moving these globals to some TCG accelerator specific state (TCGState?) that's initialized once we know how many/what cpus are in the

Re: [RFC QEMU PATCH v8 2/2] virtio-pci: implement No_Soft_Reset bit

2024-03-28 Thread Chen, Jiqian
On 2024/3/28 18:57, Michael S. Tsirkin wrote: > On Thu, Mar 28, 2024 at 06:39:03PM +0800, Jiqian Chen wrote: >> In current code, when guest does S3, virtio devices are reset due to >> the bit No_Soft_Reset is not set. After resetting, the display resources >> of virtio-gpu are destroyed, then the

Re: [PATCH 09/19] hw/sdhci: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread Philippe Mathieu-Daudé
On 28/3/24 11:20, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau ../hw/sd/sdhci.c:846:16: error: ‘res’ may be used uninitialized [-Werror=maybe-uninitialized] False-positive, because "length" is non-null. Signed-off-by: Marc-André Lureau --- hw/sd/sdhci.c | 2 +- 1 file

Re: [PATCH] block: Remove unnecessary NULL check in bdrv_pad_request()

2024-03-28 Thread Philippe Mathieu-Daudé
On 27/3/24 20:27, Kevin Wolf wrote: Coverity complains that the check introduced in commit 3f934817 suggests that qiov could be NULL and we dereference it before reaching the check. In fact, all of the callers pass a non-NULL pointer, so just remove the misleading check. Resolves: Coverity CID

Re: [PATCH 6/9] i386/pc: Skip initialization of system FW when using IGVM

2024-03-28 Thread Ani Sinha
> On 28 Mar 2024, at 16:04, Ani Sinha wrote: > > > >> On 27 Mar 2024, at 19:43, Roy Hopkins wrote: >> >> On Wed, 2024-03-27 at 18:58 +0530, Ani Sinha wrote: >>> >>> On 27 Feb 2024, at 20:20, Roy Hopkins wrote: When using an IGVM file the configuration of the system

Re: [RFC QEMU PATCH v8 2/2] virtio-pci: implement No_Soft_Reset bit

2024-03-28 Thread Michael S. Tsirkin
On Thu, Mar 28, 2024 at 06:39:03PM +0800, Jiqian Chen wrote: > In current code, when guest does S3, virtio devices are reset due to > the bit No_Soft_Reset is not set. After resetting, the display resources > of virtio-gpu are destroyed, then the display can't come back and only > show blank after

Re: [RFC 04/15] qapi: block-job-change: make copy-mode parameter optional

2024-03-28 Thread Vladimir Sementsov-Ogievskiy
On 28.03.24 12:24, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: We are going to add more parameters to change. We want to make possible to change only one or any subset of available options. So all the options should be optional. Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: qemu process consumes 100% host CPU after reverting snapshot

2024-03-28 Thread Chun Feng Wu
BTW, if I download qemu8.0(https://download.qemu.org/qemu-8.0.0.tar.xz), compile and install it in my ubuntu22.04, launch vm with the same command(just update --machine to be "pc"), the host cpu usage is not high, it seems to be a bug in QEMU6 Also, I have another question, for disk iotune or

Re: [RFC PATCH v8 09/23] target/arm: Handle PSTATE.ALLINT on taking an exception

2024-03-28 Thread Peter Maydell
On Thu, 28 Mar 2024 at 08:57, Jinjie Ruan via wrote: > > > > On 2024/3/20 0:47, Peter Maydell wrote: > > On Mon, 18 Mar 2024 at 09:37, Jinjie Ruan wrote: > >> > >> Set or clear PSTATE.ALLINT on taking an exception to ELx according to the > >> SCTLR_ELx.SPINTMASK bit. > >> > >> Signed-off-by:

Re: [PATCH v4 2/3] tools: build qemu-vmsr-helper

2024-03-28 Thread Daniel P . Berrangé
On Thu, Mar 28, 2024 at 11:27:50AM +0100, Anthony Harivel wrote: > Hi Daniel, > > My apologies for all the missed feedback in v2. > I'll be more organized for my next iteration. > > For this specific comment below, I would like to make sure I'm testing > the right way. > > > > diff --git

Re: [RFC 01/15] scripts/qapi: support type-based unions

2024-03-28 Thread Vladimir Sementsov-Ogievskiy
On 28.03.24 12:15, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Look at block-job-change command: we have to specify both 'id' to chose the job to operate on and 'type' for QAPI union be parsed. But for user this looks redundant: when we specify 'id', QEMU should be able to

[RFC QEMU PATCH v8 1/2] virtio-pci: only reset pm state during resetting

2024-03-28 Thread Jiqian Chen
Fix bug imported by 27ce0f3afc9dd25d21b43bbce505157afd93d111 (fix Power Management Control Register for PCI Express virtio devices) Only state of PM_CTRL is writable. Only when flag VIRTIO_PCI_FLAG_INIT_PM is set, need to reset state. Signed-off-by: Jiqian Chen --- hw/virtio/virtio-pci.c | 8

[RFC QEMU PATCH v8 2/2] virtio-pci: implement No_Soft_Reset bit

2024-03-28 Thread Jiqian Chen
In current code, when guest does S3, virtio devices are reset due to the bit No_Soft_Reset is not set. After resetting, the display resources of virtio-gpu are destroyed, then the display can't come back and only show blank after resuming. Implement No_Soft_Reset bit of PCI_PM_CTRL register, then

[RFC QEMU PATCH v8 0/1] S3 support

2024-03-28 Thread Jiqian Chen
Hi all, This is the v8 patch to support S3. v8 makes below changes: * Add a new patch#1 to fix a problem import by 27ce0f3afc9dd25d21b43bbce505157afd93d111, the right action is that only the state of PM_CTRL can be clear when resetting. * patch#2 is the original patch to implement

Re: [PATCH 0/3] target/ppc: fix tlb flushing race

2024-03-28 Thread Nicholas Piggin
On Thu Mar 28, 2024 at 8:15 PM AEST, Nicholas Piggin wrote: > On Thu Mar 28, 2024 at 6:12 PM AEST, Nicholas Piggin wrote: > > On Thu Mar 28, 2024 at 3:31 PM AEST, Nicholas Piggin wrote: > > > ppc broadcast tlb flushes should be synchronised with other vCPUs, > > > like all other architectures that

Re: [PATCH] block: Remove unnecessary NULL check in bdrv_pad_request()

2024-03-28 Thread Fiona Ebner
Am 27.03.24 um 20:27 schrieb Kevin Wolf: > Coverity complains that the check introduced in commit 3f934817 suggests > that qiov could be NULL and we dereference it before reaching the check. > In fact, all of the callers pass a non-NULL pointer, so just remove the > misleading check. > >

Re: [PATCH 14/19] plugins: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread Pierrick Bouvier
On 3/28/24 14:20, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau ../plugins/loader.c:405:15: error: ‘ctx’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- plugins/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH 6/9] i386/pc: Skip initialization of system FW when using IGVM

2024-03-28 Thread Ani Sinha
> On 27 Mar 2024, at 19:43, Roy Hopkins wrote: > > On Wed, 2024-03-27 at 18:58 +0530, Ani Sinha wrote: >> >> >>> On 27 Feb 2024, at 20:20, Roy Hopkins wrote: >>> >>> When using an IGVM file the configuration of the system firmware is >>> defined by IGVM directives contained in the file.

Re: [PATCH v3 1/3] docs/interop/firmware.json: add new enum FirmwareFormat

2024-03-28 Thread Thomas Weißschuh
Hi Hanna and Kevin, any updates? On Mon, Mar 11, 2024 at 02:29:25PM +0100, Markus Armbruster wrote: > Thomas Weißschuh writes: > > > Only a small subset of all blockdev drivers make sense for firmware > > images. Introduce and use a new enum to represent this. > > > > This also reduces the

Re: [PATCH v4 2/3] tools: build qemu-vmsr-helper

2024-03-28 Thread Anthony Harivel
Hi Daniel, My apologies for all the missed feedback in v2. I'll be more organized for my next iteration. For this specific comment below, I would like to make sure I'm testing the right way. > > diff --git a/meson.build b/meson.build > > index b375248a7614..376da49b60ab 100644 > > ---

[PATCH 19/19] RFC: hw/virtio: a potential leak fix

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau vhost_svq_get_buf() may return a VirtQueueElement that should be freed. It's unclear to me if the vhost_svq_get_buf() call should always return NULL. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-shadow-virtqueue.c | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH 18/19] hw/virtio: fix -Werror=maybe-uninitialized

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/virtio/vhost-shadow-virtqueue.c:545:13: error: ‘r’ may be used uninitialized [-Werror=maybe-uninitialized] '' is not guaranteed to be assigned when calling -Werror=maybe-uninitialized. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-shadow-virtqueue.c | 2

[PATCH 17/19] hw/nvme: fix -Werror=maybe-uninitialized

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/nvme/ctrl.c:6081:21: error: ‘result’ may be used uninitialized [-Werror=maybe-uninitialized] It's not obvious that 'result' is set in all code paths. When is a returned argument, it's even less clear. Looking at various assignments, 0 seems to be a suitable

[PATCH 16/19] tests: fix -Werror=maybe-uninitialized

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../tests/unit/test-block-iothread.c:773:17: error: ‘job’ may be used uninitialized [-Werror=maybe-uninitialized] /usr/include/glib-2.0/glib/gtestutils.h:73:53: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau ---

[PATCH 14/19] plugins: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../plugins/loader.c:405:15: error: ‘ctx’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- plugins/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/loader.c b/plugins/loader.c index

[PATCH 13/19] hw/virtio-blk: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/block/virtio-blk.c:1212:12: error: ‘rq’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- hw/block/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/virtio-blk.c

[PATCH 15/19] migration: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../migration/ram.c:1873:23: error: ‘dirty’ may be used uninitialized [-Werror=maybe-uninitialized] When 'block' != NULL, 'dirty' is initialized. Signed-off-by: Marc-André Lureau --- migration/ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 12/19] migration: fix -Werror=maybe-uninitialized false-positives

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../migration/dirtyrate.c:186:5: error: ‘records’ may be used uninitialized [-Werror=maybe-uninitialized] ../migration/dirtyrate.c:168:12: error: ‘gen_id’ may be used uninitialized [-Werror=maybe-uninitialized] ../migration/migration.c:2273:5: error: ‘file’ may be used

[PATCH 11/19] migration/block: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../migration/block.c:966:16: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized] Given that "cluster_size" must be <= BLK_MIG_BLOCK_SIZE, the previous loop is entered at least once, so 'ret' is assigned a value in all conditions. Signed-off-by:

[PATCH 10/19] hw/rdma: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/rdma/rdma_backend.c:129:8: error: ‘ne’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- hw/rdma/rdma_backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/rdma_backend.c

[PATCH 09/19] hw/sdhci: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/sd/sdhci.c:846:16: error: ‘res’ may be used uninitialized [-Werror=maybe-uninitialized] False-positive, because "length" is non-null. Signed-off-by: Marc-André Lureau --- hw/sd/sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 07/19] hw/ahci: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/ide/ahci.c:989:58: error: ‘tbl_entry_size’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- hw/ide/ahci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index

[PATCH 06/19] block/stream: fix -Werror=maybe-uninitialized false-positives

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../block/stream.c:193:19: error: ‘unfiltered_bs’ may be used uninitialized [-Werror=maybe-uninitialized] ../block/stream.c:176:5: error: ‘len’ may be used uninitialized [-Werror=maybe-uninitialized] trace/trace-block.h:906:9: error: ‘ret’ may be used uninitialized

[PATCH 08/19] hw/vhost-scsi: fix -Werror=maybe-uninitialized

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/scsi/vhost-scsi.c:173:12: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized] It can be reached when num_queues=0. It probably doesn't make much sense to instantiate a vhost-scsi with 0 IO queues though. For now, make vhost_scsi_set_workers()

<    1   2   3   >