Commit Graph

6584 Commits

Author SHA1 Message Date
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
Amy Reyes 0ac609b5d8 doc: create ACRN config tool/board inspector docs
- Create ACRN config tool doc based on info in existing "Intro to ACRN Configuration" doc, add clarifications
- Create board inspector tool doc based on info in existing "Intro to ACRN Configuration" doc, add clarifications
- Create launch config options doc based on info in existing "Intro to ACRN Configuration" doc, similar to existing scenario config options doc
- Update refs that no longer exist
- Create hypervisor makefile options doc, combining makefile info from "Intro to ACRN Configuration" doc and "Build ACRN from Source" doc
- Clarify why you need config files, difference between scenario vs. launch VM settings
- Updates are intended to reflect v2.6 code

Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-09-28 08:59:08 -07:00
fuzhongl 6700a510be Doc: Add known issue and fixed issue in release note
Signed-off-by: fuzhongl <fuzhong.liu@eintel.com>
2021-09-28 08:51:34 -07:00
David B. Kinder 60baaea3cd doc: update checkout branch in GSG
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-27 19:11:31 -07:00
David B. Kinder b4967081bf doc: cleanup/update glossary terms
There are many graphics-related terms in the glossary that are not
referenced in the documentation.  Remove those terms, and clarify new
terms in our updated GSG and introductory docs.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-27 19:04:50 -07:00
Liu,Junming 545c006a33 hv: inject #GP if guest tries to reprogram pass-thru dev PIO bar
In current design, when pass-thru dev,
for the PIO bar, need to ensure the guest PIO start address
equals to host PIO start address.

But malicious guest may reprogram the PIO bar,
then hv will pass-thru the reprogramed PIO address to guest.
This isn't safe behavior.
When guest tries to reprogram pass-thru dev PIO bar,
inject #GP to guest directly.

Tracked-On: #6508

Signed-off-by: Liu,Junming <junming.liu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Fei Li <fei1.li@intel.com>
2021-09-28 08:49:01 +08:00
Liu,Junming 4105ca2cb4 hv: deny the launch of VM if pass-thru PIO bar isn't identical mapping
In current design, when pass-thru dev,
for the PIO bar, need to ensure the guest PIO start address
equals to host PIO start address.
Then set the VMCS io bitmap to pass-thru the corresponding
port io to guest for performance.

ACRN-DM and acrn-config should ensure the identical mapping of PIO bar.
If ACRN-DM or acrn-config failed to achieve this,
we should deny the launch of VM

Tracked-On: #6508

Signed-off-by: Liu,Junming <junming.liu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Fei Li <fei1.li@intel.com>
2021-09-28 08:49:01 +08:00
Yonghua Huang 275a274673 doc: update 'asa.rst' for 2.6 release
Update security vulnerability fix in 2.6 release.

Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-27 10:35:16 -07:00
jackwhich 0f05204cbc doc: Update logical_partition documentation
1.Modified Intel Whiskey Lake to Intel NUC Kit NUC11TNBi5
2.Change the logical partition and mixed test motherboard name

Signed-off-by: zhongzhenx.liu <zhongzhenx.liu@intel.com>
2021-09-27 10:26:03 -07:00
Victor Sun 28824c1e74 HV: init e820 before init paging
In the commit of 4e1deab3d9, we changed the
init sequence that init paging first and then init e820 because we worried
about the efi memory map could be beyond 4GB space on some platform.

After we double checked multiboot2 spec, when system boot from multiboot2
protocol, the efi memory map info will be embedded in multiboot info so it
is guaranteed that the efi memory map must be under 4GB space. Consider that
the page table will be allocated in free memory space in future, we have
to change the init sequence back that init e820 first and then init paging.

If we need to support other boot protocol in future that the efi memory map
might be put beyond 4GB, we could have below options:
	1. Request bootloader put efi memory map below 4GB;
	2. Call EFI_BOOT_SERVICES.GetMemoryMap() before ExitBootServices();
	3. Enable a early 64bit page table to get the efi memory map only;

Tracked-On: #5626

Signed-off-by: Victor Sun <victor.sun@intel.com>
2021-09-27 09:03:15 +08:00
Yang,Yu-chu 8f2ede9cfd config-tools: pci devices' io-ports passthrough
Pass through the io-ports for the passthrough pci devices of
pre-launched VM.

Three parts to support this feature:
1. Identical map the pci devices io-port address for pre-launched VM
2. Set the io-ports address range to DSDT
3. Avoid to allocate the bar index for VMSIX

Tracked-On: #6620
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2021-09-26 09:21:11 +08:00
Zide Chen a62dd6ad8a hv: nested: fixed vmxoff_vmexit_handler() issue
In VMXOFF vmexit handler, it's supposed to remove VMCS shadowing.

Tracked-On: #6289
Signed-off-by: Zide Chen <zide.chen@intel.com>
2021-09-26 08:49:35 +08:00
Zide Chen 45b036e028 hv: nested: enable multiple active VMCS12 support
This patch changes the size of vvmcs[] array from 1 to
PER_VCPU_ACTIVE_VVMCS_NUM, and actually enables multiple active VMCS12
support in ACRN.  The basic operations:

- if L1 VMPTRLDs a VMCS12 without previously VMCLEAR the current
  VMCS12, ACRN no longer unconditionally flushes the current VMCS12
  back to L1.  Instead, it tries to keep both the current and the newly
  loaded VMCS12 in the nested->vvmcs[] array, unless:

- if there is no more available vvmcs[] entry, ACRN flushes one active
  VMCS12 to make room for this new VMCS12.

Tracked-On: #6289
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2021-09-26 08:49:35 +08:00
David B. Kinder ce8d69333a doc: remove enable ptm tutorial
Enabling PTM requires some additional engineering work, so we're
removing these instructions for now.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-24 16:08:10 -07:00
David B. Kinder bd57475854 doc: add iomem kernel parameter for board inspector
Without this ``iomem=relaxed`` kernel parameter, the generated board XML
is essentially the same as having ``--basic`` when executing the board
inspector, i.e. the ACPI namespace will not be parsed. The generated
board XML may still work, but some functionality (e.g. passthru of TPM
and other PCI devices that need INTx) will no longer work due to lack of
hardware information.

Replacing PR #6618

Tracked-On: #5692

Signed-off-by: zhongzhenx.liu <zhongzhenx.liu@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-24 11:40:24 -07:00
Mingqiang Chi f39c882359 hv:change log level for check_vmx_ctrl
Some processors don't support VMX_PROCBASED_CTLS_TERTIARY bit
and VMX_PROCBASED_CTLS2_UWAIT_PAUSE bit in MSRs
(IA32_VMX_PROCBASED_CTLS & IA32_VMX_PROCBASED_CTLS2),
HV will output error log which will cause confusion,
change the log level from pr_err to pr_info.

Tracked-On: #6397

Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
2021-09-24 10:17:19 +08:00
Jie Deng 064fd7647f hv: add priority based scheduler
This patch adds a new priority based scheduler to support
vCPU scheduling based on their pre-configured priorities.
A vCPU can be running only if there is no higher priority
vCPU running on the same pCPU.

Tracked-On: #6571
Signed-off-by: Jie Deng <jie.deng@intel.com>
2021-09-24 09:32:18 +08:00
David B. Kinder dfe49ee972 doc: update serial port instructions in scenario GSGs
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-23 16:28:12 -07:00
jackwhich f591a249e2 doc: Steps to update hybrid and logical_Partition documents
1.Modify hybrid update ubuntu grub Note: The syntax is easy for users to understand.
2.Add to view the serial port number, enter the serial hybrid verification mode.
3.Delete the kernel, because the config_uos file has been abandoned for maintenance,
  now the Ubuntu native kernel image is used and added to the document.
4.Add to view the serial port number, enter the serial port logic_partition verification method.

Signed-off-by: zhongzhenx.liu <zhongzhenx.liu@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-23 11:43:38 -07:00
fuzhongl 7ca0d97ee9 Doc: launch L2 guest with ovmf for ACRN on QEMU
ACRN will not maintain User VM kernel config any more;
ovmf will be used to launch L2 guest by default.

Signed-off-by: fuzhongl <fuzhong.liu@eintel.com>
Reviewed-by:   gvancuts <geoffroy.vancutsem@intel.com>
2021-09-23 07:10:40 -07:00
David B. Kinder 722570d728 doc: update release notes with new features
Add new features information provided by engineering.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-23 07:06:14 -07:00
David B. Kinder 6cfa9252c1 doc: Add CODE_OF_CONDUCT to project repo
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-22 20:13:58 -07:00
Yang,Yu-chu 3cf525725c config-tools: remove acrn:is-tpm-passthrough-board
Simplify the statement by TPM2 enablement detection and present TPM2 device.
Remove the function and move the statement to misc_cfg.h.xsl

Tracked-On: #6562
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2021-09-23 09:20:59 +08:00
Junjie Mao bd28e548d0 config_tools: populate default values to all nodes
The default value population algorithm introduced by commit
2bfaa34 ("config_tools: populate default values in scenario XML") only
populates default values to the first occurrence of a tag when the tag is
specified to allow multiple occurrences under an xs:all node. This may lead
to incomplete scenario XML as some of the default values are missed.

This patch fixes this issue by checking **all** nodes having the same tag
under a node specified by an xs:all schema.

Fixes: 2bfaa34 ("config_tools: populate default values in scenario XML")

Tracked-On: #6292
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2021-09-23 09:15:44 +08:00
David B. Kinder 824d4a21cb doc: remove unreferenced images
Over time, and after deleting or moving documents around, we've left
behind quite the collection of unreferenced images.  It's time to clean
them out of the doc folders.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-22 16:29:57 -07:00
David B. Kinder 6d352ba4e6 doc: remove remaining GVT-g documentation
When GVT-g support was removed from ACRN some documentation changes were
missed. Delete the GVT-g HLD docs and the images it used.  Also fix
references in the old release notes so they don't depend on this deleted
document.  (The original release notes are still in the archived release
docs.)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-22 16:08:14 -07:00
Junjie Mao e2bf4a90b4 doc: update release notes for v2.6 on configuration upgrades
This patch updates recommendations to upgrade from a prior ACRN version for
v2.6.

Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2021-09-22 16:03:39 -07:00
Liu,Junming 858e7b2464 doc: remove "gpu" parameter when pass-thru IGD
remove "gpu" parameter when pass-thru IGD

Tracked-On: #6357

Signed-off-by: Liu,Junming <junming.liu@intel.com>
2021-09-22 15:32:01 +08:00
Liu,Junming 97d4485455 config_tool: remove "gpu" parameter when pass-thru IGD
remove "gpu" parameter when pass-thru IGD

Tracked-On: #6357

Signed-off-by: Liu,Junming <junming.liu@intel.com>
2021-09-22 15:32:01 +08:00
Liu,Junming 345ad0a010 dm: refine the logic and UX for IGD pass-thru
Previously, when pass-thru IGD,
need to use the extra parameter "gpu",
it isn't friendly to user.
So remove the "gpu" paramater here.

Refine the logic for the judgment of IGD
check the following three conditions:
1. Physical BDF is 00:02.0
2. VGA class
3. vendor id is 0x8086
Then we can assume it's IGD.

Tracked-On: #6357

Signed-off-by: Liu,Junming <junming.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2021-09-22 15:32:01 +08:00
Liu,Junming d56442bed5 dm: set pass-thru dev virtual class id
For pass-thru PCI dev,
get the class id from the physical pci config space,
then set the value in virtual config space class id.

Tracked-On: #6357

Signed-off-by: Liu,Junming <junming.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2021-09-22 15:32:01 +08:00
David B. Kinder 1013b291d3 doc: cleanup obsolete nocl redirect doc
When we removed Clear Linux documentation in the v2.2 release, we
created redirect pages for the deleted /latest document referring folks
to the v2.1 documentation that last supported Clear Linunx.  It's time
to remove this common redirect page.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-21 12:52:31 -07:00
David B. Kinder 9c1c6b80a5 doc: finish renaming vmh to hsm
Fixed some additional doc references missed in PR #6283

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-21 11:18:37 -07:00
David B. Kinder 0d03224070 doc: fix mispellings and formatting
* General scan for misspellings, "smart quotes", and formatting errors
  missed during regular review. Also removed used of "please".

* Fix old XML examples that had desc="..." comments. These comments were
  moved to to xsd files instead of being in the XML files themselves.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-21 10:46:12 -07:00
Shuang Zheng ac67051ab5 doc: add virtio input element in config doc
add virtio input element in the description of elements for
launch XMLs in config doc.

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
2021-09-20 08:23:51 -07:00
jackwhich 4f2e3384b1 Add sample diagrams for user reference. 2021-09-20 08:22:58 -07:00
jackwhich 321653e3c7 doc: update documentation and grub file
1. Because the < > in the document will mislead users to copy and paste directly,
       modify the < > to " ".
       Add sample diagrams for user reference.
    2. Because there is a problem with the user adding the GRUB_CMDLINE_LINUX=text
       parameter, delete this parameter.
    3. The script generation of launch_uos_id3.sh does not match the GitHub and doc,
       modify the parameters.

    Signed-off-by: zhongzhenx.liu <zhongzhenx.liu@intel.com>
2021-09-20 08:22:58 -07:00
Junjie Mao efcb9e2fdf Makefile: fix wrong reference to board XML and skip binary in diffconfig
The current config.mk uses the variable BOARD_FILE as the path to the board
XML when generating an unmodified copy of configuration files for
comparison, which is incorrect. The right variable is HV_BOARD_XML which is
the path to the copy of board XML that is actually used for the build.

This patch corrects the bug above.

In addition, this patch also skips binary files (which are not meant to be
edited manually) when calculating the differences.

Tracked-On: #6592
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2021-09-19 20:23:44 +08:00
David B. Kinder 4315ae26b6 doc: updated What is ACRN introduction
* Update and simplify our What is ACRN document.
* Removed SDC disussion and out-of-date best known configuration
  descriptions and scenario block diagrams
* Removed I/O Mediator discussion from "What is ACRN" and move
  referenced label to content in the HLD overview (that was duplicated in
  "What is ACRN")
* Updated images for scenarios and removed obsolete images
* Add references to new overview docs and GSG
* Add general description of VMs in example scenarios

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-18 15:24:46 -07:00
David B. Kinder 306d624795 doc: Add project CONTRIBUTING repo page
Summarize the ACRN contributing guidelines (fully documented in a
separate document) and add to the top level of our project repo (as
expected by GitHub and our Technical Steering Committee)

Also, tweak the mailing list reference to recommend acrn-users instead
of acrn-dev

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-17 19:18:34 -07:00
Fei Li 53fe6d63be hv: vioapic: update remote IRR for lapic-pt
For local APIC passthrough case, EOI would not trigger VM-exit. So virtual
'Remote IRR' would not be updated. Needs to read physical IOxAPIC RTE to
update virtual 'Remote IRR' field each time when guest wants to read I/O
REDIRECTION TABLE REGISTERS

Tracked-On: #5923
Signed-off-by: Fei Li <fei1.li@intel.com>
2021-09-18 09:42:44 +08:00
Zide Chen 94cbe909ee hv: irq: identical vector mapping if LAPIC passthough
In local APIC passthrough case, when devices triggered a INTx interrupt, this
interrupt would be delivered to vCPU directly. For this case, need to set the
virtual vector in
the 'Interrupt Vector' field of physical IOxAPIC I/O REDIRECTION TABLE REGISTER
(bits 7:0) and 'Vector' field of vt-d Interrupt Remapping Table Entry (IRTE)
for Remapped Interrupts.

Assumption:
(a) IOAPIC pins won't be shared between LAPIC PT guest and other guests;
(b) The guest would not trigger this IRQ before it switched to x2 APIC mode.

Tracked-On: #5923
Signed-off-by: Zide Chen <zide.chen@intel.com>
2021-09-18 09:42:44 +08:00
Mingqiang Chi db98f01b6e add vmx capability check
check some essential vmx capablility,
will panic if processor doesn't support it.

Tracked-On: #6584

Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2021-09-18 08:44:30 +08:00
David B. Kinder 2b3c4b6d49 doc: update README for TCM meeting change
TCM (Technical comunity meetings) are monthly not weekly...

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-09-17 08:45:34 -07:00
dongshen 08d4517431 hv: fix bugs in RDT's CDP code
In current RDT code, if CDP is configured, L2/L3 resources' num_closids calculation
is wrong:
res_cap_info[res].num_closids = (uint16_t)((edx & 0xffffU) >> 1U) + 1U;

Should be:
res_cap_info[res].num_closids = (uint16_t)((edx & 0xffffU) >> 1U + 1) >> 1U;

Aslo, in order to enable CDP system-wide, need to enable the CDP bit (bit 0) on all pcpus,
not just on pcpu 0.

Tracked-On: #5917
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
2021-09-17 16:29:05 +08:00
dongshen f4cdbba0bd hv: some cosmetic fixes to rdt.c/rdt.h
Rename the clos_max field in struct rdt_info to num_closids

Rename variable valid_clos_num to common_num_closids and make it static

Tracked-On: #5917
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
2021-09-17 16:29:05 +08:00