Commit Graph

4274 Commits

Author SHA1 Message Date
Yin Fengwei 43410fd008 Makefile: Add new build target for apl-up2/uefi/hybrid
Add new build target for hybrid mode with uefi on platform apl-up2.
Also break long dependency target line to short one.

Tracked-On: #3779
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
2019-10-09 09:51:15 +08:00
Yin Fengwei d0489ef3b7 Makefile: Add acrn build/install functions
To remove several duplicated Makefile cmdline, introduce the
functions to build/install acrn.

If we need to add new build to sbl-hypervisor (which is used
by integration team), we only need to define a new target and
call acrn build/install functions with correct parameters. And
then make sbl-hypervisor depend on that new target.

Tracked-On: #3779
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
2019-10-09 09:51:15 +08:00
fuyanX df5ef925bf Misc: life_mngr clear compile warning
As Makefile's strict check, clear compile warnings for life_mngr.

Tracked-On: #3564
Signed-off-by: fuyanX <yanx.fu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-10-08 11:39:22 +08:00
fuyanX 91366b876c Misc: lifemngr add Makefile
Add Makefile for life_mngr. life_mngr is a service on UOS.

Tracked-On: #3564
Signed-off-by: fuyanX <yanx.fu@intel.com>
Reviewed-by: VanCutsem, Geoffroy <geoffroy.vancutsem@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-10-08 11:39:22 +08:00
Peter Fang 28b50463c9 hv: vm: properly reset pCPUs with LAPIC PT enabled during VM shutdown/reset
When a VM is configured with LAPIC PT mode and its vCPU is in x2APIC
mode, the corresponding pCPU needs to be reset during VM shutdown/reset
as its physical LAPIC was used by its guest.

This commit fixes an issue where this reset never happens.
is_lapic_pt_enabled() needs to be called before reset_vcpu() to be able
to correctly reflect a vCPU's APIC mode.

A vCPU with LAPIC PT mode but in xAPIC mode does not require such reset,
since its physical LAPIC was not touched by its guest directly.

v2 -> v3:
- refine edge case detection logic

v1 -> v2:
- use a separate function to return the bitmap of LAPIC PT enabled pCPUs

Tracked-On: #3708
Signed-off-by: Peter Fang <peter.fang@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Reviewed-by: Jack Ren <jack.ren@intel.com>
2019-09-29 15:12:25 +08:00
Victor Sun 0906b25ca2 Makefile: build default acrn.efi with nuc6cayh
To be back compatible, the default acrn.efi should be built when
BOARD param is nuc6cayh, because apl-nuc was overridden to nuc6cayh
in acrn-hypervisor/Makefile;

Tracked-On: #3602

Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-09-29 15:09:38 +08:00
Lei, Lu 64742be820 doc: fix broken link in release notes 1.3
Signed-off-by: Lei, Lu <leix.lu@intel.com>
2019-09-29 14:59:33 +08:00
Jack Ren 9b1caeef71 version: 1.4-unstable
Signed-off-by: Jack Ren <jack.ren@intel.com>
2019-09-29 10:47:21 +08:00
Lei, Lu 2dac1f02f4 doc: update build from source
1. Update build the hypervisor with XML file command.
2. Add "cd hypervisor" before "make defconfig BOARD=nuc6cayh"

Signed-off-by: Lei, Lu <leix.lu@intel.com>
2019-09-29 09:53:59 +08:00
David B. Kinder 168d37d12f doc: add 1.3 to version menu
Update the version menu to include the 1.3 docs (and remove the 0.8)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-28 16:10:42 -04:00
Deb Taylor f489312e67 Doc: content edits for GSG for ACRN Ind Scenario
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2019-09-28 11:12:24 -04:00
lirui34 018fed2c21 doc: Add introduction for using Preempt_RT VM with Industry scenario
This tutorial is introducing how to build service vm, preempt_rt kernel and
industry scenario hypervisor; Update built kernel and launch the preempt_rt vm.

Signed-off-by: lirui34 <ruix.li@intel.com>
2019-09-28 04:54:37 -04:00
lirui34 9dbbaa1e7d doc: Release notes v1.3
Release notes v1.3

Signed-off-by: lirui34 <ruix.li@intel.com>
2019-09-27 17:34:41 -04:00
Deb Taylor 96fc3fec10 Doc: content updates to ACRN Config Tool and Build frm Source
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2019-09-27 15:25:42 -04:00
Shuang Zheng 4f9c2f3a7a acrn-config: fix the issue config app failed to generate patch for a new board
fix the issue: WebUI could not generate configuration patch for a new imported board

Tracked-On: #3760
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2019-09-27 16:36:13 +08:00
Shuang Zheng bdf3a89e6d acrn-config: change source file format to unix
The file format of 2 source files is dos format with line endings
as CRLF, change to unix format with line endings as LF.

Tracked-On: #3760
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2019-09-27 16:36:13 +08:00
Yin Fengwei 9456d91b76 dm: hugetlb: add file lock to make sure huge page reserve atomic
Currently, DM only access /sys/kernel/mm/hugepages/hugepages-2048kB/
entries according to its own huge page requirement. So it could have
following race issue:

         DM1                                   DM2
      read nr pages
                                            read nr pages
                                            write DM2 nr pages
      write DM1 nr pages

Suppose we should write DM1 + DM2 nr page to kernel sysfs interface
to reserve enough huge page (DM1 + DM2). But actually only reserve
huge page requested by DM1.  Which could trigger one VM can't boot.
We can easily hit this issue if we enable multiple UOS auto boot
because more than one VM are started at almost same time.

We add file lock to make sure huge page reserving in DM atomic.

Tracked-On: #3729
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Wang Yu <yu1.wang@intel.com>
2019-09-27 15:12:36 +08:00
Wei Liu 9ddcb3dde8 acrn-config: remove ethernet device from pass through config
align with sample launch script for Preempt-RT Linux, remove ethernet
device from config file.

v1-v2:
    1). correct desc for ethernet device

Tracked-On: #3751
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-09-27 15:12:14 +08:00
lirui34 c17510d593 doc: update ACRN configuration tool document
- Remove the TBD parts;
- Add configuration tool UI app instructions;
- Update "Build from Source" for generating the hypervisor via configuration tool.

Signed-off-by: lirui34 <ruix.li@intel.com>
2019-09-26 08:53:13 -04:00
Lei, Lu c8ee9d98e8 doc: update acrn_ootb.rst
1. Update the Service OS VM default install disk to SATA, and Preempt-RT User
   VM default install disk to NVMe.
2. Update the Launch Preempt-RT User VM setup.

Signed-off-by: Lei, Lu <leix.lu@intel.com>
2019-09-26 06:14:18 -04:00
Lei, Lu aa355af9a0 doc: update clearlinux version and acrn.efi name in GSG
1. update clearlinux version to 31090
2. update acrn.efi name to acrn.nuc6cayh.sdc.efi

Signed-off-by: Lei, Lu <leix.lu@intel.com>
2019-09-26 06:09:35 -04:00
Mingqiang Chi 187fa97e52 hv:fixed compilation error in Ubuntu
it uses builtin function(__builtin_popcountl)in bitmap_weight(),
it will use the 'popcnt' instruction,
this patch enable 'popcnt' instruction support in Makefile

Tracked-On: #3663
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
2019-09-26 14:03:51 +08:00
Peter Fang c9c02785cb OVMF release v1.3
- GvtGopDxe: Fix crash if failed to get a valid mode
- GvtGopDxe: Enable GOP with parameters from vgt interface
- OvmfPkg/GvtGopDxe: Add GvtGopDxe skeleton driver
- Add back NVME support
- Update Readme.md

Tracked-On: #3700
Signed-off-by: Peter Fang <peter.fang@intel.com>
2019-09-26 11:33:43 +08:00
Xiaoguang Wu 11f4a7267b DM USB: xHCI: support multiple ERST
This patch is used to support multiple Event Ring Segment Table (ERST).

Tracked-On: #3628
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-09-26 11:29:22 +08:00
Xiaoguang Wu 52c17d634a DM USB: xHCI: rename some variables about ERST
This patch only changes some names of varaibles about Event Ring Segement
Table (ERST), and doesn't modify any code logic.

Tracked-On: #3628
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-09-26 11:29:22 +08:00
Xiaoguang Wu e9211514e7 DM USB: modify disconnecting logic to support Windows 10
The Windows 10 feeds back quicker than Linux OS when error occured
due to device disconnecting, it will quickly reset the xHCI controller
before the DM starts to emulate disconnect event and it may cause some
unexpected errors such as crash.

This patch will do one more check when error happens, if the error
is induced by device disconnecting, the DM will not report error and
just wait until the disconnect event is reported to the guest. This
change could produce the correct hehavior as we expected.

Tracked-On: #3628
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-09-26 11:29:22 +08:00
Xiaoguang Wu 06781b37e9 DM USB: dynamically allocate block count for struct usb_xfer
The block count of the struct usb_xfer is hard coded by the macro
USB_MAX_XFER_BLOCKS (1024), it wastes memory if 1024 blocks are
allocated for low speed transfer such as control transfer or interrupt
transfer. This patch introduces a new method to allocate different
number of blocks according to different endpoint type.

Tracked-On: #3628
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-09-26 11:29:22 +08:00
Xiaoguang Wu f1b142e6e0 DM USB: xHCI: implement the emulation for overrun and underrun event
The overrun and underrun event are used in the timing control machanism,
this patch is used to implement this feature.

Tracked-On: #3628
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-09-26 11:29:22 +08:00
Xiaoguang Wu 7cb45bc968 DM USB: xHCI: refine the emulation logic for BEI bit in the TRB
The Block Event Interrupt (BEI) bit in the TRB descriptor could
delay the triggering of interrupt. For most OSes, the native
driver for xHCI will use this bit to optimize the IO performence,
due to reduction of number of interrupts.

But in Linux, the native xHCI driver for Intel brand controller
doesn't use this bit. It is fine for the native scenario due to
most work is completed by hardware. But in virtualization scenario,
it is almost impossible to support heavy data IO such as high
resolution video recording (ISOC transfer).

Hence, this issue is solved by a 'quirk' when the intel hardware is
emulated (when vendor id is set as 0x8086). For other cases, a
virtal hardware called 'ACRN xHCI' is emulated, and both Linux and
Windows will use BEI bit by default.

Tracked-On: #3628
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-09-26 11:29:22 +08:00
Xiaoguang Wu 685b1a7b66 DM USB: xHCI: fix emulation code for MFINDEX register
The old logic to emulate MFINDEX register is not right, this patch
is used to fix it.

Tracked-On: #3628
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-09-26 11:29:22 +08:00
Xiaoguang Wu bda43ee352 DM USB: xHCI: rename the variable mf_prev_time
Just changed the name of the variable and didn't change any emulation
code logic.

Tracked-On: #3628
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-09-26 11:29:22 +08:00
Xiaoguang Wu 8949a5802a DM USB: introduce struct xhci_block for xHCI emulation
In the struct usb_block, there are some fields such as 'ccs',
'streamid', which should not be seen in the USB layer. This
patch intruduces new struct xhci_block to include the variables
for xHCI emulation.

Tracked-On: #3628
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-09-26 11:29:22 +08:00
Xiaoguang Wu 0110465416 DM USB: code clean: remove redundent code
When control transfer is detected and an unnecessary reset of
struct usb_xfer is conducted. This behavior is not necessary
and this patch is used to remove it.

Tracked-On: #3628
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-09-26 11:29:22 +08:00
Xiaoguang Wu 1352eca224 DM USB: introduce helper functions: index_inc and index_valid
Introduce helper functions to make code shorter and cleaner.

Tracked-On: #3628
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-09-26 11:29:22 +08:00
Xiaoguang Wu d58a766556 DM USB: re-implement the data block process logic
In Windows OS, there are many non-data blocks (EVENT DATA) during the USB
data transfer process, which is very different from the Linux conterpart.
To support both OS, the data processing logic is changed with the help of
newly introduced enum usb_block_type.

Tracked-On: #3628
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-09-26 11:29:22 +08:00
Xiaoguang Wu 236c23e418 DM USB: introduce enum type usb_block_type
In the process of USB data transfer, there three kinds of data blocks:
a. Non data block, which contains some control information;
b. Partial data block, which contains part of a large data chunk;
c. Full data block, which contains a complete data chunk.

In previous implementation, the differences mentioned above are described
by the usb_block::chained. But the 'chained' is concept in the xHCI area
and should not appear in the USB layer. This patch introduces enum type
usb_block_type to replace the 'chained' field in struct usb_block.

Tracked-On: #3628
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-09-26 11:29:22 +08:00
Xiaoguang Wu 7445e404a8 DM USB: code clean: change some names of functions and variables
Some names of functions and variables are long and not exact, this
patch is used to change them, no logic code are affected. The
changing included:

usb_data_xfer -> usb_xfer
usb_data_xfer_block -> usb_block
usb_xfer_blk_stat -> usb_block_stat
usb_data_xfer_append -> usb_block_append
USB_XFER_BLK_* -> USB_BLOCK_*

Tracked-On: #3628
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-09-26 11:29:22 +08:00
Deb Taylor dd1172ee63 doc: content updates to Install ACRN out of the box file
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2019-09-25 19:24:42 -04:00
David B. Kinder df465cc1df doc: update robots.txt to exclude old docs
Exclude older documentation from search engines (< 1.0)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-25 14:24:16 -07:00
lirui34 7f42edcb0b doc: Use out-of-the-box image to boot ACRN RTVM
This tutorial describes how to generate, deploy OOTB Service VM
RTVM image so that all of the users are able to use ACRN, boot
RTVM immediately after installation without any configuration or
modification.

Signed-off-by: lirui34 <ruix.li@intel.com>
2019-09-25 15:36:45 -04:00
Geoffroy Van Cutsem 9c273cf33e doc: editorial tweaks to "Real-Time (RT) Performance Analysis on ACRN"
Editorial tweaks to the "Real-Time (RT) Performance Analysis on ACRN" document,
mostly to improve readibility, no technical content change.

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2019-09-25 14:51:38 -04:00
Deb Taylor 7eb0dc1436 doc: content updates to RT perf tuning doc
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2019-09-25 09:39:20 -04:00
Shiqing Gao c8bcab9006 hv: pci: update function "bdf_is_equal"
- update the function argument type to union
  Declaring argument as pointer is not necessary since it
  only does the comparison.

Tracked-On: #1842
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
2019-09-25 13:45:39 +08:00
Shiqing Gao 658fff27b4 hv: pci: update "union pci_bdf"
- add one more filed in "union pci_bdf"
- remove following interfaces:
  * pci_bus
  * pci_slot
  * pci_func
  * pci_devfn

Tracked-On: #1842
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
2019-09-25 13:45:39 +08:00
Deb Taylor b16531257e doc: content updates for using SBL on UP2 board file
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2019-09-24 20:23:10 -04:00
Deb Taylor 04dd9f97d2 doc: minor edits to using celadon as user os file
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2019-09-24 19:41:25 -04:00
Deb Taylor da89175bef doc: content updates to GSG for the Intel NUC
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2019-09-24 16:15:11 -04:00
lirui34 617a77d8fb doc: Add document of RT performance tuning.
Add document of RT performance tuning.

Signed-off-by: lirui34 <ruix.li@intel.com>
2019-09-24 09:57:07 -04:00
Lei, Lu 13b998f240 update using_sbl_on_up2 doc and create-up2-images.sh
1. Fix the broken link to dwonload UP2 Board BIOS
2. In Clear Linux 31030 the acrn.apl-up2.sbl name is changed to
   acrn.apl-up2.sbl.sdc.32.out, so we need to update the creaet-up2-imgages.sh
3. Command "swupd verify --install -m" has been superseded, use "swupd
   os-install -V" instead.

Signed-off-by: Lei, Lu <leix.lu@intel.com>
2019-09-24 09:53:59 -04:00
lirui34 01a1aeb69f doc: Add note to use a stable Celadon source tree
So far the patches are only suite for Celadon Android 9.
Need to specify the Android 9 repo branch to apply patches and
build Celadon image.

Signed-off-by: lirui34 <ruix.li@intel.com>
2019-09-24 09:53:02 -04:00