Hi Randy,
On Thu, Dec 03, 2020 at 09:37:48AM -0800, Randy Dunlap wrote:
On 12/3/20 9:04 AM, Stefano Garzarella wrote:
Some headers are not necessary, so let's remove them to do
some cleaning.
Signed-off-by: Stefano Garzarella
Hi,
What makes you say that some of these are unnecessary?
On Thu, Dec 03, 2020 at 09:25:52AM -0800, Randy Dunlap wrote:
Hi,
On 12/3/20 9:05 AM, Stefano Garzarella wrote:
diff --git a/drivers/vdpa/Kconfig b/drivers/vdpa/Kconfig
index 2c892e890b9e..b0f91ad8eb47 100644
--- a/drivers/vdpa/Kconfig
+++ b/drivers/vdpa/Kconfig
@@ -9,15 +9,20 @@ menuconfig
On 2020/12/3 下午4:00, wangyunjian wrote:
From: Yunjian Wang
After setting callback for ubuf_info of skb, the callback
(vhost_net_zerocopy_callback) will be called to decrease
the refcount when freeing skb. But when an exception occurs
afterwards, the error handling in vhost handle_tx() will
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 for
features prototyping and testing.
Note that get/restore virtqueue state is not supported which needs
extension on the virtio specification.
Signed-off-by:
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 ++---
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
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 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
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
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
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
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
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 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
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
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
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
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
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
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
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 devres for virtio-pci core
- tweak the commit
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 12/3/20 9:04 AM, Stefano Garzarella wrote:
> Some headers are not necessary, so let's remove them to do
> some cleaning.
>
> Signed-off-by: Stefano Garzarella
Hi,
What makes you say that some of these are unnecessary?
Please use Rule #1 from Documentation/process/submit-checklist.rst:
1)
Hi,
On 12/3/20 9:05 AM, Stefano Garzarella wrote:
> diff --git a/drivers/vdpa/Kconfig b/drivers/vdpa/Kconfig
> index 2c892e890b9e..b0f91ad8eb47 100644
> --- a/drivers/vdpa/Kconfig
> +++ b/drivers/vdpa/Kconfig
> @@ -9,15 +9,20 @@ menuconfig VDPA
> if VDPA
>
> config VDPA_SIM
> - tristate
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 Garzarella
---
v2:
- Fixed "warning: variable 'dev' is
vringh_getdesc_iotlb() manages 2 iovs for writable and readable
descriptors. This is very useful for the block device, where for
each request we have both types of descriptor.
Let's split the vdpasim_virtqueue's iov field in out_iov and
in_iov to use them with vringh_getdesc_iotlb().
We are
Allow each device to specify the size of the buffer allocated
in vdpa_sim.
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c
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().
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 4 ++--
1 file changed, 2 insertions(+), 2
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
---
v3:
- cleared notify during reset [Jason]
---
The set_config callback can be used by the device to parse the
config structure modified by the driver.
The callback will be invoked, if set, in vdpasim_set_config() after
copying bytes from caller buffer into vdpasim->config buffer.
Signed-off-by: Stefano Garzarella
---
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 vdpasim_net_get_config() callback.
Signed-off-by:
Add new 'config_size' attribute in 'vdpasim_dev_attr' and allocates
'config' dynamically to support any device types.
Signed-off-by: Stefano Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git
As preparation for the next patches, we store the MAC address,
parsed during the vdpasim_create(), in a buffer that will be used
to fill 'config' together with other configurations.
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 10 +++---
1
Remove VDPASIM_DEVICE_ID macro and add 'id' field in vdpasim_dev_attr,
that will be returned by vdpasim_get_device_id().
Use VIRTIO_ID_NET for vDPA-net simulator device id.
Co-developed-by: Max Gurtovoy
Signed-off-by: Max Gurtovoy
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
Rename vdpasim_work() in vdpasim_net_work() and add it to
the vdpasim_dev_attr structure.
Co-developed-by: Max Gurtovoy
Signed-off-by: Max Gurtovoy
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 7 +--
1 file changed, 5 insertions(+), 2
Introduce a new VDPASIM_FEATURES macro with the generic features
supported by the vDPA simulator, and VDPASIM_NET_FEATURES macro with
vDPA-net features.
Add 'supported_features' field in vdpasim_dev_attr, to allow devices
to specify their features.
Co-developed-by: Max Gurtovoy
Signed-off-by:
vdpasim_dev_attr will contain device specific attributes. We starting
moving the number of virtqueues (i.e. nvqs) to vdpasim_dev_attr.
vdpasim_create() creates a new vDPA simulator following the device
attributes defined in the vdpasim_dev_attr parameter.
Co-developed-by: Max Gurtovoy
These variables store generic callbacks used by the vDPA simulator
core, so we can remove the 'net' word in their names.
Co-developed-by: Max Gurtovoy
Signed-off-by: Max Gurtovoy
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 12 ++--
1
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 Wang
Signed-off-by: Stefano Garzarella
---
v3:
-
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-by: Stefano Garzarella
---
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()]
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
v1:
- use kcalloc() instead of
'default n' is not necessary since it is already the default when
nothing is specified.
Suggested-by: Jason Wang
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
drivers/vdpa/Kconfig | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/vdpa/Kconfig b/drivers/vdpa/Kconfig
Some headers are not necessary, so let's remove them to do
some cleaning.
Signed-off-by: Stefano Garzarella
---
v3:
- avoided to remove some headers with structures and functions directly
used (device.h, slab.h, virtio_byteorder.h)[Jason]
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 10 --
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, allowing the possibility to add new vDPA device simulators.
For now I removed the vdpa-blk simulator patches, since I'm still working
on them and debugging
On Thu, Dec 03, 2020 at 03:06:20AM +, Zack Rusin wrote:
>
>
> > On Dec 2, 2020, at 11:03, Daniel Vetter wrote:
> >
> > On Wed, Dec 2, 2020 at 4:37 PM Zack Rusin wrote:
> >>
> >>
> >>
> >>> On Dec 2, 2020, at 09:27, Thomas Zimmermann wrote:
> >>>
> >>> Hi
> >>>
> >>> Am 02.12.20 um
On Thu, Dec 03, 2020 at 02:09:29PM +0200, Eli Cohen wrote:
> On Thu, Dec 03, 2020 at 05:44:17AM -0500, Michael S. Tsirkin wrote:
> > On Thu, Dec 03, 2020 at 08:49:28AM +0200, Eli Cohen wrote:
> > > On Wed, Dec 02, 2020 at 05:00:22PM -0500, Michael S. Tsirkin wrote:
> > > > On Wed, Dec 02, 2020 at
On Thu, Dec 03, 2020 at 08:49:28AM +0200, Eli Cohen wrote:
> On Wed, Dec 02, 2020 at 05:00:22PM -0500, Michael S. Tsirkin wrote:
> > On Wed, Dec 02, 2020 at 09:48:25PM +0800, Jason Wang wrote:
> > >
> > > On 2020/12/2 下午5:23, Michael S. Tsirkin wrote:
> > > > On Wed, Dec 02, 2020 at 07:57:14AM
50 matches
Mail list logo