Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what's plan to support the service/driver at the virtio level? #390

Closed
xiaoxiang781216 opened this issue May 8, 2022 · 15 comments · Fixed by #489, #493 or #494
Closed

what's plan to support the service/driver at the virtio level? #390

xiaoxiang781216 opened this issue May 8, 2022 · 15 comments · Fixed by #489, #493 or #494
Assignees
Labels

Comments

@xiaoxiang781216
Copy link
Collaborator

xiaoxiang781216 commented May 8, 2022

In Linux kernel, we can:

  1. Write various virtio drivers(e.g. virtio-blk, virtio-net...)
  2. Write various rpmsg drivers(e.g. rpmsg-char, rpmsg-tty...)

But, we can just write rpmsg drivers in Open-AMP, but virtio drivers is very useful in some case:

  1. Interact with virito device/driver in Linux kernel(A core) from RTOS(M core) in the same SoC
  2. Improve IPC performance in some(e.g. network or file system) case

So, I think the support of native virito driver is a great addition to Open-AMP, we(Xiaomi) are very interesting to improve Open-AMP virtio driver capability.

@arnopo
Copy link
Collaborator

arnopo commented May 10, 2022

Hello @xiaoxiang781216 ,

Some other companies are also interested in extending the open-amp library to support more Virtio services.
Some discussions and works are just starting on the topic.
I added people involved as assignee of the issue.

@xiaoxiang781216
Copy link
Collaborator Author

Thanks @arnopo . Let see how can we work together to improve virtio driver experience in the IoT space.

@xiaoxiang781216
Copy link
Collaborator Author

Where can I find the related proposal or reference change? I want to evaluate the potential influence to the current code base. @arnopo @wmamills

@danmilea
Copy link
Collaborator

There's ongoing work to integrate a virtio MMIO front-end layer in the open-amp library based on the Zephyr virtio MMIO implementation from https://github.com/danmilea/zephyr/blob/main/drivers/virtio/virtio-mmio.c (updated to use OpenAMP virtqueue APIs), with the goal to also include support for device drivers (e.g. virtio console, virtio-net).

The framework will also support hypervisorless mode operation. More information on hypervisorless virtio is available here:

@xiaoxiang781216

@xiaoxiang781216
Copy link
Collaborator Author

Thanks @danmilea . I will study these document and feedback to you soon.

@arnopo arnopo linked a pull request Jun 10, 2022 that will close this issue
@arnopo arnopo removed a link to a pull request Jun 10, 2022
@xiaoxiang781216
Copy link
Collaborator Author

xiaoxiang781216 commented Nov 13, 2022

@danmilea @arnopo I see that all virito driver support is done on virtio-exp branch, when will the work merge back to the main branch? We are very interesting to try these new exciting features on our platform. @qinwei2004

@arnopo
Copy link
Collaborator

arnopo commented Nov 14, 2022

Hi @xiaoxiang781216
yes @danmilea has already done a great job.
Current status is that some services are now available ( net, console, entropy) but there are strong correlation for time being with the MMIO transport layer.
So for me a good trigger to merge in main would be to also support the remotreproc virtio transport.
I don't see any associated work started, So if you are interesting in, you are welcome.

@xiaoxiang781216
Copy link
Collaborator Author

@danmilea will you continue MMIO transport in the near feature?

@danmilea
Copy link
Collaborator

@xiaoxiang781216 Do you mean adding support for the remoteproc style of virtio? Before looking into that, I think it's more relevant to investigate the requirements of an OpenAMP-based solution for VIRTIO back-ends, since the current implementation includes only front-end support. The scope pf my current work is to get everything on a usable level in a hypervisorless-virtio type of deployment.

@CV-Bowen
Copy link
Contributor

CV-Bowen commented Mar 7, 2023

There's ongoing work to integrate a virtio MMIO front-end layer in the open-amp library based on the Zephyr virtio MMIO implementation from https://github.com/danmilea/zephyr/blob/main/drivers/virtio/virtio-mmio.c (updated to use OpenAMP virtqueue APIs), with the goal to also include support for device drivers (e.g. virtio console, virtio-net).

The framework will also support hypervisorless mode operation. More information on hypervisorless virtio is available here:

@xiaoxiang781216

@danmilea Hi, I want to implement the virtio-mmio-serial/net driver based on openamp. Do you have some examples show how to use the virtio mmio apis in virito-exp branch?

@danmilea
Copy link
Collaborator

danmilea commented Mar 9, 2023

Hi @CV-Bowen
zephyr-openamp-staging (branch virtio-exp) includes samples for net and serial which use the open-amp library virtio mmio support in a standard virtual guest configuration. The hvl_net_rng_reloc sample works in a hypervisorless virtio environment (details in the sample README.rst file).

@CV-Bowen
Copy link
Contributor

@danmilea Got, Thanks a lot.

@arnopo
Copy link
Collaborator

arnopo commented Jun 22, 2023

@CV-Bowen , @danmilea, @xiaoxiang781216,

We have 2 complementary PRs for Virtio. I'd like to suggest that we move forward step by step to have a common dev approved by everyone and ease the reviews by splitting PRs.

step 1:

  • @CV-Bowen : create a new PR that introduce virtio API with create_virtqueues/delete_virtqueues dispatcher ops
    => no remorteproc_virtio or rpmsg update that will come in step 3

step 2:

  • @danmilea : create a new PR with virtio MMIO transport only that uses new dispatcher ops

step3

@arnopo
Copy link
Collaborator

arnopo commented Jul 12, 2023

Step 1 merged : #495

@arnopo arnopo reopened this Aug 17, 2023
@github-actions
Copy link

This issue has been marked as a stale issue because it has been open (more than) 45 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment