Commit Graph

6829 Commits

Author SHA1 Message Date
Kunhui-Li 0caf214cf1 config_tools: fix UI issue that don't export xml file successfully
call default_populator.py to expand the default value in the
scenario XML file to fix the issue that don't export xml successfully
in UI when user to click the 'Export XML' button to export scenario xml
file because that the unexpanded xml does not conform to schema check.

Tracked-On: #6292
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-10-21 15:19:21 +08:00
Junjie Mao aceae3a30f config_tools: update vTPM2 revision to 4
According to TCG ACPI specification (version 1.2), the current revision of
TPM2 table, which has the optional log area fields, is 4. This patch
updates the revision of vTPM2 accordingly.

Tracked-On: #6288
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2021-10-21 12:58:43 +08:00
Junjie Mao ebee11ae11 board_inspector: add _CID to vACPI device objects
ACPI device drivers use both _HID and _CID to identify devices they
match. This patch copies _CID objects to vACPI devices so that guest
drivers can recognize the passthrough devices properly.

Tracked-On: #6288
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2021-10-21 12:58:43 +08:00
Amy Reyes ca32ae7e3d doc: terminology cleanup in hv-dev-passthrough.rst
- Change UOS and SOS to User VM and Service VM, respectively
- Change guest to VM or similar depending on context
- Clean up some of the grammar

Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-10-20 11:00:40 -07:00
Yifan Liu 00631f113f dm: TPM2 passthrough for post-launched VM with eventlog support
This patch enables TPM2 passthrough to post-launched VM with eventlog
support.
User starts by providing command line "--acpidev_pt <TPM2_HID>",
of which the <TPM2_HID> will be searched from /proc/iomem for TPM2 buffer
start address and size. Furthermore, If TPM2 eventlog is supported,
TPM2 eventlog information will be retrieved from sysfs TPM2 table and
passed-through as well.

v4 -> v5:
move tpm2 related logic from acpi.c to tpm.c
multiple API rename

Tracked-On: #6686
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2021-10-20 12:15:37 +08:00
Yifan Liu ad5eb6e23d dm: Refine ACPI device passthrough framework
This patch refines the ACPI device passthrough framework by defining a
generic framework. Note that when user gives an HID by "--acpidev_pt
<HID>", the pt logic will go through all registered ops to see if
there's a match.

v4 -> v5:
parse_pt_acpidev/parse_pt_mmiodev -> create_pt_acpidev/create_pt_mmiodev
    (there were already "init_xxx" function present, so rename to
    create_xxx)
"super user" -> "superuser"
multiple API renames

Tracked-On: #6686
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2021-10-20 12:15:37 +08:00
David B. Kinder e0bb4c800d doc: tweak python requirements for doc building
Add compatible version ranges for breathe and sphinx to appease check by
show-versions.py

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-10-19 18:20:36 -07:00
David B. Kinder e2e33f76b9 doc: update to sphinx_rtd_theme 1.0
The sphinx_rtd_theme 1.0 includes simplified configuration for Google
analytics, along with general fixes and improvements.

Anyone publishing project documentation to projectacrn.github.io must be
using this updated sphinx_rtd_theme for Google Analytics data to be
properly collected.

* Switch to use this new theme version, and clean up the previous method
  of collecting analytics data.
* Update requirements.txt to use this new theme version. Update the
  show-versions.py script (used to report on installed doc building tools)
  to also report if there's a mismatch on which version is expected (in
  requirements.txt) and what's currently installed.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-10-19 13:04:01 -07:00
David B. Kinder 3bbab125b1 doc: prepare docs for removal of HV_RAM_SIZE option
HV_RAM_SIZE will be eliminated as a configuration option so we'll need
to remove references to it in the documentation.

See PR #6664 and PR #6681

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-10-19 07:14:05 -07:00
Fei Li a5541a9011 dm: pci: minor bug fix about uninitialized local variable
'error' might be used uninitialized in cfginitbar. So initialize it to zero
at the beginning.

Tracked-On: #6284
Signed-off-by: Fei Li <fei1.li@intel.com>
2021-10-19 13:16:23 +08:00
David B. Kinder 2913395123 doc: update uses of VHM in doxygen comments
PR #6283 updated code and docs to the new kernel HSM driver. Fix
some references to VHM missed in the doxygen comments. Also fixed some
misspellings while in these files.

Tracked-On: #6282

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-10-18 19:09:07 -07:00
Liu,Junming 79a5d7a787 hv: initialize IGD offset 0xfc of CFG space for Service VM
For the IGD device the opregion addr is returned by reading the 0xFC config of
0:02.0 bdf. And the opregion addr is required by GPU driver.
The opregion_addr should be the GPA addr.

When the IGD is assigned to pre-launched VM, the value in 0xFC of igd_vdev is
programmed into with new GPA addr. In such case the prelaunched VM reads
the value from 0xFC of 0:02.0 vdev.

But for the Service VM, the IGD is initialized by using the same policy as other PCI
devices. We only initialize the vdev_head_conf(0x0-0x3F) by checking the
corresponding pbdf. The remaining pci_config_space will be read by
leveraging the corresponding pdev. But as the above code doesn't handle the
scenario for Service VM, it causes that the Service VM fails to
read the 0xFC config_space for IGD vdev.
Then the i915 GPU driver in SOS has some issues because of incorrect 0xFC
pci_conf_space.

This patch initializes offset 0xfc of CFG space of IGD for Service VM,
it is simple and can cover post-launched VM too.

Tracked-On: #6387

Signed-off-by: Liu,Junming <junming.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2021-10-18 09:11:16 +08:00
Kunhui-Li 9f5ef31c9f config_tools: add Board Inspector tool success message
add Board Inspector tool success message after users were successful
creating the board configuration file.

Tracked-On: #6670
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-10-17 15:35:39 +08:00
Xiangyang Wu dec8d7e22f hv: support at most MAX_VUART_NUM_PER_VM legacy vuarts
In the current hypervisor, only support at most two legacy vuarts
(COM1 and COM2) for a VM, COM1 is usually configured as VM console,
COM2 is configured as communication channel of S5 feature.
Hypervisor can support MAX_VUART_NUM_PER_VM(8) legacy vuart, but only
register handlers for two legacy vuart since the assumption (legacy
vuart is less than 2) is made.
In the current hypervisor configurtion, io port (2F8H) is always
allocated for virtual COM2, it will be not friendly if user wants to
assign this port to physical COM2.
Legacy vuart is common communication channel between service VM and
user VM, it can work in polling mode and its driver exits in each
guest OS. The channel can be used to send shutdown command to user VM
in S5 featuare, so need to config serval vuarts for service VM and one
vuart for each user VM.

The following changes will be made to support at most
MAX_VUART_NUM_PER_VM legacy vuarts:
   - Refine legacy vuarts initialization to register PIO handler for
related vuart.
   - Update assumption of legacy vuart number.

BTW, config tools updates about legacy vuarts will be made in other
patch.

v1-->v2:
	Update commit message to make this patch's purpose clearer;
	If vuart index is valid, register handler for it.

Tracked-On: #6652
Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@Intel.com>
2021-10-15 10:00:02 +08:00
Amy Reyes ef1b10349b doc: Delete old files from getting-started folder
- Delete Photoshop (.psd) files that are outdated and no longer needed

Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-10-14 07:58:47 -07:00
David B. Kinder 82853a53e1 doc: more scenario name fixes
Update logical partition to simply partitioned.

Remaining references to logical partition are because the documentation
is validated for releases prior to the scenario renaming.  When those
are updated to be tested with a newer release, we'll update the
documentation accordingly.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-10-14 07:54:30 -07:00
Fei Li 6c5bf4a642 hv: enhance e820_alloc_memory could allocate memory than 4G
Enhance e820_alloc_memory could allocate memory than 4G.

Tracked-On: #5830
Signed-off-by: Fei Li <fei1.li@intel.com>
2021-10-14 15:04:36 +08:00
Fei Li df7ffab441 hv: remove CONFIG_HV_RAM_SIZE
It's difficult to configure CONFIG_HV_RAM_SIZE properly at once. This patch
not only remove CONFIG_HV_RAM_SIZE, but also we use ld linker script to
dynamically get the size of HV RAM size.

Tracked-On: #6663
Signed-off-by: Fei Li <fei1.li@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2021-10-14 15:04:36 +08:00
Liu Hang1 7c2c3ad636 doc: add acrn-dm parameter emul explanation
add the emul list table to acrn-dm paramter
chapter

Tracked-On: #5406

Signed-off-by: Liu Hang1 <hang1.liu@intel.com>
2021-10-13 15:24:17 -07:00
Amy Reyes ae5fc5e494 doc: Update config tool doc and gsg per UI changes
- Update text and screenshots per UI changes in PR 6549

Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-10-13 11:31:45 -07:00
Zide Chen e48962faa6 hv: optimize run_vcpu() for nested
This patch implements a separate path for L2 VMEntry in run_vcpu(),
which has several benefits:

- keep run_vcpu() clean, to reduce the number of is_vcpu_in_l2_guest()
  statements:
  - current code has three is_vcpu_in_l2_guest() already.
  - supposed to have another 2 statement so that nested VMEntry won't
    hit the "Starting vCPU" and "vCPU launched" pr_info() and a few
    other statements in the VM launch path.

- save few other things in run_vcpu() that are not needed for nested.

Tracked-On: #6289
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@Intel.com>
2021-10-13 15:55:31 +08:00
David B. Kinder 0c677fd3b4 doc: remove unreferenced images
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-10-11 18:20:12 -07:00
Amy Reyes 538d497981 Address review feedback in hld-splitlock.rst
Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-10-11 13:01:50 -07:00
Amy Reyes b9cad70614 doc: Change "configuration tool" to "ACRN configurator tool"
- Change "configuration tool" to "ACRN configurator tool" to match the tool's UI
- Change "configuration toolset" to "ACRN configurator tool" in cases that clearly refer to the configurator and not the entire toolset, update cross-ref

Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-10-11 13:01:50 -07:00
David B. Kinder 7bcfd58f05 doc: update GSG with DX recommendations
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-10-11 11:51:45 -07:00
David B. Kinder 5e0e6b434c doc: fix cumulative issues in GSG from DX study
Address a collection of small issues in the GSG:
- remove mention of the (optional) serial port use
- update recommended development computer memory size
- mention why there are six user VM launch scripts (and that we're only going to
  use one of them)
- clarify how OS installed for running board inspector is modified with
  the Linux kernel built using board and configuration information
- add commands used to confirm files are in the expected directories
- remove specific BIOS example (keep just settings info)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-10-11 09:37:06 -07:00
Yang,Yu-chu 4856ac9336 config-tools: refine xpath to pci host bridge
Looks for host bridge with address = '0x0'.

Tracked-On: #6024
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2021-10-09 09:59:59 +08:00
Yang,Yu-chu 4651836f50 config-tools: allocate io-port address for legacy vuarts
If a legacy vuart base is configured as "CONFIG_COM_BASE", allocate a
base with unused io-port address with length 0x10.

The post-launched VM's unused io-port address range is [0xD00, 0xFFFF].
The pre-launched VM's unused io-port address range is [0xD00, 0xFFFF]
but the passthrough devices' io-port address are reserved.
The SOS VM's unused io-port address range is [0xD00, 0xFFFF] but any
native devices' io-port address are reserved. However, the io-port
address which is passed through to any pre-launched is reusable.

Tracked-On: #6652
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2021-10-09 09:47:22 +08:00
Yang,Yu-chu 69e37b96f3 config-tools: allow vm to configure up to 8 legacy vuarts
Expand the capacity of legacy vuarts per VM. This change is applied to
manual scenario xml editing only.

A SOS VM can choose io port 0x3F8, 0x2F8, 0x3E8, 0x2E8 by selecting
SOS_COM1_BASE, SOS_COM2_BASE, SOS_COM3_BASE, SOS_COM4_BASE respectively.

Non SOS VM can choose io port 0x3F8, 0x2F8, 0x3E8, 0x2E8 by selecting
COM1_BASE, COM2_BASE, COM3_BASE, COM4_BASE respectively.

For any type of VM, selecting "CONFIG_COM_BASE" allows configuration tool
to pick an available io port from hardcoded list:
['0xA000', '0xA010', '0xA020', '0xA030', '0xA040', '0xA050', '0xA060', '0xA070']

A SOS VM can choose irq 4 by selecting SOS_COM1_IRQ and SOS_COM3_IRQ, and choose irq 3 by selecting SOS_COM2_IRQ and SOS_COM4_IRQ.

Non SOS VM can choose irq 4 by selecting COM1_IRQ and COM3_IRQ, and choose irq 3 by selecting COM2_IRQ and COM4_IRQ.

For SOS VM, selecting "CONFIG_COM_IRQ" allows configuration tool
to pick an available irq based on AVAILABLE_IRQ_INFO. For non SOS VM, it
will allocate an available irq from [1, 15].

Tracked-On: #6652
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2021-10-09 09:47:22 +08:00
Zide Chen 89bbc44962 hv: inject external interrupts only if LAPIC is not passthru
Tracked-On: #6289
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@Intel.com>
2021-10-08 09:18:34 +08:00
Zide Chen 228b052fdb hv: operations on vcpu->reg_cached/reg_updated don't need LOCK prefix
In run time, one vCPU won't read or write a register on other vCPUs,
thus we don't need the LOCK prefixed instructions on reg_cached and
reg_updated.

Tracked-On: #6289
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2021-10-08 09:11:10 +08:00
Zide Chen 2b683f8f5b hv: call vcpu_inject_exception() only when ACRN_REQUEST_EXCP is set
move the bitmap test call out of vcpu_inject_exception(), then we call
the expensive bitmap_test_and_clear_lock() only pending_req_bits is
non-zero and call vcpu_inject_exception() only if needed.

Tracked-On: #6289
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@Intel.com>
2021-10-07 20:48:43 +08:00
Zide Chen f801ba4ed7 hv: update guest RIP only if vcpu->arch.inst_len is non zero
In very large number of VM extis, the VM-exit instruction length could be
zero, and it's no need to update VMX_GUEST_RIP.

Some examples:

- all external interrupt VM exits in non LAPIC passthru setup.
- for all the nested VM-exits that are reflecting to L1 hypervisor.

Tracked-On: #6289
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2021-10-07 20:47:07 +08:00
Zide Chen b7e9a68923 hv: code cleanup in run_vcpu()
- wrap a new function exec_vmentry() to reduce code duplication.
- remove exec_vmread(VMX_GUEST_RSP) since ACRN doesn't need to know
  guest RSP in run time.

Tracked-On: #6289
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2021-10-07 20:47:07 +08:00
Zide Chen ee12daff84 hv: nested: refine vmcs12_read/write_field APIs
Change "uint64_t vmcs_hva" to "void *vmcs_hva" in the input argument,
list, so that no type casting is needed when calling them from pointers.

Tracked-On: #6289
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2021-10-07 20:45:34 +08:00
David B. Kinder e03f0045dc doc: update docs and images to match scenario names
Update the docs and images referencing ``industry`` and ``logical_partition`` scenarios to
``shared`` and ``partioned``.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-10-04 15:53:45 -07:00
David B. Kinder 8ccb0d3e74 doc: missed one more VHM in images
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-30 14:18:04 -07:00
David B. Kinder ea4328f5f4 doc: GSG apt install command DX improvement
As recommended, add a ``-y`` to the ``apt install`` commands so they
don't prompt the user to confirm the installation, seen as unnecessary
in this context.

Also, wrap lines that are longer then 80 chars to improve git reviews
and follow our doc conventions.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-30 11:08:48 -07:00
Geoffroy Van Cutsem e18d99ef65 doc: Update "Enable S5 in ACRN" tutorial
Update the "Enable S5 in ACRN" tutorial to:
* Make the language clearer at places
* Consistent use of "Lifecycle Manager" and "life_mngr"
* Change "ACK" to "ACKED"
* Use a ReST reference to point at the architectural diagram
* Update build instructions
* Replace 'literalinclude' by static code-blocks to avoid the
  content going out of date

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2021-09-30 11:08:27 -07:00
David B. Kinder b81153145d doc: update images with VHM to use HSM
Change references to VHM to HSM (Hypervisor Service Module) in images.
While in these files, update SOS (to Service VM) and UOS (to User VM) as
well.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-30 08:45:46 -07:00
wenlingz 88789e3b03 version:2.7-unstable
Signed-off-by: wenlingz <wenling.zhang@intel.com>
2021-09-30 09:39:49 +08:00
Kunhui-Li 2a8c587824 config_tools: update board name in makefile
update board name from nuc7i7dnb to nuc11tnbi5 in makefile because
we have removed the nuc7i7dnb board folder, and also update the
scenario name from industry to shared to fix "make all" build issue.

Tracked-On: #6315
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-09-29 16:53:44 +08:00
Kunhui-Li 65230289f4 config_tools: clean up board folders under data directory
1. move tgl-rvp and ehl-crb-b folders under data directory to 1source.
2. delete nuc7i7dnb and whl-ipc-i7 folders under data directory.

Tracked-On: #6315
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-09-29 09:41:16 +08:00
David B. Kinder dc17068781 doc: add v2.6 to doc menu selector
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-28 13:55:05 -07:00
David B. Kinder d8e0b7df43 doc: update redirects for deleted docs
Add a couple of redirect pages for 404 errors noted in analytics data,
and add replace the deleted roscube GSG with a doc linking to the last
updated version in v2.5.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-28 11:52:48 -07:00
David B. Kinder 0f55ae4001 doc: remove draft status on 2.6 release notes
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-28 09:40:01 -07:00
David B. Kinder 732a399215 doc: fix utf8 chars and missing EOF newlines
Fix some stray and missing characters, and extra newlines.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-28 09:34:41 -07:00
Amy Reyes 6d7d417a9f Add default makefile target
Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-09-28 08:59:08 -07:00
Amy Reyes 6e4e619e17 Address review feedback for launch config options, makefile options, intro
Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-09-28 08:59:08 -07:00
Amy Reyes b203e7e958 Address review comments
Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-09-28 08:59:08 -07:00