Peter,
On 23.11.20 14:43, Peter Zijlstra wrote:
On Fri, Nov 20, 2020 at 01:53:42PM +0100, Peter Zijlstra wrote:
On Fri, Nov 20, 2020 at 12:46:18PM +0100, Juergen Gross wrote:
30 files changed, 325 insertions(+), 598 deletions(-)
Much awesome ! I'll try and get that objtool thing sorted.
On Wed, Dec 9, 2020 at 12:07 PM Stefano Garzarella wrote:
> On Mon, Dec 07, 2020 at 01:29:17PM +0800, Jason Wang wrote:
> >
> >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
On Tue, Dec 15, 2020 at 12:42:45PM +0100, Jürgen Groß wrote:
> Peter,
>
> On 23.11.20 14:43, Peter Zijlstra wrote:
> > On Fri, Nov 20, 2020 at 01:53:42PM +0100, Peter Zijlstra wrote:
> > > On Fri, Nov 20, 2020 at 12:46:18PM +0100, Juergen Gross wrote:
> > > > 30 files changed, 325 insertions(+),
.snip.
> > > This raises two issues:
> > > 1) swiotlb_tlb_unmap_single fails to check whether the index generated
> > > from the dma_addr is in range of the io_tlb_orig_addr array.
> > That is fairly simple to implement I would think. That is it can check
> > that the dma_addr is from the PA in the
On Tue, Dec 15, 2020 at 11:54:08AM +0100, Felicitas Hetzelt wrote:
> Hello,
> thank you all for looking into this! To answer some of the questions:
> - Did you have already some PoC fixes for this:
>We don't have a full PoC or fix currently. Thought we have a PoC
>with which were able to o
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 th
'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
ind
Some headers are not necessary, so let's remove them to do
some cleaning.
Signed-off-by: Stefano Garzarella
---
v4:
- checked better which headers are not directly used [Randy]
v3:
- avoided to remove some headers with structures and functions directly
used (device.h, slab.h, virtio_byteorder.
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 kmal
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 Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 7 +++
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 f
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
Signed-off
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
---
dr
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: Ma
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 delet
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 fi
Add new 'config_size' attribute in 'vdpasim_dev_attr' and allocates
'config' dynamically to support any device types.
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git
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
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
v3:
- cleared notify during reset [Jason]
---
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
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.
This is safe since in
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.
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
d
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 b/drivers/vdpa/vdpa_sim/
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 using
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]
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
---
v4:
- Fixed typo (s/
On Tue, Dec 15, 2020 at 03:18:34PM +0100, Peter Zijlstra wrote:
> Ah, I was waiting for Josh to have an opinion (and then sorta forgot
> about the whole thing again). Let me refresh and provide at least a
> Changelog.
How's this then?
---
Subject: objtool: Alternatives vs ORC, the hard way
From:
On 15.12.20 15:54, Peter Zijlstra wrote:
On Tue, Dec 15, 2020 at 03:18:34PM +0100, Peter Zijlstra wrote:
Ah, I was waiting for Josh to have an opinion (and then sorta forgot
about the whole thing again). Let me refresh and provide at least a
Changelog.
How's this then?
Thanks, will add it in
On Tue, Dec 15, 2020 at 03:54:08PM +0100, Peter Zijlstra wrote:
> The problem is that a single instance of unwind information (ORC) must
> capture and correctly unwind all alternatives. Since the trivially
> correct mandate is out, implement the straight forward brute-force
> approach:
>
> 1) gen
- Original Message -
> .snip.
> > > > This raises two issues:
> > > > 1) swiotlb_tlb_unmap_single fails to check whether the index generated
> > > > from the dma_addr is in range of the io_tlb_orig_addr array.
> > > That is fairly simple to implement I would think. That is it can check
>
- Original Message -
>
>
> > -Original Message-
> > From: Jason Wang [mailto:jasow...@redhat.com]
> > Sent: Tuesday, December 15, 2020 12:10 PM
> > To: wangyunjian ; net...@vger.kernel.org;
> > m...@redhat.com; willemdebruijn.ker...@gmail.com
> > Cc: virtualization@lists.linux-f
- Original Message -
>
>
> - Original Message -
> > .snip.
> > > > > This raises two issues:
> > > > > 1) swiotlb_tlb_unmap_single fails to check whether the index
> > > > > generated
> > > > > from the dma_addr is in range of the io_tlb_orig_addr array.
> > > > That is fairly
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 to support multiqueue and other
configurations.
When used by vhost-vDPA bus driver for VM, the control virtqueue
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/vho
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..af6ee6
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(+)
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 del
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: th
This patch introduces virtqueue groups to vDPA device. The virtqueue
group is the minimal set of virtqueues that must share an address
space. And the adddress space identifier could only be attached to
a specific virtqueue group.
A new mandated bus operation is introduced to get the virtqueue grou
This patches introduces the multiple address spaces support for vDPA
device. This idea is to identify a specific address space via an
dedicated identifier - ASID.
During vDPA device allocation, vDPA device driver needs to report the
number of address spaces supported by the device then the DMA map
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..2a8
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/vho
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 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,
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 inserti
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
i
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(+)
d
This patch extends the vhost-vdpa to support ASID based IOTLB API. The
vhost-vdpa device will allocated multple IOTLBs for vDPA device that
supports multiple address spaces. The IOTLBs and vDPA device memory
mappings is determined and maintained through ASID.
Note that we still don't support vDPA
From: Stefano Garzarella
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_get
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 --git
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 fe48
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/vdpa
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/vdpa_si
This patch introduces the control virtqueue support for vDPA
simulator. This is a requirement for supporting advanced features like
multiqueue.
A requirement for control virtqueue is to isolate its memory access
from the rx/tx virtqueues. This is because when using vDPA device
for VM, the control
- Original Message -
> > -Original Message-
> > From: Jason Wang [mailto:jasow...@redhat.com]
> > Sent: Wednesday, December 16, 2020 1:57 PM
> > To: wangyunjian
> > Cc: net...@vger.kernel.org; m...@redhat.com; willemdebruijn kernel
> > ;
> > virtualization@lists.linux-foundation.
53 matches
Mail list logo