mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-24 08:28:37 -07:00
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.
The new command-line syntax is:
$ qemu-storage-daemon \
--blockdev file,node-name=drive0,filename=test.img \
--export vduse-blk,node-name=drive0,id=vduse-export0,writable=on
After the qemu-storage-daemon started, we need to use
the "vdpa" command to attach the device to vDPA bus:
$ vdpa dev add name vduse-export0 mgmtdev vduse
Also the device must be removed via the "vdpa" command
before we stop the qemu-storage-daemon.
Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20220523084611.91-7-xieyongji@bytedance.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
20 lines
463 B
C
20 lines
463 B
C
/*
|
|
* Export QEMU block device via VDUSE
|
|
*
|
|
* Copyright (C) 2022 Bytedance Inc. and/or its affiliates. All rights reserved.
|
|
*
|
|
* Author:
|
|
* Xie Yongji <xieyongji@bytedance.com>
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or
|
|
* later. See the COPYING file in the top-level directory.
|
|
*/
|
|
|
|
#ifndef VDUSE_BLK_H
|
|
#define VDUSE_BLK_H
|
|
|
|
#include "block/export.h"
|
|
|
|
extern const BlockExportDriver blk_exp_vduse_blk;
|
|
|
|
#endif /* VDUSE_BLK_H */
|