Commit Graph

5752 Commits

Author SHA1 Message Date
Geoffroy Van Cutsem b87070f95a Revert "hv: fix formatting for cfg.log output"
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>
2020-12-11 09:46:21 +08:00
ChenYing Kuo ead26799ff Small updates to ROScube-I Installation Guide
* 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>
2020-12-10 09:23:49 -08:00
Geoffroy Van Cutsem 9264aeb77d doc: small updates to the GSG
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>
2020-12-10 09:21:54 -08:00
David B. Kinder 2571314d77 doc: add ROScube GSG
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>
2020-12-08 11:08:58 -08:00
Shuang Zheng b4249bd11c acrn-config: update function for xml.etree.ElementTree to compatible with python3.9
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>
2020-12-08 15:47:01 +08:00
Yonghua Huang 06e9220794 dm: rename ioctl command for hv-emulated management
Use add/remove device instead of create/destroy.

Tracked-On: #5586
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
2020-12-07 16:25:17 +08:00
Yonghua Huang 08c42f91c9 hv: rename hypercall for hv-emulated device management
Coding style cleanup, use add/remove instead of create/destroy.

Tracked-On: #5586
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
2020-12-07 16:25:17 +08:00
Yonghua Huang d5bf1a76ff doc: update acrn secureboot enablement
- 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>
2020-12-05 12:05:27 -08:00
Yonghua Huang 914ac534c0 doc: update HLD of HV-Land Ivshmem
Add a figure for HLD of HV-land doorbell design.

Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
2020-12-05 11:25:31 -08:00
Shixiong Zhang 91fde59f41 acrn-config: modify the cmd args in pre-launched rt xml
add the right cmd args provided by Ronnie.

Tracked-On: #5501

Signed-off-by: Shixiong Zhang <shixiongx.zhang@intel.com>
2020-12-04 14:59:15 +08:00
Shuang Zheng 376b90d40a acrn-config: update tpm config source code for hybrid_rt on ehl
enable tpm2 config source code for hybrid_rt scenario on ehl board.

Tracked-On: #5506

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
2020-12-04 14:57:20 +08:00
Shuang Zheng 5ea9c55145 acrn-config: enable tpm for hybird_rt on ehl
enable tpm for hybrid_rt scenario on ehl board.

Tracked-On: #5506

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
2020-12-04 14:57:20 +08:00
David B. Kinder 8838f0e661 doc: tweak to 2.3 release notes
Added a couple of missing documents in the "changed doc" list, and fixed
spelling of passthrough

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-12-03 09:23:00 -08:00
David B. Kinder dd05d7417a doc: update doc version selector for v2.3
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-12-02 17:46:23 -08:00
David B. Kinder ef36eacb55 doc: release notes tweaks for v2.3
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-12-02 17:30:14 -08:00
fuzhongl 2e947496c2 Doc: release_notes_2.3 update
Signed-off-by: fuzhongl <fuzhong.liu@intel.com>
2020-12-02 17:13:45 -08:00
David B. Kinder 5cd9eb43a9 doc: update v2.3 release notes
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-12-02 09:43:05 -08:00
Shuang Zheng b87814ba36 doc: update the doc to setup openstack with ACRN
update ACRN version, update kernel boot args, and fix the issue in
the steps to set up libvirt.

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-12-02 09:12:48 -08:00
Yonghua Huang 4759735c99 doc: Setup secureboot with GRUB
Add guide to enable grub secure boot on ACRN.

Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-12-02 08:59:52 -08:00
fuzhongl 124752fcf7 Doc: Update GSG and Build ACRN from Source for v2.3
Update Getting Started Guide for ACRN Industry Scenario with Ubuntu Service VM;
and Getting Started Guide for ACRN logical partition mode.
Also update Build ACRN from Source for EFI related part since it is
removed form v2.3

Signed-off-by: fuzhongl <fuzhong.liu@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com
2020-12-02 08:52:50 -08:00
Peter Fang 3db34b3164 doc: add documentation for graceful system shutdown
Tracked-On: #5411
Signed-off-by: Peter Fang <peter.fang@intel.com>
2020-12-02 08:51:11 -08:00
Yang,Yu-chu e6dc6dfe0d acrn-config: remove hardcoded device in launch script
The "virtio-hyper_dmabuf" is no longer needed for PREEMPT-RT LINUX.
Remove it from launch script.

Tracked-On: #5565
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2020-12-02 13:45:57 +08:00
Geoffroy Van Cutsem e2590d88aa hv: fix formatting for cfg.log output
Fix the formatting for the cfg.log (build/hypervisor/cfg.log) generation. The
'echo' command uses '-e' but that gets put as-is into the log file. Removing
the '-e' argument fixes it.

Tracked-On: #5561
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-12-02 13:45:39 +08:00
David B. Kinder ad8a0cf737 doc: doc cleanup for v2.3 release
Remove some stray Clear Linux references, document labels, and update
the known issue filter patterns.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-12-01 15:37:06 -08:00
Yonghua Huang eb4f335dab doc: update 'enable_ivshmem'
Add notification (doorbell) usage for ivshmem devices.

Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-12-01 09:12:29 -08:00
Yonghua Huang a95e019045 doc: update 'asa.rst' for 2.3 release
update fixed security issue for 2.3 release.

Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-12-01 09:04:38 -08:00
Tao Yuhong e8c20e7a63 Doc: pci-vuart-guide
update tutorials/vuart_configuration.rst, add pci-vuart guide

Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-11-30 18:35:19 -08:00
Yang,Yu-chu 73cd9e939c doc: update configuration tool description of vuarts
Acrn introduces pci based vuart. Update the existing vuarts and add the
pci based vuart description

1. rename existing vuarts to legacy_vuart
2. add console and communication vuarts general desciption
  - the console vuart is similar to legacy_vuart0 but only contains subtag "base"
  - the communication vuart is similar to legacy_vuart1 but only contains subtags
    "base", "target_vm_id" and "target_uart_id"

Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-11-30 18:14:02 -08:00
wenlingz 4a4f97525c version:2.4-unstable
Signed-off-by: wenlingz <wenling.zhang@intel.com>
2020-12-01 09:30:15 +08:00
David B. Kinder b028e9f9a3 doc: add v2.3 release notes draft
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-11-30 17:18:31 -08:00
Geoffroy Van Cutsem 79892f911d misc: adjust code for gcc-10
The latest gcc 10.x changes the default to '-fno-common'. This causes a couple
of build failures in ACRN. This patch changes the default behaviour to
'-fcommon' for the 'acrnprobe' tool and fixes the 'hv_prebuild' codebase.

More details on that change can be found here:
https://gcc.gnu.org/gcc-10/porting_to.html

Tracked-On: #5553
Tracked-On: #5549
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-11-30 14:45:27 +08:00
Shiqing Gao 6f10bd00bf hv: coding style clean-up related to Boolean
While following two styles are both correct, the 2nd one is simpler.
	bool is_level_triggered;
	1. if (is_level_triggered == true) {...}
	2. if (is_level_triggered) {...}

This patch cleans up the style in hypervisor.

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
2020-11-28 14:51:32 +08:00
Jie Deng 74203e39d9 dm: virtio_console: read only when the virtqueue is ready.
The read should not continue if the virtqueue is not ready.

Tracked-On: #5544
Signed-off-by: Jie Deng <jie.deng@intel.com>
2020-11-27 15:01:14 +08:00
Peter Fang 4dbf30fcad misc: add the s5_trigger.sh script
s5_trigger.sh is part of the system shutdown flow, coordinating with the
lifecycle manager in each VM.

Tracked-On: #5411
Signed-off-by: Peter Fang <peter.fang@intel.com>
2020-11-26 21:00:10 +08:00
Peter Fang e69750dd43 misc: life_mngr: prevent log flooding after SOS socket is closed
After the SOS socket is closed, read() returns instantly with a return
value of 0. This causes life_mngr to flood the log file with the
following messages:

    received msg []
    received msg []
    received msg []
    ...

Exit the program directly now if this is detected.

Tracked-On: #5429
Signed-off-by: Peter Fang <peter.fang@intel.com>
2020-11-26 14:10:12 +08:00
Junming Liu 1cd932e568 hv: refine code style
refine code style

Tracked-On: #4020

Signed-off-by: Junming Liu <junming.liu@intel.com>
2020-11-26 12:56:28 +08:00
Junming Liu 56eb859ea4 hv: vmexit: refine xsetbv_vmexit_handler API
From SDM Vol.2C - XSETBV instruction description,
If CR4.OSXSAVE[bit 18] = 0,
execute "XSETBV" instruction will generate #UD exception.

From SDM Vol.3C 25.1.1,#UD exception has priority over VM exits,
So if vCPU execute "XSETBV" instruction when CR4.OSXSAVE[bit 18] = 0,
VM exits won't happen.

While hv inject #GP if vCPU execute "XSETBV" instruction
when CR4.OSXSAVE[bit 18] = 0.
It's a wrong behavior, this patch will fix the bug.

Tracked-On: #4020

Signed-off-by: Junming Liu <junming.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-11-26 12:56:28 +08:00
Yang,Yu-chu 2767eb0d29 acrn-config:refine the ivshmem for pre-launched vm
1. Discard the method to find unused vbar bases from system ram, find
unused mmio windows from 2G to 4G range.
2. Refine the ivshmem devices declaration.

Tracked-On: #5530
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2020-11-24 16:30:26 +08:00
Yang Yu-chu b6a18fa0fb acrn-config: update default pci_dev.c
update all default pci_dev.c under
misc/vm_configs/scenarios/<scenario>/<platform> for non-xml compilation

Tracked-On: #5425
Signed-off-by: Yang Yu-chu <yu-chu.yang@intel.com>
2020-11-24 16:29:40 +08:00
Yonghua Huang 62d51dff3d hv: fix nr_bars for hv-land ivshmem devices
Memory BAR of ivshmem device is 64-bit, 2 BAR registers
 are used, counting in one 32-bit MMIO bar and and one
 32-bit vMSIX table bar, number of bars "nr_bars" shall
 be 4 instead of 3.

Tracked-On: #5490
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
2020-11-24 13:13:48 +08:00
Geoffroy Van Cutsem 36e42c9fdf doc: correct typo (missing space)
Add missing space in the document describing how to use Ubuntu as a User VM OS.
2020-11-23 17:02:13 -08:00
Geoffroy Van Cutsem 3ae00e1b22 doc: correct 'gvtg' parameters for acrn-dm
Correct the GVT-g parameters description in the 'ACRN Device Model parameters'
document. The order was the wrong way around.

Tracked-On: #5528
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-11-23 00:08:07 -08:00
Yang,Yu-chu dc86cd8bff doc: update the steps of enable ivshmem
To enable the hv_land ivshmem for post-launched vm, the lanch script
needs to be cofigured accordingly.

Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2020-11-23 00:07:12 -08:00
David B. Kinder f2546384c8 doc: fix breathe config for C vs CPP
Breathe and doxygen work best for C++, but we're using C.  This shows up
as API documentaiton having a C++ flavor (modules and classes) instead
of the expected C flavor.  We really need to upgrade the versions of
doxygen and breathe to newer versions, and this configuration tweak
prepares for this.  (It will need CI coordination to update these tools,
but the changes in this PR are compatible with the current older tools.)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-11-23 00:06:01 -08:00
fuzhongl bb4fcae1b8 Doc: update document to remove CL Service VM dependency
Some document refer Clear Linux as Service VM; update them
to Ubuntu Service VM.

Signed-off-by: fuzhongl <fuzhong.liu@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-11-23 00:02:58 -08:00
Liu Long b37442564b DM: Add the return value check in case cause Null pointer exception
paddr_guest2host may return NULL, this patch checks the return value
to avoid null pointer dereference.

Tracked-On: #5514
Signed-off-by: Liu Long <long.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-11-18 09:51:42 +08:00
Tomas Winkler 9ab1110f80 dm: mei: vmei_proc_tx check buffer length before accessing the memory
Prevent memory and information leaks by checking boundaries of
the incoming buffers from the hypervisor.

1. We check that the buffer is sufficent to hold a valid header.
2. We that each hbm message has valid size
   vmei_hbm_handler() now returns -EINVAL if the size too small.
3. hdr->length < data_length.

Tracked-On: #5451
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-11-17 10:01:36 +08:00
Geoffroy Van Cutsem 14ea52c42f dm: update acrn-dm built-in list and description of args
Update and light clean-up of the buit-in list of arguments from 'acrn-dm'
* Added options in the top part (list with no explanation)
* Remove a couple of arguments that are no longer valid ('vmcfg' and 'dump')

Tracked-On: #5445
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-11-17 09:58:51 +08:00
Yonghua Huang 49a773ab54 hv: bugfix for hv-emulated device de-init
- fix bug in 'hcall_destroy_vdev()', the availability of
   vpci device shall be checked on 'target_vm".

 - refine 'vpci_update_one_vbar()' to avoid potential NULL
   pointer access.

Tracked-On: #5490
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
2020-11-13 11:43:47 +08:00
Peter Fang 68dc8d9f8f hv: pm: avoid duplicate shutdowns on RTVM
It is possible for more than one vCPUs to trigger shutdown on an RTVM.
We need to avoid entering VM_READY_TO_POWEROFF state again after the
RTVM has been paused or shut down.

Also, make sure an RTVM enters VM_READY_TO_POWEROFF state before it can
be paused.

v1 -> v2:
- rename to poweroff_if_rt_vm for better clarity

Tracked-On: #5411
Signed-off-by: Peter Fang <peter.fang@intel.com>
2020-11-11 14:05:39 +08:00