acrn-hypervisor/hypervisor
Sainath Grandhi 422330d4ab HV: reimplement PCI device discovery
Major changes:

1. Correct handling of device multi-function capability

We only check function zero for this feature. If it has it, we continue
looking at all remaining functions, ignoring those with invalid vendors.
The PCI spec says we are not to probe beyond function zero if it does
not exist or indicates it is not a multi-function device.

2a. Walk *ALL* buses in the PCI space, however,
Before walking the PCI hierarchy, post-processed ACPI DMAR info is parsed
and a map is created between all device-scopes across all DRHDs and the
corresponding IOMMU index.

This map is used at the time of walking the PCI hierarchy. If a BDF that
ACRN is currently working on, is found in the above-mentioned map, the
BDF device is mapped to the corresponding DRHD in the map.
If the BDF were a bridge type, realized with "Header Type" in config space,
the BDF device along with all its downstream devices are mapped to the
corresponding DRHD in the map.

To avoid walking previously visited buses, we maintain a bitmap that
stores which bus is walked when we handle Bridge type devices.

Once ACPI information is included into ACRN about the PCI-Express Root
Complexes / PCI Host Bridges, we can avoid the final loop which probes
all remainder buses, and instead jump to the next Host Bridge bus.

From prior patches, init_pdev returns the pdev structure it created to
the caller. This allows us to complete initialization by updating its
drhd_idx to the correct DRHD.

Tracked-On: #4134
Signed-off-by: Alexander Merritt <alex.merritt@intel.com>
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2019-11-27 09:49:32 +08:00
..
acpi_parser HV: move dmar info definition to board.c 2019-11-08 16:40:14 +08:00
arch/x86 HV: refactor device_to_dmaru 2019-11-27 09:49:32 +08:00
boot HV: move dmar info definition to board.c 2019-11-08 16:40:14 +08:00
bsp/ld hv: dmar_parse: remove dynamic memory allocation 2019-05-10 11:33:37 +08:00
common hv:refine 'uint64_t' string print format in comm moudle 2019-11-09 11:42:38 +08:00
debug hv:add dump_guest_mem 2019-11-26 10:58:19 +08:00
dm hv: modify printf "not support the vuart index parameter" in vuart_register_io_handler 2019-11-20 09:45:00 +08:00
hw HV: reimplement PCI device discovery 2019-11-27 09:49:32 +08:00
include HV: reimplement PCI device discovery 2019-11-27 09:49:32 +08:00
lib hv:tiny cleanup 2019-09-05 09:58:47 +08:00
pre_build hv:merge static_checks.c 2019-05-14 09:16:33 +08:00
release hv: uart: enable early boot uart 2019-07-26 09:10:06 +08:00
scenarios hv: Update industry scenarios configuration 2019-10-25 15:23:16 +08:00
scripts Makefile: move .mk file to hv scripts folder 2019-11-13 16:05:30 +08:00
Kconfig HV: config: add Kconfig and defconfigs for sbl & uefi 2018-06-08 17:21:13 +08:00
MAINTAINERS update home page information 2018-05-15 17:19:39 +08:00
Makefile Makefile: do not rm board acpi info header 2019-11-21 16:15:23 +08:00
README.rst doc: fix utf-8 punctuation, branding, spelling 2019-03-14 09:13:58 -07:00

README.rst

ACRN Hypervisor
###############

The open source `Project ACRN`_ defines a device hypervisor reference stack and
an architecture for running multiple software subsystems, managed securely, on
a consolidated system by means of a virtual machine manager. It also defines a
reference framework implementation for virtual device emulation, called the
"ACRN Device Model".

The ACRN Hypervisor is a Type 1 reference hypervisor stack, running directly on
the bare-metal hardware, and is suitable for a variety of IoT and embedded
device solutions. The ACRN hypervisor addresses the gap that currently exists
between datacenter hypervisors, and hard partitioning hypervisors. The ACRN
hypervisor architecture partitions the system into different functional
domains, with carefully selected guest OS sharing optimizations for IoT and
embedded devices.

You can find out more about Project ACRN on the `Project ACRN documentation`_
website.

.. _`Project ACRN`: https://projectacrn.org
.. _`ACRN Hypervisor`: https://github.com/projectacrn/acrn-hypervisor
.. _`Project ACRN documentation`: https://projectacrn.github.io/