All of lore.kernel.org
 help / color / mirror / Atom feed
* [virtio-dev] Doorbell mapping of vDPA
@ 2020-04-07  7:55 Jason Wang
  2020-04-15 13:50 ` [virtio-dev] " Jason Wang
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Wang @ 2020-04-07  7:55 UTC (permalink / raw)
  To: virtio-networking, Virtio-Dev; +Cc: Michael S. Tsirkin

Hi all:

To get native performance of VF, we need to map doorbell to guest to 
avoid unnecessary vmexit. In order to do this, we will launch qemu with 
page-per-vq=on. This means the each doorbell register should be located 
at the beginning of 4K page and does not share the page with other 
registers. Then vDPA framework can safely map it into the guest physical 
address (GPA) range defined by qemu. It could be either

1) a single doorbell register that is used by all virtqueues

or

2) several different per-vq doorbell registers

If you decide to implement a virtio-pci register layout, need to make 
sure for notification structure (4.1.4.4 of virtio spec):

For each virtqueue, the result 
ofcap.offset+queue_notify_off*notify_off_multiplier is PAGE_SIZE (e.g  
4K) alignment, and the doorbeel does not share the page with other 
registers.

And it would be better if queue_notify_off, notify_off_multiplier can be 
changed via firmware for extra flexibility.

Please check and make sure your hardware have such ability and feel free 
to ask if you have questions (offline if necessary).

Thanks






---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [virtio-dev] Re: Doorbell mapping of vDPA
  2020-04-07  7:55 [virtio-dev] Doorbell mapping of vDPA Jason Wang
@ 2020-04-15 13:50 ` Jason Wang
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Wang @ 2020-04-15 13:50 UTC (permalink / raw)
  To: virtio-networking, Virtio-Dev; +Cc: Michael S. Tsirkin


On 2020/4/7 下午3:55, Jason Wang wrote:
> Hi all:
>
> To get native performance of VF, we need to map doorbell to guest to 
> avoid unnecessary vmexit. In order to do this, we will launch qemu 
> with page-per-vq=on. This means the each doorbell register should be 
> located at the beginning of 4K page and does not share the page with 
> other registers. 


After discussion with some vendors. We can relax such requirement by 
extending qemu to support doorbells like:

1) doorbell registers should exclusively own one or more pages
2) The location of the each doorbell register could be calculated as the 
algorithm described in the specification (4.1.4.4)

Then qemu can map them safely to guest through virtio-pci.

For virtio-mmio, we will extend the spec to support the same doorbell 
layouts.

Thanks


> Then vDPA framework can safely map it into the guest physical address 
> (GPA) range defined by qemu. It could be either
>
> 1) a single doorbell register that is used by all virtqueues
>
> or
>
> 2) several different per-vq doorbell registers
>
> If you decide to implement a virtio-pci register layout, need to make 
> sure for notification structure (4.1.4.4 of virtio spec):
>
> For each virtqueue, the result 
> ofcap.offset+queue_notify_off*notify_off_multiplier is PAGE_SIZE (e.g  
> 4K) alignment, and the doorbeel does not share the page with other 
> registers.
>
> And it would be better if queue_notify_off, notify_off_multiplier can 
> be changed via firmware for extra flexibility.
>
> Please check and make sure your hardware have such ability and feel 
> free to ask if you have questions (offline if necessary).
>
> Thanks
>
>
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-15 13:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-07  7:55 [virtio-dev] Doorbell mapping of vDPA Jason Wang
2020-04-15 13:50 ` [virtio-dev] " Jason Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.