Re: [virtio-dev] Re: [PATCH v2 0/1] VirtIO video device specification

2020-01-20 Thread Gerd Hoffmann
> > > Can't this problem be solved by adding "offset" field in > > > virtio_video_mem_entry? > > > > > > struct virtio_video_mem_entry { > > > le64 addr; > > > le32 length; > > > le32 offset; > > > u8 padding[4]; > > > }; > > > > > > Here, "addr" must be the same in every mem_entry for (1)

[virtio-dev] [PATCH v2 1/5] virtio-mmio: Add feature bit for MMIO notification

2020-01-20 Thread Jing Liu
All the queues notifications use the same register on MMIO transport layer. Add a feature bit (39) for enhancing the notification capability. The detailed mechanism would be in next patch. Co-developed-by: Chao Peng Signed-off-by: Chao Peng Co-developed-by: Liu Jiang Signed-off-by: Liu Jiang C

[virtio-dev] [PATCH v2 5/5] virtio-mmio: MSI vector and event mapping

2020-01-20 Thread Jing Liu
Bit 1 msi_sharing reported in the MsiState register indicates the mapping mode device uses. Bit 1 is 0 - device uses MSI non-sharing mode. This indicates vector per event and fixed static vectors and events relationship. This fits for devices with a high interrupt rate and best performance; Bit

[virtio-dev] [PATCH v2 3/5] virtio-mmio: Add feature bit for MMIO MSI

2020-01-20 Thread Jing Liu
The current MMIO transport layer uses a single, dedicated interrupt signal, which brings performance penalty. Add a feature bit (40) for introducing MSI capability. Co-developed-by: Chao Peng Signed-off-by: Chao Peng Co-developed-by: Liu Jiang Signed-off-by: Liu Jiang Co-developed-by: Zha Bin

[virtio-dev] [PATCH v2 0/5] virtio-mmio enhancement

2020-01-20 Thread Jing Liu
The current virtio over MMIO has some limitations that impact the performance. It only supports single legacy, dedicated interrupt and one virtqueue notification register for all virtqueues which cause performance penalties. To address such limitations, we proposed to update virtio-mmio spec with

[virtio-dev] [PATCH v2 4/5] virtio-mmio: Introduce MSI details

2020-01-20 Thread Jing Liu
With VIRTIO_F_MMIO_MSI feature bit offered, the Message Signal Interrupts (MSI) is supported as first priority. For any reason it fails to use MSI, it need use the single dedicated interrupt as before. For MSI vectors and events mapping relationship, introduce in next patch. Co-developed-by: Chao

[virtio-dev] [PATCH v2 2/5] virtio-mmio: Enhance queue notification support

2020-01-20 Thread Jing Liu
With VIRTIO_F_MMIO_NOTIFICATION feature bit offered, the notification mechanism is enhanced. Driver reads QueueNotify register to get notification structure and calculate notification addresses of each virtqueue. Co-developed-by: Chao Peng Signed-off-by: Chao Peng Co-developed-by: Liu Jiang Sig

Re: [virtio-dev] Re: [PATCH v1 2/2] virtio-mmio: add features for virtio-mmio specification version 3

2020-01-20 Thread Liu, Jing2
On 1/5/2020 7:04 PM, Michael S. Tsirkin wrote: struct virtio_mmio_vq_info { @@ -101,6 +107,8 @@ struct virtio_mmio_vq_info { }; +static void vm_free_msi_irqs(struct virtio_device *vdev); +static int vm_request_msi_vectors(struct virtio_device *vdev, int nirqs); /* Configura

Re: [virtio-dev] Re: [PATCH v2 0/1] VirtIO video device specification

2020-01-20 Thread Keiichi Watanabe
Hi, On Mon, Jan 20, 2020 at 7:48 PM Gerd Hoffmann wrote: > > Hi, > > > > Hmm, using (ii) the API, then check whenever your three plane buffers > > > happen to have the correct layout for (1) hardware looks somewhat > > > backwards to me. > > > > Can't this problem be solved by adding "offset" f

Re: [virtio-dev] Re: [PATCH v2 0/1] VirtIO video device specification

2020-01-20 Thread Gerd Hoffmann
Hi, > > Hmm, using (ii) the API, then check whenever your three plane buffers > > happen to have the correct layout for (1) hardware looks somewhat > > backwards to me. > > Can't this problem be solved by adding "offset" field in > virtio_video_mem_entry? > > struct virtio_video_mem_entry { >