acrn-hypervisor/hypervisor
Shiqing Gao d90dbc0d91 hv: check the capability of XSAVES/XRSTORS instructions before execution
For platforms that do not support XSAVES/XRSTORS instructions, like QEMU,
executing these instructions causes #UD.
This patch adds the check before the execution of XSAVES/XRSTORS instructions.

It also refines the logic inside rstore_xsave_area for the following reason:
If XSAVES/XRSTORS instructions are supported, restore XSAVE area if any of the
following conditions is met:
 1. "vcpu->launched" is false (state initialization for guest)
 2. "vcpu->arch.xsave_enabled" is true (state restoring for guest)

 * Before vCPU is launched, condition 1 is satisfied.
 * After vCPU is launched, condition 2 is satisfied because
   is_valid_xsave_combination() guarantees that "vcpu->arch.xsave_enabled"
   is consistent with pcpu_has_cap(X86_FEATURE_XSAVES).
Therefore, the check against "vcpu->launched" and "vcpu->arch.xsave_enabled"
can be eliminated here.

Tracked-On: #6481

Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@Intel.com>
2021-08-26 09:42:23 +08:00
..
acpi_parser hv: dm: Use new power management data structures 2021-07-15 11:53:54 +08:00
arch/x86 hv: check the capability of XSAVES/XRSTORS instructions before execution 2021-08-26 09:42:23 +08:00
boot HV: Add implements of 32bit and 64bit elf loader 2021-08-19 20:00:45 +08:00
bsp/ld HV: add a specific stack space used in CPU booting 2020-04-29 13:56:40 +08:00
common hv: minor cleanup of hv_main.c 2021-08-25 08:49:54 +08:00
debug ACRN:hv: Fix vcpu_dumpreg command hang issue 2021-08-25 08:54:27 +08:00
dm hv: mmiodev: a minor bug fix about refine acrn_mmiodev data structure 2021-08-19 12:01:35 +08:00
hw hv: ensure PTM root is always enabled in hw 2021-05-27 09:00:50 +08:00
include hv: Pass-through IA32_TSC_AUX MSR to L1 guest 2021-08-26 09:25:54 +08:00
lib HV: replace merge_cmdline api with strncat_s 2020-06-08 13:30:04 +08:00
quirks hv: quirks: SMBIOS passthrough for prelaunched-VM 2021-08-26 09:24:50 +08:00
release hv: debug: Add hv console callback to VM-exit event 2021-07-22 10:08:23 +08:00
scripts config_tools: remove obsolete kconfig files 2021-08-09 09:25:02 +08:00
MAINTAINERS update home page information 2018-05-15 17:19:39 +08:00
Makefile HV: Add elf loader sketch 2021-08-19 20:00:45 +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/