qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [Mediated device framework] Is it possible in our use case?


From: Sasikumar Natarajan
Subject: [Qemu-devel] [Mediated device framework] Is it possible in our use case?
Date: Thu, 29 Sep 2016 17:50:57 +0530

Hi all,

I just asked the same question in vfio-users mailing list.

Ref link:
https://www.redhat.com/archives/vfio-users/2016-September/msg00097.html

I got response like "The vfio can't help in our use case. A new framework
called "mediated device" can help to achieve this. After a few hours of
googling on mediated devices I landed here for an discussion.


I think this is the right mailing list to ask this.

Question:
                     _______________________
_______________________
                    |                       |
|                       |
                    |   Virtual Machine 1   |            |   Virtual
Machine 2   |
                    |      ___________      |            |
___________       |
                    |     |           |     |            |    |
|      |
                    |     | VM1 Memory|     |            |    |VM2 Memory
|      |
                    |     |___________|     |            |
|___________|      |
                    |             ^         |            |
^             |
                    |____________ | ________|            |________ |
____________|
                                  |                                |
                                  |                                |
                          ________V________________________________V___________

                          |       |
|           |
                          |       |           IOMMU
|           |
                          |_______|_____________________
___________|___________|
                                  ^                                ^
                                  |                                |
                         [To/From VM1 Buffers]            [To/From VM2
Buffers]     HOST
                  ----------------|-------------
-------------------|------------------------
                        _________ | ______________________________
|_____________   PCI Device
                       |          |          PCI NIC CARD
|             |
                       |          |      (Single PCI Function)
|             |
                       |        __|________________________________|__
|
                       |       |  |                                |
|          |
                       |       |  |        PCIe DMA                |
|          |
                       |       |_ |_______________________________
|__|          |
                       |          |
|             |
                       |          V
V             |
                       |     Queue for VM1                   Queues for
VM2      |
                       |       |RX|TX|
|RX|TX|          |
                       |       |RX|TX|
|RX|TX|          |
                       |       |RX|TX|
|RX|TX|          |
                       |          ^
^             |
                       |          |       ___________________
|             |
                       |          |      |                   |
|             |
                       |          ------>|  Queue Classifier
|<----              |
                       |                 |___________________|
|
                       |                 |
|                   |
                       |                 |        MAC
|                   |
                       |                 |___________________|
------         |
                       |_____________________________
_____________|Port|_________|
                                                                  ------
                                                                    ||
                                                                    ||
                                                                    ||___

|___----> To Network Fabric




We are trying to share the PCIe NIC card with multiple VMs. PCI NIC card
has one Physical function (NO SRIOV support).

The NIC has multiple queues (each with TX and RX descriptor ring). Packets
are placed in queue based on packet classifier(Ex: MAC addresses). So each
queue can be used for a network interface, therefore host can have multiple
virtual network interfaces. We are planning to assign each queue to each VM
(emulate like PCI Virual functions, but our HW doesnt support Virtual
function). Packet buffer for corresponding queue will reside in VM's memory.

DMA in the PCI card need to push/pull packet data to/from directly to the
VM's memory (for this we need IOMMU support).

We need to eliminate the intermediate CPU memory copy.

Is it possible to use mediated device frame work in the above mentioned
situation?


*Regards,*

Sasikumar Natarajan

VVDN Technologies Pvt Ltd


reply via email to

[Prev in Thread] Current Thread [Next in Thread]