[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: Doorbell mapping of vDPA
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 pages2) The location of the each doorbell register could be calculated as the algorithm described in the specification (184.108.40.206)
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.
Then vDPA framework can safely map it into the guest physical address (GPA) range defined by qemu. It could be either1) a single doorbell register that is used by all virtqueues or 2) several different per-vq doorbell registersIf you decide to implement a virtio-pci register layout, need to make sure for notification structure (220.127.116.11 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