qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 0/1] virtiofs queue for 6.0
@ 2021-04-13 15:22 Dr. David Alan Gilbert (git)
  2021-04-13 15:22 ` [PULL 1/1] vhost-user-fs: fix features handling Dr. David Alan Gilbert (git)
  2021-04-14  9:06 ` [PULL 0/1] virtiofs queue for 6.0 Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2021-04-13 15:22 UTC (permalink / raw)
  To: qemu-devel, antonkuchin; +Cc: stefanha

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

The following changes since commit dce628a97fde2594f99d738883a157f05aa0a14f:

  Merge remote-tracking branch 'remotes/dg-gitlab/tags/ppc-for-6.0-20210412' into staging (2021-04-13 13:05:07 +0100)

are available in the Git repository at:

  https://gitlab.com/dagrh/qemu.git tags/pull-virtiofs-20210413

for you to fetch changes up to ace66791cd15657320b11b1a421afc055f28efca:

  vhost-user-fs: fix features handling (2021-04-13 16:13:41 +0100)

----------------------------------------------------------------
virtiofs: Fix feature negotiation (for 6.0)

A 6.0 fix for feature negotiation on vhost-user.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

----------------------------------------------------------------
Anton Kuchin (1):
      vhost-user-fs: fix features handling

 hw/virtio/vhost-user-fs.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PULL 1/1] vhost-user-fs: fix features handling
  2021-04-13 15:22 [PULL 0/1] virtiofs queue for 6.0 Dr. David Alan Gilbert (git)
@ 2021-04-13 15:22 ` Dr. David Alan Gilbert (git)
  2021-04-14  9:06 ` [PULL 0/1] virtiofs queue for 6.0 Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2021-04-13 15:22 UTC (permalink / raw)
  To: qemu-devel, antonkuchin; +Cc: stefanha

From: Anton Kuchin <antonkuchin@yandex-team.ru>

Make virtio-fs take into account server capabilities.

Just returning requested features assumes they all of then are implemented
by server and results in setting unsupported configuration if some of them
are absent.

Signed-off-by: Anton Kuchin <antonkuchin@yandex-team.ru>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
  With changes suggested by Stefan
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 hw/virtio/vhost-user-fs.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/hw/virtio/vhost-user-fs.c b/hw/virtio/vhost-user-fs.c
index ac4fc34b36..6f7f91533d 100644
--- a/hw/virtio/vhost-user-fs.c
+++ b/hw/virtio/vhost-user-fs.c
@@ -24,6 +24,17 @@
 #include "monitor/monitor.h"
 #include "sysemu/sysemu.h"
 
+static const int user_feature_bits[] = {
+    VIRTIO_F_VERSION_1,
+    VIRTIO_RING_F_INDIRECT_DESC,
+    VIRTIO_RING_F_EVENT_IDX,
+    VIRTIO_F_NOTIFY_ON_EMPTY,
+    VIRTIO_F_RING_PACKED,
+    VIRTIO_F_IOMMU_PLATFORM,
+
+    VHOST_INVALID_FEATURE_BIT
+};
+
 static void vuf_get_config(VirtIODevice *vdev, uint8_t *config)
 {
     VHostUserFS *fs = VHOST_USER_FS(vdev);
@@ -129,11 +140,12 @@ static void vuf_set_status(VirtIODevice *vdev, uint8_t status)
 }
 
 static uint64_t vuf_get_features(VirtIODevice *vdev,
-                                      uint64_t requested_features,
-                                      Error **errp)
+                                 uint64_t features,
+                                 Error **errp)
 {
-    /* No feature bits used yet */
-    return requested_features;
+    VHostUserFS *fs = VHOST_USER_FS(vdev);
+
+    return vhost_get_features(&fs->vhost_dev, user_feature_bits, features);
 }
 
 static void vuf_handle_output(VirtIODevice *vdev, VirtQueue *vq)
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PULL 0/1] virtiofs queue for 6.0
  2021-04-13 15:22 [PULL 0/1] virtiofs queue for 6.0 Dr. David Alan Gilbert (git)
  2021-04-13 15:22 ` [PULL 1/1] vhost-user-fs: fix features handling Dr. David Alan Gilbert (git)
@ 2021-04-14  9:06 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2021-04-14  9:06 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git)
  Cc: Stefan Hajnoczi, QEMU Developers, antonkuchin

On Tue, 13 Apr 2021 at 16:25, Dr. David Alan Gilbert (git)
<dgilbert@redhat.com> wrote:
>
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> The following changes since commit dce628a97fde2594f99d738883a157f05aa0a14f:
>
>   Merge remote-tracking branch 'remotes/dg-gitlab/tags/ppc-for-6.0-20210412' into staging (2021-04-13 13:05:07 +0100)
>
> are available in the Git repository at:
>
>   https://gitlab.com/dagrh/qemu.git tags/pull-virtiofs-20210413
>
> for you to fetch changes up to ace66791cd15657320b11b1a421afc055f28efca:
>
>   vhost-user-fs: fix features handling (2021-04-13 16:13:41 +0100)
>
> ----------------------------------------------------------------
> virtiofs: Fix feature negotiation (for 6.0)
>
> A 6.0 fix for feature negotiation on vhost-user.
>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
>


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/6.0
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-14  9:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13 15:22 [PULL 0/1] virtiofs queue for 6.0 Dr. David Alan Gilbert (git)
2021-04-13 15:22 ` [PULL 1/1] vhost-user-fs: fix features handling Dr. David Alan Gilbert (git)
2021-04-14  9:06 ` [PULL 0/1] virtiofs queue for 6.0 Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).