This patch introduces vp_modern_config_vector() for setting config
vector.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
b/drivers/virtio
Instead of accessing iomem via struct virito_pci_device directly,
tweak to call the io accessors through the iomem structure. This will
ease the splitting of modern virtio device logic.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 76 ++
1 file
dynamic id in order to be less confusing with virtio-pci driver
- No feature whitelist, supporting any features (mq, config etc)
Thanks
Jason Wang (19):
virtio-pci: do not access iomem via struct virtio_pci_device directly
virtio-pci: split out modern device
virtio-pci-modern: factor out
On 2020/12/4 下午11:20, Stefano Garzarella wrote:
+#define VP_VDPA_QUEUE_MAX 256
+#define VP_VDPA_DRIVER_NAME "vp_vdpa"
+
+struct vp_vring {
+ void __iomem *notify;
+ char msix_name[256];
Can we use a macro for the msix_name size, since we use 256 in
multiple places?
Yes, will switch
On 2020/12/5 上午1:10, Randy Dunlap wrote:
Hi Jason--
On 12/3/20 8:03 PM, Jason Wang wrote:
diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig
index 7b41130d3f35..d1a6bd2a975f 100644
--- a/drivers/virtio/Kconfig
+++ b/drivers/virtio/Kconfig
@@ -12,6 +12,14 @@ config
On 2020/12/4 下午12:03, Jason Wang wrote:
Hi all:
This series tries to implement a vDPA driver for virtio-pci device
which will bridge between vDPA bus and virtio-pci device.
This could be used for future feature prototyping and testing.
Please review
Changes from V2:
- don't try to use
On 2020/12/30 下午6:05, Eli Cohen wrote:
On Wed, Dec 16, 2020 at 02:48:09PM +0800, Jason Wang wrote:
Follows the vDPA support for multiple address spaces, this patch
introduce uAPI for the userspace to know the number of virtqueue
groups supported by the vDPA device.
Signed-off-by: Jason Wang
On 2020/12/29 下午8:24, Eli Cohen wrote:
On Wed, Dec 16, 2020 at 02:48:09PM +0800, Jason Wang wrote:
Follows the vDPA support for multiple address spaces, this patch
introduce uAPI for the userspace to know the number of virtqueue
groups supported by the vDPA device.
Can you explain what
On 2020/12/29 下午7:53, Eli Cohen wrote:
+
+static struct vhost_vdpa_as *vhost_vdpa_alloc_as(struct vhost_vdpa *v, u32
asid)
+{
+ struct hlist_head *head = >as[asid % VHOST_VDPA_IOTLB_BUCKETS];
+ struct vhost_vdpa_as *as;
+
+ if (asid_to_as(v, asid))
+ return
On 2020/12/29 下午8:05, Eli Cohen wrote:
+
+static int vhost_vdpa_remove_as(struct vhost_vdpa *v, u32 asid)
The return value is never interpreted. I think it should either be made
void or return values checked.
Right, will make it void.
+{
+ struct vhost_vdpa_as *as =
On 2020/12/29 下午7:41, Eli Cohen wrote:
On Wed, Dec 16, 2020 at 02:48:08PM +0800, Jason Wang wrote:
This patch converts the vhost-vDPA device to support multiple IOTLBs
tagged via ASID via hlist. This will be used for supporting multiple
address spaces in the following patches.
Signed-off
On 2020/12/29 下午6:20, Eli Cohen wrote:
-static int vhost_process_iotlb_msg(struct vhost_dev *dev,
+static int vhost_process_iotlb_msg(struct vhost_dev *dev, u16 asid,
struct vhost_iotlb_msg *msg)
{
int ret = 0;
+ if (asid != 0)
+
On 2020/12/29 下午3:28, Eli Cohen wrote:
@@ -43,6 +43,8 @@ struct vdpa_vq_state {
* @index: device index
* @features_valid: were features initialized? for legacy guests
* @nvqs: the number of virtqueues
+ * @ngroups: the number of virtqueue groups
+ * @nas: the number of address spaces
On 2020/12/29 下午3:28, Eli Cohen wrote:
@@ -43,6 +43,8 @@ struct vdpa_vq_state {
* @index: device index
* @features_valid: were features initialized? for legacy guests
* @nvqs: the number of virtqueues
+ * @ngroups: the number of virtqueue groups
+ * @nas: the number of address spaces
zi
Signed-off-by: Stefano Garzarella
Acked-by: Jason Wang
---
The patch is the same of v1, but I re-tested it with:
- QEMU v5.2.0-551-ga05f8ecd88
- Linux 5.9.15 (host)
- Linux 5.9.15 and 5.10.0 (guest)
Now, enabling 'ats' it works well, there are just a few simple changes.
Garzarella
Few nits, but:
Acked-by: Jason Wang
---
drivers/vdpa/vdpa_sim/vdpa_sim.h | 2 +
drivers/vdpa/vdpa_sim/vdpa_sim.c | 108 +++
drivers/vdpa/Kconfig | 1 +
3 files changed, 69 insertions(+), 42 deletions(-)
diff --git a/drivers/vdpa
On 2020/12/22 下午8:29, Jason Wang wrote:
On 2020/12/22 下午6:57, Stefano Garzarella wrote:
On Tue, Dec 22, 2020 at 10:44:48AM +0800, Jason Wang wrote:
On 2020/12/21 下午7:14, Stefano Garzarella wrote:
On Mon, Dec 21, 2020 at 11:16:54AM +0800, Jason Wang wrote:
On 2020/12/18 下午7:38, Stefano
On 2020/12/22 下午6:57, Stefano Garzarella wrote:
On Tue, Dec 22, 2020 at 10:44:48AM +0800, Jason Wang wrote:
On 2020/12/21 下午7:14, Stefano Garzarella wrote:
On Mon, Dec 21, 2020 at 11:16:54AM +0800, Jason Wang wrote:
On 2020/12/18 下午7:38, Stefano Garzarella wrote:
On Mon, Nov 16, 2020
On 2020/12/21 下午7:14, Stefano Garzarella wrote:
On Mon, Dec 21, 2020 at 11:16:54AM +0800, Jason Wang wrote:
On 2020/12/18 下午7:38, Stefano Garzarella wrote:
On Mon, Nov 16, 2020 at 11:37:48AM +0800, Jason Wang wrote:
On 2020/11/13 下午9:47, Stefano Garzarella wrote:
Thanks to Max
On 2020/12/18 下午7:38, Stefano Garzarella wrote:
On Mon, Nov 16, 2020 at 11:37:48AM +0800, Jason Wang wrote:
On 2020/11/13 下午9:47, Stefano Garzarella wrote:
Thanks to Max that started this work!
I took his patches, and extended the block simulator a bit.
This series moves the network device
(macaddr, charp, 0);
MODULE_PARM_DESC(macaddr, "Ethernet MAC address");
-u8 macaddr_buf[ETH_ALEN];
+static u8 macaddr_buf[ETH_ALEN];
static struct vdpasim *vdpasim_net_dev;
Acked-by: Jason Wang
On 2020/12/18 上午6:28, Michael S. Tsirkin wrote:
On Thu, Dec 17, 2020 at 05:02:49PM +0800, Jason Wang wrote:
On 2020/12/17 下午3:58, Michael S. Tsirkin wrote:
On Thu, Dec 17, 2020 at 11:30:18AM +0800, Jason Wang wrote:
On 2020/12/16 下午5:47, Michael S. Tsirkin wrote:
On Wed, Dec 16, 2020 at 02
On 2020/12/17 下午3:58, Michael S. Tsirkin wrote:
On Thu, Dec 17, 2020 at 11:30:18AM +0800, Jason Wang wrote:
On 2020/12/16 下午5:47, Michael S. Tsirkin wrote:
On Wed, Dec 16, 2020 at 02:47:57PM +0800, Jason Wang wrote:
Hi All:
This series tries to add the support for control virtqueue in vDPA
vdpasim_net_get_config() callback.
This is safe since in vdpa_get_config() we already check that
.set_features() callback is called before .get_config().
Signed-off-by: Stefano Garzarella
Acked-by: Jason Wang
---
v4:
- explained in the commit message that the moving is safe [Jason]
v3
On 2020/12/15 下午10:42, Stefano Garzarella wrote:
Some devices may require a higher limit for the number of IOTLB
entries, so let's make it configurable through a module parameter.
By default, it's initialized with the current limit (2048).
Suggested-by: Jason Wang
Signed-off-by: Stefano
On 2020/12/16 下午5:47, Michael S. Tsirkin wrote:
On Wed, Dec 16, 2020 at 02:47:57PM +0800, Jason Wang wrote:
Hi All:
This series tries to add the support for control virtqueue in vDPA.
Control virtqueue is used by networking device for accepting various
commands from the driver. It's a must
for the driver to set mac address.
Signed-off-by: Jason Wang
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 189 +++
1 file changed, 166 insertions(+), 23 deletions(-)
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
index fe90a783bde4..0fd06ac491cd 100644
This patch implements a simple unicast filter for vDPA simulator.
Signed-off-by: Jason Wang
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 49
1 file changed, 31 insertions(+), 18 deletions(-)
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim
Signed-off-by: Jason Wang
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 33 +---
1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
index 8d051cf25f0a..e901177c6dfe 100644
--- a/drivers/vdpa
We've already reported maximum mtu via config space, so let's
advertise the feature.
Signed-off-by: Jason Wang
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
index
device with more than one
address spaces that depends on platform IOMMU. This work will be done
by moving the IOMMU logic from vhost-vDPA to vDPA device driver.
Signed-off-by: Jason Wang
---
drivers/vhost/vdpa.c | 127 --
drivers/vhost/vhost.c | 4 +-
2
with vringh_getdesc_iotlb().
We are using VIRTIO terminology for "out" (readable by the device)
and "in" (writable by the device) descriptors.
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 11 ++-
1 file changed, 6 insertions(+),
Follows the vDPA support for associating ASID to a specific virtqueue
group. This patch adds a uAPI to support setting them from userspace.
Signed-off-by: Jason Wang
---
drivers/vhost/vdpa.c | 8
include/uapi/linux/vhost.h | 7 +++
2 files changed, 15 insertions(+)
diff
Follows the support for virtqueue group in vDPA. This patches
introduces uAPI to get the virtqueue group ID for a specific virtqueue
in vhost-vdpa.
Signed-off-by: Jason Wang
---
drivers/vhost/vdpa.c | 8
include/uapi/linux/vhost.h | 8
2 files changed, 16 insertions
This patch introduces the uAPI for getting the number of address
spaces supported by this vDPA device.
Signed-off-by: Jason Wang
---
drivers/vhost/vdpa.c | 3 +++
include/uapi/linux/vhost.h | 2 ++
2 files changed, 5 insertions(+)
diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
Follows the vDPA support for multiple address spaces, this patch
introduce uAPI for the userspace to know the number of virtqueue
groups supported by the vDPA device.
Signed-off-by: Jason Wang
---
drivers/vhost/vdpa.c | 4
include/uapi/linux/vhost.h | 3 +++
2 files changed, 7
This patch converts the vhost-vDPA device to support multiple IOTLBs
tagged via ASID via hlist. This will be used for supporting multiple
address spaces in the following patches.
Signed-off-by: Jason Wang
---
drivers/vhost/vdpa.c | 106 ---
1 file changed
This patches allows userspace to send ASID based IOTLB message to
vhost. This idea is to use the reserved u32 field in the existing V2
IOTLB message. Vhost device should advertise this capability via
VHOST_BACKEND_F_IOTLB_ASID backend feature.
Signed-off-by: Jason Wang
---
drivers/vhost/vdpa.c
This patch splits out IOTLB initialization to make sure it could be
reused by external modules.
Signed-off-by: Jason Wang
---
drivers/vhost/iotlb.c | 23 ++-
include/linux/vhost_iotlb.h | 2 ++
2 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/drivers
This patch introduces a new bus operation to allow the vDPA bus driver
to associate an ASID to a virtqueue group.
Signed-off-by: Jason Wang
---
include/linux/vdpa.h | 10 ++
1 file changed, 10 insertions(+)
diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
index 0a9a754f8180
and 1 address spaces for
all vDPA devices. And vhost-vDPA will simply reject the device with
more than 1 virtqueue groups or address spaces.
Signed-off-by: Jason Wang
---
drivers/vdpa/ifcvf/ifcvf_main.c | 2 +-
drivers/vdpa/mlx5/net/mlx5_vnet.c | 5 +++--
drivers/vdpa/vdpa.c | 4
group
ID for a specific virtqueue.
All the vDPA device drivers were converted to simply support a single
virtqueue group.
Signed-off-by: Jason Wang
---
drivers/vdpa/ifcvf/ifcvf_main.c | 9 -
drivers/vdpa/mlx5/net/mlx5_vnet.c | 8 +++-
drivers/vdpa/vdpa.c | 4
To ease the implementation of per group ASID support for vDPA
device. This patch switches to use a vhost-vdpa specific IOTLB to
avoid the unnecessary refactoring of the vhost core.
Signed-off-by: Jason Wang
---
drivers/vhost/vdpa.c | 18 ++
1 file changed, 10 insertions(+), 8
Signed-off-by: Jason Wang
---
include/linux/vdpa.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
index 30bc7a7223bb..8ab8dcde705d 100644
--- a/include/linux/vdpa.h
+++ b/include/linux/vdpa.h
@@ -42,6 +42,7 @@ struct vdpa_vq_state {
* @config
To prepare for the ASID support for vhost-vdpa, try to pass IOTLB
object to dma helpers. No functional changes, it's just a preparation
for support multiple IOTLBs.
Signed-off-by: Jason Wang
---
drivers/vhost/vdpa.c | 41 +++--
1 file changed, 23 insertions
There's no need for setting callbacks for the driver that doesn't care
about that.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_vdpa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_vdpa.c b/drivers/virtio/virtio_vdpa.c
index 4a9ddb44b2a7
We should store feature bits in vhost_types.h as what has been done
for e.g VHOST_F_LOG_ALL.
Signed-off-by: Jason Wang
---
include/uapi/linux/vhost.h | 5 -
include/uapi/linux/vhost_types.h | 5 +
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/uapi/linux
when using ASID with IOTLB batching requests
- switch to use Stefano's patch for having separated iov
- remove unused "used_as" variable
- fix the iotlb/asid checking in vhost_vdpa_unmap()
Thanks
Jason Wang (20):
vhost: move the backend feature bits to vhost_types.h
virtio-vdpa:
index resulting in CQ overrun.
Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices")
Signed-off-by: Eli Cohen
---
V0 -> V1
Use dma_wmb() instead of wmb()
Acked-by: Jason Wang
drivers/vdpa/mlx5/net/mlx5_vnet.c | 5 +
1 file changed, 5 insertions(+
On 2020/12/9 下午6:58, Stefano Garzarella wrote:
On Mon, Dec 07, 2020 at 12:00:07PM +0800, Jason Wang wrote:
On 2020/12/4 上午1:04, Stefano Garzarella wrote:
The simulated devices can support multiple queues, so this limit
should be defined according to the number of queues supported
On 2020/12/8 下午3:02, Enrico Weigelt, metux IT consult wrote:
On 08.12.20 03:36, Jason Wang wrote:
Hi,
So we endup with two solutions (without a prompt):
1) using select, user may end up with driver without transport
IMHO not an entirely unusual situation in other places of the kernel,
eg
On 2020/12/7 下午5:33, Enrico Weigelt, metux IT consult wrote:
On 07.12.20 04:48, Jason Wang wrote:
Hi,
Not a native speaker but event sounds like something driver read from
device. Looking at the below lists, most of them except for
VIRTIO_GPIO_EV_HOST_LEVEL looks more like a command.
okay
On 2020/12/7 下午9:53, Michael S. Tsirkin wrote:
On Mon, Dec 07, 2020 at 11:12:50AM +0800, Jason Wang wrote:
On 2020/12/6 上午3:32, Michael S. Tsirkin wrote:
On Sat, Dec 05, 2020 at 08:59:55AM +0100, Enrico Weigelt, metux IT consult
wrote:
On 04.12.20 04:35, Jason Wang wrote:
--- a/drivers
m/Makefile | 1 +
5 files changed, 292 insertions(+), 222 deletions(-)
create mode 100644 drivers/vdpa/vdpa_sim/vdpa_sim.h
create mode 100644 drivers/vdpa/vdpa_sim/vdpa_sim_net.c
Acked-by: Jason Wang
On 2020/12/4 上午1:05, Stefano Garzarella wrote:
Instead of calling the vq callback directly, we can leverage the
vringh_notify() function, adding vdpasim_vq_notify() and setting it
in the vringh notify callback.
Suggested-by: Jason Wang
Signed-off-by: Stefano Garzarella
Acked-by: Jason
off-by: Stefano Garzarella
Acked-by: Jason Wang
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
index f935ade0806b..03a8717f80ea 100644
--- a/drivers/v
On 2020/12/4 上午1:05, Stefano Garzarella wrote:
The get_config callback can be used by the device to fill the
config structure.
The callback will be invoked in vdpasim_get_config() before copying
bytes into caller buffer.
Move vDPA-net config updates from vdpasim_set_features() in the
new
(+), 4 deletions(-)
Acked-by: Jason Wang
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
index 949f4231d08a..fe71ed7890e1 100644
--- a/drivers/vdpa/vdpa_sim/vdpa_sim.c
+++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c
@@ -62,6 +62,7 @@ struct vdpasim_virtqueue
destroy_vq_cmds;
}
Acked-by: Jason Wang
On 2020/12/4 上午1:04, Stefano Garzarella wrote:
The simulated devices can support multiple queues, so this limit
should be defined according to the number of queues supported by
the device.
Since we are in a simulator, let's simply remove that limit.
Suggested-by: Jason Wang
Acked-by: Jason
On 2020/12/4 上午1:04, Stefano Garzarella wrote:
It's possible to allocate an unlimited IOTLB calling
vhost_iotlb_alloc() with 'limit' = 0.
Add a new macro (VHOST_IOTLB_UNLIMITED) for this case and document
it in the vhost_iotlb_alloc() documentation block.
Suggested-by: Jason Wang
Signed-off
On 2020/12/4 下午5:36, Enrico Weigelt, metux IT consult wrote:
On 04.12.20 04:35, Jason Wang wrote:
Hi,
Is the plan to keep this doc synced with the one in the virtio
specification?
Yes, of course. I'm still in progress of doing the beaurocratic stuff w/
virtio-tc folks (ID registration
On 2020/12/5 上午1:12, Randy Dunlap wrote:
On 12/4/20 7:20 AM, Stefano Garzarella wrote:
On Fri, Dec 04, 2020 at 12:03:53PM +0800, Jason Wang wrote:
This patch introduce a vDPA driver for virtio-pci device. It bridges
the virtio-pci control command to the vDPA bus. This will be used
On 2020/12/6 上午4:05, Enrico Weigelt, metux IT consult wrote:
On 05.12.20 20:32, Michael S. Tsirkin wrote:
Hi,
It seems a bit of a mess, at this point I'm not entirely sure when
should drivers select VIRTIO and when depend on it.
if VIRTIO just enables something that could be seen as
On 2020/12/6 上午3:32, Michael S. Tsirkin wrote:
On Sat, Dec 05, 2020 at 08:59:55AM +0100, Enrico Weigelt, metux IT consult
wrote:
On 04.12.20 04:35, Jason Wang wrote:
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -1615,6 +1615,15 @@ config GPIO_MOCKUP
       tools/testing
mvq->event_cb.callback(mvq->event_cb.private);
Acked-by: Jason Wang
This patch introduces helpers to allow set and get device status.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 37 +++---
1 file changed, 29 insertions(+), 8 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
b/drivers/virtio
-by: Jason Wang
---
drivers/vdpa/Kconfig | 6 +
drivers/vdpa/Makefile | 1 +
drivers/vdpa/virtio_pci/Makefile | 2 +
drivers/vdpa/virtio_pci/vp_vdpa.c | 455 ++
4 files changed, 464 insertions(+)
create mode 100644 drivers/vdpa/virtio_pci
There's no guarantee that the device can disable a specific virtqueue
through set_vq_ready(). One example is the modern virtio-pci
device. So this patch removes the warning.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_vdpa.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff
This patch delay the queue number setting to vDPA device
registering. This allows us to probe the virtqueue numbers between
device allocation and registering.
Signed-off-by: Jason Wang
---
drivers/vdpa/ifcvf/ifcvf_main.c | 5 ++---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 5 ++---
drivers/vdpa
Signed-off-by: Jason Wang
---
drivers/virtio/Kconfig | 10 +-
drivers/virtio/Makefile| 1 +
drivers/virtio/virtio_pci_common.h | 27 +-
drivers/virtio/virtio_pci_modern.c | 617 -
drivers/virtio/virtio_pci_modern_dev.c | 599
This patch introduces help to get notification offset of modern device.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 21 -
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
b/drivers/virtio
To ease the split, map_capability() was renamed to
vp_modern_map_capability(). While at it, add the comments for the
arguments and switch to use virtio_pci_modern_device as the first
parameter.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 46
This patch introduces helper for getting queue num of modern device.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
b/drivers/virtio/virtio_pci_modern.c
index
This patch introduces helper for setting/getting queue size for modern
device.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 34 --
1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
b/drivers
This patch introduce a helper to set virtqueue address for modern address.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 33 --
1 file changed, 27 insertions(+), 6 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
b/drivers/virtio
This patch introduces a helper to set/get queue_enable for modern device.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 37 +-
1 file changed, 31 insertions(+), 6 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
b/drivers/virtio
This patch introduces helpers for setting and getting features.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 43 +++---
1 file changed, 33 insertions(+), 10 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
b/drivers/virtio
This patch introduces vp_modern_config_vector() for setting config
vector.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
b/drivers/virtio
This patch introduces a helper to set virtqueue MSI vector.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 35 --
1 file changed, 23 insertions(+), 12 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
b/drivers/virtio
This patch introduces vp_modern_generation() to get device generation.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 17 ++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
b/drivers/virtio/virtio_pci_modern.c
This patch introduces vp_modern_remove() doing device resources
cleanup to make it can be used.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 14 --
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
b/drivers
This patch factors out the modern device initialization logic into a
helper. Note that it still depends on the caller to enable pci device
which allows the caller to use e.g devres.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 50 +-
1 file
This patch splits out the virtio-pci modern device only attributes
into another structure. While at it, a dedicated probe method for
modern only attributes is introduced. This may help for split the
logic into a dedicated module.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_common.h
Instead of accessing iomem via struct virito_pci_device directly,
tweak to call the io accessors through the iomem structure. This will
ease the splitting of modern virtio device logic.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 76 ++
1 file
log
- split the patches furtherly to ease the reviewing
Changes from V1:
- Split common codes from virito-pci and share it with vDPA driver
- Use dynamic id in order to be less confusing with virtio-pci driver
- No feature whitelist, supporting any features (mq, config etc)
Thanks
Jason Wang (19
On 2020/12/4 上午3:11, Enrico Weigelt, metux IT consult wrote:
Introducing new gpio driver for virtual GPIO devices via virtio.
The driver allows routing gpio control into VM guests, eg. brigding
virtual gpios to specific host gpios, or attaching simulators for
automatic application testing.
On 2020/12/3 下午8:24, Eli Cohen wrote:
It is mentioned in Parav's patchset that this will be coming in a
subsequent patch to his vdpa tool.
So I think kernel has two options:
- require a mac when device is created, we supply it to guest
Yes, the driver should always set VIRTIO_NET_F_MAC and
On 2020/12/2 下午5:23, Michael S. Tsirkin wrote:
On Wed, Dec 02, 2020 at 07:57:14AM +0200, Eli Cohen wrote:
On Wed, Dec 02, 2020 at 12:18:36PM +0800, Jason Wang wrote:
On 2020/12/1 下午5:23, Cindy Lu wrote:
On Mon, Nov 30, 2020 at 11:33 PM Michael S. Tsirkin wrote:
On Mon, Nov 30, 2020 at 06
On 2020/12/2 下午9:04, Michael S. Tsirkin wrote:
On Wed, Dec 02, 2020 at 08:56:37PM +0800, Jason Wang wrote:
On 2020/12/2 下午5:30, Michael S. Tsirkin wrote:
On Wed, Dec 02, 2020 at 12:18:36PM +0800, Jason Wang wrote:
On 2020/12/1 下午5:23, Cindy Lu wrote:
On Mon, Nov 30, 2020 at 11:33 PM
On 2020/12/2 下午9:07, Michael S. Tsirkin wrote:
Two questions here:
1. Now we don't have support for control virtqueue. Yet, we must filter
packets based on MAC, what do you suggest to do here?
How about an ioctl to pass the mac to the device?
Maybe mirroring the control vq struct format ...
On 2020/12/2 下午8:17, Michael S. Tsirkin wrote:
On Wed, Dec 02, 2020 at 02:12:41PM +0200, Eli Cohen wrote:
On Wed, Dec 02, 2020 at 04:23:11AM -0500, Michael S. Tsirkin wrote:
On Wed, Dec 02, 2020 at 07:57:14AM +0200, Eli Cohen wrote:
On Wed, Dec 02, 2020 at 12:18:36PM +0800, Jason Wang wrote
On 2020/12/2 下午5:30, Michael S. Tsirkin wrote:
On Wed, Dec 02, 2020 at 12:18:36PM +0800, Jason Wang wrote:
On 2020/12/1 下午5:23, Cindy Lu wrote:
On Mon, Nov 30, 2020 at 11:33 PM Michael S. Tsirkin wrote:
On Mon, Nov 30, 2020 at 06:41:45PM +0800, Cindy Lu wrote:
On Mon, Nov 30, 2020 at 5:33
On 2020/12/1 下午5:23, Cindy Lu wrote:
On Mon, Nov 30, 2020 at 11:33 PM Michael S. Tsirkin wrote:
On Mon, Nov 30, 2020 at 06:41:45PM +0800, Cindy Lu wrote:
On Mon, Nov 30, 2020 at 5:33 PM Michael S. Tsirkin wrote:
On Mon, Nov 30, 2020 at 11:27:59AM +0200, Eli Cohen wrote:
On Mon, Nov 30,
On 2020/11/30 下午10:14, Stefano Garzarella wrote:
On Mon, Nov 30, 2020 at 11:25:31AM +0800, Jason Wang wrote:
On 2020/11/26 下午10:49, Stefano Garzarella wrote:
The get_config callback can be used by the device to fill the
config structure.
The callback will be invoked in vdpasim_get_config
On 2020/11/26 下午10:49, Stefano Garzarella wrote:
From: Max Gurtovoy
Introduce new vdpa_sim_net and vdpa_sim (core) drivers. This is a
preparation for adding a vdpa simulator module for block devices.
Signed-off-by: Max Gurtovoy
[sgarzare: various cleanups/fixes]
Signed-off-by: Stefano
to use them with vringh_getdesc_iotlb().
We are using VIRTIO terminology for "out" (readable by the device)
and "in" (writable by the device) descriptors.
Signed-off-by: Stefano Garzarella
---
v2:
- used VIRTIO terminology [Stefan]
---
Acked-by: Jason Wang
d
On 2020/11/26 下午10:49, Stefano Garzarella wrote:
Instead of calling the vq callback directly, we can leverage the
vringh_notify() function, adding vdpasim_vq_notify() and setting it
in the vringh notify callback.
Suggested-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
drivers/vdpa
On 2020/11/26 下午10:49, Stefano Garzarella wrote:
The get_config callback can be used by the device to fill the
config structure.
The callback will be invoked in vdpasim_get_config() before copying
bytes into caller buffer.
Move vDPA-net config updates from vdpasim_set_features() in the
new
/vdpa_sim.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
Acked-by: Jason Wang
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
index b84d9acd130c..9f2ca3a77025 100644
--- a/drivers/vdpa/vdpa_sim/vdpa_sim.c
+++ b/drivers/vdpa/vdpa_sim
401 - 500 of 4497 matches
Mail list logo