Difference between revisions of "Virtual I/O Internals"

From Open-IOV
Jump to navigation Jump to search
Line 25: Line 25:
==RPC Mode==
==RPC Mode==
[[File:Mediated Device Access MMU.png|thumb|A slide describing Extended Page Table & MMU used in mediated device management.]]
[[File:Mediated Device Access MMU.png|thumb|A slide describing Extended Page Table & MMU used in mediated device management.]]
[[File:Mediated Device Access.png|thumb|A slide from Neo Gia's presentation at KVM forum.]]
=== Instruction Execution ===
=== Instruction Execution ===
RPC Mode moves instruction information across a virtual function interface (VF) using [https://infogalactic.com/info/Remote_procedure_call Remote Procedure Calls] generally by way of [https://infogalactic.com/info/Interrupt soft interrupt] (IOCTLs). Guest GPU instructions passed from the guest as Remote Procedure Calls are [https://infogalactic.com/info/Just-in-time_compilation Just-in-time]  recompiled on the host for execution by a device driver.
RPC Mode moves instruction information across a virtual function interface (VF) using [https://infogalactic.com/info/Remote_procedure_call Remote Procedure Calls] generally by way of [https://infogalactic.com/info/Interrupt soft interrupt] (IOCTLs). Guest GPU instructions passed from the guest as Remote Procedure Calls are [https://infogalactic.com/info/Just-in-time_compilation Just-in-time]  recompiled on the host for execution by a device driver.

Revision as of 20:56, 21 April 2022

The following document will attempt to detail the internals of a Virtual Function IO (VFIO) driven Mediated Device (Mdev).

Comparison of Approaches
RPC Mode SR-IOV Mode
Host requires insight about guest of workload. Host ignorance of guest workload.
Error reporting. No guest driver error reporting.
In depth dynamic monitoring. Basic dynamic monitoring.
Software defined MMU guest separation. Firmware defined MMU guest separation.
Requires deferred instructions to be supported by host software (support libraries). Guest is ignorant of host supported software such as support libraries.


RPC Mode

File:Mediated Device Access MMU.png
A slide describing Extended Page Table & MMU used in mediated device management.

Instruction Execution

RPC Mode moves instruction information across a virtual function interface (VF) using Remote Procedure Calls generally by way of soft interrupt (IOCTLs). Guest GPU instructions passed from the guest as Remote Procedure Calls are Just-in-time recompiled on the host for execution by a device driver.

Memory Management

Guests are presented with emulated memory regions (indirect emulated communication requiring a VM-exit) or passthrough memory regions (direct communication requiring no VM-exit).


RPC Mode Requirements:

Sensitive Instruction List.

Instruction Shim/Binary Translator.

HPA<->GPA Boundary Enforcement.

SR-IOV Mode

SR-IOV Mode involves the communication of instructions from a virtual function (VF) though direct communication to the PCI BAR.


RPC Mode Requirements:

Device SR-IOV support.

HPA<->GPA Boundary Enforcement.