On Mon, Apr 7, 2025 at 2:39 AM Michael S. Tsirkin wrote:
>
> On Thu, May 25, 2023 at 10:20:11PM +, T.J. Alumbaugh wrote:
> > This is the device implementation for the proposed expanded balloon feature
> > described here:
> >
> > https://lore.kernel.org/linux-mm/20230509185419.1088297-1-yuan...
libvduse.c:vduse_iova_add_region() I see it
> > handles the offset by adding it up to the size, instead of using it
> > directly as a parameter in the mmap:
> >
> > void *mmap_addr = mmap(0, size + offset, prot, MAP_SHARED, fd, 0);
>
>
> CC Xie Yongji who wrote this cod
On Fri, Oct 6, 2023 at 8:08 PM Thomas Huth wrote:
>
> No need to declare a new variable with the same name here,
> we can simple re-use the one from the top of the function.
> With this change, the file now compiles fine with -Wshadow=local.
>
> Signed-off-by: Thomas Huth
>
On Wed, Apr 26, 2023 at 12:43 AM Stefan Hajnoczi wrote:
>
> On Fri, Apr 21, 2023 at 11:36:02AM +0800, Yongji Xie wrote:
> > Hi Stefan,
> >
> > On Thu, Apr 20, 2023 at 7:39 PM Stefan Hajnoczi wrote:
> > >
> > > vduse_blk_detach_ctx() waits for in-flight r
Hi Stefan,
On Thu, Apr 20, 2023 at 7:39 PM Stefan Hajnoczi wrote:
>
> vduse_blk_detach_ctx() waits for in-flight requests using
> AIO_WAIT_WHILE(). This is not allowed according to a comment in
> bdrv_set_aio_context_commit():
>
> /*
>* Take the old AioContex when detaching it from bs.
>
On Wed, Dec 21, 2022 at 3:27 AM Marcel Holtmann wrote:
>
> CC libvduse.o
> libvduse.c: In function ‘vring_set_avail_event’:
> libvduse.c:603:7: error: dereferencing type-punned pointer will break
> strict-aliasing rules [-Werror=strict-aliasin]
> 603 | *((uint16_t *)&vq->vring.used-
nsigned int in the fist place.
>
> Signed-off-by: Marcel Holtmann
> ---
> subprojects/libvduse/libvduse.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Xie Yongji
Thanks,
Yongji
s being treated as errors
> ninja: build stopped: cannot make progress due to previous errors.
>
> Fixes: d9cf16c0be ("libvduse: Replace strcpy() with strncpy()")
> Suggested-by: Markus Armbruster
> Signed-off-by: Philippe Mathieu-Daudé
> ---
> Supersedes
Hi Stefano,
On Wed, Oct 26, 2022 at 5:12 PM Stefano Garzarella wrote:
>
> Hi Xie,
> I was testing libblkio [1] with QSD vduse-blk export and had some
> issues.
>
> In a nutshell, QSD prints me the following messages when using
> vhost-vdpa to access the device:
>
>
On Fri, Oct 7, 2022 at 6:51 PM Ming Lei wrote:
>
> On Fri, Oct 07, 2022 at 06:04:29PM +0800, Yongji Xie wrote:
> > On Thu, Oct 6, 2022 at 7:24 PM Ming Lei wrote:
> > >
> > > On Wed, Oct 05, 2022 at 08:21:45AM -0400, Stefan Hajnoczi wrote:
> > > > On
> > > empty image and pre-allocated image, for example of pre-allocated
> > > > > > > qcow2
> > > > > > > image(8GB):
> > > > > > >
> > > > > > > - qemu-nbd (make test T=qcow2/002)
> > > > > >
> > > > >
t; > ninja: build stopped: cannot make progress due to previous errors.
> >
> > Fixes: d9cf16c0be ("libvduse: Replace strcpy() with strncpy()")
> > Signed-off-by: Philippe Mathieu-Daudé
>
> The subject feels a bit too alarming to me. This patch suppresses a
&
The value passed to strerror() should be positive.
So let's fix it.
Fixes: Coverity CID 1490226, 1490223
Signed-off-by: Xie Yongji
Reviewed-by: Richard Henderson
Reviewed-by: Markus Armbruster
---
subprojects/libvduse/libvduse.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
) with strncpy() (as a general library,
we'd like to minimize dependencies on other libraries, so we
didn't use g_strlcpy() here) to fix the coverity complaint.
Fixes: Coverity CID 1490224
Signed-off-by: Xie Yongji
Reviewed-by: Markus Armbruster
---
subprojects/libvduse/libvduse.c | 3
In vduse_name_is_valid(), we actually check whether
the name is invalid or not. So let's change the
function name to vduse_name_is_invalid() to match
the behavior.
Signed-off-by: Xie Yongji
Reviewed-by: Markus Armbruster
---
subprojects/libvduse/libvduse.c | 6 +++---
1 file chang
x27;t use g_strlcpy() [Markus]
Xie Yongji (3):
libvduse: Fix the incorrect function name
libvduse: Replace strcpy() with strncpy()
libvduse: Pass positive value to strerror()
subprojects/libvduse/libvduse.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
--
2.20.1
On Wed, Jun 29, 2022 at 9:22 PM Markus Armbruster wrote:
>
> Yongji Xie writes:
>
> > On Wed, Jun 29, 2022 at 7:39 PM Markus Armbruster wrote:
> >>
> >> Yongji Xie writes:
> >>
> >> > On Wed, Jun 29, 2022 at 5:41 PM Markus Armbrus
On Wed, Jun 29, 2022 at 7:39 PM Markus Armbruster wrote:
>
> Yongji Xie writes:
>
> > On Wed, Jun 29, 2022 at 5:41 PM Markus Armbruster wrote:
> >>
> >> Xie Yongji writes:
> >>
> >> > Coverity pointed out (CID 1490222, 1490227) that we cal
On Wed, Jun 29, 2022 at 5:41 PM Markus Armbruster wrote:
>
> Xie Yongji writes:
>
> > Coverity pointed out (CID 1490222, 1490227) that we called
> > ioctl somewhere without checking the return value. This
> > patch fixes these issues.
> >
> > Fixes: Cover
On Tue, Jun 28, 2022 at 8:26 AM Richard Henderson
wrote:
>
> On 6/27/22 14:32, Xie Yongji wrote:
> > -strcpy(dev_config->name, name);
> > +strncpy(dev_config->name, name, VDUSE_NAME_MAX);
> > +dev_config->name[VDUSE_NAME_MAX - 1] = '\0';
>
The value passed to strerror() should be positive.
So let's fix it.
Fixes: Coverity CID 1490226, 1490223
Signed-off-by: Xie Yongji
---
subprojects/libvduse/libvduse.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/subprojects/libvduse/libvduse.c b/subprojects/lib
Coverity pointed out (CID 1490222, 1490227) that we called
ioctl somewhere without checking the return value. This
patch fixes these issues.
Fixes: Coverity CID 1490222, 1490227
Signed-off-by: Xie Yongji
---
subprojects/libvduse/libvduse.c | 10 --
1 file changed, 8 insertions(+), 2
y() with strncpy() to fix the coverity
complaint.
Fixes: Coverity CID 1490224
Signed-off-by: Xie Yongji
---
subprojects/libvduse/libvduse.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/subprojects/libvduse/libvduse.c b/subprojects/libvduse/libvduse.c
index 6374933881..1e3622
This series fixes some issues reported by coverity.
Patch 1 fixes an incorrect function name.
Patch 2 fixes Coverity CID 1490224.
Patch 3 fixes Coverity CID 1490226, 1490223.
Patch 4 fixes Coverity CID 1490222, 1490227.
Xie Yongji (4):
libvduse: Fix the incorrect function name
libvduse
In vduse_name_is_valid(), we actually check whether
the name is invalid or not. So let's change the
function name to vduse_name_is_invalid() to match
the behavior.
Signed-off-by: Xie Yongji
---
subprojects/libvduse/libvduse.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
On Mon, Jun 27, 2022 at 12:45 PM Markus Armbruster wrote:
>
> Kevin Wolf writes:
>
> > From: Xie Yongji
> >
> > VDUSE [1] is a linux framework that makes it possible to implement
> > software-emulated vDPA devices in userspace. This adds a library
> > as
On Tue, Jun 14, 2022 at 1:04 AM Kevin Wolf wrote:
>
> Am 09.06.2022 um 22:18 hat Richard Henderson geschrieben:
> > On 6/9/22 10:21, Kevin Wolf wrote:
> > > The following changes since commit
> > > 028f2361d0c2d28d6f918fe618f389228ac22b60:
> > >
> > >Merge tag 'pull-target-arm-20220609' of
>
vduse-blk export instead.
Signed-off-by: Xie Yongji
---
block/export/vduse-blk.c | 4 ++--
docs/tools/qemu-storage-daemon.rst | 5 +++--
qapi/block-export.json | 7 ---
storage-daemon/qemu-storage-daemon.c | 8
4 files changed, 13 insertions(+), 11 deletio
|
| long unsigned int
|%llu
1319 | version, strerror(errno));
| ~~~
| |
| uint64_t
Don't delete the export until all inflight I/Os completed.
Otherwise, it might lead to a use-after-free.
Fixes: cc241b5505b2 ("vduse-blk: Implement vduse-blk export")
Signed-off-by: Xie Yongji
---
block/export/vduse-blk.c | 22 ++
1 file changed, 22 insertions
Add a 'serial' option to allow user to specify this value
explicitly. And the default value is changed to an empty
string as what we did in "hw/block/virtio-blk.c".
Signed-off-by: Xie Yongji
---
block/export/vduse-blk.c | 20 ++--
block/export/vho
loads.
Patch 5, 6 adds two new options for vduse-blk export.
V1 to V2:
- Add a patch to fix some compile errors with clang
Xie Yongji (6):
libvduse: Fix some compile errors with clang
libvduse: Fix resources leak in vduse_dev_destroy()
vduse-blk: Don't unlink the reconnect file if d
We should not unlink the reconnect file if vduse_dev_destroy()
fails with -EBUSY which means the VDUSE device has not been
removed from the vDPA bus. Otherwise, we might fail on
the reconnection later.
Fixes: 730abef0e873 ("libvduse: Add support for reconnecting")
Signed-off-by:
This fixes resource leak when the fd is zero in
vduse_dev_destroy().
Fixes: 8dbd281c1675 ("libvduse: Add VDUSE (vDPA Device in Userspace) library")
Signed-off-by: Xie Yongji
---
subprojects/libvduse/libvduse.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/s
Don't delete the export until all inflight I/Os completed.
Otherwise, it might lead to a use-after-free.
Fixes: cc241b5505b2 ("vduse-blk: Implement vduse-blk export")
Signed-off-by: Xie Yongji
---
block/export/vduse-blk.c | 22 ++
1 file changed, 22 insertions
Add a 'serial' option to allow user to specify this value
explicitly. And the default value is changed to an empty
string as what we did in "hw/block/virtio-blk.c".
Signed-off-by: Xie Yongji
---
block/export/vduse-blk.c | 20 ++--
block/export/vho
This series includes few fixes and improvements for the
vduse-blk export.
Patch 1 fixes resources leak when vduse fd is zero.
Patch 2, 3 fixes two bugs which could be triggered
by force deleting a vduse-blk export with high I/O loads.
Patch 4, 5 adds two new options for vduse-blk export.
Xie
vduse-blk export instead.
Signed-off-by: Xie Yongji
---
block/export/vduse-blk.c | 4 ++--
docs/tools/qemu-storage-daemon.rst | 5 +++--
qapi/block-export.json | 7 ---
storage-daemon/qemu-storage-daemon.c | 8
4 files changed, 13 insertions(+), 11 deletio
We should not unlink the reconnect file if vduse_dev_destroy()
fails with -EBUSY which means the VDUSE device has not been
removed from the vDPA bus. Otherwise, we might fail on
the reconnection later.
Fixes: 730abef0e873 ("libvduse: Add support for reconnecting")
Signed-off-by:
This fixes resource leak when the fd is zero in
vduse_dev_destroy().
Fixes: 8dbd281c1675 ("libvduse: Add VDUSE (vDPA Device in Userspace) library")
Signed-off-by: Xie Yongji
---
subprojects/libvduse/libvduse.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/s
On Fri, Jun 3, 2022 at 7:25 PM Maxime Coquelin
wrote:
>
> Hi Yongji,
>
> On 5/23/22 10:46, Xie Yongji wrote:
> > VDUSE [1] is a linux framework that makes it possible to implement
> > software-emulated vDPA devices in userspace. This adds a library
> > as a subproj
On Mon, Jun 6, 2022 at 7:05 PM Stefan Hajnoczi wrote:
>
> On Wed, Jun 01, 2022 at 09:10:58PM +0800, Yongji Xie wrote:
> > On Wed, Jun 1, 2022 at 9:03 PM Stefan Hajnoczi wrote:
> > >
> > > On Tue, May 31, 2022 at 05:52:21PM +0800, Xie Yongji wrote:
> > > >
On Wed, Jun 1, 2022 at 9:03 PM Stefan Hajnoczi wrote:
>
> On Tue, May 31, 2022 at 05:52:21PM +0800, Xie Yongji wrote:
> > Currently we use 'id' option as the name of VDUSE device.
> > It's a bit confusing since we use one value for two different
> > purpos
vduse-blk export instead.
Signed-off-by: Xie Yongji
---
block/export/vduse-blk.c | 9 ++---
docs/tools/qemu-storage-daemon.rst | 5 +++--
qapi/block-export.json | 7 ---
storage-daemon/qemu-storage-daemon.c | 8
4 files changed, 17 insertions(+), 12 d
vduse-blk export instead.
Signed-off-by: Xie Yongji
---
block/export/vduse-blk.c | 6 +++---
docs/tools/qemu-storage-daemon.rst | 5 +++--
qapi/block-export.json | 7 ---
storage-daemon/qemu-storage-daemon.c | 8
4 files changed, 14 insertions(+), 12 d
On Fri, May 27, 2022 at 11:34 PM Kevin Wolf wrote:
>
> Am 23.05.2022 um 10:46 hat Xie Yongji geschrieben:
> > This implements a VDUSE block backends based on
> > the libvduse library. We can use it to export the BDSs
> > for both VM and container (host) usage.
> >
&
On Wed, May 25, 2022 at 8:19 PM Stefan Hajnoczi wrote:
>
> Document vduse-blk exports in qemu-storage-daemon --help and the
> qemu-storage-daemon(1) man page.
>
> Based-on: <20220523084611.91-1-xieyon...@bytedance.com>
> Cc: Xie Yongji
> Signed-off-by: Stefan Hajnocz
On Wed, May 25, 2022 at 7:02 PM Stefan Hajnoczi wrote:
>
> On Mon, May 23, 2022 at 04:46:03PM +0800, Xie Yongji wrote:
> > Hi all,
> >
> > Last few months ago, VDUSE (vDPA Device in Userspace) [1] has
> > been merged into Linux kernel as a framework that make it
On Wed, May 25, 2022 at 8:48 PM Stefan Hajnoczi wrote:
>
> On Mon, May 23, 2022 at 04:46:03PM +0800, Xie Yongji wrote:
> > Hi all,
> >
> > Last few months ago, VDUSE (vDPA Device in Userspace) [1] has
> > been merged into Linux kernel as a framework that make it
To support block resize, this uses vduse_dev_update_config()
to update the capacity field in configuration space and inject
config interrupt on the block resize callback.
Signed-off-by: Xie Yongji
Reviewed-by: Stefan Hajnoczi
---
block/export/vduse-blk.c | 20
1 file
VDUSE [1] is a linux framework that makes it possible to implement
software-emulated vDPA devices in userspace. This adds a library
as a subproject to help implementing VDUSE backends in QEMU.
[1] https://www.kernel.org/doc/html/latest/userspace-api/vduse.html
Signed-off-by: Xie Yongji
Now the req->size is set to the correct value only
when handling VIRTIO_BLK_T_GET_ID request. This patch
fixes it.
Signed-off-by: Xie Yongji
---
block/export/vhost-user-blk-server.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/block/export/vhost-user-blk-server.c
Abstract the common logic of virtio-blk I/O process to a function
named virtio_blk_process_req(). It's needed for the following commit.
Signed-off-by: Xie Yongji
---
MAINTAINERS | 2 +
block/export/meson.build | 2 +-
block/export/vhost-user-blk-ser
To support reconnecting after restart or crash, VDUSE backend
might need to resubmit inflight I/Os. This stores the metadata
such as the index of inflight I/O's descriptors to a shm file so
that VDUSE backend can restore them during reconnecting.
Signed-off-by: Xie Yongji
---
block/export/
emon.
Signed-off-by: Xie Yongji
Reviewed-by: Stefan Hajnoczi
---
MAINTAINERS | 4 +-
block/export/export.c | 6 +
block/export/meson.build | 5 +
block/export/vduse-blk.c | 307 ++
block/export/vduse-blk.h |
This adds vduse header to linux headers so that the
relevant VDUSE API can be used in subsequent patches.
Signed-off-by: Xie Yongji
Reviewed-by: Stefan Hajnoczi
---
linux-headers/linux/vduse.h | 306
scripts/update-linux-headers.sh | 2 +-
2 files changed
- Increase default queue size to 256 for vduse-blk [Stefan]
- Zero-initialize virtio-blk config space [Stefan]
- Add a patch to support reset blk->dev_ops
- Validate vq->log->inflight fields [Stefan]
- Add vduse_set_reconnect_log_file() API to support specifing the
reconnect log file
- Fix some
This supports passing NULL ops to blk_set_dev_ops()
so that we can remove stale ops in some cases.
Signed-off-by: Xie Yongji
Reviewed-by: Stefan Hajnoczi
---
block/block-backend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/block-backend.c b/block/block-backend.c
On Thu, May 19, 2022 at 5:44 PM Stefan Hajnoczi wrote:
>
> On Thu, May 19, 2022 at 04:25:13PM +0800, Yongji Xie wrote:
> > On Wed, May 18, 2022 at 10:03 PM Stefan Hajnoczi
> > wrote:
> > >
> > > On Wed, May 04, 2022 at 03:40:51PM +0800, Xie Yongji wrote:
>
On Wed, May 18, 2022 at 10:03 PM Stefan Hajnoczi wrote:
>
> On Wed, May 04, 2022 at 03:40:51PM +0800, Xie Yongji wrote:
> > @@ -291,6 +294,15 @@ static int vduse_blk_exp_create(BlockExport *exp,
> > BlockExportOptions *opts,
> > return -ENOMEM;
> >
On Wed, May 18, 2022 at 9:46 PM Stefan Hajnoczi wrote:
>
> On Wed, May 04, 2022 at 03:40:48PM +0800, Xie Yongji wrote:
> > +static int vduse_queue_update_vring(VduseVirtq *vq, uint64_t desc_addr,
> > +uint64_t avail_addr, uint6
On Wed, May 18, 2022 at 9:14 PM Stefan Hajnoczi wrote:
>
> On Wed, May 04, 2022 at 03:40:46PM +0800, Xie Yongji wrote:
> > -static void vu_blk_req_complete(VuBlkReq *req)
> > +static void vu_blk_req_complete(VuBlkReq *req, size_t in_len)
> > {
> > VuDev
On Wed, May 18, 2022 at 9:17 PM Stefan Hajnoczi wrote:
>
> On Wed, May 04, 2022 at 03:40:45PM +0800, Xie Yongji wrote:
> > Support getting the guest block size for the block backend.
> > It's needed for the following commit.
> >
> > Signed-off-by: Xie Yongji
On Fri, May 13, 2022 at 6:03 PM Michael S. Tsirkin wrote:
>
> On Wed, May 04, 2022 at 03:40:43PM +0800, Xie Yongji wrote:
> > Hi all,
> >
> > Last few months ago, VDUSE (vDPA Device in Userspace) [1] has
> > been merged into Linux kernel as a framework that make it
To support reconnecting after restart or crash, VDUSE backend
might need to resubmit inflight I/Os. This stores the metadata
such as the index of inflight I/O's descriptors to a shm file so
that VDUSE backend can restore them during reconnecting.
Signed-off-by: Xie Yongji
---
block/export/
VDUSE [1] is a linux framework that makes it possible to implement
software-emulated vDPA devices in userspace. This adds a library
as a subproject to help implementing VDUSE backends in QEMU.
[1] https://www.kernel.org/doc/html/latest/userspace-api/vduse.html
Signed-off-by: Xie Yongji
emon.
Signed-off-by: Xie Yongji
---
MAINTAINERS | 4 +-
block/export/export.c | 6 +
block/export/meson.build | 5 +
block/export/vduse-blk.c | 312 ++
block/export/vduse-blk.h | 20 +++
meson.build
This adds vduse header to linux headers so that the
relevant VDUSE API can be used in subsequent patches.
Signed-off-by: Xie Yongji
---
linux-headers/linux/vduse.h | 306
scripts/update-linux-headers.sh | 2 +-
2 files changed, 307 insertions(+), 1
[Stefan]
- Add vduse_set_reconnect_log_file() API to support specifing the
reconnect log file
- Fix some bugs [Stefan]
Xie Yongji (8):
block: Support passing NULL ops to blk_set_dev_ops()
block-backend: Introduce blk_get_guest_block_size()
block/export: Abstract out the logic of virtio-blk I/O p
Abstract the common logic of virtio-blk I/O process to a function
named virtio_blk_process_req(). It's needed for the following commit.
Signed-off-by: Xie Yongji
---
MAINTAINERS | 2 +
block/export/meson.build | 2 +-
block/export/vhost-user-blk-ser
To support block resize, this uses vduse_dev_update_config()
to update the capacity field in configuration space and inject
config interrupt on the block resize callback.
Signed-off-by: Xie Yongji
Reviewed-by: Stefan Hajnoczi
---
block/export/vduse-blk.c | 20
1 file
Support getting the guest block size for the block backend.
It's needed for the following commit.
Signed-off-by: Xie Yongji
---
block/block-backend.c | 6 ++
include/sysemu/block-backend-io.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/block/block-backend.c b/
This supports passing NULL ops to blk_set_dev_ops()
so that we can remove stale ops in some cases.
Signed-off-by: Xie Yongji
---
block/block-backend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/block-backend.c b/block/block-backend.c
index e0e1aff4b1..35457a6a1d
On Wed, Apr 27, 2022 at 9:22 PM Kevin Wolf wrote:
>
> Am 27.04.2022 um 05:11 hat Yongji Xie geschrieben:
> > On Wed, Apr 27, 2022 at 1:03 AM Kevin Wolf wrote:
> > >
> > > Am 06.04.2022 um 09:59 hat Xie Yongji geschrieben:
> > > > This implements a
On Wed, Apr 27, 2022 at 1:03 AM Kevin Wolf wrote:
>
> Am 06.04.2022 um 09:59 hat Xie Yongji geschrieben:
> > This implements a VDUSE block backends based on
> > the libvduse library. We can use it to export the BDSs
> > for both VM and container (host) usage.
> >
&
emon.
Signed-off-by: Xie Yongji
---
MAINTAINERS | 4 +-
block/export/export.c | 6 +
block/export/meson.build | 5 +
block/export/vduse-blk.c | 425 ++
block/export/vduse-blk.h | 20 ++
meson.build
This supports passing NULL ops to blk_set_dev_ops()
so that we can remove stale ops in some cases.
Signed-off-by: Xie Yongji
---
block/block-backend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/block-backend.c b/block/block-backend.c
index e0e1aff4b1..35457a6a1d
To support block resize, this uses vduse_dev_update_config()
to update the capacity field in configuration space and inject
config interrupt on the block resize callback.
Signed-off-by: Xie Yongji
Reviewed-by: Stefan Hajnoczi
---
block/export/vduse-blk.c | 20
1 file
To support reconnecting after restart or crash, VDUSE backend
might need to resubmit inflight I/Os. This stores the metadata
such as the index of inflight I/O's descriptors to a shm file so
that VDUSE backend can restore them during reconnecting.
Signed-off-by: Xie Yongji
---
block/export/
VDUSE [1] is a linux framework that makes it possible to implement
software-emulated vDPA devices in userspace. This adds a library
as a subproject to help implementing VDUSE backends in QEMU.
[1] https://www.kernel.org/doc/html/latest/userspace-api/vduse.html
Signed-off-by: Xie Yongji
This adds vduse header to linux headers so that the
relevant VDUSE API can be used in subsequent patches.
Signed-off-by: Xie Yongji
---
linux-headers/linux/vduse.h | 306
scripts/update-linux-headers.sh | 2 +-
2 files changed, 307 insertions(+), 1
pport reset blk->dev_ops
- Validate vq->log->inflight fields [Stefan]
- Add vduse_set_reconnect_log_file() API to support specifing the
reconnect log file
- Fix some bugs [Stefan]
Xie Yongji (6):
block: Support passing NULL ops to blk_set_dev_ops()
linux-headers: Add vduse.h
libvd
On Mon, Mar 21, 2022 at 9:25 PM Eric Blake wrote:
>
> On Mon, Mar 21, 2022 at 03:14:37PM +0800, Xie Yongji wrote:
> > This implements a VDUSE block backends based on
> > the libvduse library. We can use it to export the BDSs
> > for both VM and container (host) usage.
>
emon.
Signed-off-by: Xie Yongji
---
MAINTAINERS | 4 +-
block/export/export.c | 6 +
block/export/meson.build | 5 +
block/export/vduse-blk.c | 425 ++
block/export/vduse-blk.h | 20 ++
meson.build
To support block resize, this uses vduse_dev_update_config()
to update the capacity field in configuration space and inject
config interrupt on the block resize callback.
Signed-off-by: Xie Yongji
Reviewed-by: Stefan Hajnoczi
---
block/export/vduse-blk.c | 20
1 file
To support reconnecting after restart or crash, VDUSE backend
might need to resubmit inflight I/Os. This stores the metadata
such as the index of inflight I/O's descriptors to a shm file so
that VDUSE backend can restore them during reconnecting.
Signed-off-by: Xie Yongji
---
block/export/
This supports passing NULL ops to blk_set_dev_ops()
so that we can remove stale ops in some cases.
Signed-off-by: Xie Yongji
---
block/block-backend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/block-backend.c b/block/block-backend.c
index e0e1aff4b1..35457a6a1d
VDUSE [1] is a linux framework that makes it possible to implement
software-emulated vDPA devices in userspace. This adds a library
as a subproject to help implementing VDUSE backends in QEMU.
[1] https://www.kernel.org/doc/html/latest/userspace-api/vduse.html
Signed-off-by: Xie Yongji
g->inflight fields [Stefan]
- Add vduse_set_reconnect_log_file() API to support specifing the
reconnect log file
- Fix some bugs [Stefan]
Xie Yongji (6):
block: Support passing NULL ops to blk_set_dev_ops()
linux-headers: Add vduse.h
libvduse: Add VDUSE (vDPA Device in Userspace) libra
This adds vduse header to linux headers so that the
relevant VDUSE API can be used in subsequent patches.
Signed-off-by: Xie Yongji
---
linux-headers/linux/vduse.h | 306
scripts/update-linux-headers.sh | 2 +-
2 files changed, 307 insertions(+), 1
On Wed, Mar 16, 2022 at 11:51 PM Stefan Hajnoczi wrote:
>
> On Wed, Mar 16, 2022 at 09:49:19PM +0800, Yongji Xie wrote:
> > On Wed, Mar 16, 2022 at 9:28 PM Stefan Hajnoczi wrote:
> > >
> > > On Tue, Mar 15, 2022 at 07:38:12PM +0800, Yongji Xie wrote:
> >
On Wed, Mar 16, 2022 at 9:28 PM Stefan Hajnoczi wrote:
>
> On Tue, Mar 15, 2022 at 07:38:12PM +0800, Yongji Xie wrote:
> > On Tue, Mar 15, 2022 at 5:48 PM Stefan Hajnoczi wrote:
> > >
> > > On Tue, Feb 15, 2022 at 06:59:40PM +0800, Xie Yongji wrote:
> > >
On Wed, Mar 16, 2022 at 8:16 PM Stefan Hajnoczi wrote:
>
> On Tue, Mar 15, 2022 at 07:52:03PM +0800, Yongji Xie wrote:
> > On Tue, Mar 15, 2022 at 7:08 PM Stefan Hajnoczi wrote:
> > >
> > > On Tue, Feb 15, 2022 at 06:59:41PM +0800, Xie Yongji wrote:
> > > &
On Tue, Mar 15, 2022 at 9:48 PM Stefan Hajnoczi wrote:
>
> On Tue, Feb 15, 2022 at 06:59:43PM +0800, Xie Yongji wrote:
> > +static int vduse_queue_inflight_get(VduseVirtq *vq, int desc_idx)
> > +{
> > +vq->log->inflight.desc[desc_idx].counter = vq->counter++
On Tue, Mar 15, 2022 at 7:08 PM Stefan Hajnoczi wrote:
>
> On Tue, Feb 15, 2022 at 06:59:41PM +0800, Xie Yongji wrote:
> > This implements a VDUSE block backends based on
> > the libvduse library. We can use it to export the BDSs
> > for both VM and container (host) usage.
On Tue, Mar 15, 2022 at 5:48 PM Stefan Hajnoczi wrote:
>
> On Tue, Feb 15, 2022 at 06:59:40PM +0800, Xie Yongji wrote:
> > VDUSE [1] is a linux framework that makes it possible to implement
> > software-emulated vDPA devices in userspace. This adds a library
> >
emon.
Signed-off-by: Xie Yongji
---
block/export/export.c | 6 +
block/export/meson.build | 5 +
block/export/vduse-blk.c | 428 ++
block/export/vduse-blk.h | 20 ++
meson.build | 13 ++
meson_options.txt
To support reconnecting after restart or crash, VDUSE backend
might need to resubmit inflight I/Os. This stores the metadata
such as the index of inflight I/O's descriptors to a shm file so
that VDUSE backend can restore them during reconnecting.
Signed-off-by: Xie Yongji
---
block/export/
VDUSE [1] is a linux framework that makes it possible to implement
software-emulated vDPA devices in userspace. This adds a library
as a subproject to help implementing VDUSE backends in QEMU.
[1] https://www.kernel.org/doc/html/latest/userspace-api/vduse.html
Signed-off-by: Xie Yongji
To support block resize, this uses vduse_dev_update_config()
to update the capacity field in configuration space and inject
config interrupt on the block resize callback.
Signed-off-by: Xie Yongji
---
block/export/vduse-blk.c | 20
1 file changed, 20 insertions(+)
diff
1 - 100 of 639 matches
Mail list logo