Variable `vdev` in `struct vhost_dev` will not be ready
until start the device, so let's not use it for the error
output here.
Fixes: 5653493 ("hw/virtio/vhost-user: don't suppress F_CONFIG when supported")
Signed-off-by: Changpeng Liu
---
hw/virtio/vhost-user.c | 8 +++
Currently vhost-user-scsi driver doesn't allow to change
the configuration space of virtio_scsi, while vhost-user-blk
support that, so here we set the flag in vhost-user-blk driver
and unset it in vhost-user-scsi.
Signed-off-by: Changpeng Liu
---
hw/block/vhost-user-blk.c | 1 +
hw/scsi/
ed: Invalid argument
Since virtio-blk doesn't support the "discard" and "write zeroes"
features, it shouldn't even expose the associated fields in the
config space actually. Just include all fields up to num_queues to
match QEMU 3.1 and older.
Signed-off-
ed: Invalid argument
Since virtio-blk doesn't support the "discard" and "write zeroes"
features, it shouldn't even expose the associated fields in the
config space actually. Just include all fields up to num_queues to
match QEMU 3.1 and older.
Signed-off-
lizing the host driver, for now, discard/write zeroes
are not supported by virtio-blk host driver, so set the config
size as before, users can change config size when adding the new
feature bits support.
Signed-off-by: Changpeng Liu
---
hw/block/virtio-blk.c | 10 ++
1 file changed, 6
lizing the host driver, for now, discard/write zeroes
are not supported by virtio-blk host driver, so set the config
size as before, users can change config size when adding the new
feature bits support.
Signed-off-by: Changpeng Liu
---
hw/block/virtio-blk.c | 15 +++
include
Linux commit 1f23816b8 "virtio_blk: add discard and write zeroes support"
added the support in the Guest kernel, while here also enable the features
support with vhost-user-blk driver. Also enable the test example utility
with DISCARD and WRITE ZEROES commands.
Signed-off-by: Cha
Linux commit 1f23816b8 "virtio_blk: add discard and write zeroes support"
added the support in the Guest kernel, while here also enable the features
support with vhost-user-blk driver. Also enable the test example utility
with DISCARD and WRITE ZEROES commands.
Signed-off-by: Cha
Signed-off-by: Changpeng Liu
---
configure | 3 +++
1 file changed, 3 insertions(+)
diff --git a/configure b/configure
index 3eee3fc..3d5af97 100755
--- a/configure
+++ b/configure
@@ -5763,6 +5763,9 @@ if test "$want_tools" = "yes" ; then
if [ "$posix" = "
Signed-off-by: Changpeng Liu
---
contrib/vhost-user-blk/vhost-user-blk.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/contrib/vhost-user-blk/vhost-user-blk.c
b/contrib/vhost-user-blk/vhost-user-blk.c
index 858221a..49640df 100644
--- a/contrib/vhost-user-blk/vhost
Linux commit 1f23816b8 "virtio_blk: add discard and write zeroes support"
added the support in the Guest kernel, while here enable the feature bits
support with vhost-user-blk driver. Also enable the test example utility
with DISCARD command support.
Signed-off-by: Changpeng Liu
--
Read only feature shouldn't be negotiable, because if the
backend device reported Read only feature supported, QEMU
host driver shouldn't change backend's RO attribute. While
here, also enable the vhost-user-blk test utility to test
RO feature.
Signed-off-by: Changpeng Liu
---
This patch reports the protocol feature that is only advertised by
QEMU if the device implements the config ops.
Signed-off-by: Changpeng Liu
---
contrib/vhost-user-blk/vhost-user-blk.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/contrib/vhost-user-blk/vhost-user-blk.c
b/contrib
Read only feature shouldn't be negotiable, because if the
backend device reported Read only feature supported, QEMU
host driver shouldn't change backend's RO attribute.
Signed-off-by: Changpeng Liu
---
hw/block/vhost-user-blk.c | 5 +
include/hw/virtio/vhost-user
This patch reports the protocol feature that is only advertised by
QEMU if the device implements the config ops.
Signed-off-by: Changpeng Liu
---
contrib/vhost-user-blk/vhost-user-blk.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/contrib/vhost-user-blk/vhost-user-blk.c
b/contrib
Signed-off-by: Changpeng Liu
---
contrib/libvhost-user/libvhost-user.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/libvhost-user/libvhost-user.h
b/contrib/libvhost-user/libvhost-user.h
index 79f7a53..b27075e 100644
--- a/contrib/libvhost-user/libvhost-user.h
+++ b/contrib
Currently virtio-pci driver hardcoded 2 vectors for virtio-blk device,
for multiple I/O queues scenario, all the I/O queues will share one
interrupt vector, while here, enable multiple vectors according to
the number of I/O queues.
Signed-off-by: Changpeng Liu
---
hw/virtio/virtio-pci.c | 14
Currently virtio-pci driver hardcoded 2 vectors for virtio-blk device,
for multiple I/O queues scenario, all the I/O queues will share one
interrupt vector, while here, enable multiple vectors according to
the number of I/O queues.
Signed-off-by: Changpeng Liu
---
hw/virtio/virtio-pci.c | 12
Public bug reported:
The new commit: 4fe6d78 break the existing vhost-user devices, such as
vhost-user-scsi/blk and vhost-vsocks when exit the host driver,
kvm_io_ioeventfd_del will hit the abort().
** Affects: qemu
Importance: Undecided
Status: New
** Tags: vhost-user virtio
--
forward the IO
requests through socket message, but this will have huge performance drop;
Any feedback is appreciated.
Changpeng Liu (1):
block/NVMe: introduce a new vhost NVMe host device to QEMU
hw/block/Makefile.objs | 3 +
hw/block/nvme.h| 28 ++
hw/block
.
Currently Guest OS must use 4.12 kernel or later.
Signed-off-by: Changpeng Liu
---
hw/block/Makefile.objs | 3 +
hw/block/nvme.h| 28 ++
hw/block/vhost.c | 439 ++
hw/block/vhost_user.c | 588 +
hw/block
logic, such as all
user space I/O stack against hardware block device. It uses the new
vhost messages(VHOST_USER_GET_CONFIG) to get block virtio config
information from backend process.
Signed-off-by: Changpeng Liu
---
default-configs/pci.mak| 1 +
hw/block/Makefile.objs
set virtio config space.
Changpeng Liu (4):
vhost-user: add new vhost user messages to support virtio config space
vhost-user-blk: introduce a new vhost-user-blk host device
contrib/libvhost-user: enable virtio config space messages
contrib/vhost-user-blk: introduce a vhost-user-blk sample a
/path/vhost.socket
Signed-off-by: Changpeng Liu
---
.gitignore | 1 +
Makefile| 3 +
Makefile.objs | 1 +
contrib/vhost-user-blk/Makefile.objs| 1 +
contrib/vhost-user-blk/vhost-user-blk.c | 545
Enable VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG messages in
libvhost-user library, users can implement their own I/O target
based on the library. This enable the virtio config space delivered
between QEMU host device and the I/O target.
Signed-off-by: Changpeng Liu
---
contrib/libvhost-user
,
VHOST_USER_SLAVE_CONFIG_CHANGE_MSG message is added as the event notifier
in case virtio config space change in the slave I/O target.
Signed-off-by: Changpeng Liu
---
docs/interop/vhost-user.txt | 55 ++
hw/virtio/vhost-user.c| 118 ++
hw
Enable VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG messages in
libvhost-user library, users can implement their own I/O target
based on the library. This enable the virtio config space delivered
between QEMU host device and the I/O target.
Signed-off-by: Changpeng Liu
---
contrib/libvhost-user
logic, such as all
user space I/O stack against hardware block device. It uses the new
vhost messages(VHOST_USER_GET_CONFIG) to get block virtio config
information from backend process.
Signed-off-by: Changpeng Liu
---
default-configs/pci.mak| 1 +
hw/block/Makefile.objs
/path/vhost.socket
Signed-off-by: Changpeng Liu
---
.gitignore | 1 +
Makefile| 3 +
Makefile.objs | 1 +
contrib/vhost-user-blk/Makefile.objs| 1 +
contrib/vhost-user-blk/vhost-user-blk.c | 545
-user get/set messages' payload doesn't contain invalid
data buffers.
v4-v5: add header offset and size for virtio config space.
v3-v4: refactoring the vhost user block example patch based on new
libvhost-user library.
v2-v3: add new vhost user message to get/set virtio config space.
Changp
,
VHOST_USER_SLAVE_CONFIG_CHANGE_MSG message is added as the event notifier
in case virtio config space change in the slave I/O target.
Signed-off-by: Changpeng Liu
---
docs/interop/vhost-user.txt | 55 ++
hw/virtio/vhost-user.c| 118 ++
hw
Enable VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG messages in
libvhost-user library, users can implement their own I/O target
based on the library. This enable the virtio config space delivered
between QEMU host device and the I/O target.
Signed-off-by: Changpeng Liu
---
contrib/libvhost-user
logic, such as all
user space I/O stack against hardware block device. It uses the new
vhost messages(VHOST_USER_GET_CONFIG) to get block virtio config
information from backend process.
Signed-off-by: Changpeng Liu
---
default-configs/pci.mak| 1 +
hw/block/Makefile.objs
v4-v5: add header offset and size for virtio config space.
v3-v4: refactoring the vhost user block example patch based on new
libvhost-user library.
v2-v3: add new vhost user message to get/set virtio config space.
Changpeng Liu (4):
vhost-user: add new vhost user messages to support virtio co
,
VHOST_USER_SLAVE_CONFIG_CHANGE_MSG message is added as the event notifier
in case virtio config space change in the slave I/O target.
Signed-off-by: Changpeng Liu
---
docs/interop/vhost-user.txt | 53 +
hw/virtio/vhost-user.c| 118 ++
hw
/path/vhost.socket
Signed-off-by: Changpeng Liu
---
.gitignore | 1 +
Makefile| 3 +
Makefile.objs | 1 +
contrib/vhost-user-blk/Makefile.objs| 1 +
contrib/vhost-user-blk/vhost-user-blk.c | 543
/path/vhost.socket
Signed-off-by: Changpeng Liu
---
.gitignore | 1 +
Makefile| 3 +
Makefile.objs | 1 +
contrib/vhost-user-blk/Makefile.objs| 1 +
contrib/vhost-user-blk/vhost-user-blk.c | 550
logic, such as all
user space I/O stack against hardware block device. It uses the new
vhost messages(VHOST_USER_GET_CONFIG) to get block virtio config
information from backend process.
Signed-off-by: Changpeng Liu
---
default-configs/pci.mak| 1 +
hw/block/Makefile.objs
case
of virtio config space changed.
Signed-off-by: Changpeng Liu
---
contrib/libvhost-user/libvhost-user.c | 80 +++
contrib/libvhost-user/libvhost-user.h | 36 +++-
2 files changed, 115 insertions(+), 1 deletion(-)
diff --git a/contrib/libvhost-user
,
VHOST_USER_SET_CONFIG_FD message is added as the event notifier
in case virtio config space change in the I/O target.
Signed-off-by: Changpeng Liu
---
docs/interop/vhost-user.txt | 45
hw/virtio/vhost-user.c| 107 ++
hw/virtio/vhost.c
valid data buffers.
v4-v5: add header offset and size for virtio config space.
v3-v4: refactoring the vhost user block example patch based on new
libvhost-user library.
v2-v3: add new vhost user message to get/set virtio config space.
Changpeng Liu (4):
vhost-user: add new vhost user messages
case
of virtio config space changed.
Signed-off-by: Changpeng Liu
---
contrib/libvhost-user/libvhost-user.c | 80 +++
contrib/libvhost-user/libvhost-user.h | 36 +++-
2 files changed, 115 insertions(+), 1 deletion(-)
diff --git a/contrib/libvhost-user
logic, such as all
user space I/O stack against hardware block device. It uses the new
vhost messages(VHOST_USER_GET_CONFIG) to get block virtio config
information from backend process.
Signed-off-by: Changpeng Liu
---
default-configs/pci.mak| 1 +
hw/block/Makefile.objs
,
VHOST_USER_SET_CONFIG_FD message is added as the event notifier
in case virtio config space change in the I/O target.
Signed-off-by: Changpeng Liu
---
docs/interop/vhost-user.txt | 44
hw/virtio/vhost-user.c| 107 ++
hw/virtio/vhost.c
/path/vhost.socket
Signed-off-by: Changpeng Liu
---
.gitignore | 1 +
Makefile| 3 +
Makefile.objs | 1 +
contrib/vhost-user-blk/Makefile.objs| 1 +
contrib/vhost-user-blk/vhost-user-blk.c | 556
toring the vhost user block example patch based on new
libvhost-user library.
v2-v3: add new vhost user message to get/set virtio config space.
Changpeng Liu (4):
vhost-user: add new vhost user messages to support virtio config space
vhost-user-blk: introduce a new vhost-user-blk host device
/path/vhost.socket
Signed-off-by: Changpeng Liu
---
.gitignore | 1 +
Makefile| 3 +
Makefile.objs | 1 +
contrib/vhost-user-blk/Makefile.objs| 1 +
contrib/vhost-user-blk/vhost-user-blk.c | 536
case
of virtio config space changed.
Signed-off-by: Changpeng Liu
---
contrib/libvhost-user/libvhost-user.c | 79 +++
contrib/libvhost-user/libvhost-user.h | 24 ++-
2 files changed, 102 insertions(+), 1 deletion(-)
diff --git a/contrib/libvhost-user
logic, such as all
user space I/O stack against hardware block device. It uses the new
vhost messages(VHOST_USER_GET_CONFIG) to get block virtio config
information from backend process.
Signed-off-by: Changpeng Liu
---
default-configs/pci.mak| 1 +
hw/block/Makefile.objs
live migration as well.
V4-v5: add header offset and size for virtio config space.
v3-v4: refactoring the vhost user block example patch based on new
libvhost-user library.
v2-v3: add new vhost user message to get/set virtio config space.
Changpeng Liu (4):
vhost-user: add new vhost user messages
,
VHOST_USER_SET_CONFIG_FD message is added as the event notifier
in case virtio config space change in the I/O target.
Signed-off-by: Changpeng Liu
---
docs/interop/vhost-user.txt | 39
hw/virtio/vhost-user.c| 98 +++
hw/virtio/vhost.c
,
VHOST_USER_SET_CONFIG_FD message is added as the event notifier
in case virtio config space change in the I/O target.
Signed-off-by: Changpeng Liu
---
docs/interop/vhost-user.txt | 33 +
hw/virtio/vhost-user.c| 97 +++
hw/virtio/vhost.c
logic, such as all
user space I/O stack against hardware block device. It uses the new
vhost messages(VHOST_USER_GET_CONFIG) to get block virtio config
information from backend process.
Signed-off-by: Changpeng Liu
---
configure | 11 ++
hw/block/Makefile.objs
live migration as well.
v3-v4: refactoring the vhost user block example patch based on new
libvhost-user library.
v2-v3: add new vhost user message to get/set virtio config space
Changpeng Liu (4):
vhost-user: add new vhost user messages to support virtio config space
vhost-user-blk: introduce
case
of virtio config space changed.
Signed-off-by: Changpeng Liu
---
contrib/libvhost-user/libvhost-user.c | 75 +++
contrib/libvhost-user/libvhost-user.h | 15 ++-
2 files changed, 89 insertions(+), 1 deletion(-)
diff --git a/contrib/libvhost-user/libvhost
/path/vhost.socket
Signed-off-by: Changpeng Liu
---
.gitignore | 1 +
Makefile| 3 +
Makefile.objs | 1 +
contrib/vhost-user-blk/Makefile.objs| 1 +
contrib/vhost-user-blk/vhost-user-blk.c | 492
/path/vhost.socket
Signed-off-by: Changpeng Liu
---
.gitignore | 1 +
Makefile| 3 +
Makefile.objs | 2 +
contrib/vhost-user-blk/Makefile.objs| 1 +
contrib/vhost-user-blk/vhost-user-blk.c | 735
, VHOST_USER_SET_CONFIG_FD message is added as the event notifier
in case virtio config space change.
Signed-off-by: Changpeng Liu
---
docs/interop/vhost-user.txt | 32 +
hw/virtio/vhost-user.c| 97 +++
hw/virtio/vhost.c
logic, such as all
user space I/O stack against hardware block device. It uses the new
vhost messages(VHOST_USER_GET_CONFIG) to get block virtio config
information from backend process.
Signed-off-by: Changpeng Liu
---
configure | 11 ++
hw/block/Makefile.objs
device live migration as well.
Changpeng Liu (4):
vhost-user: add new vhost user messages to support virtio config space
vhost-user-blk: introduce a new vhost-user-blk host device
contrib/libvhost-user: enable virtio config space messages
contrib/vhost-user-blk: introduce a vhost-user-blk
case
of virtio config space changed.
Signed-off-by: Changpeng Liu
---
contrib/libvhost-user/libvhost-user.c | 74 +++
contrib/libvhost-user/libvhost-user.h | 15 +++
2 files changed, 89 insertions(+)
diff --git a/contrib/libvhost-user/libvhost-user.c
b/contrib
/path/vhost.socket
Signed-off-by: Changpeng Liu
---
.gitignore | 1 +
Makefile| 3 +
Makefile.objs | 2 +
contrib/vhost-user-blk/Makefile.objs| 1 +
contrib/vhost-user-blk/vhost-user-blk.c | 735
case
of virtio config space changed.
Signed-off-by: Changpeng Liu
---
contrib/libvhost-user/libvhost-user.c | 51 +++
contrib/libvhost-user/libvhost-user.h | 14 ++
2 files changed, 65 insertions(+)
diff --git a/contrib/libvhost-user/libvhost-user.c
b
, VHOST_USER_SET_CONFIG_FD message is added as the event notifier
in case virtio config space change.
Signed-off-by: Changpeng Liu
---
docs/interop/vhost-user.txt | 31 ++
hw/virtio/vhost-user.c| 86 +++
hw/virtio/vhost.c
messages(VHOST_USER_GET_CONFIG) to get block virtio config
information from backend process.
Signed-off-by: Changpeng Liu
---
configure | 11 ++
hw/block/Makefile.objs | 3 +
hw/block/vhost-user-blk.c | 360 +
hw/virtio
device live migration as well.
Changpeng Liu (4):
vhost-user: add new vhost user messages to support virtio config space
vhost-user-blk: introduce a new vhost-user-blk host device
contrib/libvhost-user: enable virtio config space messages
contrib/vhost-user-blk: introduce a vhost-user-blk
/path/vhost.socket
Signed-off-by: Changpeng Liu
---
.gitignore | 1 +
Makefile| 3 +
Makefile.objs | 2 +
contrib/vhost-user-blk/Makefile.objs| 1 +
contrib/vhost-user-blk/vhost-user-blk.c | 695
exist vhost-user messages, Qemu can't get the parameters such as
capacity of the backend block device, users need to append such
parameters when start Qemu.
Signed-off-by: Changpeng Liu
---
configure | 11 ++
hw/block/Makefile.objs | 3 +
hw/block/
) for vhost-user-blk device.
But for this patch, we choose append parameters to Qemu vhost-user-blk as the
solution.
Changpeng Liu (2):
vhost-user-blk: introduce a new vhost-user-blk host device
vhost-user-blk: introduce a vhost-user-blk sample application
.giti
VIRTIO_BLK_T_DISCARD
to extend exist virtio-blk protocol. virtio-blk protocol uses a single
8 bytes descriptor containing type,reserved and sector, currently Linux
uses the reserved field as IO priority, here we also re-use the reserved
field as number of discard sectors.
Signed-off-by: Changpeng Liu
70 matches
Mail list logo