In order to remove Kconfig from the build process, acrn-config shall
transform XML configuration files to config.h and config.mk by itself. This
patch adds XSLT scripts that do the trick.
Unfortunately, the scenario XML file along is not sufficient to generate
config.h and config.mk, though. In addition to resource
allocation (i.e. allocating physical RAM for the hypervisor), the
transformation also need to do the following:
1. Translate UART info in board XML into several configuration entries
depending on the UART selected in the scenario XML.
2. Use the MAX_MSIX_TABLE_NUM value in the board XML if the scenario
XML does not specify it.
In order to use XSLT to transform both XMLs in one shot, a template is
provided to create another XML that includes (using XInclude) both board
and scenario XMLs as sub-nodes. It will be instantiated once the
transformations are integrated in the following patch.
v2:
* Add `allocation.xml` to `unified.xml` to include the results from static
allocation.
* Use HV_RAM_START and HV_RAM_SIZE in allocation results if they are not
explicitly specified in the scenario XML.
Tracked-On: #5644
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
In order to split the allocation logic from tranformation in the
configuration tool, this patch introduces the `static_allocators` directory
under `misc/acrn-config` to host scripts that statically allocate
resources (currently the physical memory) and fill the scenario XML with
the results. The logic is extracted from the existing configuration tool
which allocates resources when transforming XML files, while XPath is used
to read and manipulate the XML when possible.
The aim is to make transformation from XML files to C configuration sources
to be more trivial and easier to express in descriptive languages like
XSLT.
v2:
* Instead of rewriting the scenario XML, the new version generates
allocation results to a new XML named `allocation.xml` so that the form
of the results are not restricted by the XML schema.
Tracked-On: #5644
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
In order for a unified interface for generating configuration sources from
board and scenario XMLs, this patch introduces a script named genconf.sh
which takes XML files as inputs and generate sources under the specified
directory. Once used in Makefiles, this script helps to minimize the
impacts on the Makefiles when we refine the configuration source generation
process in the future.
This patch also adds a non-zero return value to board_cfg_gen.py and
scenario_cfg_gen.py so that we do not need to inspect the logs to determine
if the generation succeeds.
Tracked-On: #5644
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
The commit 'Fix: HV: VM OS failed to assign new address to pci-vuart
BARs' need more reshuffle.
Tracked-On: #5491
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Signed-off-by: Eddie Dong <eddie.dong@intel.com>
When "signal_event" is called, "wait_event" will actually not block.
So it is ok to remove this line.
Tracked-On: #5605
Signed-off-by: Jie Deng <jie.deng@intel.com>
Now, we use hash table to maintain intx irq mapping by using
the key generated from sid. So once the entry is added,we can
not update source ide any more. Otherwise, we can't locate the
entry with the key generated from new source ide.
For source id change, remove_remapping/add_remapping is used
instead of update source id directly if entry was added already.
Tracked-On: #5640
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This patch move the split-lock logic into dedicated file
to reduce LOC. This may make the logic more clear.
Tracked-On: #5605
Signed-off-by: Jie Deng <jie.deng@intel.com>
This patch adds a cache register for VMX_PROC_VM_EXEC_CONTROLS
to avoid the frequent VMCS access.
Tracked-On: #5605
Signed-off-by: Jie Deng <jie.deng@intel.com>
The TF is visible to guest which may be modified by
the guest, so it is not a safe method to emulate the
split-lock. While MTF is specifically designed for
single-stepping in x86/Intel hardware virtualization
VT-x technology which is invisible to the guest. Use MTF
to single step the VCPU during the emulation of split lock.
Tracked-On: #5605
Signed-off-by: Jie Deng <jie.deng@intel.com>
For a SMP guest, split-lock check may happen on
multiple vCPUs simultaneously. In this case, one
vCPU at most can be allowed running in the
split-lock emulation window. And if the vCPU is
doing the emulation, it should never be blocked
in the hypervisor, it should go back to the guest
to execute the lock instruction immediately and
trap back to the hypervisor with #DB to complete the
split-lock emulation.
Tracked-On: #5605
Signed-off-by: Jie Deng <jie.deng@intel.com>
This patch basically reverts commit 22f24c229b
since virtio polling mode is still not ready in VxWorks official build.
commit 22f24c229b
Author: Kaige Fu <kaige.fu@intel.com>
Date: Thu Jun 13 09:24:07 2019 +0000
DM: Samples: Enable VxWorks as hard-rt VM
This patch adds --lapic_pt option to launch VxWorks as hard-rt VM.
End user could enable VxWorks as hard-rt VM with acrn-config tool, or add
below acrn-dm parameters in launch script:
" --lapic_pt \
--virtio_poll 1000000 \
-U $rtvm_uuid"
Tracked-On: #3069
Signed-off-by: Victor Sun <victor.sun@intel.com>
When wrong BAR address is set for pci-vuart, OS may assign a
new BAR address to it. Pci-vuart BAR can't be reprogrammed,
for its wrong fixed value. That can may because pci_vbar.fixed and
pci_vbar.type has overlap in abstraction, pci_vbar.fixed
has a confusing name, pci_vbar.type has PCIBAR_MEM64HI which is not
really a type of pci BARs.
So replace pci_vbar.type with pci_vbar.is_mem64hi, and change
pci_vbar.fixed to an union type with new name pci_vbar.bar_type.
Tracked-On: #5491
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Update the documentation for how to build ACRN documents
(tutorial/docbuild.rst) and the scripts/requirements.txt that lists the
tested configuration of python tools being used.
Previous merged commits have already been made to handle doc builds with
the previous (2.3 documented configuration and the new v2.4
configuration.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Update known-issues list to eliminate known warnings for duplicate
declaration warnings because of breathe/sphinx upgrades.
Update conf.py to check sphinx version and use appropriate way to
include extra javascript and css files depending on the version.
Both of these changes will allow the old and new doc tools to not show
unanticipated warnings or errors and allow for a smooth upgrade to the
CI system (and contributors local doc builds).
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
We have trapped the #DB for split-lock emulation.
Only fault exception need RIP being retained.
Tracked-On: #5605
Signed-off-by: Jie Deng <jie.deng@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
xchg may also cause the #AC for split-lock check.
This patch adds this emulation.
1. Kick other vcpus of the guest to stop execution
if the guest has more than one vcpu.
2. Emulate the xchg instruction.
3. Notify other vcpus (if any) to restart execution.
Tracked-On: #5605
Signed-off-by: Jie Deng <jie.deng@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This patch adds the split-lock emulation.
If a #AC is caused by instruction with LOCK prefix then
emulate it, otherwise, inject it back as it used to be.
1. Kick other vcpus of the guest to stop execution
and set the TF flag to have #DB if the guest has more
than one vcpu.
2. Skip over the LOCK prefix and resume the current
vcpu back to guest for execution.
3. Notify other vcpus to restart exception at the end
of handling the #DB since we have completed
the LOCK prefix instruction emulation.
Tracked-On: #5605
Signed-off-by: Jie Deng <jie.deng@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
code-block content wasn't indented in a recent change so wasn't included
in the code-block formatting
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
configure the entry number of vcpu_clos same as the entry number
of pcpu_id to avoid sanity check error.
Tracked-On: #5600
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Since GVT-g isn't enable for new platform (i.e TGL EHL CFL),
update the doc about using GVT-d GOP to create WaaG image.
Signed-off-by: fuzhongl <fuzhong.liu@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com
Specify the version of 'sphinx-tabs' to be installed in order
to be able to build the documentation. Without this, the latest
is installed but is incompatible with 'sphinx==1.7.7' as specified
in our doc/scripts/requirements' file.
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
LICENSE file copyright must reflect latest year of contributions
(before this update, it said 2017-2018).
Tracked-On: #5611
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
add cfl-k700-i7 into tpm supprted boards to enable tpm
passthru to the pre-launched vm.
Tracked-On: #5614
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
Currently, OVMF sets CR4.MCE bit without
any hardware support checking, this will cause
User VM boot fails as MCE feature is not available
for ACRN guest VM.
This patch walk around this issue in OVMF.
Tracked-On: #5586
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Check hardware support for all features in CR4,
and hide bits from guest by vcpuid if they're not supported
for guests OS.
Tracked-On: #5586
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
- The current code to virtualize CR0/CR4 is not
well designed, and hard to read.
This patch reshuffle the logic to make it clear
and classify those bits into PASSTHRU,
TRAP_AND_PASSTHRU, TRAP_AND_EMULATE & reserved bits.
Tracked-On: #5586
Signed-off-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
some RT related boot arguments are needed for preempt-rt linux.
add them in configure file built in for EHL board.
for EHL, it is booted with SBL, not like GRUB, extra boot arguments
can be added; so better to be built in.
Tracked-On: #5606
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Automatically update the copyright year on the page footers to be
2018-[current_year] when generating documentation.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
As part of the trademark registration for ACRN, it is helpful to
ensure that the logo is displayed on the same page from which the
ACRN code can be downloaded.
This PR adds the logo and updates the README file to display it.
Tracked-On: #5601
Signed-off-by: Steve Winslow <steve@swinslow.net>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The function validate if the legacy vuart1 and its target_vm_id are
paired. However, it dynamically modifies the tracking list. It would try
to access an invalid keys which has been removed.
Refine the logic to add a valid paired legacy vuart1 to new list.
Tracked-On: #5592
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
Explicitly set the SHELL variable in the top-level Makefile. This ensures that
'echo -e' as used in the Makefile behaves correctly on various systems. It does
require /bin/bash to be present but that is probably true on many systems.
Tracked-On: #5588
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
This reverts commit e2590d88aa. It introdcues a
regression for systems that have '/bin/sh' pointing at '/bin/bash'.
Tracked-On: #5588
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
* Add newline before `sudo reboot` in User VM section.
* Add `cd ~/acrn/tools/` before downloading script in User VM section.
Signed-off-by: ChenYing Kuo <chenying.kuo@adlinktech.com>
Small updates to the Getting Started Guide:
* Add a missing command
* Add a note for the Grub configuration
* Make the 'blkid' hint consistent with the environment
Tracked-On: #5594
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Adding a new GSG contributed by ADLINK for installing an ACRN Industry
Scenario on their ROScube-I system.
Signed-off-by: ChenYing Kuo <chenying.kuo@adlinktech.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The function getchildren() is removed from xml.etree.ElementTree.Element
on python3.9, update the function to list() to make config tool
compatible with python3.9.
Tracked-On: #5570
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
- Format some section title
- Add one more section.
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>