在 2023/4/1 04:48, Zhu Lingshan 写道:
VIRTIO_CONFIG_S_FAILED indicates the guest driver has given up
the device due to fatal errors. So it is the guest decision,
the vendor driver should not set this status to the device.
Signed-off-by: Zhu Lingshan
Acked-by: Jason Wang
Thanks
---
在 2023/4/1 04:48, Zhu Lingshan 写道:
This commit synchronize irqs of the virtqueues
and config space in the reset routine.
Thus ifcvf_stop_hw() and reset() are refactored as well.
Signed-off-by: Zhu Lingshan
---
drivers/vdpa/ifcvf/ifcvf_base.c | 61 ++---
在 2023/4/1 04:48, Zhu Lingshan 写道:
Rather than former lazy-initialization mechanism,
now the virtqueue operations and driver_features related
ops access the virtio registers directly to take
immediate actions. So ifcvf_start_datapath() should
retire.
ifcvf_add_status() is retierd because we
在 2023/4/1 04:48, Zhu Lingshan 写道:
This commit implements a new function ifcvf_get_driver_feature()
which read driver_features from virtio registers.
To be less ambiguous, ifcvf_set_features() is renamed to
ifcvf_set_driver_features(), and ifcvf_get_features()
is renamed to
在 2023/4/1 04:48, Zhu Lingshan 写道:
In this commit, virtqueue operations including:
set_vq_num(), set_vq_address(), set_vq_ready()
and get_vq_ready() access PCI registers directly
to take immediate actions.
Signed-off-by: Zhu Lingshan
---
drivers/vdpa/ifcvf/ifcvf_base.c | 58
On Tue, Apr 25, 2023 at 4:10 PM Xuan Zhuo wrote:
>
> On Tue, 25 Apr 2023 16:00:05 +0800, Xuan Zhuo
> wrote:
> > On Tue, 25 Apr 2023 15:58:03 +0800, Jason Wang wrote:
> > > On Sun, Apr 23, 2023 at 6:58 PM Xuan Zhuo
> > > wrote:
> > > >
> > > > The purpose of this patch is to simplify the
在 2023/4/23 18:57, Xuan Zhuo 写道:
This logic is used in multiple places, now we separate it into
a helper.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
Thanks
---
drivers/net/virtio_net.c | 34 +-
1 file changed, 21 insertions(+), 13 deletions(-)
在 2023/4/23 18:57, Xuan Zhuo 写道:
Simplifying receive_small() function. Bringing the logic relating to
build_skb together.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
Thanks
---
drivers/net/virtio_net.c | 48 ++--
1 file changed, 31
On Sun, Apr 23, 2023 at 6:58 PM Xuan Zhuo wrote:
>
> now, the process of xdp is simple, we can remove the skip_xdp.
I would say the reason why xdp is simple, I think it is because the
skb build path is not shared between XDP and non-XDP case.
Other than this
Acked-by: Jason Wang
Thanks
>
>
On Sun, Apr 23, 2023 at 6:58 PM Xuan Zhuo wrote:
>
> Avoid the problem that some variables(headroom and so on) will repeat
> the calculation when process xdp.
>
> Signed-off-by: Xuan Zhuo
Nit: I think we need to tweak the title, it's better to say what is
optimized. (And it would be better to
On 4/25/23 7:09 PM, Xuan Zhuo wrote:
On Tue, 25 Apr 2023 14:25:53 -0700, Shannon Nelson
wrote:
To add a bit of flexibility with various virtio based devices, allow
the caller to specify a different device id and DMA mask. This adds
fields to struct virtio_pci_modern_device to specify an
On Tue, 25 Apr 2023 14:25:53 -0700, Shannon Nelson
wrote:
> To add a bit of flexibility with various virtio based devices, allow
> the caller to specify a different device id and DMA mask. This adds
> fields to struct virtio_pci_modern_device to specify an override device
> id check and a DMA
This is the vDPA device support, where we advertise that we can
support the virtio queues and deal with the configuration work
through the pds_core's adminq.
Signed-off-by: Shannon Nelson
---
drivers/vdpa/pds/aux_drv.c | 15 +
drivers/vdpa/pds/aux_drv.h | 1 +
drivers/vdpa/pds/debugfs.c |
Register for the pds_core's notification events, primarily to
find out when the FW has been reset so we can pass this on
back up the chain.
Signed-off-by: Shannon Nelson
---
drivers/vdpa/pds/vdpa_dev.c | 68 -
drivers/vdpa/pds/vdpa_dev.h | 1 +
2 files
These are the adminq commands that will be needed for
setting up and using the vDPA device. There are a number
of commands defined in the FW's API, but by making use of
the FW's virtio BAR we only need a few of these commands
for vDPA support.
Signed-off-by: Shannon Nelson
---
Note: the
Add the documentation and Kconfig entry for pds_vdpa driver.
Signed-off-by: Shannon Nelson
---
.../device_drivers/ethernet/amd/pds_vdpa.rst | 85 +++
.../device_drivers/ethernet/index.rst | 1 +
MAINTAINERS | 4 +
drivers/vdpa/Kconfig
Prep and use the "modern" virtio bar utilities to get our
virtio config space ready.
Signed-off-by: Shannon Nelson
---
drivers/vdpa/pds/aux_drv.c | 25 +
drivers/vdpa/pds/aux_drv.h | 3 +++
2 files changed, 28 insertions(+)
diff --git a/drivers/vdpa/pds/aux_drv.c
This is the initial auxiliary driver framework for a new vDPA
device driver, an auxiliary_bus client of the pds_core driver.
The pds_core driver supplies the PCI services for the VF device
and for accessing the adminq in the PF device.
This patch adds the very basics of registering for the
Add new adminq definitions in support for vDPA operations.
Signed-off-by: Shannon Nelson
---
include/linux/pds/pds_adminq.h | 266 +
1 file changed, 266 insertions(+)
diff --git a/include/linux/pds/pds_adminq.h b/include/linux/pds/pds_adminq.h
index
The pds_core_logical_qtype enum and IFNAMSIZ are not needed
in the common PDS header, only needed when working with the
adminq, so move them to the adminq header.
Note: This patch might conflict with pds_vfio patches that are
in review, depending on which patchset gets pulled first.
Find the vDPA management information from the DSC in order to
advertise it to the vdpa subsystem.
Signed-off-by: Shannon Nelson
Acked-by: Jason Wang
---
drivers/vdpa/pds/Makefile | 3 +-
drivers/vdpa/pds/aux_drv.c | 17 ++
drivers/vdpa/pds/aux_drv.h | 7 +++
To add a bit of flexibility with various virtio based devices, allow
the caller to specify a different device id and DMA mask. This adds
fields to struct virtio_pci_modern_device to specify an override device
id check and a DMA mask.
int (*device_id_check)(struct pci_dev *pdev);
If
This patchset implements a new module for the AMD/Pensando DSC that
supports vDPA services on PDS Core VF devices. This code is based on
and depends on include files from the pds_core driver described here[0].
The pds_core driver creates the auxiliary_bus devices that this module
connects to, and
On 4/24/23 11:08 PM, Michael S. Tsirkin wrote:
On Mon, Apr 24, 2023 at 03:50:28PM -0700, Shannon Nelson wrote:
While testing our vDPA driver with QEMU we found that vhost_vdpa was
missing some support for PACKED VQs. Adding these helped us get further
in our testing. The first patch makes
On Tue, Apr 25, 2023 at 01:02:38PM +, Alvaro Karsz wrote:
> > > In the virtnet case, we'll decide which features to block based on the
> > > ring size.
> > > 2 < ring < MAX_FRAGS + 2 -> BLOCK GRO + MRG_RXBUF
> > > ring < 2 -> BLOCK GRO + MRG_RXBUF + CTRL_VQ
> >
> > why MRG_RXBUF? what does
> > In the virtnet case, we'll decide which features to block based on the ring
> > size.
> > 2 < ring < MAX_FRAGS + 2 -> BLOCK GRO + MRG_RXBUF
> > ring < 2 -> BLOCK GRO + MRG_RXBUF + CTRL_VQ
>
> why MRG_RXBUF? what does it matter?
>
You're right, it should be blocked only when ring < 2.
Or
On Tue, Apr 25, 2023 at 11:17:20AM +0200, Marc Kleine-Budde wrote:
> On 24.04.2023 17:09:23, Michael S. Tsirkin wrote:
> > On Mon, Apr 24, 2023 at 09:47:58PM +0200, Marc Kleine-Budde wrote:
> > > Address the topics raised in
> > >
> > >
On Tue, Apr 25, 2023 at 04:21:53PM +0800, Xuan Zhuo wrote:
> On Tue, 25 Apr 2023 04:13:09 -0400, "Michael S. Tsirkin"
> wrote:
> > On Tue, Apr 25, 2023 at 04:05:03PM +0800, Xuan Zhuo wrote:
> > > On Tue, 25 Apr 2023 03:51:47 -0400, "Michael S. Tsirkin"
> > > wrote:
> > > > On Tue, Apr 25, 2023
On Tue, Apr 25, 2023 at 11:11:54AM +, Alvaro Karsz wrote:
> > > So, let's add some funky flags in virtio device to block out
> > > features, have core compare these before and after,
> > > detect change, reset and retry?
> >
> > In the virtnet case, we'll decide which features to block based
On Tue, Apr 25, 2023 at 09:41:35AM +, Alvaro Karsz wrote:
> > So, let's add some funky flags in virtio device to block out
> > features, have core compare these before and after,
> > detect change, reset and retry?
>
> In the virtnet case, we'll decide which features to block based on the
> > So, let's add some funky flags in virtio device to block out
> > features, have core compare these before and after,
> > detect change, reset and retry?
>
> In the virtnet case, we'll decide which features to block based on the ring
> size.
> 2 < ring < MAX_FRAGS + 2 -> BLOCK GRO +
Introduce a new memory accessor for vringh. It is able to use vringh to
virtio rings located on io-memory region.
Signed-off-by: Shunsuke Mie
---
Changes from v2:
https://lore.kernel.org/virtualization/20230202090934.549556-1-...@igel.co.jp/
- Focus on an adding io memory APIs
Remove vringh
> So, let's add some funky flags in virtio device to block out
> features, have core compare these before and after,
> detect change, reset and retry?
In the virtnet case, we'll decide which features to block based on the ring
size.
2 < ring < MAX_FRAGS + 2 -> BLOCK GRO + MRG_RXBUF
ring < 2 ->
On Sun, Apr 23, 2023 at 12:28:49PM +, Alvaro Karsz wrote:
>
> > > > The rest of stuff can probably just be moved to after find_vqs without
> > > > much pain.
> > > >
> > > Actually, I think that with a little bit of pain :)
> > > If we use small vrings and a GRO feature bit is set, Linux will
On Tue, 25 Apr 2023 04:13:09 -0400, "Michael S. Tsirkin"
wrote:
> On Tue, Apr 25, 2023 at 04:05:03PM +0800, Xuan Zhuo wrote:
> > On Tue, 25 Apr 2023 03:51:47 -0400, "Michael S. Tsirkin"
> > wrote:
> > > On Tue, Apr 25, 2023 at 03:36:02PM +0800, Xuan Zhuo wrote:
> > > > ## About DMA APIs
> > >
On Tue, Apr 25, 2023 at 04:05:03PM +0800, Xuan Zhuo wrote:
> On Tue, 25 Apr 2023 03:51:47 -0400, "Michael S. Tsirkin"
> wrote:
> > On Tue, Apr 25, 2023 at 03:36:02PM +0800, Xuan Zhuo wrote:
> > > ## About DMA APIs
> > >
> > > Now, virtio may can not work with DMA APIs when virtio features do not
On Thu, Apr 20, 2023 at 09:18:21AM -0700, Christoph Hellwig wrote:
> On Thu, Apr 20, 2023 at 05:11:48PM +0800, Xuan Zhuo wrote:
> > I know that the current design of DMA API only supports some physical
> > hardware,
> > but can it be modified or expanded?
>
> I think the important point is that
On Tue, 25 Apr 2023 16:00:05 +0800, Xuan Zhuo
wrote:
> On Tue, 25 Apr 2023 15:58:03 +0800, Jason Wang wrote:
> > On Sun, Apr 23, 2023 at 6:58 PM Xuan Zhuo
> > wrote:
> > >
> > > The purpose of this patch is to simplify the receive_small().
> > > Separate all the logic of XDP of small into a
On Tue, 25 Apr 2023 03:51:47 -0400, "Michael S. Tsirkin"
wrote:
> On Tue, Apr 25, 2023 at 03:36:02PM +0800, Xuan Zhuo wrote:
> > ## About DMA APIs
> >
> > Now, virtio may can not work with DMA APIs when virtio features do not have
> > VIRTIO_F_ACCESS_PLATFORM.
> >
> > 1. I tried to let DMA APIs
On Tue, 25 Apr 2023 15:58:03 +0800, Jason Wang wrote:
> On Sun, Apr 23, 2023 at 6:58 PM Xuan Zhuo wrote:
> >
> > The purpose of this patch is to simplify the receive_small().
> > Separate all the logic of XDP of small into a function.
> >
> > Signed-off-by: Xuan Zhuo
> > ---
> >
On Sun, Apr 23, 2023 at 6:58 PM Xuan Zhuo wrote:
>
> The purpose of this patch is to simplify the receive_small().
> Separate all the logic of XDP of small into a function.
>
> Signed-off-by: Xuan Zhuo
> ---
> drivers/net/virtio_net.c | 165 ---
> 1 file
On Tue, Apr 25, 2023 at 03:36:02PM +0800, Xuan Zhuo wrote:
> ## About DMA APIs
>
> Now, virtio may can not work with DMA APIs when virtio features do not have
> VIRTIO_F_ACCESS_PLATFORM.
>
> 1. I tried to let DMA APIs return phy address by virtio-device. But DMA APIs
> just
>work with the
On Tue, 25 Apr 2023 15:41:28 +0800, Jason Wang wrote:
> On Sun, Apr 23, 2023 at 6:57 PM Xuan Zhuo wrote:
> >
> > virtnet_build_xdp_buff_mrg() and virtnet_xdp_handler() auto
> > release xdp shinfo then the caller no need to careful the xdp shinfo.
>
> Thinking of this, I think releasing frags in
On Sun, Apr 23, 2023 at 6:57 PM Xuan Zhuo wrote:
>
> virtnet_build_xdp_buff_mrg() and virtnet_xdp_handler() auto
> release xdp shinfo then the caller no need to careful the xdp shinfo.
Thinking of this, I think releasing frags in
virtnet_build_xdp_buff_mrg() is fine. But for
Introduce virtqueue_reset() to release all buffer inside vq.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 33 +
include/linux/virtio.h | 2 ++
2 files changed, 35 insertions(+)
diff --git a/drivers/virtio/virtio_ring.c
Modify the "useless" to a more accurate "unused".
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 871ac552b3b6..af46746c9637
The subsequent reset function will reuse these logic.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 58
1 file changed, 39 insertions(+), 19 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c
virtio core only supports virtual addresses, dma is completed in virtio
core.
In some scenarios (such as the AF_XDP), the memory is allocated
and DMA mapping is completed in advance, so it is necessary for us to
support passing the DMA address to virtio core.
Drives can use sg->dma_address to
virtio core only supports virtual addresses, dma is completed in virtio
core.
In some scenarios (such as the AF_XDP), the memory is allocated
and DMA mapping is completed in advance, so it is necessary for us to
support passing the DMA address to virtio core.
Drives can use sg->dma_address to
Update the document of virtqueue_add_* series API, allowing the callers to
use sg->dma_address to pass the dma address to Virtio Core.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 16
1 file changed, 16 insertions(+)
diff --git a/drivers/virtio/virtio_ring.c
DMA-related logic is separated from the virtqueue_add_split() to
one new function. DMA address will be saved as sg->dma_address if
use_dma_api is true, then virtqueue_add_split() will use it directly.
Unmap operation will be simpler.
The purpose of this is to facilitate subsequent support to
Added virtqueue_dma_dev() to get DMA device for virtio. Then the
caller can do dma operation in advance. The purpose is to keep memory
mapped across multiple add/get buf operations.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 17 +
include/linux/virtio.h |
DMA-related logic is separated from the virtqueue_add_indirect_packed().
DMA address will be saved as sg->dma_address, then
virtqueue_add_indirect_packed() will use it directly. Unmap operation
will be simpler.
The purpose of this is to facilitate subsequent support to receive
dma address mapped
virtio core only supports virtual addresses, dma is completed in virtio
core.
In some scenarios (such as the AF_XDP), the memory is allocated
and DMA mapping is completed in advance, so it is necessary for us to
support passing the DMA address to virtio core.
Drives can use sg->dma_address to
## About DMA APIs
Now, virtio may can not work with DMA APIs when virtio features do not have
VIRTIO_F_ACCESS_PLATFORM.
1. I tried to let DMA APIs return phy address by virtio-device. But DMA APIs
just
work with the "real" devices.
2. I tried to let xsk support callballs to get phy address
DMA-related logic is separated from the virtqueue_add_packed(). DMA
address will be saved as sg->dma_address, then virtqueue_add_packed()
will use it directly. Unmap operation will be simpler.
The purpose of this is to facilitate subsequent support to receive
dma address mapped by drivers.
On Mon, Apr 24, 2023 at 03:50:28PM -0700, Shannon Nelson wrote:
> While testing our vDPA driver with QEMU we found that vhost_vdpa was
> missing some support for PACKED VQs. Adding these helped us get further
> in our testing. The first patch makes sure that the vhost_vdpa vqs are
> given the
On Tue, Apr 25, 2023 at 6:50 AM Shannon Nelson wrote:
>
> Use the right structs for PACKED or split vqs when setting and
> getting the vring base.
>
> Signed-off-by: Shannon Nelson
Acked-by: Jason Wang
Thanks
> ---
> drivers/vhost/vdpa.c | 21 +
> 1 file changed, 17
On Tue, Apr 25, 2023 at 6:50 AM Shannon Nelson wrote:
>
> Use the right structs for PACKED or split vqs when setting and
> getting the vring base.
>
> Signed-off-by: Shannon Nelson
Acked-by: Jason Wang
Thanks
> ---
> drivers/vhost/vhost.c | 18 +-
> drivers/vhost/vhost.h |
59 matches
Mail list logo