Commit Graph

3472 Commits

Author SHA1 Message Date
ruix.li c954ec57a0 doc: release note v1.0, correct some words.
Signed-off-by: ruix.li <ruix.li@intel.com>
2019-05-08 22:10:30 -07:00
Shiqing Gao 1f0ccd5f83 doc: add rules in C coding guidelines
This patch adds rules in C coding guidelines for function
naming convention.

Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
2019-05-08 19:22:45 -07:00
David B. Kinder 5cbaafd717 doc: Update intro to 1.0 release notes
Update the high-level summary.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-05-08 12:16:10 -07:00
David B. Kinder 38c553b397 doc: add v1.0 doc menu to master
Update the /latest documents with a menu choice for the 1.0 release
docs.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-05-08 12:05:41 -07:00
Yan, Like 83c971221d doc: acrnlog: update loglevel usage
This commit updates the usage of "loglevel" command in README.rst, which was
out-of-date due to change of "loglevel" command.

Tracked-On: #2712
Signed-off-by: Yan, Like <like.yan@intel.com>
2019-05-08 08:43:44 -07:00
Yin Fengwei 8626e5aa3a vm_state: Update vm state VM_STATE_INVALID to VM_POWERED_OFF
Replace the vm state VM_STATE_INVALID to VM_POWERED_OFF.
Also replace is_valid_vm() with is_poweroff_vm().
Add API is_created_vm() to identify VM created state.

Tracked-On: #3082
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
2019-05-08 16:58:41 +08:00
Kaige Fu 21b82d8815 tools: Fix the non-effective option -f --frequency
We use global variable TSC_FREQ defined in config.py in each of the analyzers.
And the value set to TSC_FREQ through option -f/--frequency doesn't take effect.

This patch fix it by adding one parameter to each of the analyzers and pass
the value set by -f/--frequency to it instead of use the global one.

Tracked-On: #3085
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-05-08 16:58:01 +08:00
Victor Sun 1f93f7f46c HV: remove some redundant includes
vm_config.h has included types.h/acrn_common.h/vm_configurations.h,
acrn_common.h has included types.h, so remove the redundant includes;

Tracked-On: #2291

Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-05-08 16:57:46 +08:00
dongshen 41d87ea828 HV: replace partition mode with pre-launched VM in comments
This is to get rid of partition mode strings in comments

Tracked-On: #3056
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-05-08 10:02:56 +08:00
dongshen 4e2d13bda7 HV: rename hostbridge related functions
vdev_hostbridge_init --> vhostbridge_init
vdev_hostbridge_cfgread --> vhostbridge_cfgread
vdev_hostbridge_cfgwrite --> vhostbridge_cfgwrite
vdev_hostbridge_deinit --> vhostbridge_deinit

Tracked-On: #3056
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-05-08 10:02:56 +08:00
David B. Kinder 6c085c1a25 doc: Update 1.0 release notes
Fix release intro description, misspellings, remove trailing blanks,
trademark use.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-05-07 11:10:47 -07:00
David B. Kinder a569ea45f9 doc: update APL NUC GSG
APL NUC Getting started guide has some obsolete information (such as
saying the user had to build ACRN as part of the installation process
and changed instructions because the Clear Linux installer changed),
along with some spelling and grammar issues.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-05-07 10:53:19 -07:00
Victor Sun ddd54927d7 HV: hotfix for acpi.c compile error
In commit b68aee6ef1, acpi.c
removed "hypervisor.h" which includes "acrn_common.h", but
commit e2d723d4fa is depend on
"acrn_common.h", this caused build error.

Tracked-On: #3073

Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-05-07 16:03:35 +08:00
ruix.li 6b93de7438 doc: Add v1.0 release note
v1.0 release note

Signed-off-by: ruix.li <ruix.li@intel.com>
2019-05-06 20:55:56 -07:00
Kaige Fu 0cadc16b8b DM: Add one sample script to launch VxWorks as guest
This patch add one sample script to launch VxWorks as guest.

Tracked-On: #3069
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2019-05-07 11:40:35 +08:00
Conghui Chen 926fe655d5 HV: vuart: split vuart_write
Split vuart_write as its cyclomatic complexity is greater than 20.

Tracked-On: #2987
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-05-07 11:40:05 +08:00
Conghui Chen 14e2c66a1e HV: vuart: rename functions
Rename functions to be more unified.

Tracked-On: #2987
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-05-07 11:40:05 +08:00
Conghui Chen 39e7c69fb5 HV: vuart: cleanup MISRA-C issues
1. Add brackets for if/else sentence.
2. Add suffix 'U' for the unsigned constants.

Tracked-On: #2987
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-05-07 11:40:05 +08:00
Victor Sun ad3658ee17 HV: remove CONFIG_CONSTANT_ACPI from Kconfig
The MACRO of CONFIG_CONSTANT_ACPI will be defined per scenario usage,
so move it from Kconfig to vm_configurations.h;

Tracked-On: #2291

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-05-07 11:39:51 +08:00
Victor Sun e2d723d4fa HV: enable acpi pm1a register info fixup
Previously ACPI PM1A register info was hardcoded to 0 in HV for generic boards,
but SOS still can know the real PM1A info so the system would hang if user
trigger S3 in SOS. Enabling PM1A register info fixup will let HV be able to
intercept the operation on PM1A and then make basic function of S3 work for
all boards;

Tracked-On: #2291

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-05-07 11:39:51 +08:00
Shiqing Gao 81e13de407 doc: initial draft of Assembly coding guidelines
This patch creates initial draft of Assembly coding guidelines.

Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
2019-05-06 18:42:35 -07:00
Mingqiang Chi da9ed0eda9 hv:remove some unnecessary includes
remove some unnecessary includes

Tracked-On: #1842
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
2019-05-07 09:10:13 +08:00
Mingqiang Chi b68aee6ef1 hv:remove common header files
remove hypervisor.h/hv_debug.h/hv_arch.h

Tracked-On: #1842
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>

deleted:    include/arch/x86/hv_arch.h
deleted:    include/hv_debug.h
deleted:    include/hypervisor.h
2019-05-07 09:10:13 +08:00
Vijay Dhanraj b1f61669fc DOC: Usage guide for Virtio-blk blkrescan feature
This patch adds the steps required to use the newly
introduced blkrescan feature for Virtio-blk device.

Tracked-On: #3051
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
2019-05-07 09:08:50 +08:00
Vijay Dhanraj 71b56e0eed DM: Virtio-Blk Rescan
This patch adds support to trigger rescan of virtio-blk device by the
guest VM. This is an alternate to hot-plugging virtio-blk device.
This feature stems from the kata requirement, which hot-plugs container
rootfs after the VM is launched.

As part of virtio-blk rescan,
1. Update the backing file for the virtio-blk device with valid file.
   Basically update the empty file (with dummy bctxt) that was passed
   during VM launch.
2. Update virtio-blk device configurations for udpated backing file.
3. Update size associated with valid backing file in the config space.
4. Notify guest OS, of the new config change.
5. On this notification, guest will do the following.
	(i). Update virtio-blk capacity.
 	(ii). Revalidate the disk.
 	(iii). Identify the newly plugged block device.

v5 -> v6:
- Removed use of dummy file and added a new parameter "nodisk"
  to virtio-blk which indicates user wants to create a virtio-blk
  device with dummy backend.
- Moved vm_monitor_rescan from pci core to virtio-blk as it currently
  applies to only virtio-blk.

v4 -> v5:
- Reverted back logic, so that blkrescan is only supported when
  VM is launched with empty backend file.

v3 -> v4:
- Close block context before allocating a new one
- Allow backend filepath  with additional options to be more generic
- Remove blank lines introduced as part of previous patches.

v2 -> v3:
- Renamed vdev ops vdev_blk rescan to vdev_rescan
- Renamed montior ops virtio_blkrescan_ops to virtio_rescan_ops
- Consolidated virtio-blk configuration specific part into
  a separate function
- Removed size requirement in acrnctl command.

v1 -> v2:
- Added more comments in the code.
- Renamed APIs from displug to blkrescan, inline with acrnctl cmd.
- Split the patch into two. This corresponds to changes in acrn-dm.

Tracked-On: #3051
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-05-07 09:08:50 +08:00
Vijay Dhanraj f178788d7c Tools: New ACRNCTL command "blkrescan"
This patch adds support for new acrnctl command blkrescan.
Purpose: To add a virtio-blk device to guest VM after launch.
Use case:
1. Anticipate number of block devices that will be needed
   and add empty backend file while launching VM.
   e.g: -s 5, virtio-blk,nodisk
2. Use the following acrnctl command to trigger
   a rescan of virtio-blk device by guest VM, to
   revalidate and update the backend file.
   “acrnctl blkrescan VMname slot,newfilepath”

v5 -> v6:
- Removed unsed #define
- Reduced the size of param len of blkrescan command
  from 512 to 256.

v2 -> v5:
- No change

v1 -> v2:
- Renamed the acrnctl command and APIs from diskplug
  to blkrescan.
- Split the patch into two. This corresponds to
  changes in tools.

Tracked-On: #3051
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
2019-05-07 09:08:50 +08:00
David B. Kinder 30de7e8e34 doc: Fix references to be Wi-Fi
Correct spelling of the trademarked name is Wi-Fi

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-05-06 14:14:35 -07:00
root 37dfea1df3 doc: Update the diagram of KBL NUC serial port rework
Update the connection of serial port rework for KBL NUC

Signed off by: Xie, Zhengtian<zhengtian.xie@intel.com>
2019-05-06 12:57:08 -07:00
Zide Chen 5f87e716b8 hv: release IOMMU irte when releasing ptirq remapping entries
IRTE is freed if ptirq entry is released from remove_msix_remapping() or
remove_intx_remapping(). But if it's called from ptdev_release_all_entries(),
e.g. SOS shutdown/reboot, IRTE is not freed.

This patch adds a release_cb() callback function to do any architectural
specific cleanup. In x86, it's used to release IRTE.

On VM shutdown, vpci_cleanup() needs to remove MSI/MSI-X remapping on
ptirq entries, thus it should be called before ptdev_release_all_entries().

Tracked-On: #2700
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-05-06 18:25:37 +08:00
Conghui Chen dd86a78e75 HV: rename 'type' in struct io_request
Rename 'type' in struct io_request to 'io_type' to be more readable.

Tracked-On: #3061
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-05-06 18:25:20 +08:00
Shiqing Gao 94e1e362fb hv: rename 'interrupt_init' to 'init_interrupt'
This patch renames 'interrupt_init' to 'init_interrupt'.

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-05-06 16:58:27 +08:00
Minggui Cao c3d60297f2 DM: use log macro/func to output log info
also add logs for some key entries.

Tracked-On: #3012
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2019-05-05 19:13:07 +08:00
Minggui Cao 4e289341ff DM: add logger params in launch script for NUC&UP2
add logger_setting params in launch_uos.sh for NUC & UP2;
then the logger system can work; by default console logger
is enabled.

Tracked-On: #3012
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2019-05-05 19:13:07 +08:00
Minggui Cao 1cd914f992 DM: add logger setting parser function
the logger setting can be input as acrn-dm params;
so need parse it to init logger system.

Tracked-On: #3012
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2019-05-05 19:13:07 +08:00
Minggui Cao 229d44a884 DM: add kmsg logger to sync with kernel log
kmsg logger used to output ACRN-DM log to /dev/kmsg,
it is easy to sync with kernel log.

it is better just output key info or error/failure
log to kmsg for kernel log size is limited.

Tracked-On: #3012
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2019-05-05 19:13:07 +08:00
Minggui Cao c3954cecbe DM: add log macro/func and basic data structure.
also set default logger as console and enabled.

Tracked-On: #3012
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2019-05-05 19:13:07 +08:00
Yan, Like 31efa2b522 hv: add one more guest VM to the industry scenario
This commmit added one more guest VM to the industry scenario, to
be aligned with the HLD for the industry usage.
With this commit, 4 VMs could be launched at maximum: 1 SOS VM and 3 post-launced VM.

Tracked-On: #3039
Signed-off-by: Yan, Like <like.yan@intel.com>
2019-05-05 16:38:57 +08:00
Conghui Chen e6670b32f4 HV: rename structure acrn_vm_type
Rename structure acrn_vm_type to acrn_vm_load_order as it is used to
indicate the load order instead of the VM type.

Tracked-On: #2291
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-05-05 11:50:36 +08:00
Yonghua Huang be2fe2a44d hv:remove accessing shared log buffer cases between stac/clac
Shared buffer is allocated by VM and is protected by SMAP.
Accessing to shared buffer between stac/clac pair will invalidate
SMAP protection.This patch is to remove these cases.
Fix minor stac/clac mis-usage,and add comments as stac/clac usage BKM

Tracked-On: #2526
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-05-05 10:00:32 +08:00
David B. Kinder 321ad5c374 doc: update APL GSG details
Add additional edits to APL NUC GSG.
Also update corrupt PNG image

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-05-02 15:13:13 -07:00
ruix.li 4bdc34f4ff doc: Add instruction for gsg_quick_setup.sh script.
An instruction is needed from gsg so that user could know where
to get the script and also how to use it to setup SOS, UOS automatically.

Signed-off-by: ruix.li <ruix.li@intel.com>
2019-05-01 14:07:39 -07:00
Li, Wilson e8242a797b Updated GSG of using RT Linux as RTVM in accordance with acrn-kernel v4.19.28
Signed-off-by: Li, Wilson <wilson.li@intel.com>
2019-05-01 11:24:52 -07:00
Geoffroy Van Cutsem ee4e46cd07 doc: update "Using PREEMPT_RT-Linux for real-time UOS" to use RTVM term
Update the architectural diagram in the "Using PREEMPT_RT-Linux for
real-time UOS" tutorial to reflect the new name given to that type of
VM, i.e. from "Privileged VM" to "RTVM".

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2019-04-30 22:37:12 -07:00
Yuan Liu 38e8059ce9 dm: uart_core: fix uart dm cause interrupt storm issue
For Linux kernel, the UART driver will disable IER.THRE. But for Windows, it
will keep IER.THRE turn on then cause interrupt storm.

From pc16550d UART spec, INTR PIN description:

"Interrupt. This pin goes high whenever any one of the following interrupt types
has an active high condition and is enabled through the IER Receiver Error Flag;
Received Data Available timeout (FIFO Mode only); Transmitter Holding Register
Empty; and MODEM Status. The INTR signal is reset low upon the appropriate
interrupt service or a Master Reset operation."

And Interrupt Reset Control of Transmitter Holding Register Empty Interrupt
description:

"Reading the IIR Register (if source of interrupt) or Writing into
the Transmitter Holding Register"

The datasheet hasn't describe very clear if the THRE interrupt will be
re-generate after "Reading the IIR Register". We assume it will not do
that, so the THRE interrupt only generate when THR turn to empty.

This patch follows above assumption to resolve the interrupt storm cause WaaG
boot failed issue.

Tracked-On: #2713
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-05-01 10:52:14 +08:00
zhangyun 7553d1cd26 doc: How to build ACRN on Fedora 29
Update FAQ about compilation issue workaround on Fedora 29

Tracked-On: #2457
Signed-off-by: zhangyun <yunxzhang@intel.com>
2019-04-30 10:23:19 -07:00
Shiqing Gao 42a05c5f27 doc: add rules in C coding guidelines
This patch adds rules in C coding guidelines.

Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
2019-04-29 22:26:52 -07:00
Victor Sun b42d5c710c HV: correct GUEST_FLAG_IO_COMPLETION_POLLING in SOS
As commit info of 2362e58509, the guest flags
of GUEST_FLAG_IO_COMPLETION_POLLING work for POST_LAUNCHED_VM only, this
patch fix the wrong setting in SOS_VM;

Tracked-On: #2291

Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-04-30 11:23:18 +08:00
Geoffroy Van Cutsem d5cee835d2 doc: update instructions for building ACRN on Ubuntu 16.04
Update the instructions on how to build ACRN on Ubuntu 16.04,
specifically:
* Add 'pkg-config' package
* Upgrade 'binutils' to 2.27

Note: there is still an issue with regards to the GPIO header
(linux/gpio.h) which needs to be resolved.

Tracked-On: #2737
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2019-04-29 15:19:16 -07:00
Conghui Chen af0b16e1a8 DOC: change hv shell cmd sos_console to vm_console
Change shell command 'sos_console' to 'vm_console' as it is not only
used to switch console to SOS.

Tracked-On: #2987
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
2019-04-29 15:14:59 -07:00
Shiqing Gao 080d1f76a9 doc: rename rules ID in C coding guidelines
This patch renames rules ID to reflect the language, in order
to support multiple programming languages.

Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
2019-04-29 14:29:34 -07:00