[PATCH v2 1/6] hw/xen: Set XenBackendInstance in the XenDevice before realizing it

2023-11-21 Thread Volodymyr Babchuk
From: David Woodhouse This allows a XenDevice implementation to know whether it was created by QEMU, or merely discovered in XenStore after the toolstack created it. This will allow us to create frontend/backend nodes only when we should, rather than unconditionally attempting to overwrite them

[PATCH v2 2/6] xen: backends: touch some XenStore nodes only if device...

2023-11-21 Thread Volodymyr Babchuk
was created by QEMU Xen PV devices in QEMU can be created in two ways: either by QEMU itself, if they were passed via command line, or by Xen toolstack. In the latter case, QEMU scans XenStore entries and configures devices accordingly. In the second case we don't want QEMU to write/delete

Re: [PULL 0/9] Block layer fixes for 8.2.0-rc1

2023-11-21 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 06/12] hw/xen: add get_frontend_path() method to XenDeviceClass

2023-11-21 Thread David Woodhouse
On Tue, 2023-10-24 at 14:29 +0100, David Woodhouse wrote: > > > > As a general rule (I'll be doing a bombing run on xen-bus once I get my > > > patch queue down into single digits) we should never check 'if (*errp)' > > > to check if a function had an error. It should *also* return a success > >

[PULL 7/9] ide/pci: introduce pci_ide_update_mode() function

2023-11-21 Thread Kevin Wolf
From: Mark Cave-Ayland This function reads the value of the PCI_CLASS_PROG register for PCI IDE controllers and configures the PCI BARs and/or IDE ioports accordingly. In the case where we switch to legacy mode, the PCI BARs are set to return zero (as suggested in the "PCI IDE Controller"

[PULL 1/9] hw/ide/ahci: fix legacy software reset

2023-11-21 Thread Kevin Wolf
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

[PULL 8/9] ide/via: don't attempt to set default BAR addresses

2023-11-21 Thread Kevin Wolf
From: Mark Cave-Ayland The via-ide device currently attempts to set the default BAR addresses to the values shown in the datasheet, but this doesn't work for 2 reasons: firstly BARS 1-4 do not set the bottom 2 bits to PCI_BASE_ADDRESS_SPACE_IO, and secondly the initial PCI bus reset clears the

[PULL 4/9] stream: Fix AioContext locking during bdrv_graph_wrlock()

2023-11-21 Thread Kevin Wolf
In stream_prepare(), we need to temporarily drop the AioContext lock that job_prepare_locked() took for us while calling the graph write lock functions which can poll. All block nodes related to this block job are in the same AioContext, so we can pass any of them to bdrv_graph_wrlock()/

[PULL 3/9] block: Fix deadlocks in bdrv_graph_wrunlock()

2023-11-21 Thread Kevin Wolf
bdrv_graph_wrunlock() calls aio_poll(), which may run callbacks that have a nested event loop. Nested event loops can depend on other iothreads making progress, so in order to allow them to make progress it must not hold the AioContext lock of another thread while calling aio_poll(). This

[PULL 0/9] Block layer fixes for 8.2.0-rc1

2023-11-21 Thread Kevin Wolf
The following changes since commit af9264da80073435fd78944bc5a46e695897d7e5: Merge tag '20231119-xtensa-1' of https://github.com/OSLL/qemu-xtensa into staging (2023-11-20 05:25:19 -0500) are available in the Git repository at: https://repo.or.cz/qemu/kevin.git tags/for-upstream for you to

[PULL 2/9] block: Fix bdrv_graph_wrlock() call in blk_remove_bs()

2023-11-21 Thread Kevin Wolf
While not all callers of blk_remove_bs() are correct in this respect, the assumption in the function is that callers hold the AioContext lock of the BlockBackend (this is required by the drain calls in it). In order to avoid deadlock in the nested event loop, bdrv_graph_wrlock() has then to be

[PULL 6/9] ide/ioport: move ide_portio_list[] and ide_portio_list2[] definitions to IDE core

2023-11-21 Thread Kevin Wolf
From: Mark Cave-Ayland These definitions are present in ioport.c which is currently only available when CONFIG_IDE_ISA is enabled. Move them to the IDE core so that they can be made available to PCI IDE controllers that support switching to legacy mode. Signed-off-by: Mark Cave-Ayland

[PULL 5/9] iotests: Test two stream jobs in a single iothread

2023-11-21 Thread Kevin Wolf
This tests two parallel stream jobs that will complete around the same time and run on two different disks in the same iothreads. It is loosely based on the bug report at https://issues.redhat.com/browse/RHEL-1761. For me, this test hangs reliably with the originally reported bug in

[PULL 9/9] hw/ide/via: implement legacy/native mode switching

2023-11-21 Thread Kevin Wolf
From: Mark Cave-Ayland Allow the VIA IDE controller to switch between both legacy and native modes by calling pci_ide_update_mode() to reconfigure the device whenever PCI_CLASS_PROG is updated. This patch moves the initial setting of PCI_CLASS_PROG from via_ide_realize() to via_ide_reset(), and

Re: [PATCH 2/3] vl: disable default serial when xen-console is enabled

2023-11-21 Thread David Woodhouse
On Tue, 2023-11-21 at 14:58 +0400, Marc-André Lureau wrote: > > > Consistent with the rest of the lines (no conditional compilation nor > > driver #define..) > > Reviewed-by: Marc-André Lureau Thanks. > > btw, while quickly testing this (do we have any test for xen-console?): > > > > $ qemu

Re: [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers

2023-11-21 Thread Peter Maydell
On Tue, 21 Nov 2023 at 10:18, Mark Cave-Ayland wrote: > In the meantime the department of hacks has been looking at ways of trying to > set BAR > addresses during reset, and humbly submits the following for consideration: > +static void via_ide_bar_reset(void *opaque) > +{ > +PCIIDEState *d

Re: [PATCH 2/3] vl: disable default serial when xen-console is enabled

2023-11-21 Thread Paul Durrant
On 15/11/2023 17:24, David Woodhouse wrote: From: David Woodhouse If a Xen console is configured on the command line, do not add a default serial port. Signed-off-by: David Woodhouse --- system/vl.c | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Paul Durrant

Re: [PATCH 2/3] vl: disable default serial when xen-console is enabled

2023-11-21 Thread Marc-André Lureau
Hi On Tue, Nov 21, 2023 at 2:57 PM Marc-André Lureau wrote: > > Hi > > On Wed, Nov 15, 2023 at 9:28 PM David Woodhouse wrote: > > > > From: David Woodhouse > > > > If a Xen console is configured on the command line, do not add a default > > serial port. > > > > Signed-off-by: David Woodhouse

Re: [PATCH 2/3] vl: disable default serial when xen-console is enabled

2023-11-21 Thread Marc-André Lureau
Hi On Wed, Nov 15, 2023 at 9:28 PM David Woodhouse wrote: > > From: David Woodhouse > > If a Xen console is configured on the command line, do not add a default > serial port. > > Signed-off-by: David Woodhouse > --- > system/vl.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git

Re: Open qcow2 on multiple hosts simultaneously.

2023-11-21 Thread Kevin Wolf
Am 20.11.2023 um 13:41 hat kvaps geschrieben: > Hey Alberto, > > My article on this design has just been published. > In this article I talk about the chosen technologies and the > ReadWriteMany implementation: > > https://blog.deckhouse.io/lvm-qcow-csi-driver-shared-san-kubernetes-81455201590e

Re: [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers

2023-11-21 Thread Mark Cave-Ayland
On 21/11/2023 09:12, Kevin Wolf wrote: Am 20.11.2023 um 16:02 hat BALATON Zoltan geschrieben: On Mon, 20 Nov 2023, Mark Cave-Ayland wrote: On 20/11/2023 13:42, Kevin Wolf wrote: Am 20.11.2023 um 14:09 hat BALATON Zoltan geschrieben: On Mon, 20 Nov 2023, Mark Cave-Ayland wrote: On

Re: [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers

2023-11-21 Thread Kevin Wolf
Am 20.11.2023 um 16:11 hat BALATON Zoltan geschrieben: > On Mon, 20 Nov 2023, Kevin Wolf wrote: > > Am 20.11.2023 um 14:47 hat BALATON Zoltan geschrieben: > > > On Mon, 20 Nov 2023, Kevin Wolf wrote: > > > > Am 20.11.2023 um 14:09 hat BALATON Zoltan geschrieben: > > > > > On Mon, 20 Nov 2023, Mark

Re: [PATCH v3 0/4] ide: implement simple legacy/native mode switching for PCI IDE controllers

2023-11-21 Thread Kevin Wolf
Am 20.11.2023 um 16:02 hat BALATON Zoltan geschrieben: > On Mon, 20 Nov 2023, Mark Cave-Ayland wrote: > > On 20/11/2023 13:42, Kevin Wolf wrote: > > > Am 20.11.2023 um 14:09 hat BALATON Zoltan geschrieben: > > > > On Mon, 20 Nov 2023, Mark Cave-Ayland wrote: > > > > > On 19/11/2023 21:43, BALATON