From: Ilya Maximets <i.maximets@samsung.com>
To: "Michael S . Tsirkin" <mst@redhat.com>
Cc: qemu-devel@nongnu.org, Jason Wang <jasowang@redhat.com>,
Tiwei Bie <tiwei.bie@intel.com>,
Maxime Coquelin <maxime.coquelin@redhat.com>,
Xiao Wang <xiao.w.wang@intel.com>,
Ilya Maximets <i.maximets@samsung.com>
Subject: [Qemu-devel] [PATCH] virtio: add ORDER_PLATFORM feature support
Date: Fri, 14 Dec 2018 20:31:23 +0300 [thread overview]
Message-ID: <20181214173123.31223-1-i.maximets@samsung.com> (raw)
In-Reply-To: CGME20181214173128eucas1p25789b473622f9506c239c6a02d95e8b6@eucas1p2.samsung.com
This patch adds new property "order_platform" which is required to
allow VIRTIO_F_ORDER_PLATFORM feature negotiation. Disabled by
default because needed only for HW assited vhost backends.
Enabling of this feature will request guest drivers to use heavier
(platform dependent) techniques for memory ordering if negotiated.
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
Note: Patch to change the name of the feature from VIRTIO_F_IO_BARRIER
to VIRTIO_F_ORDER_PLATFORM is not merged yet:
https://www.mail-archive.com/virtio-dev@lists.oasis-open.org/msg04114.html
Patch for DPDK virtio driver available here:
http://patches.dpdk.org/patch/48886/
hw/net/vhost_net.c | 1 +
include/hw/virtio/virtio.h | 13 ++++++++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index e037db63a3..71877e46a5 100644
--- a/hw/net/vhost_net.c
+++ b/hw/net/vhost_net.c
@@ -78,6 +78,7 @@ static const int user_feature_bits[] = {
VIRTIO_NET_F_MRG_RXBUF,
VIRTIO_NET_F_MTU,
VIRTIO_F_IOMMU_PLATFORM,
+ VIRTIO_F_ORDER_PLATFORM,
/* This bit implies RARP isn't sent by QEMU out of band */
VIRTIO_NET_F_GUEST_ANNOUNCE,
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index 9c1fa07d6d..7e206dadbc 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -29,6 +29,15 @@
(0x1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) | \
(0x1ULL << VIRTIO_F_ANY_LAYOUT))
+#ifndef VIRTIO_F_ORDER_PLATFORM
+/*
+ * This feature indicates that memory accesses by the driver and the device
+ * are ordered in a way described by the platform.
+ * Not yet defined in Linux, i.e. not in standard-headers.
+ */
+#define VIRTIO_F_ORDER_PLATFORM 36
+#endif
+
struct VirtQueue;
static inline hwaddr vring_align(hwaddr addr,
@@ -264,7 +273,9 @@ typedef struct VirtIORNGConf VirtIORNGConf;
DEFINE_PROP_BIT64("any_layout", _state, _field, \
VIRTIO_F_ANY_LAYOUT, true), \
DEFINE_PROP_BIT64("iommu_platform", _state, _field, \
- VIRTIO_F_IOMMU_PLATFORM, false)
+ VIRTIO_F_IOMMU_PLATFORM, false), \
+ DEFINE_PROP_BIT64("order_platform", _state, _field, \
+ VIRTIO_F_ORDER_PLATFORM, false)
hwaddr virtio_queue_get_desc_addr(VirtIODevice *vdev, int n);
hwaddr virtio_queue_get_avail_addr(VirtIODevice *vdev, int n);
--
2.17.1
parent reply other threads:[~2018-12-14 17:31 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <CGME20181214173128eucas1p25789b473622f9506c239c6a02d95e8b6@eucas1p2.samsung.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181214173123.31223-1-i.maximets@samsung.com \
--to=i.maximets@samsung.com \
--cc=jasowang@redhat.com \
--cc=maxime.coquelin@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=tiwei.bie@intel.com \
--cc=xiao.w.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).