virtio queue numbering and optional queues

2023-08-21 Thread Daniel Verkamp
Hello virtio folks, I noticed a mismatch between the way the specification defines device-specific virtqueue indexes and the way device and driver implementers have interpreted the specification. As a practical example, consider the traditional memory balloon device [1]. The first two queues

[PATCH v2 2/2] virtio-pci: check name when counting MSI-X vectors

2020-01-03 Thread Daniel Verkamp
lloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT") Reviewed-by: Cornelia Huck Signed-off-by: Daniel Verkamp --- v1: https://lists.linuxfoundation.org/pipermail/virtualization/2019-December/044828.html drivers/virtio/virtio_pci_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/virtio/virtio_pc

[PATCH v2 1/2] virtio-balloon: initialize all vq callbacks

2020-01-03 Thread Daniel Verkamp
; however, the uninitialized callbacks elements would still be read in vp_find_vqs_msix() and used to calculate the number of MSI-X vectors required. Cc: sta...@vger.kernel.org Fixes: 86a559787e6f ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT") Reviewed-by: Cornelia Huck Signed-off-

Re: [PATCH 1/2] virtio-balloon: initialize all vq callbacks

2019-12-17 Thread Daniel Verkamp
On Tue, Dec 17, 2019 at 12:05 PM Michael S. Tsirkin wrote: > > On Tue, Dec 17, 2019 at 11:06:09AM -0800, Daniel Verkamp wrote: > > Ensure that elements of the array that correspond to unavailable > > features are set to NULL; previously, they would be left uninitiali

[PATCH 1/2] virtio-balloon: initialize all vq callbacks

2019-12-17 Thread Daniel Verkamp
, the uninitialized callbacks elements would still be read in vp_find_vqs_msix() and used to calculate the number of MSI-X vectors required. Fixes: 86a559787e6f ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT") Signed-off-by: Daniel Verkamp --- drivers/virtio/virtio_balloon.c | 2 ++ 1 file

[PATCH 2/2] virtio-pci: check name when counting MSI-X vectors

2019-12-17 Thread Daniel Verkamp
to the per_vq_vectors loop so that vectors with no name are not counted to make the two loops consistent. This prevents over-counting unnecessary vectors (e.g. for features which were not negotiated with the device). Signed-off-by: Daniel Verkamp --- drivers/virtio/virtio_pci_common.c | 2 +- 1 file

Re: [PATCH] virtio-balloon: request nvqs based on features

2019-12-17 Thread Daniel Verkamp
On Tue, Dec 17, 2019 at 1:11 AM Cornelia Huck wrote: > > On Mon, 16 Dec 2019 15:14:29 -0800 > Daniel Verkamp wrote: > > > After 86a559787e6f ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT"), > > the virtio-balloon device unconditionally specifies 4 virtqueu

[PATCH] virtio-balloon: request nvqs based on features

2019-12-16 Thread Daniel Verkamp
s assigned a fixed index. Signed-off-by: Daniel Verkamp --- drivers/virtio/virtio_balloon.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 93f995f6cf36..67c6318d77c7 100644 --- a/drivers/virtio/virtio

Regression with "arm64: KVM: Skip MMIO insn after emulation" on 4.4 stable

2019-02-27 Thread Daniel Verkamp
Hello, In my testing of crosvm[1] with Linux 4.4.175, I am observing failures on a 'kevin' Chromebook (RK3399) device - the guest kernel does not even get to the point of printing its first messages, and the host seems to be spinning at 100% CPU in KVM_RUN. I narrowed this down to the 4.4 stable

Re: [PATCH v9] virtio_blk: add discard and write zeroes support

2018-11-03 Thread Daniel Verkamp
: > > Hi Daniel, > > Other than crosvm, is there any version of qemu (e.g., repositories developed > in > progress on github) where I can try with this feature? > > Thank you very much! > > Dongli Zhang > > On 11/02/2018 06:40 AM, Daniel Verkamp wrote: > > From:

[PATCH v9] virtio_blk: add discard and write zeroes support

2018-11-02 Thread Daniel Verkamp
ch enables support for discard and write zeroes in the virtio-blk driver when the device advertises the corresponding features, VIRTIO_BLK_F_DISCARD and VIRTIO_BLK_F_WRITE_ZEROES. Signed-off-by: Changpeng Liu Signed-off-by: Daniel Verkamp --- dverkamp: I've picked up this patch and made a few min

Re: [PATCH v8] virtio_blk: add discard and write zeroes support

2018-11-02 Thread Daniel Verkamp
t; > > On Fri, Oct 12, 2018 at 02:06:28PM -0700, Daniel Verkamp wrote: > > > > > + range[n].flags = cpu_to_le32(flags); > > > > > + range[n].num_sectors = cpu_to_le32(num_sectors); > > > > > + range[n].sect

Re: [PATCH v8] virtio_blk: add discard and write zeroes support

2018-10-15 Thread Daniel Verkamp
On Mon, Oct 15, 2018 at 2:27 AM Christoph Hellwig wrote: > On Fri, Oct 12, 2018 at 02:06:28PM -0700, Daniel Verkamp wrote: > > From: Changpeng Liu > > > > In commit 88c85538, "virtio-blk: add discard and write zeroes features > > to specification" (htt

[PATCH v8] virtio_blk: add discard and write zeroes support

2018-10-12 Thread Daniel Verkamp
ch enables support for discard and write zeroes in the virtio-blk driver when the device advertises the corresponding features, VIRTIO_BLK_F_DISCARD and VIRTIO_BLK_F_WRITE_ZEROES. Signed-off-by: Changpeng Liu Signed-off-by: Daniel Verkamp --- dverkamp: I've picked up this patch and made a few min

[PATCH v7] virtio_blk: add discard and write zeroes support

2018-08-28 Thread Daniel Verkamp
ch enables support for discard and write zeroes in the virtio-blk driver when the device advertises the corresponding features, VIRTIO_BLK_F_DISCARD and VIRTIO_BLK_F_WRITE_ZEROES. Signed-off-by: Changpeng Liu Signed-off-by: Daniel Verkamp --- dverkamp: I've picked up this patch and made a few min