mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-13 19:44:06 +00:00
check if there are enough free huge pages(1GB & 2MB now) for UOS, if no, it will try to reserve more pages for UOS. here are two examples 1. if system has free huge pages: 1 page of 1GB size, 0 page of 2MB. one UOS need 2GB + 500MB memory, it will try to reserve one more 1GB page and 250 2MB pages from system. If enough free system memory, it can succeed. 2. if system has free huge pages: 4 pages of 1GB size, 0 page of 2MB. one UOS need 2GB + 500MB, 1GB huge pages 4 > 2, it's enough, and 2 pages left. It will try to reserve 250 2MB pages from system free memory, if failed, it will try to release 1 of the 2 left 1GB pages. And then try to reserve 250 2MB pages. Signed-off-by: Minggui Cao <minggui.cao@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
ACRN Device Model
#################
Introduction
============
The ACRN Device Model provides **device sharing** capabilities between the Service OS and Guest OSs. It is a component that is used in conjunction with the `ACRN Hypervisor`_ and this is installed within the Service OS. You can find out more about Project ACRN on the `Project ACRN documentation`_ website.
Building the Device Model
=========================
Build dependencies
******************
* For Clear Linux
.. code-block:: console
sudo swupd bundle-add os-clr-on-clr \
os-utils-gui-dev
* For CentOS
.. code-block:: console
sudo yum install gcc \
libuuid-devel \
openssl-devel \
libpciaccess-devel \
libusb-devel
* For Fedora 27
.. code-block:: console
sudo dnf install gcc \
libuuid-devel \
openssl-devel \
libpciaccess-devel \
libusb-devel
Build
*****
To build the Device Model
.. code-block:: console
make
To clean the build artefacts
.. code-block:: console
make clean
Runtime dependencies
********************
* On CentOS
.. code-block:: console
sudo yum install openssl-libs \
zlib \
libpciaccess \
libuuid \
libusb
* On Fedora 27
.. code-block:: console
sudo dnf install openssl-libs \
zlib \
libpciaccess \
libuuid \
libusb
.. _`ACRN Hypervisor`: https://github.com/projectacrn/acrn-hypervisor
.. _`Project ACRN documentation`: https://projectacrn.github.io/