mbox series

[v1,00/10] vDPA support in qemu

Message ID 20200622153756.19189-1-lulu@redhat.com (mailing list archive)
Headers show
Series vDPA support in qemu | expand

Message

Cindy Lu June 22, 2020, 3:37 p.m. UTC
vDPA device is a device that uses a datapath which complies with the
virtio specifications with vendor specific control path. vDPA devices
can be both physically located on the hardware or emulated by software.
This RFC introduce the vDPA support in qemu
TODO 
1) vIOMMU support
2) live migration support

Cindy Lu (8):
  net: introduce qemu_get_peer
  vhost_net: use the function qemu_get_peer
  vhost-backend: export the vhost backend helper
  vhsot_net: introduce set_config & get_config function
  vhost: introduce new VhostOps vhost_dev_start
  vhost: implement vhost_dev_start method
  vhost-vdpa: introduce vhost-vdpa backend
  vhost-vdpa: introduce vhost-vdpa net client

Jason Wang (2):
  virtio-bus: introduce queue_enabled method
  virtio-pci: implement queue_enabled method

 configure                         |  21 ++
 hw/net/vhost_net.c                |  46 +++-
 hw/net/virtio-net.c               |  19 +-
 hw/virtio/Makefile.objs           |   1 +
 hw/virtio/vhost-backend.c         |  40 ++-
 hw/virtio/vhost-vdpa.c            | 406 ++++++++++++++++++++++++++++++
 hw/virtio/vhost.c                 |  59 ++++-
 hw/virtio/virtio-pci.c            |  18 ++
 hw/virtio/virtio.c                |   6 +
 include/hw/virtio/vhost-backend.h |  36 ++-
 include/hw/virtio/vhost-vdpa.h    |  26 ++
 include/hw/virtio/vhost.h         |   8 +
 include/hw/virtio/virtio-bus.h    |   4 +
 include/net/net.h                 |   1 +
 include/net/vhost-vdpa.h          |  21 ++
 include/net/vhost_net.h           |   6 +-
 net/Makefile.objs                 |   2 +-
 net/clients.h                     |   2 +
 net/net.c                         |   9 +
 net/vhost-vdpa.c                  | 230 +++++++++++++++++
 qapi/net.json                     |  23 +-
 qemu-options.hx                   |  12 +
 22 files changed, 952 insertions(+), 44 deletions(-)
 create mode 100644 hw/virtio/vhost-vdpa.c
 create mode 100644 include/hw/virtio/vhost-vdpa.h
 create mode 100644 include/net/vhost-vdpa.h
 create mode 100644 net/vhost-vdpa.c

Comments

Markus Armbruster June 23, 2020, 7:07 a.m. UTC | #1
Cindy Lu <lulu@redhat.com> writes:

> vDPA device is a device that uses a datapath which complies with the
> virtio specifications with vendor specific control path. vDPA devices
> can be both physically located on the hardware or emulated by software.
> This RFC introduce the vDPA support in qemu
> TODO 
> 1) vIOMMU support
> 2) live migration support

This gives me the foggiest of ideas on what vDPA is.  Could we use
docs/interop/vhost-vdpa.rst?
Cindy Lu June 23, 2020, 9:16 a.m. UTC | #2
On Tue, Jun 23, 2020 at 3:07 PM Markus Armbruster <armbru@redhat.com> wrote:
>
> Cindy Lu <lulu@redhat.com> writes:
>
> > vDPA device is a device that uses a datapath which complies with the
> > virtio specifications with vendor specific control path. vDPA devices
> > can be both physically located on the hardware or emulated by software.
> > This RFC introduce the vDPA support in qemu
> > TODO
> > 1) vIOMMU support
> > 2) live migration support
>
> This gives me the foggiest of ideas on what vDPA is.  Could we use
> docs/interop/vhost-vdpa.rst?
>
Sure will add this
Jason Wang June 23, 2020, 9:43 a.m. UTC | #3
On 2020/6/23 下午5:16, Cindy Lu wrote:
> On Tue, Jun 23, 2020 at 3:07 PM Markus Armbruster <armbru@redhat.com> wrote:
>> Cindy Lu <lulu@redhat.com> writes:
>>
>>> vDPA device is a device that uses a datapath which complies with the
>>> virtio specifications with vendor specific control path. vDPA devices
>>> can be both physically located on the hardware or emulated by software.
>>> This RFC introduce the vDPA support in qemu
>>> TODO
>>> 1) vIOMMU support
>>> 2) live migration support
>> This gives me the foggiest of ideas on what vDPA is.  Could we use
>> docs/interop/vhost-vdpa.rst?
>>
> Sure will add this
>
>

Not sure it's the best place since vhost-vdpa is kernel specific.

Maybe kernel docs (TBD) is a better place and we can refer it this file 
in the future.

But it doesn't harm if you said something more here and refer the kernel 
commit here: 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4c8cf31885f69e86be0b5b9e6677a26797365e1d

Thanks
Cindy Lu June 24, 2020, 9:42 a.m. UTC | #4
On Tue, Jun 23, 2020 at 5:43 PM Jason Wang <jasowang@redhat.com> wrote:
>
>
> On 2020/6/23 下午5:16, Cindy Lu wrote:
> > On Tue, Jun 23, 2020 at 3:07 PM Markus Armbruster <armbru@redhat.com> wrote:
> >> Cindy Lu <lulu@redhat.com> writes:
> >>
> >>> vDPA device is a device that uses a datapath which complies with the
> >>> virtio specifications with vendor specific control path. vDPA devices
> >>> can be both physically located on the hardware or emulated by software.
> >>> This RFC introduce the vDPA support in qemu
> >>> TODO
> >>> 1) vIOMMU support
> >>> 2) live migration support
> >> This gives me the foggiest of ideas on what vDPA is.  Could we use
> >> docs/interop/vhost-vdpa.rst?
> >>
> > Sure will add this
> >
> >
>
> Not sure it's the best place since vhost-vdpa is kernel specific.
>
> Maybe kernel docs (TBD) is a better place and we can refer it this file
> in the future.
>
> But it doesn't harm if you said something more here and refer the kernel
> commit here:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4c8cf31885f69e86be0b5b9e6677a26797365e1d
>
> Thanks
>
>
Hi Markus,
I think I agree with Jason's opinion, kernel docs is a better place.
Maybe we can keep what it is now, and do this job in the future.

Thanks
Cindy
Markus Armbruster June 25, 2020, 4:48 a.m. UTC | #5
Cindy Lu <lulu@redhat.com> writes:

> On Tue, Jun 23, 2020 at 5:43 PM Jason Wang <jasowang@redhat.com> wrote:
>>
>>
>> On 2020/6/23 下午5:16, Cindy Lu wrote:
>> > On Tue, Jun 23, 2020 at 3:07 PM Markus Armbruster <armbru@redhat.com> wrote:
>> >> Cindy Lu <lulu@redhat.com> writes:
>> >>
>> >>> vDPA device is a device that uses a datapath which complies with the
>> >>> virtio specifications with vendor specific control path. vDPA devices
>> >>> can be both physically located on the hardware or emulated by software.
>> >>> This RFC introduce the vDPA support in qemu
>> >>> TODO
>> >>> 1) vIOMMU support
>> >>> 2) live migration support
>> >> This gives me the foggiest of ideas on what vDPA is.  Could we use
>> >> docs/interop/vhost-vdpa.rst?
>> >>
>> > Sure will add this
>> >
>> >
>>
>> Not sure it's the best place since vhost-vdpa is kernel specific.
>>
>> Maybe kernel docs (TBD) is a better place and we can refer it this file
>> in the future.
>>
>> But it doesn't harm if you said something more here and refer the kernel
>> commit here:
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4c8cf31885f69e86be0b5b9e6677a26797365e1d
>>
>> Thanks
>>
>>
> Hi Markus,
> I think I agree with Jason's opinion, kernel docs is a better place.
> Maybe we can keep what it is now, and do this job in the future.

I think a super-short description of vDPA here (one sentence?) together
with a link to complete information would be helpful.  If the link's
target doesn't yet exist, adding the link later is okay.
Cindy Lu June 28, 2020, 1:37 a.m. UTC | #6
On Thu, Jun 25, 2020 at 12:48 PM Markus Armbruster <armbru@redhat.com> wrote:
>
> Cindy Lu <lulu@redhat.com> writes:
>
> > On Tue, Jun 23, 2020 at 5:43 PM Jason Wang <jasowang@redhat.com> wrote:
> >>
> >>
> >> On 2020/6/23 下午5:16, Cindy Lu wrote:
> >> > On Tue, Jun 23, 2020 at 3:07 PM Markus Armbruster <armbru@redhat.com> wrote:
> >> >> Cindy Lu <lulu@redhat.com> writes:
> >> >>
> >> >>> vDPA device is a device that uses a datapath which complies with the
> >> >>> virtio specifications with vendor specific control path. vDPA devices
> >> >>> can be both physically located on the hardware or emulated by software.
> >> >>> This RFC introduce the vDPA support in qemu
> >> >>> TODO
> >> >>> 1) vIOMMU support
> >> >>> 2) live migration support
> >> >> This gives me the foggiest of ideas on what vDPA is.  Could we use
> >> >> docs/interop/vhost-vdpa.rst?
> >> >>
> >> > Sure will add this
> >> >
> >> >
> >>
> >> Not sure it's the best place since vhost-vdpa is kernel specific.
> >>
> >> Maybe kernel docs (TBD) is a better place and we can refer it this file
> >> in the future.
> >>
> >> But it doesn't harm if you said something more here and refer the kernel
> >> commit here:
> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4c8cf31885f69e86be0b5b9e6677a26797365e1d
> >>
> >> Thanks
> >>
> >>
> > Hi Markus,
> > I think I agree with Jason's opinion, kernel docs is a better place.
> > Maybe we can keep what it is now, and do this job in the future.
>
> I think a super-short description of vDPA here (one sentence?) together
> with a link to complete information would be helpful.  If the link's
> target doesn't yet exist, adding the link later is okay.
>
sure thanks Markus, will do
Jason Wang June 28, 2020, 7:06 a.m. UTC | #7
On 2020/6/22 下午11:37, Cindy Lu wrote:
> vDPA device is a device that uses a datapath which complies with the
> virtio specifications with vendor specific control path. vDPA devices
> can be both physically located on the hardware or emulated by software.
> This RFC introduce the vDPA support in qemu
> TODO
> 1) vIOMMU support
> 2) live migration support


Jut notice that the config interrupt [1] looks missed in this series.

Please add them in next version.

Thanks

[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=776f395004d829bbbf18c159ed9beb517a208c71
Cindy Lu June 28, 2020, 8:19 a.m. UTC | #8
On Sun, Jun 28, 2020 at 3:07 PM Jason Wang <jasowang@redhat.com> wrote:
>
>
> On 2020/6/22 下午11:37, Cindy Lu wrote:
> > vDPA device is a device that uses a datapath which complies with the
> > virtio specifications with vendor specific control path. vDPA devices
> > can be both physically located on the hardware or emulated by software.
> > This RFC introduce the vDPA support in qemu
> > TODO
> > 1) vIOMMU support
> > 2) live migration support
>
>
> Jut notice that the config interrupt [1] looks missed in this series.
>
> Please add them in next version.
>
> Thanks
>
> [1]
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=776f395004d829bbbf18c159ed9beb517a208c71
>
sure will add this part