mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-02 20:35:32 +00:00
In the current hypervisor design, when HPA is not found for the specified gpa by calling gpa2hpa or local_gpa2hpa, 0 will be returned as a error code, but 0 may be a valid HPA for vm0; error checking is missed when invoking gpa2hpa or local_gpa2hpa; when invoking lookup_address, the caller guarantees that parameter pointer pml4_page and pointer pg_size is not NULL. If local_gpa2hpa/gpa2hpa returns a invalid HPA, it means that this function fails to find the HPA of the specified gpa of vm. If local_gpa2hpa/gpa2hpa return value is a valid HPA, it means that this function have found the HPA of the specified gpa of vm. Each valid vm's EPTP is initialized during vm creating, vm's EPTP is valid until this vm is destroyed. So the caller can guarantee parameter pointer pml4_page is not NULL. The caller uses a temporary variable to store page size. So the caller can guarantee parameter pointer pg_size is not NULL. In this patch, define a invalid HPA for gpa2hpa and local_gpa2hpa;add some error checking when invoking local_gpa2hpa/gpa2hpa;add precondition for lookup_address function and remove redundant error checking. V1-->V2: Define INVALID_HPA as a invalid HPA for gpa2hpa and local_gpa2hpa; Updated related error checking when invoking gpa2hpa or local_gpa2hpa; V2-->V3: Add some debug information if specified gpa2hpa mapping doesn't exit and ept_mr_del is called; Update INVALID_HPA definition easier to be reviewed. V3-->V4: Add vm->id and gpa into pr_error; Add precondition to ept_mr_del to cover [gpa,gpa+size) unmapping case. V4-->V5: Update comments; Update pr_error message. Tracked-On: #1258 Signed-off-by: Xiangyang Wu <xiangyang.wu@linux.intel.com> Reviewed-by: Li, Fei1 <fei1.li@intel.com> |
||
---|---|---|
.. | ||
arch/x86 | ||
boot | ||
bsp | ||
common | ||
debug | ||
dm | ||
include | ||
lib | ||
partition | ||
scripts/kconfig | ||
Kconfig | ||
MAINTAINERS | ||
Makefile | ||
README.rst |
Embedded-Hypervisor ################### This open source embedded hypervisor defines a software architecture for running multiple software subsystems managed securely on a consolidated system (by means of a virtual machine manager), and defines a reference framework Device Model implementation for devices emulation This embedded hypervisor is type-1 reference hypervisor, running directly on the system hardware. It can be used for building software defined cockpit (SDC) or In-Vehicle Experience (IVE) solutions running on Intel Architecture Apollo Lake platforms. As a reference implementation, it provides the basis for embedded hypervisor vendors to build solutions with an open source reference I/O mediation solution, and provides auto makers a reference software stack for SDC usage. This embedded hypervisor is able to support both Linux* and Android* as a Guest OS, managed by the hypervisor, where applications can run. This embedded hypervisor is a partitioning hypervisor reference stack, also suitable for non-automotive IoT & embedded device solutions. It will be addressing the gap that currently exists between datacenter hypervisors, hard partitioning hypervisors, and select industrial applications. Extending the scope of this open source embedded hypervisor relies on the involvement of community developers like you!