acrn-hypervisor/hypervisor
Zhao Yakui 296b649ae9 ACRN/HV: emulated pcicfg uses the aligned offset to fix the unaligned pci_cfg access
When the SOS kernel/pre-launched OS access the 0xCF8/0xCFC, it will cause
the vm-exit and then the hypervisor tries to emulate the PCI_cfg access.
0xCF8 write:  The bdf/reg is captured. cache_reg = value & (0xFF);
0xCFC-0xCFF read/write: offset = address - 0xCFC. Then cached_reg + offset is
used as the offset to access the pci_cfg.

If the aligned reg is passed in 0xCF8 register, it can work well. But when
the unaligned reg is passed in 0xCF8 register, the cached_reg + offset will cause
that the incorrect pci_cfg offset is accessed. For example:
   The cached_reg = 0x02(Device_ID offset) based on the value passed from 0xCF8
   offset = 2 based on 0xCFC-0xCFF address.
   Then cached_reg + offset is used as the offset(PCI_CMD_REG)

In fact the unaligned reg can work well on the real HW.

So the cached_reg should be aligned to handle the unaligned reg passed in
0xCF8 reg.

Tracked-On: #3249
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
2019-06-13 10:28:17 +08:00
..
acpi_parser hv: use 64bit FACS table address only beyond ACPI2.0 2019-05-30 16:47:19 +08:00
arch/x86 HV:Modularize vpic code to remove usage of acrn_vm 2019-06-13 09:54:52 +08:00
boot HV: misra fix for patch set of Zephyr enabling 2019-06-06 09:40:52 +08:00
bsp/ld hv: dmar_parse: remove dynamic memory allocation 2019-05-10 11:33:37 +08:00
common HV:Modularize vpic code to remove usage of acrn_vm 2019-06-13 09:54:52 +08:00
debug xHV: remove unused function is_dbg_uart_enabled 2019-05-22 16:36:03 +08:00
dm ACRN/HV: emulated pcicfg uses the aligned offset to fix the unaligned pci_cfg access 2019-06-13 10:28:17 +08:00
hw HV: remove function pci_pdev_foreach() 2019-05-23 14:06:51 +08:00
include ACRN/HV: emulated pcicfg uses the aligned offset to fix the unaligned pci_cfg access 2019-06-13 10:28:17 +08:00
lib 1. fix cpu family calculation 2019-05-21 10:37:17 +08:00
pre_build hv:merge static_checks.c 2019-05-14 09:16:33 +08:00
release xHV: remove unused function is_dbg_uart_enabled 2019-05-22 16:36:03 +08:00
scenarios HV: add hybrid scenario 2019-06-06 15:22:10 +08:00
scripts hv: remove CONFIG_PLATFORM_[SBL|UEFI] and UEFI_STUB 2019-03-13 10:26:55 +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 HV: add hybrid scenario 2019-06-06 15:22:10 +08:00
README.rst doc: fix utf-8 punctuation, branding, spelling 2019-03-14 09:13:58 -07:00

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/