Re: [RFC] Proposal of QEMU PCI Endpoint test environment

2023-10-05 Thread Mattias Nissler
On Thu, Oct 5, 2023 at 3:31 AM Shunsuke Mie wrote: > > Hi Jiri, Mattias and all. > > 2023年10月4日(水) 16:36 Mattias Nissler : >>> >>> hi shunsuke, all, >>> what about vfio-user + qemu? > > Thank you for the suggestion. > >> FWIW, I have had some good success using VFIO-user to bridge software >> com

Re: [PATCH v2 2/5] hw/i386/apic: Defer error check from apic_get_class to kvm_apic_realize

2023-10-05 Thread Philippe Mathieu-Daudé
Hi Bernhard, On 4/10/23 01:21, Bernhard Beschow wrote: Am 3. Oktober 2023 08:27:25 UTC schrieb "Philippe Mathieu-Daudé" : apic_get_class() isn't supposed to fail. kvm_apic_realize() is DeviceRealize() handler, which can fail. Defer the error check to the latter. Signed-off-by: Philippe Mathie

Re: [PATCH] hw/isa/vt82c686: Respect SCI interrupt assignment

2023-10-05 Thread Bernhard Beschow
Am 4. Oktober 2023 14:52:14 UTC schrieb BALATON Zoltan : >On Wed, 4 Oct 2023, Bernhard Beschow wrote: >> Am 4. Oktober 2023 12:08:02 UTC schrieb BALATON Zoltan : >>> On Tue, 3 Oct 2023, Bernhard Beschow wrote: According to the datasheet, SCI interrupts of the power management function

Re: [PATCH 00/52] migration/rdma: Error handling fixes

2023-10-05 Thread Daniel P . Berrangé
On Wed, Oct 04, 2023 at 08:00:34PM +0200, Juan Quintela wrote: > Daniel P. Berrangé wrote: > > On Tue, Sep 19, 2023 at 12:49:46PM -0400, Peter Xu wrote: > >> On Mon, Sep 18, 2023 at 04:41:14PM +0200, Markus Armbruster wrote: > >> > Oh dear, where to start. There's so much wrong, and in pretty obv

Re: [RFC] migration/block-dirty-bitmap: make loading bitmap for device with iothread future-proof

2023-10-05 Thread Fiona Ebner
Am 04.10.23 um 18:13 schrieb Vladimir Sementsov-Ogievskiy: >> @@ -833,7 +836,10 @@ static int dirty_bitmap_load_start(QEMUFile *f, >> DBMLoadState *s) >>     bdrv_disable_dirty_bitmap(s->bitmap); >>   if (flags & DIRTY_BITMAP_MIG_START_FLAG_ENABLED) { >> +    AioContext *ctx = bdrv_get_

Re: [PATCH v2 52/53] migration/rdma: Use error_report() & friends instead of stderr

2023-10-05 Thread Juan Quintela
Markus Armbruster wrote: > error_report() obeys -msg, reports the current error location if any, > and reports to the current monitor if any. Reporting to stderr > directly with fprintf() or perror() is wrong, because it loses all > this. > > Fix the offenders. Bonus: resolves a FIXME about prob

Re: [PATCH v2] hw/isa/vt82c686: Respect SCI interrupt assignment

2023-10-05 Thread Bernhard Beschow
Am 4. Oktober 2023 12:28:58 UTC schrieb BALATON Zoltan : >On Wed, 4 Oct 2023, Bernhard Beschow wrote: >> According to the datasheet, SCI interrupts of the power management function >> aren't routed through the PCI pins but rather directly to the integrated PIC. >> The routing is configurable thr

Re: [PATCH v3 01/10] migration: Display error in query-migrate irrelevant of status

2023-10-05 Thread Juan Quintela
Peter Xu wrote: > Display it as long as being set, irrelevant of FAILED status. E.g., it may > also be applicable to PAUSED stage of postcopy, to provide hint on what has > gone wrong. > > The error_mutex seems to be overlooked when referencing the error, add it > to be very safe. > > This will c

Re: [PATCH v3 02/10] migration: Introduce migrate_has_error()

2023-10-05 Thread Juan Quintela
Peter Xu wrote: > Introduce a helper to detect whether MigrationState.error is set for > whatever reason. > > This is preparation work for any thread (e.g. source return path thread) to > setup errors in an unified way to MigrationState, rather than relying on > its own way to set errors (mark_sou

Re: [PATCH v3 04/10] migration: Deliver return path file error to migrate state too

2023-10-05 Thread Juan Quintela
Peter Xu wrote: > We've already did this for most of the return path thread errors, but not > yet for the IO errors happened on the return path qemufile. Do that too. > > Re-export qemu_file_get_error_obj(). > > Signed-off-by: Peter Xu Reviewed-by: Juan Quintela

Re: [PATCH v2 2/5] hw/i386/apic: Defer error check from apic_get_class to kvm_apic_realize

2023-10-05 Thread Bernhard Beschow
Am 5. Oktober 2023 07:06:38 UTC schrieb "Philippe Mathieu-Daudé" : >Hi Bernhard, > >On 4/10/23 01:21, Bernhard Beschow wrote: >> Am 3. Oktober 2023 08:27:25 UTC schrieb "Philippe Mathieu-Daudé" >> : >>> apic_get_class() isn't supposed to fail. kvm_apic_realize() is >>> DeviceRealize() handler,

Re: [PATCH v3 05/10] qemufile: Always return a verbose error

2023-10-05 Thread Juan Quintela
Peter Xu wrote: > There're a lot of cases where we only have an errno set in last_error but > without a detailed error description. When this happens, try to generate > an error contains the errno as a descriptive error. > > This will be helpful in cases where one relies on the Error*. E.g., > m

Re: [PATCH v3 06/10] migration: Remember num of ramblocks to sync during recovery

2023-10-05 Thread Juan Quintela
Peter Xu wrote: > Instead of only relying on the count of rp_sem, make the counter be part of > RAMState so it can be used in both threads to synchronize on the process. > > rp_sem will be further reused in follow up patches, as a way to kick the > main thread, e.g., on recovery failures. > > Revi

Re: [PATCH v3 07/10] migration: Add migration_rp_wait|kick()

2023-10-05 Thread Juan Quintela
Peter Xu wrote: > It's just a simple wrapper for rp_sem on either wait() or kick(), make it > even clearer on how it is used. Prepared to be used even for other things. > > Reviewed-by: Fabiano Rosas > Signed-off-by: Peter Xu Reviewed-by: Juan Quintela I agree with the idea, but I think that

Re: [PATCH v3 03/10] migration: Refactor error handling in source return path

2023-10-05 Thread Juan Quintela
Peter Xu wrote: > rp_state.error was a boolean used to show error happened in return path > thread. That's not only duplicating error reporting (migrate_set_error), > but also not good enough in that we only do error_report() and set it to > true, we never can keep a history of the exact error an

Re: [PATCH v3 09/10] migration: Allow RECOVER->PAUSED convertion for dest qemu

2023-10-05 Thread Juan Quintela
Peter Xu wrote: > There's a bug on dest that if a double fault triggered on dest qemu (a > network issue during postcopy-recover), we won't set PAUSED correctly > because we assumed we always came from ACTIVE. > > Fix that by always overwriting the state to PAUSE. > > We could also check for these

Re: Wshadow: Better name for 'optarg'?

2023-10-05 Thread Daniel P . Berrangé
On Thu, Oct 05, 2023 at 07:17:17AM +0200, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > > > On 4/10/23 19:35, Thomas Huth wrote: > >> On 04/10/2023 19.23, Richard Henderson wrote: > >>> On 10/4/23 03:05, Philippe Mathieu-Daudé wrote: > Hi, > > I'm getting a bunch of e

Re: Wshadow: Better name for 'optarg'?

2023-10-05 Thread Claudio Fontana
On 10/4/23 12:05, Philippe Mathieu-Daudé wrote: > Hi, > > I'm getting a bunch of errors for 'optarg' declared in : > > NAME > getopt – get option character from command line argument list > > LIBRARY > Standard C Library (libc, -lc) > > SYNOPSIS > #include > > extern c

Re: [PATCH v3 14/16] softmmu/vl: Clean up global variable shadowing

2023-10-05 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Fix: > > softmmu/vl.c:1069:44: error: declaration shadows a variable in the global > scope [-Werror,-Wshadow] > static void parse_display_qapi(const char *optarg) > ^ > softmmu/vl.c:1224:39: error: declaration sh

Re: [PATCH v2 00/22] qapi: Kill 'qapi/qmp/qerror.h' for good

2023-10-05 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Since v1: > - Fixed checkpatch warnings (Juan) > - Added R-b tags > - New patch for 'vcpu_dirty_limit' > > Hi, > > This is kind of a selfish series. I'm really tired to grep > and read this comment from 2015 in qapi/qmp/qerror.h: > /* >* These macros

[PATCH v8 0/4] pci hotplug tracking

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
Hi all! Main thing this series does is DEVICE_ON event - a counter-part to DEVICE_DELETED. A guest-driven event that device is powered-on. Details are in patch 2. The new event is paried with corresponding command query-hotplug. v8: - improve naming, wording and style - make new QMP interface

[PATCH v8 4/4] pcie: implement DEVICE_ON event and query-hotplug

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
For PCIe and SHPC hotplug it's important to track led indicators and "device-on" status. At this step implement the prepared infrastructure in PCIe. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/pci/pcie.c | 83 +++ hw/pci/pcie_port.c| 1

[PATCH v8 1/4] qapi/qdev.json: unite DEVICE_* event data into single structure

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
DEVICE_DELETED and DEVICE_UNPLUG_GUEST_ERROR has equal data, let's refactor it to one structure. That also helps to add new events consistently. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/qdev.json | 43 +++ 1 file changed, 31 insertions(+), 12 d

[PATCH v8 3/4] shpc: implement DEVICE_ON event and query-hotplug

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
For PCIe and SHPC hotplug it's important to track led indicators and "device-on" status. At this step, implement the prepared infrastructure in SHPC. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/pci-bridge/pci_bridge_dev.c | 14 ++ hw/pci-bridge/pcie_pci_bridge.c | 1 + hw/pci/shpc.

[PATCH v8 2/4] qapi: add DEVICE_ON and query-hotplug infrastructure

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
We have DEVICE_DELETED event, that signals that device_del command is actually completed. But we don't have a counter-part for device_add. Still it's sensible for SHPC and PCIe-native hotplug, as there are time when the device in some intermediate state. Let's add an event that say that the device

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

2023-10-05 Thread Niklas Cassel
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 called COMRESET, also referred to as port reset. A port reset is the pref

[PATCH] target/riscv: Fix vfwmaccbf16.vf

2023-10-05 Thread Max Chou
The operator (fwmacc16) of vfwmaccbf16.vf helper function should be replaced by fwmaccbf16. Signed-off-by: Max Chou --- target/riscv/vector_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c index 3fb05cc3d6e..

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

2023-10-05 Thread Niklas Cassel
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 called COMRESET, also referred to as port reset. A port reset is the pref

Re: [QEMU][PATCH v4 1/2] xen_arm: Create virtio-mmio devices during initialization

2023-10-05 Thread Anthony PERARD
Hi Vikram, This patch prevent QEMU from been build with Xen 4.15. See comments. Also, why didn't you CC all the maintainers of include/hw/xen/xen_native.h? On Tue, Aug 29, 2023 at 09:35:17PM -0700, Vikram Garhwal wrote: > diff --git a/include/hw/xen/xen_native.h b/include/hw/xen/xen_native.h > i

Re: [PATCH] target/riscv: Fix vfwmaccbf16.vf

2023-10-05 Thread Philippe Mathieu-Daudé
On 5/10/23 11:57, Max Chou wrote: The operator (fwmacc16) of vfwmaccbf16.vf helper function should be replaced by fwmaccbf16. Fixes: adf772b0f7 ("target/riscv: Add support for Zvfbfwma extension") Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Max Chou --- target/riscv/vector_helper

Re: [PATCH v3 14/16] softmmu/vl: Clean up global variable shadowing

2023-10-05 Thread Philippe Mathieu-Daudé
On 5/10/23 10:59, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: Fix: softmmu/vl.c:1069:44: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static void parse_display_qapi(const char *optarg) ^ softmm

Re: [PATCH v2 1/2] hw/ide: reset: cancel async DMA operation before resetting state

2023-10-05 Thread Simon Rowe
On Wednesday, 6 September 2023 Fiona Ebner wrote: > If there is a pending DMA operation during ide_bus_reset(), the fact > that the IDEState is already reset before the operation is canceled > can be problematic. In particular, ide_dma_cb() might be called and > then use the reset IDEState which

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

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

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

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

Re: [PATCH] hw/isa/vt82c686: Respect SCI interrupt assignment

2023-10-05 Thread BALATON Zoltan
On Thu, 5 Oct 2023, Bernhard Beschow wrote: Am 4. Oktober 2023 14:52:14 UTC schrieb BALATON Zoltan : On Wed, 4 Oct 2023, Bernhard Beschow wrote: Am 4. Oktober 2023 12:08:02 UTC schrieb BALATON Zoltan : On Tue, 3 Oct 2023, Bernhard Beschow wrote: According to the datasheet, SCI interrupts of t

Re: [RFC PATCH v2 21/22] qapi: Inline and remove QERR_UNSUPPORTED definition

2023-10-05 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Address the comment added in commit 4629ed1e98 > ("qerror: Finally unused, clean up"), from 2015: > > /* >* These macros will go away, please don't use >* in new code, and do not add new ones! >*/ > > Mechanical transformation using: > > $ sed -i -

Re: [PATCH v2] hw/isa/vt82c686: Respect SCI interrupt assignment

2023-10-05 Thread BALATON Zoltan
On Thu, 5 Oct 2023, Bernhard Beschow wrote: Am 4. Oktober 2023 12:28:58 UTC schrieb BALATON Zoltan : On Wed, 4 Oct 2023, Bernhard Beschow wrote: According to the datasheet, SCI interrupts of the power management function aren't routed through the PCI pins but rather directly to the integrated P

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

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

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

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

[PATCH v4 0/3] WIP: ramfb: migration support

2023-10-05 Thread marcandre . lureau
From: Marc-André Lureau Hi, Implement RAMFB migration, and add properties to enable it only on >= 8.2 machines, + a few related cleanups. Cedric, did you get the chance to test the VFIO display/ramfb code? thanks v4: (Laszlo review and suggestions) - change migrate_needed() to assert(ramfb_ex

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

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

[PATCH v3] hw/isa/vt82c686: Respect SCI interrupt assignment

2023-10-05 Thread Bernhard Beschow
According to the datasheet, SCI interrupts of the power management function aren't routed through the PCI pins but rather directly to the integrated PIC. The routing is configurable through the ACPI interrupt select register at offset 0x42 in the PCI configuration space of the power management func

Re: [RFC PATCH v2 21/22] qapi: Inline and remove QERR_UNSUPPORTED definition

2023-10-05 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Address the comment added in commit 4629ed1e98 > ("qerror: Finally unused, clean up"), from 2015: > > /* >* These macros will go away, please don't use >* in new code, and do not add new ones! >*/ > > Mechanical transformation using: > > $ sed -i -

Re: [RFC PATCH v2 21/22] qapi: Inline and remove QERR_UNSUPPORTED definition

2023-10-05 Thread Markus Armbruster
Please ignore this copy, it has the recipients messed up.

Re: [PATCH v4 0/3] WIP: ramfb: migration support

2023-10-05 Thread Cédric Le Goater
On 10/5/23 13:30, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Hi, Implement RAMFB migration, and add properties to enable it only on >= 8.2 machines, + a few related cleanups. Cedric, did you get the chance to test the VFIO display/ramfb code? Nope. I was busy with VFIO stuff

Re: [PATCH v2] hw/isa/vt82c686: Respect SCI interrupt assignment

2023-10-05 Thread Bernhard Beschow
Am 5. Oktober 2023 11:26:56 UTC schrieb BALATON Zoltan : >On Thu, 5 Oct 2023, Bernhard Beschow wrote: >> Am 4. Oktober 2023 12:28:58 UTC schrieb BALATON Zoltan : >>> On Wed, 4 Oct 2023, Bernhard Beschow wrote: According to the datasheet, SCI interrupts of the power management function

Re: How to tame CI?

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
On 26.07.23 16:32, Thomas Huth wrote: On 26/07/2023 15.00, Peter Maydell wrote: On Wed, 26 Jul 2023 at 13:06, Juan Quintela wrote: To make things easier, this is the part that show how it breaks (this is the gcov test): 357/423 qemu:block / io-qcow2-copy-before-write  

Re: [PATCH v2] hw/isa/vt82c686: Respect SCI interrupt assignment

2023-10-05 Thread BALATON Zoltan
On Thu, 5 Oct 2023, Bernhard Beschow wrote: Am 5. Oktober 2023 11:26:56 UTC schrieb BALATON Zoltan : On Thu, 5 Oct 2023, Bernhard Beschow wrote: Am 4. Oktober 2023 12:28:58 UTC schrieb BALATON Zoltan : On Wed, 4 Oct 2023, Bernhard Beschow wrote: According to the datasheet, SCI interrupts of t

Re: [PATCH v3] hw/isa/vt82c686: Respect SCI interrupt assignment

2023-10-05 Thread BALATON Zoltan
On Thu, 5 Oct 2023, Bernhard Beschow wrote: According to the datasheet, SCI interrupts of the power management function aren't routed through the PCI pins but rather directly to the integrated PIC. The routing is configurable through the ACPI interrupt select register at offset 0x42 in the PCI co

[PATCH] cutils: squelch compiler warnings with custom paths

2023-10-05 Thread Paolo Bonzini
Setting --bindir= to an absolute path that is shorter than the prefix causes GCC to complain about array accesses out of bounds. The code however is safe, so disable the warning and explain why we are doing so. Signed-off-by: Paolo Bonzini --- util/cutils.c | 7 +++ 1 file changed, 7 inserti

Re: [PULL 00/51] Bsd user mmap patches

2023-10-05 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 00/13] Misc patches

2023-10-05 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH v3 16/16] trace/control: Clean up global variable shadowing

2023-10-05 Thread Stefan Hajnoczi
On Wed, Oct 04, 2023 at 02:00:19PM +0200, Philippe Mathieu-Daudé wrote: > Fix: > > trace/control.c:288:34: error: declaration shadows a variable in the global > scope [-Werror,-Wshadow] > void trace_opt_parse(const char *optarg) >^ > > /Library/Developer

Re: [PULL 00/11] Migration 20231004 patches

2023-10-05 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 0/1] Block patches

2023-10-05 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

[PATCH] configure: change $softmmu to $system

2023-10-05 Thread Paolo Bonzini
"softmmu" is a deprecated moniker, do the easy change matching the variable to the command line option. Based-on: <20231004090629.37473-1-phi...@linaro.org> Signed-off-by: Paolo Bonzini --- configure | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configure b/confi

Re: [PATCH v3 03/10] migration: Refactor error handling in source return path

2023-10-05 Thread Fabiano Rosas
Peter Xu writes: > @@ -1882,48 +1870,46 @@ static void *source_return_path_thread(void *opaque) > uint32_t tmp32, sibling_error; > ram_addr_t start = 0; /* =0 to silence warning */ > size_t len = 0, expected_len; > +Error *err = NULL; > int res; > > trace_source_re

[PATCH 2/7] audio: disable default backends if -audio/-audiodev is used

2023-10-05 Thread Paolo Bonzini
Match what is done for other options, for example -monitor. Require the user to specify a backend if one is specified on the command line. Signed-off-by: Paolo Bonzini --- audio/audio.c | 9 + audio/audio.h | 1 + docs/about/removed-features.rst | 4 +

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

2023-10-05 Thread Paolo Bonzini
Currently, AUD_register_card picks the audio backend from either: - the first audiodev that was created - the audio_prio_list[] array, which can be customized at configure time This series instead extends -audio to define a default audio backend if no "model" is used. This preserves simple co

[PATCH 7/7] audio, qtest: get rid of QEMU_AUDIO_DRV

2023-10-05 Thread Paolo Bonzini
Default audio devices can now be created with "-audio". Tests for soundcards were already using "-audiodev" if they want to specify a particular backend, for the others remove the last remnants of legacy audio configuration. Signed-off-by: Paolo Bonzini --- audio/audio.c | 12 -

[PATCH 3/7] audio: extract audio_define_default

2023-10-05 Thread Paolo Bonzini
It will be used soon to define a default audio device from the command line. Signed-off-by: Paolo Bonzini --- audio/audio.c | 19 --- audio/audio.h | 1 + 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index 67a7e25254d..186cc4d336e

[PATCH 6/7] audio: reintroduce default audio backend for VNC

2023-10-05 Thread Paolo Bonzini
Make VNC use the default backend again if one is defined. The recently introduced support for disabling the VNC audio extension is still used, in case no default backend exists. Signed-off-by: Paolo Bonzini --- audio/audio.c | 28 ++-- audio/audio.h

[PATCH 1/7] audio: error hints need a trailing \n

2023-10-05 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- audio/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/audio.c b/audio/audio.c index 730bf2498dc..98621576d95 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -1833,7 +1833,7 @@ bool AUD_register_card (const char *name, QEMUSoundC

[PATCH 5/7] audio: do not use first -audiodev as default audio device

2023-10-05 Thread Paolo Bonzini
It is now possible to specify the options for the default audio device using -audio, so there is no need anymore to use a fake -audiodev option. Remove the fall back to QTAILQ_FIRST(&audio_states), instead remember the AudioState that was created from default_audiodevs and use that one. Signed-of

[PATCH 4/7] audio: extend -audio to allow creating a default backend

2023-10-05 Thread Paolo Bonzini
If "-audio BACKEND" is used without a model, the resulting backend will be used whenever the audiodev property is not specified. Signed-off-by: Paolo Bonzini --- qemu-options.hx | 29 + system/vl.c | 27 +++ 2 files changed, 36 insertions(+

Re: [PULL 0/9] Python patches

2023-10-05 Thread Stefan Hajnoczi
On Thu, 5 Oct 2023 at 00:49, Philippe Mathieu-Daudé wrote: > > Hi John, > > On 4/10/23 21:46, John Snow wrote: > > The following changes since commit da1034094d375afe9e3d8ec8980550ea0f06f7e0: > > > >Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging > > (2023-10-03 07:43

Re: [PATCH] softmmu/vl: improve select_machine() function

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
On 25.07.23 20:47, Vladimir Sementsov-Ogievskiy wrote: - put machine name into error message (helps debugging CI) - fix style (over-80 lines) - use g_autoptr - drop extra error propagation Signed-off-by: Vladimir Sementsov-Ogievskiy ping ;) -- Best regards, Vladimir

Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER

2023-10-05 Thread Fabiano Rosas
Peter Xu writes: > From: Fabiano Rosas > > To do so, create two paired sockets, but make them not providing real data. > Feed those fake sockets to src/dst QEMUs for recovery to let them go into > RECOVER stage without going out. Test that we can always kick it out and > recover again with the

Re: [PATCH v3 08/10] migration: Allow network to fail even during recovery

2023-10-05 Thread Fabiano Rosas
Peter Xu writes: > Normally the postcopy recover phase should only exist for a super short > period, that's the duration when QEMU is trying to recover from an > interrupted postcopy migration, during which handshake will be carried out > for continuing the procedure with state changes from PAUSE

Re: [PATCH] semihosting/arm-compat: Have TARGET_SYS_EXIT[_EXTENDED] return signed

2023-10-05 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Per the "Semihosting for AArch32 and AArch64" spec. v2 (2023Q3) [*]: > > 6.5 SYS_EXIT (0x18) > 6.5.2 Entry (64-bit) > > On entry, the PARAMETER REGISTER contains a pointer to > a two-field argument block: > > . field 1 > The exception t

Re: [PATCH 5/7] audio: do not use first -audiodev as default audio device

2023-10-05 Thread BALATON Zoltan
On Thu, 5 Oct 2023, Paolo Bonzini wrote: It is now possible to specify the options for the default audio device using -audio, so there is no need anymore to use a fake -audiodev option. Remove the fall back to QTAILQ_FIRST(&audio_states), instead remember the AudioState that was created from def

Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER

2023-10-05 Thread Fabiano Rosas
Fabiano Rosas writes: > Peter Xu writes: > >> From: Fabiano Rosas >> >> To do so, create two paired sockets, but make them not providing real data. >> Feed those fake sockets to src/dst QEMUs for recovery to let them go into >> RECOVER stage without going out. Test that we can always kick it o

Re: [PATCH 5/7] audio: do not use first -audiodev as default audio device

2023-10-05 Thread BALATON Zoltan
On Thu, 5 Oct 2023, BALATON Zoltan wrote: On Thu, 5 Oct 2023, Paolo Bonzini wrote: It is now possible to specify the options for the default audio device using -audio, so there is no need anymore to use a fake -audiodev option. Remove the fall back to QTAILQ_FIRST(&audio_states), instead rememb

Re: MAINTAINERS still leaves more files uncovered than I'd like

2023-10-05 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 29/9/23 13:43, Markus Armbruster wrote: >> Back in 2014 (time flies), I posted >> >> Subject: MAINTAINERS leaves too many files uncovered >> Message-ID: <87mw8rumhb@blackfin.pond.sub.org> >> https://lore.kernel.org/qemu-devel/87mw8rumhb@b

Re: [Libguestfs] [PATCH v7 12/12] nbd/server: Add FLAG_PAYLOAD support to CMD_BLOCK_STATUS

2023-10-05 Thread Eric Blake
On Wed, Oct 04, 2023 at 04:55:02PM -0500, Eric Blake wrote: > > > +static int > > > +nbd_co_block_status_payload_read(NBDClient *client, NBDRequest *request, > > > + Error **errp) > > > > [..] > > > +for (i = 0; i < count; i++) { > > > +id = ldl_be_p(bu

Re: MAINTAINERS still leaves more files uncovered than I'd like

2023-10-05 Thread Markus Armbruster
Cédric Le Goater writes: > Regarding PPC, I am not sure where these common PPC files should go : > > configs/targets/ppc* > docs/system/ppc/embedded.rst > docs/system/target-ppc.rst > hw/ppc/meson.build > hw/ppc/trace* > > under "PowerPC TCG CPUs" may be ? > > These files : > > tests/tcg/pp

[PATCH v6 03/14] scripts/cpu-x86-uarch-abi.py: use .command() instead of .cmd()

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
Here we don't expect a failure. In case on failure we'll crash on trying to access ['return']. Let's better use .command() that clearly raise on failure. Signed-off-by: Vladimir Sementsov-Ogievskiy --- scripts/cpu-x86-uarch-abi.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-

[PATCH v6 02/14] qmp_shell.py: _fill_completion() use .command() instead of .cmd()

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
We just want to ignore failure, so we don't need low level .cmd(). This helps further renaming .command() to .cmd(). Signed-off-by: Vladimir Sementsov-Ogievskiy --- python/qemu/qmp/qmp_shell.py | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/python/qemu/

[PATCH v6 05/14] python/qemu: rename command() to cmd()

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
Use a shorter name. We are going to move in iotests from qmp() to command() where possible. But command() is longer than qmp() and don't look better. Let's rename. You can simply grep for '\.command(' and for 'def command(' to check that everything is updated (command() in tests/docker/docker.py i

[PATCH v6 08/14] iotests: add some missed checks of qmp result

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/041| 1 + tests/qemu-iotests/151| 1 + tests/qemu-iotests/152| 2 ++ tests/qemu-iotests/tests/migrate-bitmaps-test | 2 ++ 4 files changed, 6 insertions(+) d

[PATCH v6 07/14] iotests: QemuStorageDaemon: add cmd() method like in QEMUMachine.

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
Add similar method for consistency. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 8ffd9fb660..6cc50f0b50 100644 --- a/test

[PATCH v6 12/14] iotests.py: pause_job(): drop return value

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
The returned value is unused. It's simple to check by command git grep -B 3 '\.pause_job(' Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iote

[PATCH v6 06/14] python/machine.py: upgrade vm.cmd() method

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
The method is not popular in iotests, we prefer use vm.qmp() and then check success by hand.. But that's not optimal. To simplify movement to vm.cmd() let's support same interface improvements like in vm.qmp(). Signed-off-by: Vladimir Sementsov-Ogievskiy --- python/qemu/machine/machine.py | 12 +

[PATCH v6 04/14] python: rename QEMUMonitorProtocol.cmd() to cmd_raw()

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
Having cmd() and command() methods in one class doesn't look good. Rename cmd() to cmd_raw(), to show its meaning better. We also want to rename command() to cmd() in future, so this commit is a necessary step. Signed-off-by: Vladimir Sementsov-Ogievskiy --- python/qemu/machine/machine.py | 2 +

[PATCH v6 00/14] iotests: use vm.cmd()

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
Hi all! Let's get rid of pattern result = self.vm.qmp(...) self.assert_qmp(result, 'return', {}) And switch to just self.vm.cmd(...) v6: rebase on master Vladimir Sementsov-Ogievskiy (14): python/qemu/qmp/legacy: cmd(): drop cmd_id unused argument qmp_shell.py: _fill_completio

[PATCH v6 10/14] iotests: drop some occasional semicolons

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/041 | 2 +- tests/qemu-iotests/196 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041 index 4d7a829b65..550e4dc391 100755 --- a/tests/qemu-iotests/041 +++ b/tests

Re: [PATCH] MAINTAINERS: Add some unowned files to the SBSA-REF section

2023-10-05 Thread Markus Armbruster
Nominating for qemu-trivial. Thomas Huth writes: > These files belong to the sbsa-ref machine and thus should > be listed here. > > Signed-off-by: Thomas Huth > --- > MAINTAINERS | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 874234cb7b..fc415d3ce

[PATCH v6 09/14] iotests: refactor some common qmp result checks into generic pattern

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
To simplify further conversion. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/040 | 3 ++- tests/qemu-iotests/147 | 3 ++- tests/qemu-iotests/155 | 4 ++-- tests/qemu-iotests/218 | 4 ++-- tests/qemu-iotests/296 | 3 ++- 5 files changed, 10 insertions(+), 7 deletions(-) dif

[PATCH v2] coverity: physmem: use simple assertions instead of modelling

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
Unfortunately Coverity doesn't follow the logic aroung "len" and "l" variables in stacks finishing with flatview_{read,write}_continue() and generate a lot of OVERRUN false-positives. When small buffer (2 or 4 bytes) is passed to mem read/write path, Coverity assumes the worst case of sz=8 in stn_h

[PATCH v6 01/14] python/qemu/qmp/legacy: cmd(): drop cmd_id unused argument

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
The argument is unused, let's drop it for now, as we are going to refactor the interface and don't want to refactor unused things. Signed-off-by: Vladimir Sementsov-Ogievskiy --- python/qemu/qmp/legacy.py | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/python/qemu/qmp/le

[PATCH v6 11/14] iotests: drop some extra ** in qmp() call

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
qmp() method supports passing dict (if it doesn't need substituting '_' to '-' in keys). So, drop some extra '**' operators. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/040| 4 +- tests/qemu-iotests/041| 14 +++--- tests/qem

[PATCH v6 13/14] tests/vm/basevm.py: use cmd() instead of qmp()

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
We don't expect failure here and need 'result' object. cmd() is better in this case. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/vm/basevm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index a97e23b0ce..8aef4cff96 100

Re: [PULL 1/9] Python/iotests: Add type hint for nbd module

2023-10-05 Thread Eric Blake
On Wed, Oct 04, 2023 at 03:46:05PM -0400, John Snow wrote: > The test bails gracefully if this module isn't installed, but linters > need a little help understanding that. It's enough to just declare the > type in this case. > > (Fixes pylint complaining about use of an uninitialized variable beca

Re: [PATCH v4 0/3] WIP: ramfb: migration support

2023-10-05 Thread Laszlo Ersek
On 10/5/23 14:01, Cédric Le Goater wrote: > On 10/5/23 13:30, marcandre.lur...@redhat.com wrote: >> From: Marc-André Lureau >> >> Hi, >> >> Implement RAMFB migration, and add properties to enable it only on >= 8.2 >> machines, + a few related cleanups. >> >> Cedric, did you get the chance to test

Re: [PATCH v4 0/3] WIP: ramfb: migration support

2023-10-05 Thread Laszlo Ersek
On 10/5/23 16:16, Laszlo Ersek wrote: > On 10/5/23 14:01, Cédric Le Goater wrote: >> On 10/5/23 13:30, marcandre.lur...@redhat.com wrote: >>> From: Marc-André Lureau >>> >>> Hi, >>> >>> Implement RAMFB migration, and add properties to enable it only on >= 8.2 >>> machines, + a few related cleanups

Re: [PATCH v8 2/2] tpm: add backend for mssim

2023-10-05 Thread James Bottomley
On Thu, 2023-10-05 at 08:49 +0200, Philippe Mathieu-Daudé wrote: > Hi James, > > On 4/10/23 20:42, James Bottomley wrote: > > From: James Bottomley > > > > The Microsoft Simulator (mssim) is the reference emulation platform > > for the TCG TPM 2.0 specification. > > > > https://github.com/Micro

Re: [PATCH v6 01/14] python/qemu/qmp/legacy: cmd(): drop cmd_id unused argument

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:37PM +0300, Vladimir Sementsov-Ogievskiy wrote: > The argument is unused, let's drop it for now, as we are going to > refactor the interface and don't want to refactor unused things. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > python/qemu/qmp/legacy.py |

Re: [PATCH] configure: change $softmmu to $system

2023-10-05 Thread Philippe Mathieu-Daudé
On 5/10/23 14:54, Paolo Bonzini wrote: "softmmu" is a deprecated moniker, do the easy change matching the variable to the command line option. Based-on: <20231004090629.37473-1-phi...@linaro.org> Signed-off-by: Paolo Bonzini --- configure | 10 +- 1 file changed, 5 insertions(+), 5 d

Re: [PATCH v6 02/14] qmp_shell.py: _fill_completion() use .command() instead of .cmd()

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:38PM +0300, Vladimir Sementsov-Ogievskiy wrote: > We just want to ignore failure, so we don't need low level .cmd(). This > helps further renaming .command() to .cmd(). > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > python/qemu/qmp/qmp_shell.py | 20 +++

Re: [PATCH v3] hw/isa/vt82c686: Respect SCI interrupt assignment

2023-10-05 Thread Philippe Mathieu-Daudé
On 5/10/23 14:45, BALATON Zoltan wrote: On Thu, 5 Oct 2023, Bernhard Beschow wrote: According to the datasheet, SCI interrupts of the power management function aren't routed through the PCI pins but rather directly to the integrated PIC. The routing is configurable through the ACPI interrupt se

  1   2   3   >