[PATCH v7 4/4] tests/qtest: Introduce tests for UFS

2023-07-25 Thread Jeuk Kim
This patch includes the following tests Test mmio read Test ufs device initialization and ufs-lu recognition Test I/O (Performs a write followed by a read to verify) Signed-off-by: Jeuk Kim --- MAINTAINERS | 1 + tests/qtest/meson.build | 1 + tests/qtest/ufs-test.c | 575

[PATCH v7 1/4] hw/ufs: Initial commit for emulated Universal-Flash-Storage

2023-07-25 Thread Jeuk Kim
Universal Flash Storage (UFS) is a high-performance mass storage device with a serial interface. It is primarily used as a high-performance data storage device for embedded applications. This commit contains code for UFS device to be recognized as a UFS PCI device. Patches to handle UFS logical

[PATCH v7 3/4] hw/ufs: Support for UFS logical unit

2023-07-25 Thread Jeuk Kim
This commit adds support for ufs logical unit. The LU handles processing for the SCSI command, unit descriptor query request. This commit enables the UFS device to process IO requests. Signed-off-by: Jeuk Kim --- hw/ufs/lu.c | 1445 ++

[PATCH v7 2/4] hw/ufs: Support for Query Transfer Requests

2023-07-25 Thread Jeuk Kim
This commit makes the UFS device support query and nop out transfer requests. The next patch would be support for UFS logical unit and scsi command transfer request. Signed-off-by: Jeuk Kim --- hw/ufs/trace-events | 1 + hw/ufs/ufs.c| 980 +++-

[PATCH v7 0/4] hw/ufs: Add Universal Flash Storage (UFS) support

2023-07-25 Thread Jeuk Kim
Since v6: - Add tests/qtest/ufs-test.c to test ufs initialisation and I/O - Add struct UtpTaskReqDesc to include/block/ufs.h - Fix ufs_log2() logic - Fix ufs-lu to use 4K as default block size to match the ufs spec Since I created a new file, tests/qtest/ufs-test.c, I added Laurent Vivier to the

Re: [PULL 10/10] target/tricore: Rename tricore_feature

2023-07-25 Thread Michael Tokarev
25.07.2023 22:11, Bastian Koppelmann wrote: ... Michael Tokarev has already picked it up. See https://lore.kernel.org/qemu-devel/20230725145829.37782-11-phi...@linaro.org/T/#u I noticed that too, we did it almost at the same time. But there's nothing wrong with that. It doesn't matter how a

Re: [PATCH 2/2] block/blkio: use blkio_set_int("fd") to check fd support

2023-07-25 Thread Stefan Hajnoczi
On Mon, Jul 24, 2023 at 05:46:11PM +0200, Stefano Garzarella wrote: > The way the virtio-blk driver is implemented in libblkio, > it's much easier to use blkio_set_int() instead of blkio_get_int() > and have it fail right away to see if `fd` is supported by the > transport. See

Re: [PATCH 1/2] block/blkio: fix opening virtio-blk drivers

2023-07-25 Thread Stefan Hajnoczi
On Mon, Jul 24, 2023 at 05:46:10PM +0200, Stefano Garzarella wrote: > libblkio 1.3.0 added support of "fd" property for virtio-blk-vhost-vdpa > driver. In QEMU, starting from commit cad2ccc395 ("block/blkio: use > qemu_open() to support fd passing for virtio-blk") we are using >

Re: [PATCH] block/blkio: enable the completion eventfd

2023-07-25 Thread Stefan Hajnoczi
On Tue, Jul 25, 2023 at 12:37:44PM +0200, Stefano Garzarella wrote: > Until libblkio 1.3.0, virtio-blk drivers had completion eventfd > notifications enabled from the start, but from the next releases > this is no longer the case, so we have to explicitly enable them. > > In fact, the libblkio

Re: [PULL 10/10] target/tricore: Rename tricore_feature

2023-07-25 Thread Bastian Koppelmann
Hi Phil, On Tue, Jul 25, 2023 at 04:58:29PM +0200, Philippe Mathieu-Daudé wrote: > From: Bastian Koppelmann > > this name is used by capstone and will lead to a build failure of QEMU, > when capstone is enabled. So we rename it to tricore_has_feature(), to > match has_feature() in translate.c.

Re: [PULL 00/10] Misc fixes for 2023-07-25

2023-07-25 Thread Peter Maydell
available in the Git repository at: > > https://github.com/philmd/qemu.git tags/misc-fixes-20230725 > > for you to fetch changes up to f8cfdd2038c1823301e6df753242e465b1dc8539: > > target/tricore: Rename tricore_feature (2023-07-25 14:42:00 +0200) > > --

Re: [PATCH v3 0/8] misc AHCI cleanups

2023-07-25 Thread John Snow
On Tue, Jul 25, 2023 at 9:04 AM Philippe Mathieu-Daudé wrote: > > Hi Niklas, John, Paolo, Kevin, > > On 19/7/23 12:47, Niklas Cassel wrote: > > >> Niklas Cassel (8): > >>hw/ide/ahci: remove stray backslash > >>hw/ide/core: set ERR_STAT in unsupported command completion > >>

Re: [PATCH v2 6/6] python/machine: remove unused sock_dir argument

2023-07-25 Thread Daniel P . Berrangé
On Tue, Jul 25, 2023 at 02:33:36PM -0400, John Snow wrote: > On Tue, Jul 25, 2023 at 2:26 PM Daniel P. Berrangé > wrote: > > > > On Tue, Jul 25, 2023 at 02:03:37PM -0400, John Snow wrote: > > > By using a socketpair for all of the sockets managed by the VM class and > > > its extensions, we

Re: [PATCH v2 6/6] python/machine: remove unused sock_dir argument

2023-07-25 Thread John Snow
On Tue, Jul 25, 2023 at 2:26 PM Daniel P. Berrangé wrote: > > On Tue, Jul 25, 2023 at 02:03:37PM -0400, John Snow wrote: > > By using a socketpair for all of the sockets managed by the VM class and > > its extensions, we don't need the sock_dir argument anymore, so remove > > it. > > > > We only

Re: [PATCH v2 6/6] python/machine: remove unused sock_dir argument

2023-07-25 Thread Daniel P . Berrangé
On Tue, Jul 25, 2023 at 02:03:37PM -0400, John Snow wrote: > By using a socketpair for all of the sockets managed by the VM class and > its extensions, we don't need the sock_dir argument anymore, so remove > it. > > We only added this argument so that we could specify a second, shorter >

Re: [PATCH v2 5/6] python/machine: use socketpair() for qtest connection

2023-07-25 Thread Daniel P . Berrangé
On Tue, Jul 25, 2023 at 02:03:36PM -0400, John Snow wrote: > Like the QMP and console sockets, begin using socketpairs for the qtest > connection, too. After this patch, we'll be able to remove the vestigial > sock_dir argument, but that cleanup is best done in its own patch. > > Signed-off-by:

Re: [PATCH v2 4/6] python/machine: use socketpair() for console connections

2023-07-25 Thread Daniel P . Berrangé
On Tue, Jul 25, 2023 at 02:03:35PM -0400, John Snow wrote: > Create a socketpair for the console output. This should help eliminate > race conditions around console text early in the boot process that might > otherwise have been dropped on the floor before being able to connect to > QEMU under

Re: [PATCH v2 3/6] python/console_socket: accept existing FD in initializer

2023-07-25 Thread Daniel P . Berrangé
On Tue, Jul 25, 2023 at 02:03:34PM -0400, John Snow wrote: > Useful if we want to use ConsoleSocket() for a socket created by > socketpair(). > > Signed-off-by: John Snow > --- > python/qemu/machine/console_socket.py | 29 +++ > 1 file changed, 21 insertions(+), 8

Re: [PATCH v2 2/6] python/machine: close sock_pair in cleanup path

2023-07-25 Thread Daniel P . Berrangé
On Tue, Jul 25, 2023 at 02:03:33PM -0400, John Snow wrote: > If everything has gone smoothly, we'll already have closed the socket we > gave to the child during post_launch. The other half of the pair that we > gave to the QMP connection should, likewise, be definitively closed by > now. > >

Re: [PATCH v2 1/6] python/machine: move socket setup out of _base_args property

2023-07-25 Thread Daniel P . Berrangé
On Tue, Jul 25, 2023 at 02:03:32PM -0400, John Snow wrote: > This property isn't meant to do much else besides return a list of > strings, so move this setup back out into _pre_launch(). > > Signed-off-by: John Snow > --- > python/qemu/machine/machine.py | 5 ++--- > 1 file changed, 2

[PATCH v2 0/6] python/machine: use socketpair() for console socket

2023-07-25 Thread John Snow
Like we did for the QMP socket, use socketpair() for the console socket so that hopefully there isn't a race condition during early boot where data might get dropped on the floor. May or may not help with various race conditions where early console output is not showing up in the logs and/or

[PATCH v2 5/6] python/machine: use socketpair() for qtest connection

2023-07-25 Thread John Snow
Like the QMP and console sockets, begin using socketpairs for the qtest connection, too. After this patch, we'll be able to remove the vestigial sock_dir argument, but that cleanup is best done in its own patch. Signed-off-by: John Snow --- python/qemu/machine/qtest.py | 49

[PATCH v2 4/6] python/machine: use socketpair() for console connections

2023-07-25 Thread John Snow
Create a socketpair for the console output. This should help eliminate race conditions around console text early in the boot process that might otherwise have been dropped on the floor before being able to connect to QEMU under "server,nowait". Signed-off-by: John Snow ---

[PATCH v2 6/6] python/machine: remove unused sock_dir argument

2023-07-25 Thread John Snow
By using a socketpair for all of the sockets managed by the VM class and its extensions, we don't need the sock_dir argument anymore, so remove it. We only added this argument so that we could specify a second, shorter temporary directory for cases where the temp/log dirs were "too long" as a

[PATCH v2 3/6] python/console_socket: accept existing FD in initializer

2023-07-25 Thread John Snow
Useful if we want to use ConsoleSocket() for a socket created by socketpair(). Signed-off-by: John Snow --- python/qemu/machine/console_socket.py | 29 +++ 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/python/qemu/machine/console_socket.py

[PATCH v2 2/6] python/machine: close sock_pair in cleanup path

2023-07-25 Thread John Snow
If everything has gone smoothly, we'll already have closed the socket we gave to the child during post_launch. The other half of the pair that we gave to the QMP connection should, likewise, be definitively closed by now. However, in the cleanup path, it's possible we've created the socketpair

[PATCH v2 1/6] python/machine: move socket setup out of _base_args property

2023-07-25 Thread John Snow
This property isn't meant to do much else besides return a list of strings, so move this setup back out into _pre_launch(). Signed-off-by: John Snow --- python/qemu/machine/machine.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/python/qemu/machine/machine.py

[PATCH v4] block-jobs: flush target at the end of .run()

2023-07-25 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Actually block job is not completed without this final flush. It's rather unexpected to have broken target when job was successfully completed long ago and now we fail to flush or process just crashed/killed. Signed-off-by: Vladimir Sementsov-Ogievskiy ---

s390 intermittent test failure in qemu:block / io-qcow2-copy-before-write

2023-07-25 Thread Peter Maydell
There seems to be an intermittent failure on the s390 host in the qemu:block / io-qcow2-copy-before-write test: https://gitlab.com/qemu-project/qemu/-/jobs/4737819873 The log says the test was expecting to do some reading and writing but got an unexpected 'permission denied' error on the read.

Re: [PATCH v1] block/stream:add flush l2_table_cache,ensure data integrity

2023-07-25 Thread Vladimir Sementsov-Ogievskiy
On 25.07.23 18:13, Denis V. Lunev wrote: On 7/25/23 16:25, Vladimir Sementsov-Ogievskiy wrote: On 24.07.23 10:30, Evanzhang wrote: block_stream will not actively flush l2_table_cache,when qemu process exception exit,causing disk data loss Signed-off-by: Evanzhang ---   block/stream.c | 6

Re: [PATCH v1] block/stream:add flush l2_table_cache,ensure data integrity

2023-07-25 Thread Denis V. Lunev
On 7/25/23 16:25, Vladimir Sementsov-Ogievskiy wrote: On 24.07.23 10:30, Evanzhang wrote: block_stream will not actively flush l2_table_cache,when qemu process exception exit,causing disk data loss Signed-off-by: Evanzhang ---   block/stream.c | 6 ++   1 file changed, 6 insertions(+)

[PULL 09/10] target/sparc: Handle FPRS correctly on big-endian hosts

2023-07-25 Thread Philippe Mathieu-Daudé
From: Peter Maydell In CPUSparcState we define the fprs field as uint64_t. However we then refer to it in translate.c via a TCGv_i32 which we set up with tcg_global_mem_new_ptr(). This means that on a big-endian host when the guest does something to writo te the FPRS register this value ends

[PULL 10/10] target/tricore: Rename tricore_feature

2023-07-25 Thread Philippe Mathieu-Daudé
From: Bastian Koppelmann this name is used by capstone and will lead to a build failure of QEMU, when capstone is enabled. So we rename it to tricore_has_feature(), to match has_feature() in translate.c. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1774 Signed-off-by: Bastian

[PULL 06/10] target/mips/mxu: Avoid overrun in gen_mxu_q8adde()

2023-07-25 Thread Philippe Mathieu-Daudé
Coverity reports a potential overruns (CID 1517770): Overrunning array "mxu_gpr" of 15 8-byte elements at element index 4294967295 (byte offset 34359738367) using index "XRb - 1U" (which evaluates to 4294967295). Add a gen_extract_mxu_gpr() helper similar to gen_load_mxu_gpr() to safely

[PULL 02/10] hw/mips: Improve the default USB settings in the loongson3-virt machine

2023-07-25 Thread Philippe Mathieu-Daudé
From: Thomas Huth It's possible to compile QEMU without the USB devices (e.g. when using "--without-default-devices" as option for the "configure" script). To be still able to run the loongson3-virt machine in default mode with such a QEMU binary, we have to check here for the availability of

[PULL 04/10] target/mips/mxu: Replace magic array size by its definition

2023-07-25 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230712060806.82323-2-phi...@linaro.org> --- target/mips/tcg/mxu_translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/mips/tcg/mxu_translate.c b/target/mips/tcg/mxu_translate.c

[PULL 07/10] target/mips: Pass directory/leaf shift values to walk_directory()

2023-07-25 Thread Philippe Mathieu-Daudé
We already evaluated directory_shift and leaf_shift in page_table_walk_refill(), no need to do that again: pass as argument. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Message-Id: <20230717213504.24777-2-phi...@linaro.org> --- target/mips/tcg/sysemu/tlb_helper.c | 18

[PULL 05/10] target/mips/mxu: Avoid overrun in gen_mxu_S32SLT()

2023-07-25 Thread Philippe Mathieu-Daudé
Coverity reports a potential overrun (CID 1517769): Overrunning array "mxu_gpr" of 15 8-byte elements at element index 4294967295 (byte offset 34359738367) using index "XRb - 1U" (which evaluates to 4294967295). Use gen_load_mxu_gpr() to safely load MXU registers. Fixes: ff7936f009

[PULL 08/10] target/mips: Avoid shift by negative number in page_table_walk_refill()

2023-07-25 Thread Philippe Mathieu-Daudé
From: Peter Maydell Coverity points out that in page_table_walk_refill() we can shift by a negative number, which is undefined behaviour (CID 1452918, 1452920, 1452922). We already catch the negative directory_shift and leaf_shift as being a "bail out early" case, but not until we've already

[PULL 03/10] hw/char/escc: Implement loopback mode

2023-07-25 Thread Philippe Mathieu-Daudé
From: Thomas Huth The firmware of the m68k next-cube machine uses the loopback mode for self-testing the hardware and currently fails during this step. By implementing the loopback mode, we can make the firmware pass to the next step. Signed-off-by: Thomas Huth Reviewed-by: Mark Cave-Ayland

[PULL 00/10] Misc fixes for 2023-07-25

2023-07-25 Thread Philippe Mathieu-Daudé
The following changes since commit 3ee44ec72753ec0ff05ad1569dfa609203d722b2: Merge tag 'pull-request-2023-07-24' of https://gitlab.com/thuth/qemu into staging (2023-07-24 18:06:36 +0100) are available in the Git repository at: https://github.com/philmd/qemu.git tags/misc-fixes-20230725

[PULL 01/10] hw/sd/sdhci: Do not force sdhci_mmio_*_ops onto all SD controllers

2023-07-25 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Since commit c0a55a0c9da2 "hw/sd/sdhci: Support big endian SD host controller interfaces" sdhci_common_realize() forces all SD card controllers to use either sdhci_mmio_le_ops or sdhci_mmio_be_ops, depending on the "endianness" property. However, there are device models

Re: [PATCH v1] block/stream:add flush l2_table_cache,ensure data integrity

2023-07-25 Thread Vladimir Sementsov-Ogievskiy
On 24.07.23 10:30, Evanzhang wrote: block_stream will not actively flush l2_table_cache,when qemu process exception exit,causing disk data loss Signed-off-by: Evanzhang --- block/stream.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/block/stream.c b/block/stream.c index

[PATCH 5/7] iotests: add -io_uring support

2023-07-25 Thread Stefan Hajnoczi
The libblkio-based io_uring block driver currently has no test coverage. Running existing qemu-iotests with io_uring is possible with just a few tweaks. Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/033 | 1 + tests/qemu-iotests/check | 2 +- tests/qemu-iotests/common.rc |

[PATCH 4/7] iotests: filter img create backing_file when IMGPROTO is modified

2023-07-25 Thread Stefan Hajnoczi
197 and 215 modify IMGPROTO, IMGFMT, etc temporarily while creating an additional image file after the main test image. The backing file name still has the old IMGPROTO, IMGFMT, etc. This means _filter_img_create will not filter the backing_file= output from qemu-img. Add a helper that filters

[PATCH 3/7] iotests: string substitution order in _filter_img_create_filenames

2023-07-25 Thread Stefan Hajnoczi
_filter_img_create_filenames fails to remove $IMGPROTO: when $REMOTE_TEST_DIR matches. echo "$IMGPROTO:$REMOTE_TEST_DIR" | _filter_img_create_filenames results in "$IMGPROTO:TEST_DIR" instead of "TEST_DIR". Substitute "s#$REMOTE_TEST_DIR#TEST_DIR#g" after "s#$IMGPROTO:$TEST_DIR#TEST_DIR#g" since

[PATCH 1/7] block/blkio: add io_uring: filename parsing

2023-07-25 Thread Stefan Hajnoczi
The qemu-iotests test suite requires filename parsing because it does not use image options syntax everywhere. Add it now so that later patches can enable qemu-iotests for the io_uring block driver. The blkio.c code has other libblkio-based drivers that could benefit from filename parsing too.

[PATCH 7/7] iotests: add io_uring to supported protocols in 052

2023-07-25 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/052 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/052 b/tests/qemu-iotests/052 index 2f23ac9b65..42bf4c4aef 100755 --- a/tests/qemu-iotests/052 +++ b/tests/qemu-iotests/052 @@ -38,7 +38,7 @@ trap

[PATCH 6/7] iotests: add io_uring to supported protocols in 012

2023-07-25 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/012 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/012 b/tests/qemu-iotests/012 index 3a24d2ca8d..25dfc8ae12 100755 --- a/tests/qemu-iotests/012 +++ b/tests/qemu-iotests/012 @@ -40,7 +40,7 @@ trap

[PATCH 2/7] block/blkio: add "simple" creation support

2023-07-25 Thread Stefan Hajnoczi
Some block drivers do not support image creation. This is inconvenient for test cases, which usually want to create an image before testing various I/O requests. Use bdrv_co_create_opts_simple(), which initializes a pre-existing image instead of creating a new image, so that tests will be able to

[PATCH 0/7] iotests: add -io_uring support

2023-07-25 Thread Stefan Hajnoczi
Add support for block/blkio.c's "io_uring" block driver to qemu-iotests: $ (cd build && tests/qemu-iotests/check -io_uring) I took a look at supporting ./check -qcow2 -io_uring, but there are many failures related to test assumptions about image creation and QEMU command-line syntax. Only

Re: [PATCH v3 0/8] misc AHCI cleanups

2023-07-25 Thread Philippe Mathieu-Daudé
Hi Niklas, John, Paolo, Kevin, On 19/7/23 12:47, Niklas Cassel wrote: Niklas Cassel (8): hw/ide/ahci: remove stray backslash hw/ide/core: set ERR_STAT in unsupported command completion hw/ide/ahci: write D2H FIS when processing NCQ command hw/ide/ahci: simplify and document PxCI

Re: [PATCH] block/blkio: do not use open flags in qemu_open()

2023-07-25 Thread Stefano Garzarella
On Tue, Jul 25, 2023 at 12:15:40PM +0100, Daniel P. Berrangé wrote: On Tue, Jul 25, 2023 at 01:11:55PM +0200, Stefano Garzarella wrote: qemu_open() in blkio_virtio_blk_common_open() is used to open the character device (e.g. /dev/vhost-vdpa-0 or /dev/vfio/vfio) or in the future eventually the

Re: [PATCH] block/blkio: do not use open flags in qemu_open()

2023-07-25 Thread Daniel P . Berrangé
On Tue, Jul 25, 2023 at 01:11:55PM +0200, Stefano Garzarella wrote: > qemu_open() in blkio_virtio_blk_common_open() is used to open the > character device (e.g. /dev/vhost-vdpa-0 or /dev/vfio/vfio) or in > the future eventually the unix socket. > > In all these cases we cannot open the path in

[PATCH] block/blkio: do not use open flags in qemu_open()

2023-07-25 Thread Stefano Garzarella
qemu_open() in blkio_virtio_blk_common_open() is used to open the character device (e.g. /dev/vhost-vdpa-0 or /dev/vfio/vfio) or in the future eventually the unix socket. In all these cases we cannot open the path in read-only mode, when the `read-only` option of blockdev is on, because the

Re: [PATCH v2 4/4] vhost-user-scsi: support reconnect to backend

2023-07-25 Thread Li Feng
> 2023年7月25日 下午6:42,Li Feng 写道: > > If the backend crashes and restarts, the device is broken. > This patch adds reconnect for vhost-user-scsi. > > Tested with spdk backend. > > Signed-off-by: Li Feng > --- > hw/scsi/vhost-scsi-common.c | 6 + > hw/scsi/vhost-user-scsi.c

[PATCH v2 3/4] vhost: move and rename the conn retry times

2023-07-25 Thread Li Feng
Multile devices need this macro, move it to a common header. Signed-off-by: Li Feng --- hw/block/vhost-user-blk.c | 4 +--- hw/virtio/vhost-user-gpio.c | 3 +-- include/hw/virtio/vhost.h | 2 ++ 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/block/vhost-user-blk.c

[PATCH v2 1/4] vhost: fix the fd leak

2023-07-25 Thread Li Feng
When the vhost-user reconnect to the backend, the notifer should be cleanup. Otherwise, the fd resource will be exhausted. Fixes: f9a09ca3ea ("vhost: add support for configure interrupt") Signed-off-by: Li Feng --- hw/virtio/vhost.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH v2 0/4] Implement reconnect for vhost-user-scsi

2023-07-25 Thread Li Feng
Hi, This patchset adds reconnect support for vhost-user-scsi. At the same times, fix vhost fd leak and refactor some code. Changes for v2: - Split the v1 patch to small separate patchset; - New patch for fixing fd leak, which has sent to reviewers in another mail; - Implement the

[PATCH v2 4/4] vhost-user-scsi: support reconnect to backend

2023-07-25 Thread Li Feng
If the backend crashes and restarts, the device is broken. This patch adds reconnect for vhost-user-scsi. Tested with spdk backend. Signed-off-by: Li Feng --- hw/scsi/vhost-scsi-common.c | 6 + hw/scsi/vhost-user-scsi.c | 220 +++---

[PATCH v2 2/4] vhost-user-common: send get_inflight_fd once

2023-07-25 Thread Li Feng
Get_inflight_fd is sent only once. When reconnecting to the backend, qemu sent set_inflight_fd to the backend. Signed-off-by: Li Feng --- hw/scsi/vhost-scsi-common.c | 37 ++--- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git

[PATCH] block/blkio: enable the completion eventfd

2023-07-25 Thread Stefano Garzarella
Until libblkio 1.3.0, virtio-blk drivers had completion eventfd notifications enabled from the start, but from the next releases this is no longer the case, so we have to explicitly enable them. In fact, the libblkio documentation says they could be disabled, so we should always enable them at

Re: [PATCH] vhost-user-scsi: support reconnect to backend

2023-07-25 Thread Li Feng
Thanks for your comments. > 2023年7月25日 上午1:21,Raphael Norwitz 写道: > > Very excited to see this. High level looks good modulo a few small things. > > My major concern is around existing vhost-user-scsi backends which don’t > support VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD. IMO we should hide the