mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-22 13:37:10 +00:00
doc: introduce Split Device Model feature for ACRN
Introduce Split Device Model feature for ACRN. Now we only implement pass through PCI(e) device of it. Tracked-On: #4371 Signed-off-by: Li Fei1 <fei1.li@intel.com>
This commit is contained in:
parent
d646cc3767
commit
05f6b11f14
@ -21,3 +21,4 @@ documented in this section.
|
|||||||
RTC emulation in hypervisor <rtc-virt-hld>
|
RTC emulation in hypervisor <rtc-virt-hld>
|
||||||
Hostbridge emulation <hostbridge-virt-hld>
|
Hostbridge emulation <hostbridge-virt-hld>
|
||||||
AT keyboard controller emulation <atkbdc-virt-hld>
|
AT keyboard controller emulation <atkbdc-virt-hld>
|
||||||
|
Split Device Model <split-dm>
|
||||||
|
@ -155,24 +155,10 @@ directly. EPT mapping is not built for these pages having MSI-X table.
|
|||||||
Device configuration emulation
|
Device configuration emulation
|
||||||
******************************
|
******************************
|
||||||
|
|
||||||
PCI configuration is based on access of port 0xCF8/CFC. ACRN
|
PCI configuration space could been accessed by PCI-compatible Configuration Mechanism
|
||||||
implements PCI configuration emulation to handle 0xCF8/CFC to control
|
(IO port 0xCF8/CFC) and PCI Express Enhanced Configuration Access Mechanism (PCI MMCONFIG).
|
||||||
PCI device through two paths: implemented in hypervisor or in Service VM device
|
ACRN hypervisor will trap these PCI configuration space access and emulate it. You may refer
|
||||||
model.
|
to :ref:`split-device-model` for detail.
|
||||||
|
|
||||||
- When configuration emulation is in the hypervisor, the interception of
|
|
||||||
0xCF8/CFC port and emulation of PCI configuration space access are
|
|
||||||
tricky and unclean. Therefore the final solution is to reuse the
|
|
||||||
PCI emulation infrastructure of Service VM device model. The hypervisor
|
|
||||||
routes the UOS 0xCF8/CFC access to device model, and keeps blind to the
|
|
||||||
physical PCI devices. Upon receiving UOS PCI configuration space access
|
|
||||||
request, device model needs to emulate some critical space, for instance,
|
|
||||||
BAR, MSI capability, and INTLINE/INTPIN.
|
|
||||||
|
|
||||||
- For other access, device model
|
|
||||||
reads/writes physical configuration space on behalf of UOS. To do
|
|
||||||
this, device model is linked with lib pci access to access physical PCI
|
|
||||||
device.
|
|
||||||
|
|
||||||
MSI-X table emulation
|
MSI-X table emulation
|
||||||
*********************
|
*********************
|
||||||
|
BIN
doc/developer-guides/hld/images/split-dm-image1.png
Normal file
BIN
doc/developer-guides/hld/images/split-dm-image1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
BIN
doc/developer-guides/hld/images/split-dm-image2.png
Normal file
BIN
doc/developer-guides/hld/images/split-dm-image2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 42 KiB |
BIN
doc/developer-guides/hld/images/split-dm-image3.png
Normal file
BIN
doc/developer-guides/hld/images/split-dm-image3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 49 KiB |
BIN
doc/developer-guides/hld/images/split-dm-image4.png
Normal file
BIN
doc/developer-guides/hld/images/split-dm-image4.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
58
doc/developer-guides/hld/split-dm.rst
Normal file
58
doc/developer-guides/hld/split-dm.rst
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
.. _split-device-model:
|
||||||
|
|
||||||
|
Split Device Model
|
||||||
|
==================
|
||||||
|
|
||||||
|
We usually emulate device in Device Model. However, we need to emulate device in
|
||||||
|
ACRN Hypervisor for some reasons. For example, post-launched RTVM needs to emulate
|
||||||
|
pass through PCI(e) devices in ACRN Hypervisor in which case it could continue to
|
||||||
|
running even if the Device Model is killed. In spite of this, the Device Model still
|
||||||
|
should own the overall resouce management like memroy/MMIO space, interrupt pin etc.
|
||||||
|
So there shall be one communication method provided by ACRN Hypervisor, which used
|
||||||
|
to align the resource information for Device Model to ACRN Hypervisor emulated device.
|
||||||
|
|
||||||
|
Let's still take the pass through PCI(e) device as an example:
|
||||||
|
Before we split pass through PCI(e) device from Device Model to ACRN Hypervisor, the
|
||||||
|
whole picture is like this:
|
||||||
|
|
||||||
|
.. figure:: images/split-dm-image1.png
|
||||||
|
:align: center
|
||||||
|
:width: 900px
|
||||||
|
:name: split-dm-architecture-overview1
|
||||||
|
|
||||||
|
PCI Config space access in Service VM or Pre-launched VM
|
||||||
|
|
||||||
|
.. figure:: images/split-dm-image2.png
|
||||||
|
:align: center
|
||||||
|
:width: 900px
|
||||||
|
:name: split-dm-architecture-overview2
|
||||||
|
|
||||||
|
PCI Config space access in Post-launched VM
|
||||||
|
|
||||||
|
After we split pass through PCI(e) device from Device Model to ACRN Hypervisor, the
|
||||||
|
whole picture is like this:
|
||||||
|
|
||||||
|
.. figure:: images/split-dm-image3.png
|
||||||
|
:align: center
|
||||||
|
:width: 900px
|
||||||
|
:name: split-dm-architecture-overview3
|
||||||
|
|
||||||
|
.. figure:: images/split-dm-image4.png
|
||||||
|
:align: center
|
||||||
|
:width: 900px
|
||||||
|
:name: split-dm-architecture-overview4
|
||||||
|
|
||||||
|
PCI Config space access in Post-launched VM
|
||||||
|
|
||||||
|
Interfaces Design
|
||||||
|
=================
|
||||||
|
|
||||||
|
In order to achieve this, we add a new pair of hypercall to align the PCI(e) BAR
|
||||||
|
and INTx information.
|
||||||
|
|
||||||
|
.. doxygenfunction:: hcall_assign_pcidev
|
||||||
|
:project: Project ACRN
|
||||||
|
|
||||||
|
.. doxygenfunction:: hcall_deassign_pcidev
|
||||||
|
:project: Project ACRN
|
||||||
|
|
Loading…
Reference in New Issue
Block a user