Re: [PATCH v4 1/1] vringh: IOMEM support

2023-06-04 Thread Shunsuke Mie
Hi Simon-san, On 2023/06/03 23:40, Simon Horman wrote: On Fri, Jun 02, 2023 at 02:52:11PM +0900, Shunsuke Mie wrote: 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

Re: [PATCH v4 1/1] vringh: IOMEM support

2023-06-04 Thread Shunsuke Mie
+x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/de2a1f5220c32e953400f225aba6bd294a8d41b8 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Shunsuke-Mie/vringh-IOMEM-support/20230602-135351 git

[PATCH v4 1/1] vringh: IOMEM support

2023-06-01 Thread Shunsuke Mie
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 --- drivers/vhost/vringh.c | 201 + include/linux/vringh.h | 32 +++ 2 files changed, 233 insertions

[PATCH v4 0/1] Introduce a vringh accessor for IO memory

2023-06-01 Thread Shunsuke Mie
functions - Remove duplicated newlines rfc v2: https://lore.kernel.org/virtualization/20230202090934.549556-8-...@igel.co.jp/ - Focus on a adding io memory APIs - Rebase on next-20230414 rfc v1: https://lore.kernel.org/virtualization/20221227022528.609839-1-...@igel.co.jp/ - Initial patchset Shunsuke

Re: [RFC PATCH v2 3/3] PCI: endpoint: Add EP function driver to provide virtio-console functionality

2023-05-31 Thread Shunsuke Mie
I'm sorry for late response. On 2023/05/19 11:01, Jason Wang wrote: On Thu, May 18, 2023 at 5:54 PM Shunsuke Mie wrote: Gentle ping ... Thanks, Shunsuke. On 2023/05/10 12:17, Shunsuke Mie wrote: Hi Json, 2023年5月8日(月) 13:03 Jason Wang : On Thu, Apr 27, 2023 at 6:44 PM Shunsuke Mie wrote

Re: [RFC PATCH v2 3/3] PCI: endpoint: Add EP function driver to provide virtio-console functionality

2023-05-18 Thread Shunsuke Mie
Gentle ping ... Thanks, Shunsuke. On 2023/05/10 12:17, Shunsuke Mie wrote: Hi Json, 2023年5月8日(月) 13:03 Jason Wang : On Thu, Apr 27, 2023 at 6:44 PM Shunsuke Mie wrote: Add a new PCIe endpoint function driver that works as a pci virtio-console device. The console connect to endpoint side

Re: [RFC PATCH v2 1/3] PCI: endpoint: introduce a helper to implement pci ep virtio function

2023-05-09 Thread Shunsuke Mie
I'll fix the typo and some styles you mentioned. In this e-mail, I reply to the other comments. 2023年4月28日(金) 3:28 Bjorn Helgaas : > > Simple typos, don't repost until there's more substantive feedback. > > On Thu, Apr 27, 2023 at 07:44:26PM +0900, Shunsuke Mie wrote: > > The L

Re: [RFC PATCH v2 2/3] virtio_pci: add a definition of queue flag in ISR

2023-05-09 Thread Shunsuke Mie
2023年5月8日(月) 12:59 Jason Wang : > > On Thu, Apr 27, 2023 at 6:44 PM Shunsuke Mie wrote: > > > > Already it has beed defined a config changed flag of ISR, but not the queue > > Typo should be "been". Thanks for pointing that out. > > flag. Add a macro for

Re: [RFC PATCH v2 3/3] PCI: endpoint: Add EP function driver to provide virtio-console functionality

2023-05-09 Thread Shunsuke Mie
Hi Json, 2023年5月8日(月) 13:03 Jason Wang : > > On Thu, Apr 27, 2023 at 6:44 PM Shunsuke Mie wrote: > > > > Add a new PCIe endpoint function driver that works as a pci virtio-console > > device. The console connect to endpoint side console. It enables to > > comm

Re: [RFC PATCH v2 3/3] PCI: endpoint: Add EP function driver to provide virtio-console functionality

2023-05-09 Thread Shunsuke Mie
Hi Bjorn, Thanks for the many comments. I will fix the mannerisms and typos as noted. 2023年4月28日(金) 3:09 Bjorn Helgaas : > > Random typos and trivial things. No need to repost until somebody > does a more substantive review. > > On Thu, Apr 27, 2023 at 07:44:28PM +0900, Shu

Re: [PATCH v3] vringh: IOMEM support

2023-04-27 Thread Shunsuke Mie
Hi Simon-san, 2023年4月27日(木) 4:21 Simon Horman : > > On Tue, Apr 25, 2023 at 07:22:50PM +0900, Shunsuke Mie wrote: > > Introduce a new memory accessor for vringh. It is able to use vringh to > > virtio rings located on io-memory region. > > > > Signed-off-by: Shunsu

Re: [PATCH v3] vringh: IOMEM support

2023-04-27 Thread Shunsuke Mie
2023年4月26日(水) 15:10 Jason Wang : > > On Tue, Apr 25, 2023 at 6:23 PM Shunsuke Mie wrote: > > > > Introduce a new memory accessor for vringh. It is able to use vringh to > > virtio rings located on io-memory region. > > Is there a user for this? It would be better

[RFC PATCH v2 3/3] PCI: endpoint: Add EP function driver to provide virtio-console functionality

2023-04-27 Thread Shunsuke Mie
/hvc0. As an example of usage, by setting getty to /dev/hvc0, it is possible to login to another host. Signed-off-by: Shunsuke Mie --- Changes from v2: - Change to use copy functions between kiovs of pci-epf-virtio. drivers/pci/endpoint/functions/Kconfig| 12 + drivers/pci/endpoint

[RFC PATCH v2 0/3] Introduce a PCIe endpoint virtio console

2023-04-27 Thread Shunsuke Mie
on next-20230416 and RCar S4 board as PCIe endpoint. Shunsuke Mie (3): PCI: endpoint: introduce a helper to implement pci ep virtio function virtio_pci: add a definition of queue flag in ISR PCI: endpoint: Add EP function driver to provide virtio-console functionality drivers/pci

[RFC PATCH v2 2/3] virtio_pci: add a definition of queue flag in ISR

2023-04-27 Thread Shunsuke Mie
Already it has beed defined a config changed flag of ISR, but not the queue flag. Add a macro for it. Signed-off-by: Shunsuke Mie --- include/uapi/linux/virtio_pci.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/uapi/linux/virtio_pci.h b/include/uapi/linux/virtio_pci.h index

[RFC PATCH v2 1/3] PCI: endpoint: introduce a helper to implement pci ep virtio function

2023-04-27 Thread Shunsuke Mie
provide. - epf_virtio_memcpy_kiov2kiov() While this patch provides functions for negotiating with host drivers and copying data, each PCIe function driver must impl ement operations that depend on each specific device, such as network, block, etc. Signed-off-by: Shunsuke Mie --- Changes from v2

[PATCH v3] vringh: IOMEM support

2023-04-25 Thread Shunsuke Mie
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

Re: [EXT] [RFC PATCH 0/3] Introduce a PCIe endpoint virtio console

2023-04-24 Thread Shunsuke Mie
2023年4月19日(水) 1:42 Frank Li : > > > > > -Original Message- > > From: Shunsuke Mie > > Sent: Tuesday, April 18, 2023 5:31 AM > > To: Frank Li ; Lorenzo Pieralisi > > Cc: Krzysztof Wilczyński ; Manivannan Sadhasivam > > ; Kishon Vijay Abrah

Re: [EXT] [RFC PATCH 0/3] Introduce a PCIe endpoint virtio console

2023-04-18 Thread Shunsuke Mie
On 2023/04/18 0:19, Frank Li wrote: -Original Message- From: Shunsuke Mie Sent: Sunday, April 16, 2023 9:12 PM To: Frank Li ; Lorenzo Pieralisi Cc: Krzysztof Wilczyński ; Manivannan Sadhasivam ; Kishon Vijay Abraham I ; Bjorn Helgaas ; Michael S. Tsirkin ; Jason Wang ; Jon Mason

[PATCH v3 RESEND 2/2] tools/virtio: fix build caused by virtio_ring changes

2023-04-16 Thread Shunsuke Mie
Fix the build dependency for virtio_test. The virtio_ring that is used from the test requires container_of_const(). Change to use container_of.h kernel header directly and adapt related codes. Signed-off-by: Shunsuke Mie --- Changes from v2: https://lore.kernel.org/virtualization

[PATCH v3 RESEND 1/2] virtio_ring: add a struct device forward declaration

2023-04-16 Thread Shunsuke Mie
The virtio_ring header file uses the struct device without a forward declaration. Signed-off-by: Shunsuke Mie --- Changes from v2: https://lore.kernel.org/virtualization/20230410074929-mutt-send-email-...@kernel.org/ - Fix a typo of commit title include/linux/virtio_ring.h | 1 + 1 file

Re: [EXT] [RFC PATCH 0/3] Introduce a PCIe endpoint virtio console

2023-04-16 Thread Shunsuke Mie
On 2023/04/14 23:39, Frank Li wrote: -Original Message- From: Shunsuke Mie Sent: Friday, April 14, 2023 7:39 AM To: Lorenzo Pieralisi Cc: Krzysztof Wilczyński ; Manivannan Sadhasivam ; Kishon Vijay Abraham I ; Bjorn Helgaas ; Michael S. Tsirkin ; Jason Wang ; Shunsuke Mie ; Frank Li

[RFC PATCH 3/3] PCI: endpoint: Add EP function driver to provide virtio-console functionality

2023-04-14 Thread Shunsuke Mie
/hvc0. As an example of usage, by setting getty to /dev/hvc0, it is possible to login to another host. Signed-off-by: Shunsuke Mie --- drivers/pci/endpoint/functions/Kconfig| 12 + drivers/pci/endpoint/functions/Makefile | 1 + drivers/pci/endpoint/functions/pci-epf-vcon.c | 554

[RFC PATCH 2/3] virtio_pci: add a definition of queue flag in ISR

2023-04-14 Thread Shunsuke Mie
Already it has beed defined a config changed flag of ISR, but not the queue flag. Add a macro for it. Signed-off-by: Shunsuke Mie --- include/uapi/linux/virtio_pci.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/uapi/linux/virtio_pci.h b/include/uapi/linux/virtio_pci.h index

[RFC PATCH 1/3] PCI: endpoint: introduce a helper to implement pci ep virtio function

2023-04-14 Thread Shunsuke Mie
this patch provides functions for negotiating with host drivers and copying data, each PCIe function driver must impl ement operations that depend on each specific device, such as network, block, etc. Signed-off-by: Shunsuke Mie --- drivers/pci/endpoint/functions/Kconfig| 7 + drivers/pci

[RFC PATCH 0/3] Introduce a PCIe endpoint virtio console

2023-04-14 Thread Shunsuke Mie
on linux-20230406 and RCar S4 board as PCIe endpoint. Shunsuke Mie (3): PCI: endpoint: introduce a helper to implement pci ep virtio function virtio_pci: add a definition of queue flag in ISR PCI: endpoint: Add EP function driver to provide virtio-console functionality drivers/pci/endpoint

Re: [EXT] [RFC PATCH 0/4] PCI: endpoint: Introduce a virtio-net EP function

2023-04-11 Thread Shunsuke Mie
On 2023/03/30 1:46, Frank Li wrote: On 2023/02/08 1:02, Frank Li wrote: Did you have chance to improve this? I'm working on it. I'll submit the next version. Best regards Frank Li Best regards, Shunsuke ___ Virtualization mailing list

[PATCH v3 2/2] tools/virtio: fix build caused by virtio_ring changes

2023-04-11 Thread Shunsuke Mie
Fix the build dependency for virtio_test. The virtio_ring that is used from the test requires container_of_const(). Change to use container_of.h kernel header directly and adapt related codes. Signed-off-by: Shunsuke Mie --- Changes from v2: - Remove an unnecessary change - Correct indentations

[PATCH v3 1/2] virtio_ring: add a struct device forward declaration

2023-04-11 Thread Shunsuke Mie
The virtio_ring header file uses the struct device without a forward declaration. Signed-off-by: Shunsuke Mie --- Changes from v2: - Fix a typo of commit title include/linux/virtio_ring.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/virtio_ring.h b/include/linux

Re: [PATCH v2 2/2] tools/virtio: fix build caused by virtio_ring changes

2023-04-10 Thread Shunsuke Mie
On 2023/04/11 4:44, Michael S. Tsirkin wrote: On Mon, Apr 10, 2023 at 08:40:34PM +0200, Greg Kroah-Hartman wrote: On Mon, Apr 10, 2023 at 08:00:33AM -0400, Michael S. Tsirkin wrote: On Mon, Apr 10, 2023 at 08:28:45PM +0900, Shunsuke Mie wrote: Fix the build dependency for virtio_test

Re: [PATCH v2 2/2] tools/virtio: fix build caused by virtio_ring changes

2023-04-10 Thread Shunsuke Mie
On 2023/04/11 3:40, Greg Kroah-Hartman wrote: On Mon, Apr 10, 2023 at 08:00:33AM -0400, Michael S. Tsirkin wrote: On Mon, Apr 10, 2023 at 08:28:45PM +0900, Shunsuke Mie wrote: Fix the build dependency for virtio_test. The virtio_ring that is used from the test requires container_of_const

[PATCH v2 1/2] virtio_ring: add a struce device forward declaration

2023-04-10 Thread Shunsuke Mie
The virtio_ring header file uses the struct device without a forward declaration. Signed-off-by: Shunsuke Mie --- include/linux/virtio_ring.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/virtio_ring.h b/include/linux/virtio_ring.h index 8b95b69ef694..77a9c2f52919 100644

[PATCH v2 2/2] tools/virtio: fix build caused by virtio_ring changes

2023-04-10 Thread Shunsuke Mie
Fix the build dependency for virtio_test. The virtio_ring that is used from the test requires container_of_const(). Change to use container_of.h kernel header directly and adapt related codes. Signed-off-by: Shunsuke Mie --- tools/include/linux/types.h | 1 - tools/virtio/linux/compiler.h

Re: [PATCH] tools/virtio: fix build caused by virtio_ring changes

2023-04-10 Thread Shunsuke Mie
On 2023/04/10 19:58, Michael S. Tsirkin wrote: On Mon, Apr 10, 2023 at 07:56:13PM +0900, Shunsuke Mie wrote: On 2023/04/10 19:00, Shunsuke Mie wrote: On 2023/04/10 18:46, Michael S. Tsirkin wrote: On Mon, Apr 10, 2023 at 06:24:19PM +0900, Shunsuke Mie wrote: Fix the build dependency

Re: [PATCH] tools/virtio: fix build caused by virtio_ring changes

2023-04-10 Thread Shunsuke Mie
On 2023/04/10 19:00, Shunsuke Mie wrote: On 2023/04/10 18:46, Michael S. Tsirkin wrote: On Mon, Apr 10, 2023 at 06:24:19PM +0900, Shunsuke Mie wrote: Fix the build dependency for virtio_test. virtio_ring requires container_of_const() and struce device. Signed-off-by: Shunsuke Mie

Re: [PATCH] tools/virtio: fix build caused by virtio_ring changes

2023-04-10 Thread Shunsuke Mie
On 2023/04/10 18:46, Michael S. Tsirkin wrote: On Mon, Apr 10, 2023 at 06:24:19PM +0900, Shunsuke Mie wrote: Fix the build dependency for virtio_test. virtio_ring requires container_of_const() and struce device. Signed-off-by: Shunsuke Mie --- tools/include/linux/container_of.h | 36

[PATCH] tools/virtio: fix build caused by virtio_ring changes

2023-04-10 Thread Shunsuke Mie
Fix the build dependency for virtio_test. virtio_ring requires container_of_const() and struce device. Signed-off-by: Shunsuke Mie --- tools/include/linux/container_of.h | 36 ++ tools/virtio/linux/compiler.h | 3 +++ tools/virtio/linux/kernel.h| 5

Re: [EXT] [RFC PATCH 0/4] PCI: endpoint: Introduce a virtio-net EP function

2023-04-04 Thread Shunsuke Mie
On 2023/03/30 1:46, Frank Li wrote: On 2023/02/08 1:02, Frank Li wrote: Did you have chance to improve this? Yes. I'm working on it.I'd like to submit new one in this week. Best regards Frank Li Best, Shunsuke, ___ Virtualization mailing

Re: [EXT] [RFC PATCH 0/4] PCI: endpoint: Introduce a virtio-net EP function

2023-02-13 Thread Shunsuke Mie
add a result of performance evaluation using iperf and etc to the future version of this patchset. Shunsuke Mie (4): virtio_pci: add a definition of queue flag in ISR virtio_ring: remove const from vring getter PCI: endpoint: Introduce virtio library for EP functions PCI: endpoint: func

Re: PCIe RC\EP virtio rdma solution discussion.

2023-02-13 Thread Shunsuke Mie
transfer is zero copied and uses a DMA queue. The Shunsuke Mie implemented the above idea. https://lore.kernel.org/linux-pci/CANXvt5q_qgLuAfF7dxxrqUirT_Ld4B=pocq8jcb9uprvcgd...@mail.gmail.com/T/#t Similar solution posted at 2019, except use memcpy from/to PCI EP map windows. Using DMA should

Re: [EXT] Re: [RFC PATCH 4/4] PCI: endpoint: function: Add EP function driver to provide virtio net device

2023-02-07 Thread Shunsuke Mie
On 2023/02/08 0:37, Frank Li wrote: but it may need update host side pci virtio driver. Thanks, is it possible to use MSI-X as well? The virtio spec indicates to use legacy irq or MSI-X only. I supposed yes. It is depend MSI controller type in EP side. But not like standard PCI MSI-X, it is

Re: [RFC PATCH 3/4] PCI: endpoint: Introduce virtio library for EP functions

2023-02-07 Thread Shunsuke Mie
2023年2月3日(金) 19:20 Michael S. Tsirkin : > > On Fri, Feb 03, 2023 at 07:04:17PM +0900, Shunsuke Mie wrote: > > Add a new library to access a virtio ring located on PCIe host memory. The > > library generates struct pci_epf_vringh that is introduced in this patch. > > The st

Re: [EXT] Re: [RFC PATCH 4/4] PCI: endpoint: function: Add EP function driver to provide virtio net device

2023-02-07 Thread Shunsuke Mie
2023年2月4日(土) 7:15 Frank Li : > > > > > Caution: EXT Email > > > > On Fri, Feb 03, 2023 at 07:04:18PM +0900, Shunsuke Mie wrote: > > > Add a new endpoint(EP) function driver to provide virtio-net device. This > > > function not only shows vir

Re: [RFC PATCH 4/4] PCI: endpoint: function: Add EP function driver to provide virtio net device

2023-02-07 Thread Shunsuke Mie
2023年2月3日(金) 19:22 Michael S. Tsirkin : > > On Fri, Feb 03, 2023 at 07:04:18PM +0900, Shunsuke Mie wrote: > > Add a new endpoint(EP) function driver to provide virtio-net device. This > > function not only shows virtio-net device for PCIe host system, but also > > provides

Re: [EXT] [RFC PATCH 0/4] PCI: endpoint: Introduce a virtio-net EP function

2023-02-07 Thread Shunsuke Mie
2023年2月4日(土) 1:45 Frank Li : > > > > > -Original Message- > > From: Shunsuke Mie > > Sent: Friday, February 3, 2023 4:04 AM > > To: Lorenzo Pieralisi > > Cc: Krzysztof Wilczyński ; Manivannan Sadhasivam > > ; Kishon Vijay Abraham I ; Bjorn

Re: [RFC PATCH 0/4] PCI: endpoint: Introduce a virtio-net EP function

2023-02-07 Thread Shunsuke Mie
2023年2月5日(日) 19:02 Michael S. Tsirkin : > > On Fri, Feb 03, 2023 at 07:04:14PM +0900, Shunsuke Mie wrote: > > This patchset introduce a virtio-net EP device function. It provides a > > new option to communiate between PCIe host and endpoint over IP. > > Advantage of this o

Re: [RFC PATCH 1/4] virtio_pci: add a definition of queue flag in ISR

2023-02-07 Thread Shunsuke Mie
2023年2月3日(金) 19:16 Michael S. Tsirkin : > > On Fri, Feb 03, 2023 at 07:04:15PM +0900, Shunsuke Mie wrote: > > Already it has beed defined a config changed flag of ISR, but not the queue > > flag. Add a macro for it. > > > > Signed-off-by: Shunsuke Mie >

Re: [EXT] [RFC PATCH 0/4] PCI: endpoint: Introduce a virtio-net EP function

2023-02-06 Thread Shunsuke Mie
2023年2月7日(火) 10:43 Shunsuke Mie : > > 2023年2月4日(土) 6:48 Frank Li : > > > > > foundation.org > > > Subject: [EXT] [RFC PATCH 0/4] PCI: endpoint: Introduce a virtio-net EP > > > function > > > > > > > The dependent EDMA patch can't be appl

Re: [EXT] [RFC PATCH 0/4] PCI: endpoint: Introduce a virtio-net EP function

2023-02-06 Thread Shunsuke Mie
2023年2月4日(土) 6:48 Frank Li : > > > foundation.org > > Subject: [EXT] [RFC PATCH 0/4] PCI: endpoint: Introduce a virtio-net EP > > function > > > > The dependent EDMA patch can't be applied at last linux-next. > Can you provide a git link? So I can try directly. Sorry, I've missed it. The embedded

[RFC PATCH 4/4] PCI: endpoint: function: Add EP function driver to provide virtio net device

2023-02-03 Thread Shunsuke Mie
specification. This function driver has beed tested on S4 Rcar (r8a779fa-spider) board but just use the PCIe EP framework and depends on the PCIe EDMA. Signed-off-by: Shunsuke Mie Signed-off-by: Takanari Hayama --- drivers/pci/endpoint/functions/Kconfig| 12 + drivers/pci/endpoint

[RFC PATCH 3/4] PCI: endpoint: Introduce virtio library for EP functions

2023-02-03 Thread Shunsuke Mie
Add a new library to access a virtio ring located on PCIe host memory. The library generates struct pci_epf_vringh that is introduced in this patch. The struct has a vringh member, so vringh APIs can be used to access the virtio ring. Signed-off-by: Shunsuke Mie Signed-off-by: Takanari Hayama

[RFC PATCH 2/4] virtio_ring: remove const from vring getter

2023-02-03 Thread Shunsuke Mie
There are some method to manage the virto ring in Linux kernel. e.g. vhost and vringh. Remove const from the getter in order to control vring with other APIs, such as vringh. Signed-off-by: Shunsuke Mie Signed-off-by: Takanari Hayama --- drivers/virtio/virtio_ring.c | 2 +- include/linux

[RFC PATCH 0/4] PCI: endpoint: Introduce a virtio-net EP function

2023-02-03 Thread Shunsuke Mie
a virtio-net EP device function. Details are in commit respectively. Currently those network devices are testd using ping only. I'll add a result of performance evaluation using iperf and etc to the future version of this patchset. Shunsuke Mie (4): virtio_pci: add a definition of queue flag

[RFC PATCH 1/4] virtio_pci: add a definition of queue flag in ISR

2023-02-03 Thread Shunsuke Mie
Already it has beed defined a config changed flag of ISR, but not the queue flag. Add a macro for it. Signed-off-by: Shunsuke Mie Signed-off-by: Takanari Hayama --- include/uapi/linux/virtio_pci.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/linux/virtio_pci.h b/include

[PATCH] tools/virtio: enable to build with retpoline

2023-02-02 Thread Shunsuke Mie
Add build options to bring it close to a linux kernel. It allows for testing that is close to reality. Signed-off-by: Shunsuke Mie --- tools/virtio/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virtio/Makefile b/tools/virtio/Makefile index 1b25cc7c64bb

[PATCH] vringh: fix a typo in comments for vringh_kiov

2023-02-02 Thread Shunsuke Mie
Probably it is a simple copy error from struct vring_iov. Signed-off-by: Shunsuke Mie --- include/linux/vringh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/vringh.h b/include/linux/vringh.h index 212892cf9822..1991a02c6431 100644 --- a/include/linux

[RFC PATCH v2 5/7] vringh: unify the APIs for all accessors

2023-02-02 Thread Shunsuke Mie
%) 6.09888 +- 0.00155 seconds time elapsed ( +- 0.03% ) The result of changed code experiment shows an increase of branches and branch-misses, but number of pages are decremented. As a result, the elapsed time is getting shorter than original one. Signed-off-by: Shunsuke Mie --- drivers/vhost

[RFC PATCH v2 7/7] vringh: IOMEM support

2023-02-02 Thread Shunsuke Mie
This patch introduces the new memory accessor for vringh. It is able to use vringh to virtio rings located on iomemory region. Signed-off-by: Shunsuke Mie --- drivers/vhost/Kconfig | 6 drivers/vhost/vringh.c | 76 ++ include/linux/vringh.h | 8

[RFC PATCH v2 4/7] tools/virtio: convert to new vringh user APIs

2023-02-02 Thread Shunsuke Mie
struct vringh_iov is being remove, so convert vringh_test to use the vringh user APIs. This has it change to use struct vringh_kiov instead of the struct vringh_iov. Signed-off-by: Shunsuke Mie --- tools/virtio/vringh_test.c | 34 +- 1 file changed, 17 insertions

[RFC PATCH v2 6/7] tools/virtio: convert to use new unified vringh APIs

2023-02-02 Thread Shunsuke Mie
vringh_*_user APIs is being removed without vringh_init_user(). so change to use new APIs. Signed-off-by: Shunsuke Mie --- tools/virtio/vringh_test.c | 89 +++--- 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/tools/virtio/vringh_test.c b/tools

[RFC PATCH v2 3/7] vringh: remove vringh_iov and unite to vringh_kiov

2023-02-02 Thread Shunsuke Mie
the struct vringh_iov and unifies APIs to struct vringh_kiov. Signed-off-by: Shunsuke Mie --- drivers/vhost/vringh.c | 32 ++ include/linux/vringh.h | 45 -- 2 files changed, 10 insertions(+), 67 deletions(-) diff --git a/drivers/vhost

[RFC PATCH v2 0/7] Introduce a vringh accessor for IO memory

2023-02-02 Thread Shunsuke Mie
results of the API unification v1: https://lore.kernel.org/virtualization/20221227022528.609839-1-...@igel.co.jp/ - Initial patchset Shunsuke Mie (7): vringh: fix a typo in comments for vringh_kiov tools/virtio: enable to build with retpoline vringh: remove vringh_iov and unite to vringh_kiov

[RFC PATCH v2 2/7] tools/virtio: enable to build with retpoline

2023-02-02 Thread Shunsuke Mie
Add build options to bring it close to a linux kernel. It allows for testing that is close to reality. Signed-off-by: Shunsuke Mie --- tools/virtio/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virtio/Makefile b/tools/virtio/Makefile index 1b25cc7c64bb

[RFC PATCH v2 1/7] vringh: fix a typo in comments for vringh_kiov

2023-02-02 Thread Shunsuke Mie
Probably it is a simple copy error from struct vring_iov. Fixes: f87d0fbb5798 ("vringh: host-side implementation of virtio rings.") Signed-off-by: Shunsuke Mie --- include/linux/vringh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/vringh.h b/inc

Re: [RFC PATCH 2/9] vringh: remove vringh_iov and unite to vringh_kiov

2023-01-10 Thread Shunsuke Mie
On 2023/01/11 14:54, Jason Wang wrote: On Wed, Jan 11, 2023 at 11:27 AM Shunsuke Mie wrote: On 2022/12/28 15:36, Jason Wang wrote: On Tue, Dec 27, 2022 at 3:06 PM Shunsuke Mie wrote: 2022年12月27日(火) 15:04 Jason Wang : On Tue, Dec 27, 2022 at 10:25 AM Shunsuke Mie wrote: struct

Re: [RFC PATCH 4/9] vringh: unify the APIs for all accessors

2023-01-10 Thread Shunsuke Mie
On 2022/12/28 16:20, Michael S. Tsirkin wrote: On Wed, Dec 28, 2022 at 11:24:10AM +0900, Shunsuke Mie wrote: 2022年12月27日(火) 23:37 Michael S. Tsirkin : On Tue, Dec 27, 2022 at 07:22:36PM +0900, Shunsuke Mie wrote: 2022年12月27日(火) 16:49 Shunsuke Mie : 2022年12月27日(火) 16:04 Michael S. Tsirkin

Re: [RFC PATCH 2/9] vringh: remove vringh_iov and unite to vringh_kiov

2023-01-10 Thread Shunsuke Mie
On 2022/12/28 15:36, Jason Wang wrote: On Tue, Dec 27, 2022 at 3:06 PM Shunsuke Mie wrote: 2022年12月27日(火) 15:04 Jason Wang : On Tue, Dec 27, 2022 at 10:25 AM Shunsuke Mie wrote: struct vringh_iov is defined to hold userland addresses. However, to use common function, __vring_iov, finally

[PATCH v2] tools/virtio: fix the vringh test for virtio ring changes

2023-01-09 Thread Shunsuke Mie
Fix the build caused by missing kmsan_handle_dma() and is_power_of_2() that are used in drivers/virtio/virtio_ring.c. Signed-off-by: Shunsuke Mie --- Changes in v2: * Remove a file, tools/virtio/linux/log2.h * Correct a include guard of tools/virtio/linux/bug.h * Move BUILD_BUG_ON() definition

Re: [RFC PATCH 4/9] vringh: unify the APIs for all accessors

2022-12-27 Thread Shunsuke Mie
2022年12月27日(火) 23:37 Michael S. Tsirkin : > > On Tue, Dec 27, 2022 at 07:22:36PM +0900, Shunsuke Mie wrote: > > 2022年12月27日(火) 16:49 Shunsuke Mie : > > > > > > 2022年12月27日(火) 16:04 Michael S. Tsirkin : > > > > > > > > On Tue, Dec 27, 2022 a

Re: [RFC PATCH 4/9] vringh: unify the APIs for all accessors

2022-12-27 Thread Shunsuke Mie
2022年12月27日(火) 16:49 Shunsuke Mie : > > 2022年12月27日(火) 16:04 Michael S. Tsirkin : > > > > On Tue, Dec 27, 2022 at 11:25:26AM +0900, Shunsuke Mie wrote: > > > Each vringh memory accessors that are for user, kern and iotlb has own > > > interfaces th

Re: [RFC PATCH 2/9] vringh: remove vringh_iov and unite to vringh_kiov

2022-12-26 Thread Shunsuke Mie
2022年12月27日(火) 16:56 Michael S. Tsirkin : > > On Tue, Dec 27, 2022 at 04:13:49PM +0900, Shunsuke Mie wrote: > > 2022年12月27日(火) 16:05 Michael S. Tsirkin : > > > > > > On Tue, Dec 27, 2022 at 02:04:03PM +0800, Jason Wang wrote: > > > > On Tue, De

Re: [RFC PATCH 4/9] vringh: unify the APIs for all accessors

2022-12-26 Thread Shunsuke Mie
2022年12月27日(火) 16:04 Michael S. Tsirkin : > > On Tue, Dec 27, 2022 at 11:25:26AM +0900, Shunsuke Mie wrote: > > Each vringh memory accessors that are for user, kern and iotlb has own > > interfaces that calls common code. But some codes are duplicated and that > > be

Re: [RFC PATCH 2/9] vringh: remove vringh_iov and unite to vringh_kiov

2022-12-26 Thread Shunsuke Mie
2022年12月27日(火) 16:05 Michael S. Tsirkin : > > On Tue, Dec 27, 2022 at 02:04:03PM +0800, Jason Wang wrote: > > On Tue, Dec 27, 2022 at 10:25 AM Shunsuke Mie wrote: > > > > > > struct vringh_iov is defined to hold userland addresses. However, to use > > >

Re: [RFC PATCH 2/9] vringh: remove vringh_iov and unite to vringh_kiov

2022-12-26 Thread Shunsuke Mie
2022年12月27日(火) 15:04 Jason Wang : > > On Tue, Dec 27, 2022 at 10:25 AM Shunsuke Mie wrote: > > > > struct vringh_iov is defined to hold userland addresses. However, to use > > common function, __vring_iov, finally the vringh_iov converts to the > > vringh_kiov

[RFC PATCH 5/9] tools/virtio: convert to use new unified vringh APIs

2022-12-26 Thread Shunsuke Mie
vringh_*_user APIs is being removed without vringh_init_user(). so change to use new APIs. Signed-off-by: Shunsuke Mie --- tools/virtio/vringh_test.c | 89 +++--- 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/tools/virtio/vringh_test.c b/tools

[RFC PATCH 6/9] caif_virtio: convert to new unified vringh APIs

2022-12-26 Thread Shunsuke Mie
vringh_*_kern APIs are being removed without vringh_init_kern(), so change to use new APIs. Signed-off-by: Shunsuke Mie --- drivers/net/caif/caif_virtio.c | 26 ++ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/drivers/net/caif/caif_virtio.c b/drivers

[RFC PATCH 3/9] tools/virtio: convert to new vringh user APIs

2022-12-26 Thread Shunsuke Mie
struct vringh_iov is being remove, so convert vringh_test to use the vringh user APIs. This has it change to use struct vringh_kiov instead of the struct vringh_iov. Signed-off-by: Shunsuke Mie --- tools/virtio/vringh_test.c | 34 +- 1 file changed, 17 insertions

[RFC PATCH 4/9] vringh: unify the APIs for all accessors

2022-12-26 Thread Shunsuke Mie
memory accessor and simplified a caller code. Signed-off-by: Shunsuke Mie --- drivers/vhost/vringh.c | 667 +++-- include/linux/vringh.h | 100 +++--- 2 files changed, 225 insertions(+), 542 deletions(-) diff --git a/drivers/vhost/vringh.c b/drivers/vhost

[RFC PATCH 2/9] vringh: remove vringh_iov and unite to vringh_kiov

2022-12-26 Thread Shunsuke Mie
the struct vringh_iov and unifies APIs to struct vringh_kiov. Signed-off-by: Shunsuke Mie --- drivers/vhost/vringh.c | 32 ++ include/linux/vringh.h | 45 -- 2 files changed, 10 insertions(+), 67 deletions(-) diff --git a/drivers/vhost

[RFC PATCH 1/9] vringh: fix a typo in comments for vringh_kiov

2022-12-26 Thread Shunsuke Mie
Probably it is a simple copy error from struct vring_iov. Fixes: f87d0fbb5798 ("vringh: host-side implementation of virtio rings.") Signed-off-by: Shunsuke Mie --- include/linux/vringh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/vringh.h b/inc

[RFC PATCH 0/6] Introduce a vringh accessor for IO memory

2022-12-26 Thread Shunsuke Mie
for the user accessor using vringh_test and kern and iomem using a non published driver, but I think I can add a link to a patchset for the driver in the next version of this patchset. Shunsuke Mie (6): vringh: fix a typo in comments for vringh_kiov vringh: remove vringh_iov and unite