Re: [PATCH] build-sys: fix meson project version usage

2023-11-10 Thread Marc-André Lureau
On Thu, Nov 2, 2023 at 6:11 PM wrote: > > From: Marc-André Lureau > > Program wixl found: YES (/usr/bin/wixl) > > ../qga/meson.build:149:16: ERROR: Unknown variable "project". > > Fixes: e20d68aa0b9 ("configure, meson: use command line options to configure > qemu-ga") > Signed-off-by: Marc-André

Re: [PATCH] ui/console: fix default VC when there are no display

2023-11-10 Thread Marc-André Lureau
Hi On Wed, Nov 8, 2023 at 5:37 PM wrote: > > From: Marc-André Lureau > > When display is "none", we may still have remote displays (I think it > would be simpler if VNC/Spice were regular display btw). Return the > default VC then, and set them up to fix a regression when using remote > display

Re: [PATCH v2 1/2] buildsys: Bump minimal meson version required to v1.2.3

2023-11-10 Thread Paolo Bonzini
On Thu, Nov 9, 2023 at 11:00 PM BALATON Zoltan wrote: > So these are packaged with the source. I did not know that. Now I get what > you mean by s/downolads/installs/ in your reply. But then this is disabled > by --disable-download but actually downloading avocado isn't? Confusing. Yes, that's mo

Re: [SeaBIOS] [PATCH v5] limit physical address space size

2023-11-10 Thread Claudio Fontana
On 11/8/23 19:35, Kevin O'Connor wrote: > On Tue, Nov 07, 2023 at 02:03:09PM +0100, Gerd Hoffmann wrote: >> For better compatibility with old linux kernels, >> see source code comment. >> >> Related (same problem in ovmf): >> https://github.com/tianocore/edk2/commit/c1e853769046 > > Thanks. I'll

[PATCH for-8.2] test-resv-mem: Fix CID 1523911

2023-11-10 Thread Eric Auger
Coverity complains about passing "&expected" to "run_range_inverse_array", which dereferences null "expected". I guess the problem is that the compare_ranges() loop dereferences 'e' without testing it. However the loop condition is based on 'ranges' which is garanteed to have the same length as 'ex

Re: [PATCH v5 11/20] vfio/platform: Allow the selection of a given iommu backend

2023-11-10 Thread Cédric Le Goater
On 11/9/23 12:45, Zhenzhong Duan wrote: Now we support two types of iommu backends, let's add the capability to select one of them. This depends on whether an iommufd object has been linked with the vfio-platform device: If the user wants to use the legacy backend, it shall not link the vfio-pla

[PATCH] hw/arm/virt: fix GIC maintenance IRQ registration

2023-11-10 Thread Jean-Philippe Brucker
Since commit 9036e917f8 ("{include/}hw/arm: refactor virt PPI logic"), GIC maintenance IRQ registration fails on arm64: [0.979743] kvm [1]: Cannot register interrupt 9 That commit re-defined VIRTUAL_PMU_IRQ to be a INTID but missed a case where the maintenance IRQ is actually referred by its

RE: [PATCH v5 11/20] vfio/platform: Allow the selection of a given iommu backend

2023-11-10 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Friday, November 10, 2023 4:50 PM >Subject: Re: [PATCH v5 11/20] vfio/platform: Allow the selection of a given >iommu backend > >On 11/9/23 12:45, Zhenzhong Duan wrote: >> Now we support two types of iommu backends, let's add the capabil

Re: [PATCH] docs: document what configure does with virtual environments

2023-11-10 Thread Paolo Bonzini
On Thu, Nov 9, 2023 at 10:35 PM John Snow wrote: > > > +The venv resides in the ``pyvenv`` directory in the build tree, > > > +and provides consistency in how the build process runs Python code. > > > +In particular it avoids a potential mismatch, where Meson and Sphinx > > > > I think you can dro

Re: [PATCH] include/hw/xen: Use more inclusive language in comment

2023-11-10 Thread David Woodhouse
On Thu, 2023-11-09 at 18:40 +0100, Thomas Huth wrote: > Let's improve the wording here. > > Signed-off-by: Thomas Huth Absolutely, but please can we change it in Xen first because these headers are a direct import. Acked-by: David Woodhouse > --- >  include/hw/xen/interface/hvm/params.h | 2 +

[PATCH 0/2] Add QEMU_WARN_UNUSED_RESULT function attribute

2023-11-10 Thread Manos Pitsidianakis
Functions that return a value to indicate success or failure can be decorated with the warn_unused_result attribute. GCC will stop compilation if a caller does not check the return value after calling such a function. This was not possible to spot statically before, but Coverity detects this ki

[PATCH 2/2] Add warn_unused_result attr to AUD_register_card

2023-11-10 Thread Manos Pitsidianakis
Ignoring the return value by accident is easy to miss as a bug. Such a bug was spotted by Coverity CID 1523899. Now, future instances of this type of bug will produce a warning when using GCC. Signed-off-by: Manos Pitsidianakis --- audio/audio.h | 2 +- hw/arm/omap2.c | 8 +++- hw/i

[PATCH 1/2] Add QEMU_WARN_UNUSED_RESULT attribute

2023-11-10 Thread Manos Pitsidianakis
This commit adds QEMU_WARN_UNUSED_RESULT, a macro for the gcc function attribute `warn_unused_result`. The utility of this attribute is to ensure functions that return values that need to be inspected are not ignored by the caller. Signed-off-by: Manos Pitsidianakis --- include/qemu/compiler.h |

Re: [RFC PATCH-for-8.2] .gitlab-ci.d/cirrus.yml: Promote NetBSD job as gating

2023-11-10 Thread Daniel P . Berrangé
On Thu, Nov 09, 2023 at 06:15:51PM +0100, Thomas Huth wrote: > On 09/11/2023 17.58, Daniel P. Berrangé wrote: > > On Thu, Nov 09, 2023 at 04:35:56PM +0100, Philippe Mathieu-Daudé wrote: > > > On 9/11/23 16:35, Philippe Mathieu-Daudé wrote: > > > > This Cirrus-CI based job takes ~12min, similarly to

Re: [PATCH for-8.3 v2 04/46] hw/pci: add pci_init_nic_devices(), pci_init_nic_in_slot()

2023-11-10 Thread David Woodhouse
On Fri, 2023-11-10 at 08:31 +0100, Philippe Mathieu-Daudé wrote: > > > +    pci_dev = pci_new(devfn, model); > > +    qdev_set_nic_properties(&pci_dev->qdev, nd); > > +    pci_realize_and_unref(pci_dev, bus, &error_fatal); > > Could these functions be used with hotplug devices? > > If so we shou

Re: [PATCH 1/2] Add QEMU_WARN_UNUSED_RESULT attribute

2023-11-10 Thread Daniel P . Berrangé
On Fri, Nov 10, 2023 at 11:16:38AM +0200, Manos Pitsidianakis wrote: > This commit adds QEMU_WARN_UNUSED_RESULT, a macro for the gcc function > attribute `warn_unused_result`. The utility of this attribute is to > ensure functions that return values that need to be inspected are not > ignored by th

Re: [PATCH for-8.3 v2 05/46] hw/i386/pc: use qemu_get_nic_info() and pci_init_nic_devices()

2023-11-10 Thread David Woodhouse
On Fri, 2023-11-10 at 08:40 +0100, Philippe Mathieu-Daudé wrote: > Hi David, > > +Markus/Bernhard > > On 6/11/23 20:49, David Woodhouse wrote: > > From: David Woodhouse > > > > Eliminate direct access to nd_table[] and nb_nics by processing the the > > Xen and ISA NICs first and then calling pc

Re: [PATCH] include/hw/xen: Use more inclusive language in comment

2023-11-10 Thread Jan Beulich
On 09.11.2023 18:40, Thomas Huth wrote: > --- a/include/hw/xen/interface/hvm/params.h > +++ b/include/hw/xen/interface/hvm/params.h > @@ -255,7 +255,7 @@ > * Note that 'mixed' mode has not been evaluated for safety from a > * security perspective. Before using this mode in a > * security-cri

Re: [PATCH] virtio-snd: check AUD_register_card return value

2023-11-10 Thread Manos Pitsidianakis
On Fri, 10 Nov 2023 01:23, "Michael S. Tsirkin" wrote: On Thu, Nov 09, 2023 at 06:03:15PM +, Peter Maydell wrote: On Thu, 9 Nov 2023 at 17:53, Michael S. Tsirkin wrote: > > On Thu, Nov 09, 2023 at 04:25:04PM +, Peter Maydell wrote: > > On Thu, 9 Nov 2023 at 16:21, Manos Pitsidianakis >

Re: [RFC PATCH-for-8.2] .gitlab-ci.d/cirrus.yml: Promote NetBSD job as gating

2023-11-10 Thread Thomas Huth
On 10/11/2023 10.22, Daniel P. Berrangé wrote: On Thu, Nov 09, 2023 at 06:15:51PM +0100, Thomas Huth wrote: On 09/11/2023 17.58, Daniel P. Berrangé wrote: On Thu, Nov 09, 2023 at 04:35:56PM +0100, Philippe Mathieu-Daudé wrote: On 9/11/23 16:35, Philippe Mathieu-Daudé wrote: This Cirrus-CI bas

[PATCH] tests: respect --enable/--disable-download for Avocado

2023-11-10 Thread Paolo Bonzini
Pass the content of $mkvenv_flags (which is either "--online" or empty) down to tests/Makefile.include. Signed-off-by: Paolo Bonzini --- configure | 9 + tests/Makefile.include | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/configure b/configure index

Re: [RFC PATCH-for-8.2] .gitlab-ci.d/cirrus.yml: Promote NetBSD job as gating

2023-11-10 Thread Daniel P . Berrangé
On Fri, Nov 10, 2023 at 10:30:26AM +0100, Thomas Huth wrote: > On 10/11/2023 10.22, Daniel P. Berrangé wrote: > > On Thu, Nov 09, 2023 at 06:15:51PM +0100, Thomas Huth wrote: > > > On 09/11/2023 17.58, Daniel P. Berrangé wrote: > > > > On Thu, Nov 09, 2023 at 04:35:56PM +0100, Philippe Mathieu-Daud

Re: [PATCH] include/hw/xen: Use more inclusive language in comment

2023-11-10 Thread Thomas Huth
On 10/11/2023 10.30, Jan Beulich wrote: On 09.11.2023 18:40, Thomas Huth wrote: --- a/include/hw/xen/interface/hvm/params.h +++ b/include/hw/xen/interface/hvm/params.h @@ -255,7 +255,7 @@ * Note that 'mixed' mode has not been evaluated for safety from a * security perspective. Before usin

Re: [PATCH v5 03/20] vfio/iommufd: Implement the iommufd backend

2023-11-10 Thread Cédric Le Goater
On 11/9/23 12:45, Zhenzhong Duan wrote: From: Yi Liu Add the iommufd backend. The IOMMUFD container class is implemented based on the new /dev/iommu user API. This backend obviously depends on CONFIG_IOMMUFD. So far, the iommufd backend doesn't support dirty page sync yet due to missing suppor

Re: [PATCH v5 04/20] vfio/iommufd: Relax assert check for iommufd backend

2023-11-10 Thread Cédric Le Goater
On 11/9/23 12:45, Zhenzhong Duan wrote: Currently iommufd doesn't support dirty page sync yet, but it will not block us doing live migration if VFIO migration is force enabled. So in this case we allow set_dirty_page_tracking to be NULL. Note we don't need same change for query_dirty_bitmap beca

Re: [PATCH v5 05/20] vfio/iommufd: Add support for iova_ranges and pgsizes

2023-11-10 Thread Cédric Le Goater
On 11/9/23 12:45, Zhenzhong Duan wrote: Some vIOMMU such as virtio-iommu use iova ranges from host side to setup reserved ranges for passthrough device, so that guest will not use an iova range beyond host support. Use an uAPI of IOMMUFD to get iova ranges of host side and pass to vIOMMU just li

Re: [PATCH v5 19/20] kconfig: Activate IOMMUFD for s390x machines

2023-11-10 Thread Cédric Le Goater
On 11/10/23 00:00, Matthew Rosato wrote: On 11/9/23 6:45 AM, Zhenzhong Duan wrote: From: Cédric Le Goater Signed-off-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan --- hw/s390x/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/s390x/Kconfig b/hw/s390x/Kconfig index 4c068d

[PATCH v2] docs: document what configure does with virtual environments

2023-11-10 Thread Paolo Bonzini
Given the recent confusion around how QEMU detects the system Meson installation, and/or decides to install its own, it is time to fill in the "Python virtual environments and the QEMU build system" section of the documentation. As a curiosity, a first and partial draft of the text was generated b

Re: [PATCH v2 10/11] qapi: golang: Add CommandResult type to Go

2023-11-10 Thread Andrea Bolognani
On Thu, Nov 09, 2023 at 08:31:01PM +0100, Victor Toso wrote: > On Thu, Nov 09, 2023 at 10:24:20AM -0800, Andrea Bolognani wrote: > > On Mon, Oct 16, 2023 at 05:27:03PM +0200, Victor Toso wrote: > > > Example: > > > qapi: > > > | { 'command': 'query-sev', 'returns': 'SevInfo', > > > | 'if'

Re: [PATCH v3] hw/ide/ahci: fix legacy software reset

2023-11-10 Thread Kevin Wolf
Am 08.11.2023 um 23:26 hat Niklas Cassel geschrieben: > From: Niklas Cassel > > Legacy software contains a standard mechanism for generating a reset to a > Serial ATA device - setting the SRST (software reset) bit in the Device > Control register. > > Serial ATA has a more robust mechanism calle

Re: [PATCH v2 08/11] qapi: golang: Generate qapi's event types in Go

2023-11-10 Thread Andrea Bolognani
On Thu, Nov 09, 2023 at 08:13:38PM +0100, Victor Toso wrote: > On Thu, Nov 09, 2023 at 09:59:50AM -0800, Andrea Bolognani wrote: > > Now, I'm not sure I would go as far as suggesting that the > > GetName() function should be completely removed, but maybe we > > can try leaving it out from the initi

Re: [PATCH v2 07/11] qapi: golang: Generate qapi's union types in Go

2023-11-10 Thread Andrea Bolognani
On Thu, Nov 09, 2023 at 07:35:04PM +0100, Victor Toso wrote: > On Thu, Nov 09, 2023 at 09:29:28AM -0800, Andrea Bolognani wrote: > > Additionally, this would allow client code that *looks* at the > > union to keep working even if actual data is later added to the > > branch; client code that *creat

Re: [PATCH v2 04/11] qapi: golang: Generate qapi's alternate types in Go

2023-11-10 Thread Andrea Bolognani
On Thu, Nov 09, 2023 at 08:01:48PM +0100, Victor Toso wrote: > On Thu, Nov 09, 2023 at 09:34:56AM -0800, Andrea Bolognani wrote: > > We should call this Null instead of IsNull, and also make it a > > pointer similarly to what I just suggested for union branches > > that don't have additional data a

Re: [PATCH] tests: respect --enable/--disable-download for Avocado

2023-11-10 Thread BALATON Zoltan
On Fri, 10 Nov 2023, Paolo Bonzini wrote: Pass the content of $mkvenv_flags (which is either "--online" or empty) down to tests/Makefile.include. Signed-off-by: Paolo Bonzini --- configure | 9 + tests/Makefile.include | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-)

RE: [PATCH v5 05/20] vfio/iommufd: Add support for iova_ranges and pgsizes

2023-11-10 Thread Duan, Zhenzhong
Hi Cédric, >-Original Message- >From: Cédric Le Goater >Sent: Friday, November 10, 2023 5:36 PM >Subject: Re: [PATCH v5 05/20] vfio/iommufd: Add support for iova_ranges and >pgsizes > >On 11/9/23 12:45, Zhenzhong Duan wrote: >> Some vIOMMU such as virtio-iommu use iova ranges from host si

Re: [PATCH] hw/arm/virt: fix GIC maintenance IRQ registration

2023-11-10 Thread Peter Maydell
On Fri, 10 Nov 2023 at 09:07, Jean-Philippe Brucker wrote: > > Since commit 9036e917f8 ("{include/}hw/arm: refactor virt PPI logic"), > GIC maintenance IRQ registration fails on arm64: > > [0.979743] kvm [1]: Cannot register interrupt 9 > > That commit re-defined VIRTUAL_PMU_IRQ to be a INTID

RE: [PATCH v5 03/20] vfio/iommufd: Implement the iommufd backend

2023-11-10 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Friday, November 10, 2023 5:34 PM >Subject: Re: [PATCH v5 03/20] vfio/iommufd: Implement the iommufd backend > >On 11/9/23 12:45, Zhenzhong Duan wrote: >> From: Yi Liu >> >> Add the iommufd backend. The IOMMUFD container class is implem

Re: [PATCH 2/2] Add warn_unused_result attr to AUD_register_card

2023-11-10 Thread Peter Maydell
On Fri, 10 Nov 2023 at 09:16, Manos Pitsidianakis wrote: > > Ignoring the return value by accident is easy to miss as a bug. Such a > bug was spotted by Coverity CID 1523899. Now, future instances of this > type of bug will produce a warning when using GCC. > > Signed-off-by: Manos Pitsidianakis

Re: [PATCH] include/hw/xen: Use more inclusive language in comment

2023-11-10 Thread David Woodhouse
On Fri, 2023-11-10 at 10:30 +0100, Jan Beulich wrote: > On 09.11.2023 18:40, Thomas Huth wrote: > > --- a/include/hw/xen/interface/hvm/params.h > > +++ b/include/hw/xen/interface/hvm/params.h > > @@ -255,7 +255,7 @@ > >   * Note that 'mixed' mode has not been evaluated for safety from a > >   * sec

Re: [SeaBIOS] [PATCH v5] limit physical address space size

2023-11-10 Thread Gerd Hoffmann
On Fri, Nov 10, 2023 at 09:36:02AM +0100, Claudio Fontana wrote: > On 11/8/23 19:35, Kevin O'Connor wrote: > > On Tue, Nov 07, 2023 at 02:03:09PM +0100, Gerd Hoffmann wrote: > >> For better compatibility with old linux kernels, > >> see source code comment. > >> > >> Related (same problem in ovmf):

Re: [PATCH v5 10/20] vfio/pci: Make vfio cdev pre-openable by passing a file handle

2023-11-10 Thread Cédric Le Goater
On 11/9/23 12:45, Zhenzhong Duan wrote: This gives management tools like libvirt a chance to open the vfio cdev with privilege and pass FD to qemu. This way qemu never needs to have privilege to open a VFIO or iommu cdev node. Together with the earlier support of pre-opening /dev/iommu device, n

Re: [PATCH] tests: respect --enable/--disable-download for Avocado

2023-11-10 Thread Paolo Bonzini
On Fri, Nov 10, 2023 at 11:00 AM BALATON Zoltan wrote: > > +if test "$download" = "enabled" ; then > > +mkvenv_online_flag=" --online" > > Is leading space before -- intended? It does not seem to matter at usees > below. Maybe it's paranoia but I was worried that some shells would mess up "ec

Re: [RFC PATCH 1/2] migration: Report error in incoming migration

2023-11-10 Thread Fabiano Rosas
Peter Xu writes: > On Thu, Nov 09, 2023 at 01:58:55PM -0300, Fabiano Rosas wrote: >> We're not currently reporting the errors set with migrate_set_error() >> when incoming migration fails. >> >> Signed-off-by: Fabiano Rosas >> --- >> migration/migration.c | 7 +++ >> 1 file changed, 7 inse

Re: [PATCH 2/2] Add warn_unused_result attr to AUD_register_card

2023-11-10 Thread Manos Pitsidianakis
On Fri, 10 Nov 2023 12:21, Peter Maydell wrote: This kind of thing is why Coverity's unused-result warning has a lot of false positives. We shouldn't introduce extra code like this to work around the fact that the tooling doesn't understand our error-handling convention (i.e. error_fatal, and th

Re: [SeaBIOS] [PATCH v5] limit physical address space size

2023-11-10 Thread Gerd Hoffmann
Hi, > This only changes the placement of the PCI bars. The pci setup code is > the only consumer of that variable, guess it makes sense to move the > quirk to the pci code (as suggested by Kevin) to clarify this. i.e. like this: >From d538dc7d4316e557ae302464252444d09de0681d Mon Sep 17 00:00:

Re: [PATCH 1/2] Add QEMU_WARN_UNUSED_RESULT attribute

2023-11-10 Thread Philippe Mathieu-Daudé
On 10/11/23 10:16, Manos Pitsidianakis wrote: This commit adds QEMU_WARN_UNUSED_RESULT, a macro for the gcc function attribute `warn_unused_result`. The utility of this attribute is to ensure functions that return values that need to be inspected are not ignored by the caller. Signed-off-by: Man

Re: [PATCH 2/2] Add warn_unused_result attr to AUD_register_card

2023-11-10 Thread Peter Maydell
On Fri, 10 Nov 2023 at 11:02, Manos Pitsidianakis wrote: > > On Fri, 10 Nov 2023 12:21, Peter Maydell wrote: > >This kind of thing is why Coverity's unused-result warning has a > >lot of false positives. We shouldn't introduce extra code like > >this to work around the fact that the tooling doesn

Re: [PATCH 2/2] Add warn_unused_result attr to AUD_register_card

2023-11-10 Thread Daniel P . Berrangé
On Fri, Nov 10, 2023 at 12:44:56PM +0200, Manos Pitsidianakis wrote: > On Fri, 10 Nov 2023 12:21, Peter Maydell wrote: > > This kind of thing is why Coverity's unused-result warning has a > > lot of false positives. We shouldn't introduce extra code like > > this to work around the fact that the t

Re: [PATCH 2/2] Add warn_unused_result attr to AUD_register_card

2023-11-10 Thread Daniel P . Berrangé
On Fri, Nov 10, 2023 at 11:18:39AM +, Peter Maydell wrote: > On Fri, 10 Nov 2023 at 11:02, Manos Pitsidianakis > wrote: > > > > On Fri, 10 Nov 2023 12:21, Peter Maydell wrote: > > >This kind of thing is why Coverity's unused-result warning has a > > >lot of false positives. We shouldn't intro

Re: [PATCH 2/2] Add warn_unused_result attr to AUD_register_card

2023-11-10 Thread Manos Pitsidianakis
On Fri, 10 Nov 2023 13:20, "Daniel P. Berrangé" wrote: Your approach to the problem: if (!AUD_register_card("OMAP EAC", &s->codec.card, &error_fatal)) { exit(1); } is adding dead-code because the exit(1) will never be reachable. So while it lets you squelch the unused result warning, it i

Re: [PATCH 2/2] Add warn_unused_result attr to AUD_register_card

2023-11-10 Thread Manos Pitsidianakis
On Fri, 10 Nov 2023 13:23, "Daniel P. Berrangé" wrote: On Fri, Nov 10, 2023 at 11:18:39AM +, Peter Maydell wrote: On Fri, 10 Nov 2023 at 11:02, Manos Pitsidianakis wrote: > > On Fri, 10 Nov 2023 12:21, Peter Maydell wrote: > >This kind of thing is why Coverity's unused-result warning has

Re: [PATCH 2/2] Add warn_unused_result attr to AUD_register_card

2023-11-10 Thread BALATON Zoltan
On Fri, 10 Nov 2023, Daniel P. Berrangé wrote: On Fri, Nov 10, 2023 at 12:44:56PM +0200, Manos Pitsidianakis wrote: On Fri, 10 Nov 2023 12:21, Peter Maydell wrote: This kind of thing is why Coverity's unused-result warning has a lot of false positives. We shouldn't introduce extra code like th

Re: [PATCH 2/2] Add warn_unused_result attr to AUD_register_card

2023-11-10 Thread Daniel P . Berrangé
On Fri, Nov 10, 2023 at 12:35:56PM +0100, BALATON Zoltan wrote: > On Fri, 10 Nov 2023, Daniel P. Berrangé wrote: > > On Fri, Nov 10, 2023 at 12:44:56PM +0200, Manos Pitsidianakis wrote: > > > On Fri, 10 Nov 2023 12:21, Peter Maydell wrote: > > > > This kind of thing is why Coverity's unused-result

Re: [PATCH] hw/arm/virt: fix GIC maintenance IRQ registration

2023-11-10 Thread Jean-Philippe Brucker
On Fri, Nov 10, 2023 at 10:19:30AM +, Peter Maydell wrote: > On Fri, 10 Nov 2023 at 09:07, Jean-Philippe Brucker > wrote: > > > > Since commit 9036e917f8 ("{include/}hw/arm: refactor virt PPI logic"), > > GIC maintenance IRQ registration fails on arm64: > > > > [0.979743] kvm [1]: Cannot r

Re: [RFC PATCH 2/2] migration/multifd: Move semaphore release into main thread

2023-11-10 Thread Fabiano Rosas
Peter Xu writes: > On Thu, Nov 09, 2023 at 01:58:56PM -0300, Fabiano Rosas wrote: >> We cannot operate on the multifd semaphores outside of the multifd >> channel thread >> because multifd_save_cleanup() can run in parallel and >> attempt to destroy the mutexes, which causes an assert. >> >> Loo

Re: [RFC PATCH] Hexagon (target/hexagon) Make generators object oriented

2023-11-10 Thread Matheus Tavares Bernardino
Taylor Simpson wrote: > > RFC - This patch handles gen_tcg_funcs.py. I'd like to get comments > on the general approach before working on the other Python scripts. > > The generators are generally a bunch of Python if-then-else > statements based on the regtype and regid. Encapsulate regtype/re

Re: [RFC PATCH 2/2] migration/multifd: Move semaphore release into main thread

2023-11-10 Thread Fabiano Rosas
Fabiano Rosas writes: > Peter Xu writes: > >> On Thu, Nov 09, 2023 at 01:58:56PM -0300, Fabiano Rosas wrote: >>> We cannot operate on the multifd semaphores outside of the multifd >>> channel thread >>> because multifd_save_cleanup() can run in parallel and >>> attempt to destroy the mutexes, wh

Re: [PATCH 2/2] Add warn_unused_result attr to AUD_register_card

2023-11-10 Thread Philippe Mathieu-Daudé
On 10/11/23 12:20, Daniel P. Berrangé wrote: On Fri, Nov 10, 2023 at 12:44:56PM +0200, Manos Pitsidianakis wrote: On Fri, 10 Nov 2023 12:21, Peter Maydell wrote: This kind of thing is why Coverity's unused-result warning has a lot of false positives. We shouldn't introduce extra code like this

Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend

2023-11-10 Thread Joao Martins
On 10/11/2023 03:15, Duan, Zhenzhong wrote: > Hi Jason, Joao, > >> -Original Message- >> From: Jason Gunthorpe >> Sent: Thursday, November 9, 2023 10:35 PM >> Subject: Re: [PATCH v4 28/41] vfio/iommufd: Implement the iommufd backend >> >> On Thu, Nov 09, 2023 at 01:21:59PM +, Joao Mar

Re: [PATCH 5/7] qcow2: zero_l2_subclusters: fall through to discard operation when requested

2023-11-10 Thread Andrey Drobyshev
On 11/3/23 17:19, Hanna Czenczek wrote: > On 20.10.23 23:56, Andrey Drobyshev wrote: >> When zeroizing subclusters within single cluster, detect usage of the >> BDRV_REQ_MAY_UNMAP flag and fall through to the subcluster-based discard >> operation, much like it's done with the cluster-based discards

Re: [PATCH 4/7] qcow2: make subclusters discardable

2023-11-10 Thread Andrey Drobyshev
On 10/31/23 18:33, Hanna Czenczek wrote: > (Sorry, opened another reply window, forgot I already had one open...) > > On 20.10.23 23:56, Andrey Drobyshev wrote: >> This commit makes the discard operation work on the subcluster level >> rather than cluster level.  It introduces discard_l2_subcluste

Re: [PATCH v2 0/3] dump: Arch info function pointer addition and cleanup

2023-11-10 Thread Marc-André Lureau
Hi On Thu, Nov 9, 2023 at 4:05 PM Janosch Frank wrote: > > Small cleanups/fixes to the dump info function pointer assignments as > well as a new function pointer for cleanup of residual state. > > This has come up because test managed to dump a s390 PV vm onto a disk > that was too small for the

[PATCH 0/2] Implementation of resource_query_layout

2023-11-10 Thread Julia Zhang
This add implementation of resource_query_layout to get the information of how the host has actually allocated the buffer. This function is now used to query the stride for guest linear resource for dGPU prime on guest VMs. Related mesa mr: https: //gitlab.freedesktop.org/mesa/mesa/-/merge_request

[PATCH 1/2] virgl: Implement resource_query_layout

2023-11-10 Thread Julia Zhang
From: Daniel Stone A new ioctl to shuttle information between host and guest about the actual buffer allocation, which can be used for interop between GL and Vulkan when supporting standard window systems. --- hw/display/virtio-gpu-base.c| 4 ++ hw/display/virtio-gpu-virgl.c

[PATCH 2/2] virgl: Modify resource_query_layout

2023-11-10 Thread Julia Zhang
Modify resource_query_layout to handle the use case that need to query correct stride for guest linear resource before it is created. Signed-off-by: Julia Zhang --- hw/display/virtio-gpu-virgl.c | 20 +++- include/standard-headers/linux/virtio_gpu.h | 8 2

[PATCH v4] target/ppc: Fix bugs in VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros

2023-11-10 Thread John Platts
The patch below fixes a bug in the VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros in target/ppc/fpu_helper.c where a non-NaN floating point value from the source vector is incorrectly converted to 0, 0x8000, or 0x8000 instead of the expected value if a preceding source floating

Re: [PATCH v5] target/ppc: Fix bugs in VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros

2023-11-10 Thread John Platts
The patch below fixes a bug in the VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros in target/ppc/fpu_helper.c where a non-NaN floating point value from the source vector is incorrectly converted to 0, 0x8000, or 0x8000 instead of the expected value if a preceding source floating poi

[PATCH v5] target/ppc: Fix bugs in VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros

2023-11-10 Thread John Platts
The patch below fixes a bug in the VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros in target/ppc/fpu_helper.c where a non-NaN floating point value from the source vector is incorrectly converted to 0, 0x8000, or 0x8000 instead of the expected value if a preceding source floating poi

Re: [PATCH v2 04/11] qapi: golang: Generate qapi's alternate types in Go

2023-11-10 Thread Victor Toso
Hi, On Fri, Nov 10, 2023 at 01:58:20AM -0800, Andrea Bolognani wrote: > On Thu, Nov 09, 2023 at 08:01:48PM +0100, Victor Toso wrote: > > On Thu, Nov 09, 2023 at 09:34:56AM -0800, Andrea Bolognani wrote: > > > We should call this Null instead of IsNull, and also make it a > > > pointer similarly to

Re: [PATCH v2 07/11] qapi: golang: Generate qapi's union types in Go

2023-11-10 Thread Victor Toso
Hi, On Fri, Nov 10, 2023 at 01:54:50AM -0800, Andrea Bolognani wrote: > On Thu, Nov 09, 2023 at 07:35:04PM +0100, Victor Toso wrote: > > On Thu, Nov 09, 2023 at 09:29:28AM -0800, Andrea Bolognani wrote: > > > Additionally, this would allow client code that *looks* at the > > > union to keep workin

[PATCH 1/1] ui/cocoa: add zoom-interpolation display option

2023-11-10 Thread carwynellis
From: Carwyn Ellis Provides a new display option, zoom-interpolation, that enables interpolation of the scaled display when zoom-to-fit is enabled. Also provides a corresponding view menu item to allow this to be toggled as required. Signed-off-by: Carwyn Ellis --- qapi/ui.json | 6 +- u

[PATCH 0/1] ui/cocoa: add zoom-interpolation display option

2023-11-10 Thread carwynellis
From: Carwyn Ellis Provides a new display option, zoom-interpolation, that enables or disables smoothing of the scaled display output when the zoom-to-fit option is enabled. A 'Zoom Interpolation' item has also been added to the view menu to allow interpolation to be toggled on and off as requir

[PATCH] target/arm: Correct MTE tag checking for reverse-copy MOPS

2023-11-10 Thread Peter Maydell
When we are doing a FEAT_MOPS copy that must be performed backwards, we call mte_mops_probe_rev(), passing it the address of the last byte in the region we are probing. However, allocation_tag_mem_probe() wants the address of the first byte to get the tag memory for. Because we passed it (ptr, siz

Re: [PATCH v5] target/ppc: Fix bugs in VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros

2023-11-10 Thread Cédric Le Goater
Hello John, On 11/10/23 16:37, John Platts wrote: The patch below fixes a bug in the VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros in target/ppc/fpu_helper.c where a non-NaN floating point value from the source vector is incorrectly converted to 0, 0x8000, or 0x8000 instead of

[PATCH] hw/audio/es1370: Clean up comment

2023-11-10 Thread Peter Maydell
Replace a sweary comment with one that's a bit more helpful to future readers of the code. Signed-off-by: Peter Maydell --- hw/audio/es1370.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c index 91c47330ad3..fad55412119 100644 -

Re: [SeaBIOS] [PATCH v5] limit physical address space size

2023-11-10 Thread Kevin O'Connor
On Fri, Nov 10, 2023 at 12:04:24PM +0100, Gerd Hoffmann wrote: > Hi, > > > This only changes the placement of the PCI bars. The pci setup code is > > the only consumer of that variable, guess it makes sense to move the > > quirk to the pci code (as suggested by Kevin) to clarify this. > > i.e.

Re: [SeaBIOS] [PATCH v5] limit physical address space size

2023-11-10 Thread Kevin O'Connor
On Fri, Nov 10, 2023 at 11:44:48AM -0500, Kevin O'Connor wrote: > On Fri, Nov 10, 2023 at 12:04:24PM +0100, Gerd Hoffmann wrote: > > -if (CPUPhysBits) { > > -u64 top = 1LL << CPUPhysBits; > > +if (pci_phys_bits) { > > FYI, this is a change in behavior - previously this

[PATCH for-8.2] accel/tcg: Remove CF_LAST_IO

2023-11-10 Thread Richard Henderson
In cpu_exec_step_atomic, we did not set CF_LAST_IO, which can lead to a loop with cpu_io_recompile. But since 18a536f1f8 ("Always require can_do_io") we no longer need a flag to indicate when the last insn should have can_do_io set, so remove the flag entirely. Reported-by: Clément Chigot Resolv

[PATCH] target/i386: Fix CPUID encoding of Fn8000001E_ECX

2023-11-10 Thread Babu Moger
Observed the following failure while booting the SEV-SNP guest and the guest fails to boot with the smp parameters: "-smp 192,sockets=1,dies=12,cores=8,threads=2". qemu-system-x86_64: sev_snp_launch_update: SNP_LAUNCH_UPDATE ret=-5 fw_error=22 'Invalid parameter' qemu-system-x86_64: SEV-SNP: CPUI

[PATCH 0/8] Add powernv10 I2C devices and tests

2023-11-10 Thread Glenn Miles
This series of patches includes support, tests and fixes for adding PCA9552 and PCA9554 I2C devices to the powernv10 chip. The PCA9552 device is used for PCIe slot hotplug power control and monitoring, while the PCA9554 device is used for presence detection of IBM CableCard devices. Both devices

[PULL v2 00/11] qdev: Make array properties user accessible again

2023-11-10 Thread Kevin Wolf
The following changes since commit ea10c3817814b8be75be22c78ea91d633b0d2532: Merge tag 'tracing-pull-request' of https://gitlab.com/stefanha/qemu into staging (2023-11-10 08:10:43 +0800) are available in the Git repository at: https://repo.or.cz/qemu/kevin.git tags/qdev-array-prop for you

[PATCH 4/8] ppc/pnv: Fix PNV I2C invalid status after reset

2023-11-10 Thread Glenn Miles
The PNV I2C Controller was clearing the status register after a reset without repopulating the "upper threshold for I2C ports", "Command Complete" and the SCL/SDA input level fields. Fixed this for resets caused by a system reset as well as from writing to the "Immediate Reset" register. Signed-o

[PATCH 8/8] ppc/pnv: Test pnv i2c master and connected devices

2023-11-10 Thread Glenn Miles
Tests the following for both P9 and P10: - I2C master POR status - I2C master status after immediate reset Tests the following for P10 only: - Config pca9552 hotplug device pins as inputs then Read the INPUT0/1 registers to verify all pins are high - Connected GPIO pin tests of P10 PCA

[PATCH 6/8] misc: Add a pca9554 GPIO device model

2023-11-10 Thread Glenn Miles
Specs are available here: https://www.nxp.com/docs/en/data-sheet/PCA9554_9554A.pdf This is a simple model supporting the basic registers for GPIO mode. The device also supports an interrupt output line but the model does not yet support this. Signed-off-by: Glenn Miles --- MAINTAINERS

[PATCH 1/8] ppc/pnv: Add pca9552 to powernv10 for PCIe hotplug power control

2023-11-10 Thread Glenn Miles
The Power Hypervisor code expects to see a pca9552 device connected to the 3rd PNV I2C engine on port 1 at I2C address 0x63 (or left- justified address of 0xC6). This is used by hypervisor code to control PCIe slot power during hotplug events. Signed-off-by: Glenn Miles --- hw/ppc/Kconfig | 1 +

[PATCH 3/8] ppc/pnv: PNV I2C engines assigned incorrect XSCOM addresses

2023-11-10 Thread Glenn Miles
The PNV I2C engines for power9 and power10 were being assigned a base XSCOM address that was off by one I2C engine's address range such that engine 0 had engine 1's address and so on. The xscom address assignment was being based on the device tree engine numbering, which starts at 1. Rather than

[PATCH 5/8] ppc/pnv: Use resettable interface to reset child I2C buses

2023-11-10 Thread Glenn Miles
The QEMU I2C buses and devices use the resettable interface for resetting while the PNV I2C controller and parent buses and devices have not yet transitioned to this new interface and use the old reset strategy. This was preventing the I2C buses and devices wired to the PNV I2C controller from bein

[PATCH 7/8] ppc/pnv: Add a pca9554 I2C device to powernv10

2023-11-10 Thread Glenn Miles
The Power Hypervisor code expects to see a pca9554 device connected to the 3rd PNV I2C engine on port 1 at I2C address 0x25 (or left- justified address of 0x4A). This is used by the hypervisor code to detect if a "Cable Card" is present. Signed-off-by: Glenn Miles --- hw/misc/Kconfig | 4 ++

[PATCH 2/8] ppc/pnv: Wire up pca9552 GPIO pins for PCIe hotplug power control

2023-11-10 Thread Glenn Miles
For power10, a pca9552 device is used for PCIe slot hotplug power control by the Power Hypervisor code. The code expects that some time after it enables power to a PCIe slot by asserting one of the pca9552 GPIO pins 0-4, it should see a "power good" signal asserted on one of pca9552 GPIO pins 5-9.

[PATCH for-8.2] hw/riscv/virt.c: do create_fdt() earlier, add finalize_fdt()

2023-11-10 Thread Daniel Henrique Barboza
Commit 49554856f0 fixed a problem, where TPM devices were not appearing in the FDT, by delaying the FDT creation up until virt_machine_done(). This create a side effect (see gitlab #1925) - devices that need access to the '/chosen' FDT node during realize() stopped working because, at that point, w

Re: [PATCH] target/arm: Correct MTE tag checking for reverse-copy MOPS

2023-11-10 Thread Philippe Mathieu-Daudé
On 10/11/23 17:25, Peter Maydell wrote: When we are doing a FEAT_MOPS copy that must be performed backwards, we call mte_mops_probe_rev(), passing it the address of the last byte in the region we are probing. However, allocation_tag_mem_probe() wants the address of the first byte to get the tag

Re: [PATCH v2 1/1] plugins: Move the windows linking function to qemu

2023-11-10 Thread Greg Manning
> Previously, a plugin author needed an implementation of the > __pfnDliFailureHook2 or __pfnDliNotifyHook2 hook in the plugin. Now all > they need is a null exported pointer with the right name (as in > win32_linker.c). If QEMU finds this, it will set it to the hook > function, which has now moved

[PATCH v2 0/2] s390x/pci: small set of fixes

2023-11-10 Thread Matthew Rosato
The following set of changes are associated with issues exposed by testing of the 'vfio: Adopt iommufd' series. The first patch fixes an existing assumption that a vfio device will always have a group fd (which is no longer true if cdev is used, which can only happen once the iommufd backend is us

[PATCH v2 2/2] s390x/pci: only limit DMA aperture if vfio DMA limit reported

2023-11-10 Thread Matthew Rosato
If the host kernel lacks vfio DMA limit reporting, do not attempt to shrink the guest DMA aperture. Fixes: df202e3ff3 ("s390x/pci: shrink DMA aperture to be bound by vfio DMA limit") Signed-off-by: Matthew Rosato --- hw/s390x/s390-pci-vfio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v2 1/2] s390x/pci: bypass vfio DMA counting when using cdev

2023-11-10 Thread Matthew Rosato
The current code assumes that there is always a vfio group, but that's no longer guaranteed with the iommufd backend when using cdev. In this case, we don't need to track the vfio dma limit anyway. Signed-off-by: Matthew Rosato --- hw/s390x/s390-pci-vfio.c | 4 1 file changed, 4 insertions

Re: [PATCH 0/8] Add powernv10 I2C devices and tests

2023-11-10 Thread Miles Glenn
On Fri, 2023-11-10 at 11:22 -0600, Glenn Miles wrote: > This series of patches includes support, tests and fixes for > adding PCA9552 and PCA9554 I2C devices to the powernv10 chip. > > The PCA9552 device is used for PCIe slot hotplug power control > and monitoring, while the PCA9554 device is used

[PATCH] linux-user/riscv: Add Zicboz block size to hwprobe

2023-11-10 Thread Palmer Dabbelt
Support for probing the Zicboz block size landed in Linux 6.6, which was released a few weeks ago. This provides the user-configured block size when Zicboz is enabled. Signed-off-by: Palmer Dabbelt --- linux-user/syscall.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/linux-user/sys

[PATCH v6] target/ppc: Fix bugs in VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros

2023-11-10 Thread John Platts
The patch below fixes a bug in the VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros in target/ppc/fpu_helper.c where a non-NaN floating point value from the source vector is incorrectly converted to 0, 0x8000, or 0x8000 instead of the expected value if a preceding source floating poi

[PATCH v7] target/ppc: Fix bugs in VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros

2023-11-10 Thread John Platts
The patch below fixes a bug in the VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros in target/ppc/fpu_helper.c where a non-NaN floating point value from the source vector is incorrectly converted to 0, 0x8000, or 0x8000 instead of the expected value if a preceding source floating poi

[PATCH v8] target/ppc: Fix bugs in VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros

2023-11-10 Thread John Platts
The patch below fixes a bug in the VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros in target/ppc/fpu_helper.c where a non-NaN floating point value from the source vector is incorrectly converted to 0, 0x8000, or 0x8000 instead of the expected value if a preceding source floating poi

  1   2   >