ult is that driver is out of spec.
>
> Implement what the API was supposed to do
> in the 1st place. Compatibility with buggy hypervisors
> is handled inside virtio-balloon, which is the only driver
> making use of this facility, so far.
>
> Signed-off-by: Michael S. Tsirkin
Acked-by: Jason Wang
Thanks
lement functionality
> > to allow vq indexes to be discontinuous. So the current behavior of the
> > virtio-balloon device is different for the spec. But this commit has no
> > functional changes.
> >
> > Signed-off-by: Xuan Zhuo
> > Acked-by: David Hildenbrand
y: Xuan Zhuo
> Reviewed-by: Ilpo Järvinen
Acked-by: Jason Wang
Thanks
ccw);
> + vqs[i] = virtio_ccw_setup_vq(vdev, i, ccw, cfg);
> if (IS_ERR(vqs[i])) {
> ret = PTR_ERR(vqs[i]);
> vqs[i] = NULL;
> diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
> index 82ee4a288728..7f0fdc3f51cb 100644
> --- a/drivers/virtio/virtio_mmio.c
> +++ b/drivers/virtio/virtio_mmio.c
> @@ -370,8 +370,7 @@ static void vm_synchronize_cbs(struct virtio_device *vdev)
> }
>
> static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned
> int index,
> - void (*callback)(struct virtqueue *vq),
> - const char *name, bool ctx)
> +struct virtio_vq_config *cfg)
> {
> struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
> bool (*notify)(struct virtqueue *vq);
> @@ -386,9 +385,6 @@ static struct virtqueue *vm_setup_vq(struct virtio_device
> *vdev, unsigned int in
> else
> notify = vm_notify;
>
> - if (!name)
> - return NULL;
Nit: This seems to belong to patch 2.
Acked-by: Jason Wang
Thanks
Signed-off-by: Xuan Zhuo
> Reviewed-by: Ilpo Järvinen
> ---
Acked-by: Jason Wang
Thanks
On Wed, Mar 27, 2024 at 5:58 PM Xuan Zhuo wrote:
>
> Now, we pass multi parameters to vring_new_virtqueue. These parameters
> may from transport or from driver.
>
> vring_new_virtqueue is called by many places.
> Every time, we try to add a new parameter, that is difficult.
>
> If parameters from
f-by: Xuan Zhuo
> Acked-by: Johannes Berg
> Reviewed-by: Ilpo Järvinen
Acked-by: Jason Wang
Thanks
d int nvqs,
> struct cpumask *masks;
> struct vdpa_callback cb;
> bool has_affinity = desc && ops->set_vq_affinity;
> - int i, err, queue_idx = 0;
> + int i, err;
>
> if (has_affinity) {
> masks = create_af
On Mon, Mar 25, 2024 at 5:04 PM Xuan Zhuo wrote:
>
> commit 6457f126c888 ("virtio: support reserved vqs") introduced this
> support. Multiqueue virtio-net use 2N as ctrl vq finally, so the logic
> doesn't apply. And not one uses this.
>
> On the other side, that makes some trouble for us to refact
On Tue, Mar 26, 2024 at 12:11 PM Jason Wang wrote:
>
> On Mon, Mar 25, 2024 at 5:44 PM Cornelia Huck wrote:
> >
> > On Mon, Mar 25 2024, Xuan Zhuo wrote:
> >
> > > On Fri, 22 Mar 2024 22:02:27 +0100, David Hildenbrand
> > > wrote:
> > >>
part of the codebase. In an upcoming commit, we plan to
> eliminate this dependency by removing the function entirely. Therefore,
> with this change, we are ensuring that the virtio_balloon no longer
> depends on the aforementioned function.
>
> Signed-off-by: Xuan Zhuo
With the above tweak.
Acked-by: Jason Wang
Thanks
On Mon, Mar 25, 2024 at 5:44 PM Cornelia Huck wrote:
>
> On Mon, Mar 25 2024, Xuan Zhuo wrote:
>
> > On Fri, 22 Mar 2024 22:02:27 +0100, David Hildenbrand
> > wrote:
> >> On 22.03.24 20:16, Daniel Verkamp wrote:
> >> > On Thu, Mar 21, 2024 at 3:16 AM Xuan Zhuo
> >> > wrote:
> >> >>
> >> >> Cu
On Wed, Mar 20, 2024 at 5:41 PM Xuan Zhuo wrote:
>
> On Wed, 20 Mar 2024 17:22:50 +0800, Jason Wang wrote:
> > On Tue, Mar 19, 2024 at 2:58 PM Michael S. Tsirkin wrote:
> > >
> > > On Mon, Mar 18, 2024 at 01:59:52PM +0800, Xuan Zhuo wrote:
> > > > On M
On Wed, Mar 20, 2024 at 6:07 PM Xuan Zhuo wrote:
>
> On Wed, 20 Mar 2024 17:39:29 +0800, Xuan Zhuo
> wrote:
> > On Wed, 20 Mar 2024 17:22:50 +0800, Jason Wang wrote:
> > > On Tue, Mar 19, 2024 at 2:58 PM Michael S. Tsirkin
> > > wrote:
> > > >
>
On Wed, Mar 20, 2024 at 5:22 PM Jason Wang wrote:
>
> On Tue, Mar 19, 2024 at 2:58 PM Michael S. Tsirkin wrote:
> >
> > On Mon, Mar 18, 2024 at 01:59:52PM +0800, Xuan Zhuo wrote:
> > > On Mon, 18 Mar 2024 12:18:23 +0800, Jason Wang
> > > wrote:
> > >
On Tue, Mar 19, 2024 at 2:58 PM Michael S. Tsirkin wrote:
>
> On Mon, Mar 18, 2024 at 01:59:52PM +0800, Xuan Zhuo wrote:
> > On Mon, 18 Mar 2024 12:18:23 +0800, Jason Wang wrote:
> > > On Fri, Mar 15, 2024 at 3:26 PM Xuan Zhuo
> > > wrote:
> > > >
On Fri, Mar 15, 2024 at 3:26 PM Xuan Zhuo wrote:
>
> On Fri, 15 Mar 2024 11:51:48 +0800, Jason Wang wrote:
> > On Thu, Mar 14, 2024 at 2:00 PM Xuan Zhuo
> > wrote:
> > >
> > > On Thu, 14 Mar 2024 11:12:24 +0800, Jason Wang
> > > wrote:
>
On Thu, Mar 14, 2024 at 2:00 PM Xuan Zhuo wrote:
>
> On Thu, 14 Mar 2024 11:12:24 +0800, Jason Wang wrote:
> > On Tue, Mar 12, 2024 at 10:10 AM Xuan Zhuo
> > wrote:
> > >
> > > Now, we pass multi parameters to find_vqs. These parameters
> >
On Tue, Mar 12, 2024 at 10:10 AM Xuan Zhuo wrote:
>
> Now, we pass multi parameters to find_vqs. These parameters
> may work for transport or work for vring.
>
> And find_vqs has multi implements in many places:
>
> arch/um/drivers/virtio_uml.c
> drivers/platform/mellanox/mlxbf-tmfifo.c
> drive
On Thu, Mar 7, 2024 at 4:15 PM Xuan Zhuo wrote:
>
> On Thu, 7 Mar 2024 13:28:27 +0800, Jason Wang wrote:
> > On Wed, Mar 6, 2024 at 6:01 PM Xuan Zhuo wrote:
> > >
> > > On Thu, 29 Feb 2024 04:34:20 -0500, "Michael S. Tsirkin"
> > > wrote:
>
On Wed, Mar 6, 2024 at 6:01 PM Xuan Zhuo wrote:
>
> On Thu, 29 Feb 2024 04:34:20 -0500, "Michael S. Tsirkin"
> wrote:
> > On Thu, Feb 29, 2024 at 05:02:37PM +0800, Xuan Zhuo wrote:
> > > On Thu, 29 Feb 2024 03:21:14 -0500, "Michael S. Tsirkin"
> > > wrote:
> > > > On Thu, Feb 29, 2024 at 03:20
On Thu, Feb 1, 2024 at 2:01 PM Xuan Zhuo wrote:
>
> On Thu, 1 Feb 2024 13:36:46 +0800, Jason Wang wrote:
> > On Thu, Feb 1, 2024 at 11:28 AM Xuan Zhuo
> > wrote:
> > >
> > > On Wed, 31 Jan 2024 17:12:47 +0800, Jason Wang
> > > wrote:
>
On Thu, Feb 1, 2024 at 2:05 PM Xuan Zhuo wrote:
>
> On Wed, 31 Jan 2024 17:12:29 +0800, Jason Wang wrote:
> > On Tue, Jan 30, 2024 at 7:42 PM Xuan Zhuo
> > wrote:
> > >
> > > As discussed:
> > > http://lore.kernel.org/all/CACGkMEug-=C+VQhkMYSg
On Wed, Jan 31, 2024 at 5:43 PM Michael S. Tsirkin wrote:
>
> On Wed, Jan 31, 2024 at 05:12:22PM +0800, Jason Wang wrote:
> > I post a patch to store flags unconditionally at:
> >
> > https://lore.kernel.org/all/20220224122655-mutt-send-email-...@kernel.org/
>
> wha
On Thu, Feb 1, 2024 at 11:28 AM Xuan Zhuo wrote:
>
> On Wed, 31 Jan 2024 17:12:47 +0800, Jason Wang wrote:
> > On Tue, Jan 30, 2024 at 7:43 PM Xuan Zhuo
> > wrote:
> > >
> > > If the xsk is enabling, the xsk tx will share the send queue.
> > > But
On Wed, Jan 31, 2024 at 6:01 PM Xuan Zhuo wrote:
>
> On Wed, 31 Jan 2024 17:12:10 +0800, Jason Wang wrote:
> > On Tue, Jan 30, 2024 at 7:42 PM Xuan Zhuo
> > wrote:
> > >
> > > This commit structure the indirect desc table.
> > > Then we c
On Tue, Jan 30, 2024 at 7:43 PM Xuan Zhuo wrote:
>
> Export the premapped to drivers, then drivers can check
> the vq premapped mode after the find_vqs().
This looks odd, it's the charge of the driver to set premapped, so it
should know it?
Thanks
On Tue, Jan 30, 2024 at 7:43 PM Xuan Zhuo wrote:
>
> If the xsk is enabling, the xsk tx will share the send queue.
> But the xsk requires that the send queue use the premapped mode.
> So the send queue must support premapped mode.
>
> Signed-off-by: Xuan Zhuo
> ---
> drivers/net/virtio_net.c | 1
On Tue, Jan 30, 2024 at 7:42 PM Xuan Zhuo wrote:
>
> Now, we pass multi parameters to find_vqs. These parameters
> may work for transport or work for vring.
>
> And find_vqs has multi implements in many places:
>
> But every time,
> arch/um/drivers/virtio_uml.c
> drivers/platform/mellanox/mlxbf-
On Tue, Jan 30, 2024 at 7:42 PM Xuan Zhuo wrote:
>
> This commit structure the indirect desc table.
> Then we can get the desc num directly when doing unmap.
>
> And save the dma info to the struct, then the indirect
> will not use the dma fields of the desc_extra. The subsequent
> commits will ma
On Tue, Jan 30, 2024 at 7:42 PM Xuan Zhuo wrote:
>
> Just like find_vqs(), it is time to refactor the
> vring_new_virtqueue(). We pass the similar struct to
> vring_new_virtqueue.
>
Well, the vring_create_virtqueue() is converted with a structure.
We need to be consistent. And it seems better to
On Tue, Jan 30, 2024 at 7:42 PM Xuan Zhuo wrote:
>
> In the functions vring_unmap_one_split and
> vring_unmap_one_split_indirect,
> multiple checks are made whether unmap is performed and whether it is
> INDIRECT.
>
> These two functions are usually called in a loop, and we should put the
> check
On Tue, Jan 30, 2024 at 7:42 PM Xuan Zhuo wrote:
>
> This commit structure the indirect desc table.
> Then we can get the desc num directly when doing unmap.
>
> And save the dma info to the struct, then the indirect
> will not use the dma fields of the desc_extra. The subsequent
> commits will ma
On Tue, Jan 30, 2024 at 7:42 PM Xuan Zhuo wrote:
>
> In the functions vring_unmap_extra_packed and vring_unmap_desc_packed,
> multiple checks are made whether unmap is performed and whether it is
> INDIRECT.
>
> These two functions are usually called in a loop, and we should put the
> check outsid
On Tue, Jan 30, 2024 at 7:42 PM Xuan Zhuo wrote:
>
> As discussed:
> http://lore.kernel.org/all/CACGkMEug-=C+VQhkMYSgUKMC==04m7-uem_yc21bggkkzh8...@mail.gmail.com
>
> When the vq is premapped mode, the driver manages the dma
> info is a good way.
>
> So this commit make the virtio core not to stor
ue
> 3. truetrue false
>
> Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
Thanks
On Mon, Aug 1, 2022 at 2:13 PM Xuan Zhuo wrote:
>
> On Mon, 1 Aug 2022 12:49:12 +0800, Jason Wang wrote:
> > On Thu, Jul 28, 2022 at 7:27 PM Xuan Zhuo
> > wrote:
> > >
> > > On Thu, 28 Jul 2022 17:04:36 +0800, Jason Wang
> > > wrote:
>
On Thu, Jul 28, 2022 at 7:27 PM Xuan Zhuo wrote:
>
> On Thu, 28 Jul 2022 17:04:36 +0800, Jason Wang wrote:
> > On Thu, Jul 28, 2022 at 4:18 PM Xuan Zhuo
> > wrote:
> > >
> > > On Thu, 28 Jul 2022 15:42:50 +0800, Jason Wang
> > > wrote:
>
On Thu, Jul 28, 2022 at 4:18 PM Xuan Zhuo wrote:
>
> On Thu, 28 Jul 2022 15:42:50 +0800, Jason Wang wrote:
> > On Thu, Jul 28, 2022 at 3:24 PM Xuan Zhuo
> > wrote:
> > >
> > > On Thu, 28 Jul 2022 10:38:51 +0800, Jason Wang
> > > wrote:
>
On Thu, Jul 28, 2022 at 3:24 PM Xuan Zhuo wrote:
>
> On Thu, 28 Jul 2022 10:38:51 +0800, Jason Wang wrote:
> > On Wed, Jul 27, 2022 at 3:44 PM Xuan Zhuo
> > wrote:
> > >
> > > On Wed, 27 Jul 2022 11:12:19 +0800, Jason Wang
> > > wrote:
&g
On Wed, Jul 27, 2022 at 3:44 PM Xuan Zhuo wrote:
>
> On Wed, 27 Jul 2022 11:12:19 +0800, Jason Wang wrote:
> >
> > 在 2022/7/26 15:21, Xuan Zhuo 写道:
> > > virtio ring split supports resize.
> > >
> > > Only after the new vring is successfully allocate
On Wed, Jul 27, 2022 at 3:36 PM Xuan Zhuo wrote:
>
> On Wed, 27 Jul 2022 10:58:05 +0800, Jason Wang wrote:
> >
> > 在 2022/7/26 15:21, Xuan Zhuo 写道:
> > > There is currently only one place to reference __vring_new_virtqueue()
> > > directly from
enable the queue
This patch implements virtio_reset_vq(), virtio_enable_resetq() in the
pci scenario.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_pci_common.c | 12 +++-
drivers/virtio/virtio_pci_modern.c | 88 ++
2 files changed
在 2022/7/26 15:22, Xuan Zhuo 写道:
Introduce a function to initialize vq without allocating new ring,
desc_state, desc_extra.
Subsequent patches will call this function after reset vq to
reinitialize vq.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c
在 2022/7/26 15:22, Xuan Zhuo 写道:
Separate the logic of attach vring, the subsequent patch will call it
separately.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 19 +++
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a
Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 28 +---
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 32590d763c3b..fc4e3db9f93b 100644
--- a/drivers/virtio/virtio_ring.c
在 2022/7/26 15:22, Xuan Zhuo 写道:
Separate the logic for alloc desc_state and desc_extra, which will
be called separately by subsequent patches.
Use struct vring_packed to pass desc_state, desc_extra.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 48
在 2022/7/26 15:22, Xuan Zhuo 写道:
Separate the logic of packed to create vring queue.
This feature is required for subsequent virtuqueue reset vring.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 80 +++-
1 file
在 2022/7/26 15:22, Xuan Zhuo 写道:
Free the structure struct vring_vritqueue_packed.
Subsequent patches require it.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a/drivers
在 2022/7/26 15:21, Xuan Zhuo 写道:
Separate the logic of creating desc_state, desc_extra, and subsequent
patches will call it independently.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 51 +---
1 file changed, 35
在 2022/7/26 15:21, Xuan Zhuo 写道:
Separate the logic of split to create vring queue.
This feature is required for subsequent virtuqueue reset vring.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 65 ++--
1 file
-initialize(virtqueue_reinit_split()) the
virtqueue to ensure that the vring can be used.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 34 ++
1 file changed, 34 insertions(+)
diff --git a/drivers/virtio/virtio_ring.c b/drivers
在 2022/7/26 15:21, Xuan Zhuo 写道:
__vring_new_virtqueue() instead accepts struct vring_virtqueue_split.
The purpose of this is to pass more information into
__vring_new_virtqueue() to make the code simpler and the structure
cleaner.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
, int num, struct
virtio_device *vdev)
memset(info->ring, 0, vring_size(num, 4096));
vring_init(&info->vring, num, info->ring, 4096);
Let's remove the duplicated vring_init() here.
With this removed:
Acked-by: Jason Wang
- info->vq = __vring_new_virt
On Mon, Jul 25, 2022 at 3:23 PM Xuan Zhuo wrote:
>
> On Mon, 25 Jul 2022 14:57:11 +0800, Jason Wang wrote:
> > On Mon, Jul 25, 2022 at 2:43 PM Xuan Zhuo
> > wrote:
> > >
> > > On Thu, 21 Jul 2022 17:25:59 +0800, Jason Wang
> > > wrote:
&g
On Mon, Jul 25, 2022 at 2:43 PM Xuan Zhuo wrote:
>
> On Thu, 21 Jul 2022 17:25:59 +0800, Jason Wang wrote:
> >
> > 在 2022/7/20 11:04, Xuan Zhuo 写道:
> > > This patch implements the resize function of the rx queues.
> > > Based on this function, it is po
在 2022/7/20 11:04, Xuan Zhuo 写道:
This patch implements the resize function of the tx queues.
Based on this function, it is possible to modify the ring num of the
queue.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/net/virtio_net.c | 47
在 2022/7/20 11:04, Xuan Zhuo 写道:
This patch implements the resize function of the rx queues.
Based on this function, it is possible to modify the ring num of the
queue.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 22 ++
1 file changed, 22 insertions(+)
diff
, the meaning of size is the largest size, because
it may be limited by memory, the virtio core will try a smaller size.
And the size is power of 2.
Signed-off-by: Xuan Zhuo
Acked-by: Hans de Goede
Reviewed-by: Mathieu Poirier
Acked-by: Jason Wang
---
arch/um/drivers/virtio_uml.c
: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 69
include/linux/virtio.h | 3 ++
2 files changed, 72 insertions(+)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index b092914e9dcd..cf4379175163
在 2022/7/20 11:04, Xuan Zhuo 写道:
This patch implements virtio pci support for QUEUE RESET.
Performing reset on a queue is divided into these steps:
1. notify the device to reset the queue
2. recycle the buffer submitted
3. reset the vring (may re-alloc)
4. mmap vring to device, and ena
在 2022/7/20 11:04, Xuan Zhuo 写道:
Add queue_reset in virtio_pci_common_cfg.
https://github.com/oasis-tcs/virtio-spec/issues/124
https://github.com/oasis-tcs/virtio-spec/issues/139
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
include/linux/virtio_pci_modern.h | 2 +-
include
在 2022/7/20 11:04, Xuan Zhuo 写道:
Introduce a new member reset to the structure virtqueue to determine
whether the current vq is in the reset state. Subsequent patches will
use it.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 2 ++
include/linux
在 2022/7/20 11:04, Xuan Zhuo 写道:
This patch allows the new introduced
__virtqueue_break()/__virtqueue_unbreak() to break/unbreak the
virtqueue.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 24
include/linux/virtio.h
在 2022/7/20 11:04, Xuan Zhuo 写道:
Separate the logic of split to create vring queue.
This feature is required for subsequent virtuqueue reset vring.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 68 ++--
1 file changed, 42 insertions(+), 26 dele
在 2022/7/20 11:04, Xuan Zhuo 写道:
Free the structure struct vring_vritqueue_split.
Subsequent patches require it.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/drivers/virtio
在 2022/7/20 11:04, Xuan Zhuo 写道:
Separate the logic of virtqueue initialization. This logic is irrelevant
to ring layout.
This logic can be called independently when implementing resize/reset
later.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 61
the queue
In order to support queue reset, add two callbacks in struct
virtio_config_ops to implement steps 1 and 4.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
include/linux/virtio_config.h | 14 ++
1 file changed, 14 insertions(+)
diff --git a/include/linux
: Jason Wang
---
arch/um/drivers/virtio_uml.c | 1 +
drivers/platform/mellanox/mlxbf-tmfifo.c | 2 ++
drivers/remoteproc/remoteproc_virtio.c | 2 ++
drivers/s390/virtio/virtio_ccw.c | 3 +++
drivers/virtio/virtio_mmio.c | 2 ++
drivers/virtio
The double `in' is duplicated in line 172, remove one.
Signed-off-by: Jason Wang
---
arch/um/kernel/physmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c
index e7c7b53a1435..91485119ae67 100644
--- a/arch/um/k
On Fri, Jul 15, 2022 at 4:32 PM Xuan Zhuo wrote:
>
> On Fri, 8 Jul 2022 14:23:57 +0800, Jason Wang wrote:
> > On Tue, Jul 5, 2022 at 10:01 AM Xuan Zhuo
> > wrote:
> > >
> > > On Mon, 4 Jul 2022 11:45:52 +0800, Jason Wang wrote:
> > > >
> &g
On Fri, Jul 15, 2022 at 4:37 PM Xuan Zhuo wrote:
>
> On Fri, 8 Jul 2022 14:20:52 +0800, Jason Wang wrote:
> > On Tue, Jul 5, 2022 at 10:00 AM Xuan Zhuo
> > wrote:
> > >
> > > On Mon, 4 Jul 2022 11:44:12 +0800, Jason Wang wrote:
> > > >
> &g
On Tue, Jul 5, 2022 at 10:01 AM Xuan Zhuo wrote:
>
> On Mon, 4 Jul 2022 11:45:52 +0800, Jason Wang wrote:
> >
> > 在 2022/6/29 14:56, Xuan Zhuo 写道:
> > > This patch implements the resize function of the tx queues.
> > > Based on this function, it is po
On Tue, Jul 5, 2022 at 10:00 AM Xuan Zhuo wrote:
>
> On Mon, 4 Jul 2022 11:44:12 +0800, Jason Wang wrote:
> >
> > 在 2022/6/29 14:56, Xuan Zhuo 写道:
> > > This patch implements the resize function of the rx queues.
> > > Based on this function, it is po
在 2022/7/4 10:13, Xuan Zhuo 写道:
On Fri, 1 Jul 2022 17:27:48 +0800, Jason Wang wrote:
在 2022/6/29 14:56, Xuan Zhuo 写道:
virtio ring packed supports resize.
Only after the new vring is successfully allocated based on the new num,
we will release the old vring. In any case, an error is returned
在 2022/7/1 16:45, Xuan Zhuo 写道:
On Fri, 1 Jul 2022 16:26:25 +0800, Jason Wang wrote:
在 2022/6/29 14:56, Xuan Zhuo 写道:
Separate the logic of split to create vring queue.
This feature is required for subsequent virtuqueue reset vring.
Signed-off-by: Xuan Zhuo
---
drivers/virtio
在 2022/7/1 17:36, Jason Wang 写道:
在 2022/7/1 14:31, Michael S. Tsirkin 写道:
On Wed, Jun 29, 2022 at 02:56:41PM +0800, Xuan Zhuo wrote:
This patch allows the new introduced
__virtqueue_break()/__virtqueue_unbreak() to break/unbreak the
virtqueue.
Signed-off-by: Xuan Zhuo
I wonder how this
在 2022/6/29 14:56, Xuan Zhuo 写道:
This patch implements the resize function of the tx queues.
Based on this function, it is possible to modify the ring num of the
queue.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 48
1 file changed, 48 in
在 2022/6/29 14:56, Xuan Zhuo 写道:
This patch implements the resize function of the rx queues.
Based on this function, it is possible to modify the ring num of the
queue.
Signed-off-by: Xuan Zhuo
---
drivers/net/virtio_net.c | 22 ++
1 file changed, 22 insertions(+)
diff
在 2022/6/29 14:56, Xuan Zhuo 写道:
This patch implements virtio pci support for QUEUE RESET.
Performing reset on a queue is divided into these steps:
1. notify the device to reset the queue
2. recycle the buffer submitted
3. reset the vring (may re-alloc)
4. mmap vring to device, and ena
在 2022/6/29 14:56, Xuan Zhuo 写道:
Introduce new helpers to implement queue reset and get queue reset
status.
https://github.com/oasis-tcs/virtio-spec/issues/124
https://github.com/oasis-tcs/virtio-spec/issues/139
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio
在 2022/7/1 14:31, Michael S. Tsirkin 写道:
On Wed, Jun 29, 2022 at 02:56:41PM +0800, Xuan Zhuo wrote:
This patch allows the new introduced
__virtqueue_break()/__virtqueue_unbreak() to break/unbreak the
virtqueue.
Signed-off-by: Xuan Zhuo
I wonder how this interacts with the hardening patches.
在 2022/6/29 14:56, Xuan Zhuo 写道:
Add queue_notify_data in struct virtio_pci_common_cfg, which comes from
here https://github.com/oasis-tcs/virtio-spec/issues/89
Since I want to add queue_reset after queue_notify_data, I submitted
this patch first.
Signed-off-by: Xuan Zhuo
Acked-by: Jason
在 2022/6/29 14:56, Xuan Zhuo 写道:
In order to facilitate the expansion of virtio_pci_common_cfg in the
future, move it from uapi to virtio_pci_modern.h. In this way, we can
freely expand virtio_pci_common_cfg in the future.
Other projects using virtio_pci_common_cfg in uapi need to maintain a
se
在 2022/6/29 14:56, Xuan Zhuo 写道:
Introduce virtqueue_resize() to implement the resize of vring.
Based on these, the driver can dynamically adjust the size of the vring.
For example: ethtool -G.
virtqueue_resize() implements resize based on the vq reset function. In
case of failure to allocate a
在 2022/6/29 14:56, Xuan Zhuo 写道:
virtio ring packed supports resize.
Only after the new vring is successfully allocated based on the new num,
we will release the old vring. In any case, an error is returned,
indicating that the vring still points to the old vring.
In the case of an error, re-i
vq->split.may_reduce_num);
+ if (err)
+ goto err;
It's better to have decouple the allocation future more to avoid any
rewind here in the future.
But the patch should be fine.
So
Acked-by: Jason Wang
+
+ err = vring_alloc_state_extra_split(&v
在 2022/6/29 14:56, Xuan Zhuo 写道:
In vring_create_virtqueue_split() save vring_align, may_reduce_num to
structure vring_virtqueue_split. Used to create a new vring when
implementing resize .
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 9
Acked-by: Jason Wang
---
drivers/virtio/virtio_ring.c | 30 +++---
1 file changed, 19 insertions(+), 11 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 9025bd373d3b..35540daaa1e7 100644
--- a/drivers/virtio
s assignment for
queue_dma_addr/queue_size_in_bytes can keep the same as the original
code.
On the other hand, subsequent patches can use the "struct
vring_virtqueue_split split" obtained by vring_alloc_queue_split() to
directly complete the attach operation.
Signed-off-by: Xuan Zhu
在 2022/6/29 14:56, Xuan Zhuo 写道:
Separate the logic of creating desc_state, desc_extra, and subsequent
patches will call it independently.
Since only the structure vring is passed into __vring_new_virtqueue(),
when creating the function vring_alloc_state_extra_split(), we prefer to
use vring_vi
在 2022/6/29 14:56, Xuan Zhuo 写道:
Separate the logic of split to create vring queue.
This feature is required for subsequent virtuqueue reset vring.
Signed-off-by: Xuan Zhuo
---
drivers/virtio/virtio_ring.c | 68 ++--
1 file changed, 42 insertions(+), 26 dele
by: Xuan Zhuo
Acked-by: Jason Wang
> ---
> drivers/virtio/virtio_ring.c | 116 ++-
> 1 file changed, 60 insertions(+), 56 deletions(-)
>
> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
> index bb4e8ae09c9b..2806e033a651 1
On Wed, Jun 29, 2022 at 2:57 PM Xuan Zhuo wrote:
>
> reset can be divided into the following four steps (example):
> 1. transport: notify the device to reset the queue
> 2. vring: recycle the buffer submitted
> 3. vring: reset/resize the vring (may re-alloc)
> 4. transport: mmap vring
On Wed, Jun 29, 2022 at 2:57 PM Xuan Zhuo wrote:
>
> Record the maximum queue num supported by the device.
>
> virtio-net can display the maximum (supported by hardware) ring size in
> ethtool -g eth0.
>
> When the subsequent patch implements vring reset, it can judge whether
> the ring size passe
On Tue, Jun 28, 2022 at 2:10 PM Michael S. Tsirkin wrote:
>
> On Tue, Jun 28, 2022 at 02:07:28PM +0800, Jason Wang wrote:
> > On Tue, Jun 28, 2022 at 1:46 PM Michael S. Tsirkin wrote:
> > >
> > > On Tue, Jun 28, 2022 at 11:50:37AM +0800, Jason Wang wrote:
> >
On Tue, Jun 28, 2022 at 1:46 PM Michael S. Tsirkin wrote:
>
> On Tue, Jun 28, 2022 at 11:50:37AM +0800, Jason Wang wrote:
> > On Mon, Jun 27, 2022 at 7:53 PM Michael S. Tsirkin wrote:
> > >
> > > On Mon, Jun 27, 2022 at 04:14:20PM +0800, Jason Wang wrote:
> >
On Mon, Jun 27, 2022 at 7:53 PM Michael S. Tsirkin wrote:
>
> On Mon, Jun 27, 2022 at 04:14:20PM +0800, Jason Wang wrote:
> > On Mon, Jun 27, 2022 at 3:58 PM Michael S. Tsirkin wrote:
> > >
> > > On Mon, Jun 27, 2022 at 03:45:30PM +0800, Jason Wang wrote:
> >
On Mon, Jun 27, 2022 at 3:58 PM Michael S. Tsirkin wrote:
>
> On Mon, Jun 27, 2022 at 03:45:30PM +0800, Jason Wang wrote:
> > On Mon, Jun 27, 2022 at 2:39 PM Michael S. Tsirkin wrote:
> > >
> > > On Mon, Jun 27, 2022 at 10:30:42AM +0800, Jason Wang wrote:
> >
On Mon, Jun 27, 2022 at 2:39 PM Michael S. Tsirkin wrote:
>
> On Mon, Jun 27, 2022 at 10:30:42AM +0800, Jason Wang wrote:
> > On Fri, Jun 24, 2022 at 2:59 PM Michael S. Tsirkin wrote:
> > >
> > > On Fri, Jun 24, 2022 at 10:56:05AM +0800, Xuan Zhuo wrote:
> >
1 - 100 of 156 matches
Mail list logo