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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>