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
their features.
Co-developed-by: Max Gurtovoy
Signed-off-by: Max Gurtovoy
Signed-off-by: Stefano Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 29 ++---
1 file changed, 18 insertions(+), 11 deletions(-)
Acked-by: Jason Wang
diff --git a/drivers/vdpa/vdpa_sim
changed, 5 insertions(+), 2 deletions(-)
Acked-by: Jason Wang
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
index 36677fc3631b..b84d9acd130c 100644
--- a/drivers/vdpa/vdpa_sim/vdpa_sim.c
+++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c
@@ -60,6 +60,8 @@ struct
-by: Stefano Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
Acked-by: Jason Wang
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
index f98262add0e1..393b54a9f0e4 100644
--- a/drivers/vdpa
parameter.
Co-developed-by: Max Gurtovoy
Signed-off-by: Max Gurtovoy
Signed-off-by: Stefano Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 25 +
1 file changed, 17 insertions(+), 8 deletions(-)
Acked-by: Jason Wang
diff --git a/drivers/vdpa/vdpa_sim
/vdpa_sim.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
Acked-by: Jason Wang
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
index 40664d87f303..62204e064841 100644
--- a/drivers/vdpa/vdpa_sim/vdpa_sim.c
+++ b/drivers/vdpa/vdpa_sim
On 2020/11/26 下午10:49, 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
Acked-by: Jason Wang
---
v1:
- use kcalloc() instead of kmalloc_array() since some function expects
variables initialized to zero
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 18 +-
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b
On 2020/11/26 下午10:49, Stefano Garzarella wrote:
Some headers are not necessary, so let's remove them to do
some cleaning.
Signed-off-by: Stefano Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 13 -
1 file changed, 13 deletions(-)
diff --git
On 2020/11/26 下午10:49, Stefano Garzarella wrote:
'default n' is not necessary since it is already the default when
nothing is specified.
Suggested-by: Jason Wang
Signed-off-by: Stefano Garzarella
Acked-by: Jason Wang
---
drivers/vdpa/Kconfig | 3 ---
1 file changed, 3 deletions
---
Acked-by: Jason Wang
drivers/vdpa/ifcvf/ifcvf_main.c | 11 ++-
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c
index 8b4028556cb6..fa1af301cf55 100644
--- a/drivers/vdpa/ifcvf/ifcvf_main.c
+++ b/drivers
c: Parav Pandit
Cc: "Michael S. Tsirkin"
Cc: Jason Wang
Cc: virtualizat...@lists.linux-foundation.org
Cc: Saeed Mahameed
Cc: Leon Romanovsky
Cc: net...@vger.kernel.org
---
v2: change from select to depends on VHOST (Saeed)
v3: change to depends on VHOST_IOTLB (Jason)
v4: use select V
On 2020/11/26 下午9:57, Michael S. Tsirkin wrote:
On Thu, Nov 26, 2020 at 05:25:52PM +0800, Jason Wang wrote:
This patch tries to convert the modern device to use devres to manage
its resources (iomaps). Before this patch the IO address is mapped
individually according to the capability. After
On 2020/11/26 下午9:46, Michael S. Tsirkin wrote:
On Thu, Nov 26, 2020 at 05:25:51PM +0800, Jason Wang wrote:
Instead of accessing iomem via virito_pci_device directly. Add an
indirect level
well this patch does not add any indirection it's just refactoring.
which is ok of course let's just
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
-by: Jason Wang
---
drivers/vdpa/Kconfig | 6 +
drivers/vdpa/Makefile | 1 +
drivers/vdpa/virtio_pci/Makefile | 2 +
drivers/vdpa/virtio_pci/vp_vdpa.c | 450 ++
4 files changed, 459 insertions(+)
create mode 100644 drivers/vdpa/virtio_pci
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
currently. We can do that in the future if necessary.
Signed-off-by: Jason Wang
---
drivers/virtio/Kconfig | 10 +-
drivers/virtio/Makefile| 1 +
drivers/virtio/virtio_pci_common.h | 28 +-
drivers/virtio/virtio_pci_modern.c | 462
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
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 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 moves the notification sanity check to
vp_modern_probe(). This can make sure the logic could be reused by
modules other than virtio-pci.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 34 +++---
1 file changed, 22 insertions(+), 12
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 a helper to set virtqueue MSI vector.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 35 --
1 file changed, 24 insertions(+), 11 deletions(-)
diff --git a/drivers/virtio/virtio_pci_modern.c
b/drivers/virtio
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
into an
separate module.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_common.c | 10 --
drivers/virtio/virtio_pci_common.h | 2 +
drivers/virtio/virtio_pci_legacy.c | 13 ++-
drivers/virtio/virtio_pci_modern.c | 141 +
4 files changed, 54 insertions(+), 112 deletions
Instead of accessing iomem via virito_pci_device directly. Add an
indirect level to ease the life of splitting out modern virito-pci
logic.
Signed-off-by: Jason Wang
---
drivers/virtio/virtio_pci_modern.c | 76 ++
1 file changed, 46 insertions(+), 30 deletions
- 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 (14):
virtio-pci: do not access iomem via virtio_pci_device directly
virtio-pci: switch to use devres for modern devices
virtio-pci: split
On 2020/11/18 下午9:14, Stefano Garzarella wrote:
Hi Jason,
I just discovered that I missed the other questions in this email,
sorry for that!
No problem :)
On Mon, Nov 16, 2020 at 12:00:11PM +0800, Jason Wang wrote:
On 2020/11/13 下午9:47, Stefano Garzarella wrote:
From: Max Gurtovoy
On 2020/11/17 上午12:16, Stefano Garzarella wrote:
vringh_iov_push_*() functions don't have 'dst' parameter, but have
the 'src' parameter.
Replace 'dst' description with 'src' description.
Signed-off-by: Stefano Garzarella
Acked-by: Jason Wang
---
drivers/vhost/vringh.c | 6
On 2020/11/13 下午9:47, Stefano Garzarella wrote:
The previous implementation wrote only the status of each request.
This patch implements a more accurate block device simulator,
providing a ramdisk-like behavior.
Also handle VIRTIO_BLK_T_GET_ID request, always answering the
"vdpa_blk_sim"
On 2020/11/13 下午9:47, Stefano Garzarella wrote:
In some cases, it may be useful to provide a way to skip a number
of bytes in a vringh_iov.
In order to keep vringh_iov consistent, let's reuse vringh_iov_xfer()
logic and skip bytes when the ptr is NULL.
Signed-off-by: Stefano Garzarella
---
them with vringh_getdesc_iotlb().
Signed-off-by: Stefano Garzarella
Acked-by: Jason Wang
---
drivers/vdpa/vdpa_sim/vdpa_sim.h | 3 ++-
drivers/vdpa/vdpa_sim/vdpa_sim_blk.c | 6 +++---
drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 8
3 files changed, 9 insertions(+), 8 deletions
On 2020/11/13 下午9:47, Stefano Garzarella wrote:
Allow each device to specify the size of the buffer allocated
in vdpa_sim.
Signed-off-by: Stefano Garzarella
Acked-by: Jason Wang
---
drivers/vdpa/vdpa_sim/vdpa_sim.h | 1 +
drivers/vdpa/vdpa_sim/vdpa_sim.c | 2 +-
drivers
/vdpa_sim/vdpa_sim.h
+++ b/drivers/vdpa/vdpa_sim/vdpa_sim.h
@@ -10,8 +10,6 @@
#include
#include
#include
-#include
-#include
#define DRV_VERSION "0.1"
#define DRV_AUTHOR "Jason Wang "
@@ -42,8 +40,11 @@ struct vdpasim_virtqueue {
struct vdpasim_d
On 2020/11/13 下午9:47, Stefano Garzarella wrote:
The next patch will make the buffer size configurable from each
device.
Since the buffer could be larger than a page, we use kvmalloc()
instead of kmalloc().
Signed-off-by: Stefano Garzarella
Acked-by: Jason Wang
Thanks
---
drivers
On 2020/11/13 下午9:47, 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
Signed-off
On 2020/11/13 下午9:47, Stefano Garzarella wrote:
Move device properties used during the entire life cycle in a new
structure to simplify the copy of these fields during the vdpasim
initialization.
Signed-off-by: Stefano Garzarella
It would be better to do it before patch 2.
---
On 2020/11/13 下午9:47, Stefano Garzarella wrote:
From: Max Gurtovoy
This will allow running vDPA for virtio block protocol.
Signed-off-by: Max Gurtovoy
[sgarzare: various cleanups/fixes]
Signed-off-by: Stefano Garzarella
---
v1:
- Removed unused headers
- Used cpu_to_vdpasim*() to store
On 2020/11/13 下午9:47, Stefano Garzarella wrote:
From: Max Gurtovoy
Add a new attribute that will define the number of virt queues to be
created for the vdpasim device.
Signed-off-by: Max Gurtovoy
[sgarzare: replace kmalloc_array() with kcalloc()]
Signed-off-by: Stefano Garzarella
---
v1:
_VDPA_SIM_H
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#define DRV_VERSION "0.1"
+#define DRV_AUTHOR "Jason Wang "
+#define DRV_LICENSE "GPL v2"
+
+#define VDPASIM_QUEUE_ALIGN PAGE_SIZE
+#define VDPASIM_QUEUE_MAX 256
+#define VDPASIM_VENDOR_ID
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 simulator in a new module
(vdpa_sim_net) and leaves the generic functions in the vdpa_sim core
module,
_pfn check to a WARN_ON() (Jason)
Changes in v2:
- Drop the reversion patch
- Fix unhandled page leak towards the end of page_list
Acked-by: Jason Wang
Thanks
drivers/vhost/vdpa.c | 80
1 file changed, 62 insertions(+), 18 deletions(-)
On 2020/11/10 上午7:56, si-wei liu wrote:
On 11/9/2020 2:42 PM, Michael S. Tsirkin wrote:
On Mon, Nov 09, 2020 at 01:44:03PM -0800, si-wei liu wrote:
On 11/8/2020 7:21 PM, Jason Wang wrote:
On 2020/11/6 上午6:57, si-wei liu wrote:
On 11/4/2020 7:26 PM, Jason Wang wrote:
On 2020/11/5 上午7:33
On 2020/11/5 下午8:22, Alexander Lobakin wrote:
From: Jason Wang
Date: Thu, 5 Nov 2020 11:10:24 +0800
Hi Jason,
On 2020/11/4 下午11:31, Alexander Lobakin wrote:
Since commit 086d08725d34 ("remoteproc: create vdev subdevice with
specific dma memory pool"), every remoteproc has a DMA
On 2020/11/6 上午6:57, si-wei liu wrote:
On 11/4/2020 7:26 PM, Jason Wang wrote:
On 2020/11/5 上午7:33, Si-Wei Liu wrote:
Pinned pages are not properly accounted particularly when
mapping error occurs on IOTLB update. Clean up dangling
pinned pages for the error path.
The memory usage
On 2020/11/5 上午7:33, Si-Wei Liu wrote:
Pinned pages are not properly accounted particularly when
mapping error occurs on IOTLB update. Clean up dangling
pinned pages for the error path.
The memory usage for bookkeeping pinned pages is reverted
to what it was before: only one single free page
On 2020/11/5 上午7:40, si-wei liu wrote:
On 11/3/2020 6:42 PM, Jason Wang wrote:
On 2020/10/30 下午3:45, Si-Wei Liu wrote:
Pinned pages are not properly accounted particularly when
mapping error occurs on IOTLB update. Clean up dangling
pinned pages for the error path.
The memory usage
On 2020/11/4 下午11:31, Alexander Lobakin wrote:
Since commit 086d08725d34 ("remoteproc: create vdev subdevice with
specific dma memory pool"), every remoteproc has a DMA subdevice
("remoteprocX#vdevYbuffer") for each virtio device, which inherits
DMA capabilities from the corresponding platform
On 2020/10/30 下午3:45, Si-Wei Liu wrote:
Pinned pages are not properly accounted particularly when
mapping error occurs on IOTLB update. Clean up dangling
pinned pages for the error path.
The memory usage for bookkeeping pinned pages is reverted
to what it was before: only one single free page
On 2020/11/4 上午9:08, si-wei liu wrote:
On 11/3/2020 5:06 PM, si-wei liu wrote:
On 11/3/2020 5:00 AM, Jason Wang wrote:
On 2020/10/30 下午3:45, Si-Wei Liu wrote:
Pinned pages are not properly accounted particularly when
mapping error occurs on IOTLB update. Clean up dangling
pinned pages
On 2020/10/30 下午3:45, Si-Wei Liu wrote:
Pinned pages are not properly accounted particularly when
mapping error occurs on IOTLB update. Clean up dangling
pinned pages for the error path.
The memory usage for bookkeeping pinned pages is reverted
to what it was before: only one single free page
On 2020/11/3 上午1:11, Stefano Garzarella wrote:
On Fri, Oct 30, 2020 at 07:44:43PM +0800, Jason Wang wrote:
On 2020/10/30 下午6:54, Stefano Garzarella wrote:
On Fri, Oct 30, 2020 at 06:02:18PM +0800, Jason Wang wrote:
On 2020/10/30 上午1:43, Stefano Garzarella wrote:
This patch enables
On 2020/10/30 下午3:45, Si-Wei Liu wrote:
This reverts commit 7ed9e3d97c32d969caded2dfb6e67c1a2cc5a0b1.
Signed-off-by: Si-Wei Liu
---
drivers/vhost/vdpa.c | 119 +--
1 file changed, 48 insertions(+), 71 deletions(-)
I saw this has been
On 2020/10/30 下午6:54, Stefano Garzarella wrote:
On Fri, Oct 30, 2020 at 06:02:18PM +0800, Jason Wang wrote:
On 2020/10/30 上午1:43, Stefano Garzarella wrote:
This patch enables the IOTLB API support for vhost-vsock devices,
allowing the userspace to emulate an IOMMU for the guest
On 2020/10/30 上午1:43, Stefano Garzarella wrote:
This patch enables the IOTLB API support for vhost-vsock devices,
allowing the userspace to emulate an IOMMU for the guest.
These changes were made following vhost-net, in details this patch:
- exposes VIRTIO_F_ACCESS_PLATFORM feature and inits
/vdpa_sim.c | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
Acked-by: Jason Wang
- dev->coherent_dma_mask = DMA_BIT_MASK(64);
+ dev->dma_mask = >coherent_dma_mask;
+ if (dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64)))
+ goto err_iommu;
set_dma_ops(dev, _dma_ops);
vdpasim->iommu = vhost_iotlb_alloc(2048, 0);
Acked-by: Jason Wang
- if (!ret)
+ err = dma_map_sg_attrs(dma, mr->sg_head.sgl, mr->nsg,
DMA_BIDIRECTIONAL, 0);
+ if (!err)
goto err_map;
err = create_direct_mr(mvdev, mr);
Acked-by: Jason Wang
This implements a sample get_iova_range() for the simulator which
advertise [0, ULLONG_MAX] as the valid range.
Signed-off-by: Jason Wang
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 12
1 file changed, 12 insertions(+)
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa
own DMA
translation logic and assume a [0, ULLONG_MAX] range
- mandate IOVA range only for IOMMU that forcing aperture
- forbid the map which is out of the IOVA range in vhost-vDPA
Jason Wang (3):
vdpa: introduce config op to get valid iova range
vhost: vdpa: report iova range
vdpa_sim
DOMAIN_ATTR_GEOMETRY,
otherwise [0, ULLONG_MAX] is assumed.
For safety, this patch also rules out the map request which is not in
the valid range.
Signed-off-by: Jason Wang
---
drivers/vhost/vdpa.c | 41
include/uapi/linux/vhost.h | 4
include/uapi/linux
401 - 500 of 4435 matches
Mail list logo