Commit Graph

2184 Commits

Author SHA1 Message Date
Jack Ren d62196ac1f version: 0.4-unstable
Signed-off-by: Jack Ren <jack.ren@intel.com>
2018-11-12 17:38:52 +08:00
Jack Ren 43a3f120f3 version: v0.3
Signed-off-by: Jack Ren <jack.ren@intel.com>
2018-11-12 17:38:03 +08:00
Xie, nanlin aa36138151 Doc: update new known issues and features based into v0.3 release note
Signed-off-by: Xie, nanlin <nanlin.xie@intel.com>
2018-11-12 17:24:57 +08:00
David B. Kinder cb41e08006 doc: fix GSG version number typo
Update to NUC GSG had a version number typ0

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-11-10 11:21:02 -08:00
ailin,yang 5c8e4c38b7 DM: update clear Linux version
1, update Clear Linux version to 26120 
2, update kernel name to *iot-lts2018* 

Signed-off-by: Ailun258 ailin.yang@intel.com
2018-11-10 11:17:22 -08:00
ailin,yang bc2f30e229 HV: update kernel name
updated kernel name  from kernel-org.clearlinux.pk414-sos.4.14.52-63 to kernel-org.clearlinux.iot-lts2018-sos.4.19.0-16 for v0.3 release

Signed-off-by: Ailun258 <ailin.yang@intel.com>
2018-11-10 11:16:12 -08:00
ailin,yang 81cf2b6cf1 Doc: update doc to support V0.3 release
updates:  
1, update Clear Linux version to 26120 support v0.3 release
2,  update product kernel to kernel-iot-lts2018 since there is new named bundle 
Signed-off-by: Ailun258 <ailin.yang@intel.com>
2018-11-10 11:14:29 -08:00
David B. Kinder d8d164c6dd doc: release notes for 0.3
Update release notes and version selector for 0.3 release

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-11-09 09:51:28 -08:00
Xie, nanlin 76c8ff94de doc: Add v0.3 release note
Signed-off-by: Xie, nanlin <nanlin.xie@intel.com>
2018-11-09 09:13:58 -08:00
Xinyun Liu b6988e13d1 hv: fix branch addressing syntax warning
Branch addressing using registers or memory operands must be prefixed by
a '*' in AT&T ASM language.

This change is to fix these warnings:

arch/x86/cpu.c:409: Warning: indirect call without `*'
arch/x86/cpu.c:553: Warning: indirect call without `*'
arch/x86/trampoline.S:168: Warning: indirect jmp without `*'

Ref: https://csiflabs.cs.ucdavis.edu/~ssdavis/50/att-syntax.htm
Tracked-On: #1764
Signed-off-by: Xinyun Liu <xinyun.liu@intel.com>
Reviewed-By: Yin Fengwei <fengwei.yin@intel.com>
2018-11-09 13:16:13 +08:00
Victor Sun 053608a54e HV: add px cx data of bxt n3350 SOC
The cpu model name of "Intel(R) Celeron(R) CPU N3350 @ 1.10GHz" is used in
APL UP2 board, which is in Acrn official support list.

Tracked-On: #1767

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-11-09 13:07:53 +08:00
Mingqiang Chi 73530055b6 hv:Replace dynamic memory with static for port io
-- Add emulated port io index
-- Add emulated pio array in vm structure
-- Remove port list in vm structure
-- Remove free_io_emulation_resource/register_io_handler/
   create_io_handler APIs

v2-->v3:
 -- not add 'is_emulated', check len == 0U
 -- Check if io_read/io_write handler is NULL before calling
 -- Replace ENUM with MACRO for emulated pio index to avoid
    MISRA-C violations

v1-->v2:
  -- Remove EMUL_PIO_NUM in Kconfig, add emulated pio index
     for PIC/PCI/UART/RTC/PM

Tracked-On: #861
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-11-09 13:05:04 +08:00
Binbin Wu 5a1f24473d hv: ept: set snp control when modify
Current, SNP control bit is only set in ept_mr_add for cacheable memory.
However, memory type for VM0 is added as uncacheable type.
So SNP control is not set for VM0.
Add code to set SNP control bit for cacheable memory when ept modification.

Tracked-On: #1762
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Reviewed-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-11-09 13:00:51 +08:00
Zhao Yakui 66f133bf45 DM: Fix the typo error in checking the /dev/vbs_ipu file
The /dev/vbs_ipu is used by the backend driver of IPU mediator on SOS kernel
If the file of /dev/vbs_ipu exists, it indicates that IPU works in mediator mode.
Other it will fall back to the pass-through mode.
But the commit 969f7cf071 doesn't check the file of /dev/vbs_ipu correctly.
It should be -e instead of -f.

Tracked-on: https://github.com/projectacrn/acrn-hypervisor/issues/1373
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Wu, BinBin <binbin.wu@intel.com>
2018-11-09 11:26:59 +08:00
Minggui Cao ab5572bdb6 doc: explain intr storm monitor params in acrn-dm
add the introduction of interrupt storm monitor params in acrn-dm
commond lines.

Signed-off-by: Minggui Cao <minggui.cao@intel.com>
2018-11-08 16:50:15 -08:00
Shiqing Gao f65e05c5fc hv: fix 'Start of variable is upper case'
variable names shall be lower-case letters.

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-11-08 15:39:09 +08:00
Yan, Like d49a6f6fca capture acrnd AaaG booting messages to journald
It's for AaaG boot time measurement only.

Tracked-On: #1759
Signed-off-by: Yan, Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2018-11-08 15:14:15 +08:00
yuhong.tao@intel.com c4161c8784 dm: uart: fix UOS console output to stdin
At devicemodel/hw/uart_core.c, struct ttyfd has only one file
descriptor for uart backend device, that is OK if DM uart open
a tty characteor device under /dev/ for reading, writing and
terminal operating.

When use stdio as backend tty device, there are 2 fds, stdin/stdout.
DM should read from 'stdin' and output to 'stdout'. But ttyfd just
has one fd, and is only for 'stdin', so dm has to output to stdin,
too, not to stdout.

That cause a problem: if use stdio for uart backend, you can't
redirect UOS console to any other files. Because stdout is not used.

We hope to store information from VM console to system journal,
when UOS is launched by Acrnd automatically. The systemd need to
redirect stdout of dm to system journal files, but it can't be done.

So we can split the 'fd' of struct ttyfd to 'fd_in' & 'fd_out'.
they are same when use tty device; And they are different when use
stdio, 'fd_in' is for stdin and 'fd_out' is for stdout.

Tracked-On: #1759
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
Reviewed-by: Like Yan <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2018-11-08 15:14:15 +08:00
Minggui Cao b58817273d DM: add interrupt storm monitor params in cmdline
To support expose "interrupt storm monitor" params setting to user;
it is easy to adjust the params in launch UOS script.

Tracked-On: #1724
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
2018-11-08 14:43:05 +08:00
Minggui Cao ad1cbb7623 DM: add interface to set intr storm monitor params
modify and add interface to set interrupt monitor params;
it can be set by acrn-dm input arguments like following:
--intr_monitor 10000,10,1,100

the 4 params order is:
    interrupt storm theshold per second,
    probe period to get interrupt data,
    pass-through devices' interrupt injection delay time,
    delay duration, after it, stop injection & restore to normal

Tracked-On: #1724
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-11-08 14:43:05 +08:00
Yin Fengwei 1902d725a0 hv: fix partition mode no console issue.
Fix the issue that kernel console doesn't work with partition mode.

Tracked-On: #1756
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-11-08 14:41:31 +08:00
Zhao Yakui 3cbaf02830 HV: Use parameter directly to pass bdf for hcall_assign/deassign_ptdev
The the bdf(bus/dev/func) is used to determine which pass-through device should
be assigned/released. Now the hypervisor parses the corresponding bdf from the guest
physical address when hcall_assign_ptdev/hcall_deassign_ptdev is called.
As it is only uint16_t, it is unnecessary to use the GPA to pass the bdf parameter.
Instead the parameter can be used as the bdf directly.

In order to keep the compatibility, it still can get the bdf by using
copy_from_gpa when SOS passes the parameter based on the buffer. But this will
be depreciated.
This is based on the assumption that the GPA in SOS is greater than 0x10000
when one buffer is allocated to pass the corresponding hypercall parameter.
After the SOS uses the bdf to pass the hypercall paremeter, we can remove the code
that gets the bdf by using copy_from_gpa.

V1->V2: Add some comments for hcall_assign_ptdev/hcall_deassign_ptdev.

Tracked-on: #1751
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-11-08 14:36:46 +08:00
Li, Fei1 605738fc0c hv: hypercall: remove hcall_set_vm_memory_region
Since it's discarded.

Tracked-On: #1124
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-11-08 13:04:27 +08:00
Shiqing Gao b430b00a08 hv: fix 'Expression is not Boolean'
MISRA-C requires that the controlling expression of an if statement or
an iteration-statement shall be Boolean type.

v1 -> v2:
* update the U suffix of constant to let the type of operands
  to bit operations (&) is the same.
* update the type of 'i' from uint64_t to uint16_t in
  'profiling_set_control' since it is limited by phys_cpu_num,
  which is uint16_t.

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-11-08 13:04:11 +08:00
Li, Fei1 121454c4bd hv: fix a minor bug of static checks
When a macro is expanded, the two tokens on either side of each ‘##’ operator
are combined into a single token, which then replaces the ‘##’ and the two
original tokens in the macro expansion. So we need use CAT__ to expand the
__LINE__ MACRO and use CAT_ to combine the expaneded MACRO.

Tracked-on: #1750
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-11-08 09:26:56 +08:00
Binbin Wu 0800624fe5 hv: vtd: use pre-defined function for bdf calculation
Use pre-defined inline function for pci bus/slot/function calculation.

Tracked-on: #1747
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-11-08 09:12:30 +08:00
Binbin Wu 039a1c0f2e hv: pci: replace fucntion like macro with inline func
Replace fucntion like macro with inline function.

Tracked-on: #1747
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-11-08 09:12:30 +08:00
Zhi Jin 36aaaa1cfd DM NPK: unmap the MMIO in pci_npk_deinit
Otherwise, after UOS crashes, the PTE for the MMIO may be added
again.

Tracked-On: #1745
Signed-off-by: Zhi Jin <zhi.jin@intel.com>
2018-11-08 09:06:17 +08:00
Mingqiang Chi ef974d1adf hv:Remove atomic operation to set initial value for 'created_vcpu'
It is not necessary to use atomic operation to
set the initial value for 'created_vcpu' in vm structure.

Tracked-On: #861
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
2018-11-07 15:58:08 +08:00
Yin Fengwei 0fc47b5a7c hv: fix release build issue
The old doc update commit changed the code by accident and broke
release version build. This patch fix the release build issue.

Tracked-On: #1595
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-11-07 15:39:01 +08:00
Tw a8a1e22981 hv:vtd: fix minor bug in domain count
domain count should be CONFIG_MAX_VM_NUM+1 instead of CONFIG_MAX_IOMMU_NUM+1

Tracked-On: #861
Signed-off-by: Tw <wei.tan@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-11-07 15:36:12 +08:00
Binbin Wu 78dd92e4ed DM: sos_bootargs: split sos_bootargs into multiple lines
Difficult to review the changes of sos_bootargs when the args is a single line.
Split sos boot args into multiple lines.

Tracked-On: #1730
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
2018-11-07 09:21:13 +08:00
David B. Kinder 44ce3a664f doc: update HLD Trace/Log
Transcode, edit, and upload HLD 0.7 section 9 (Trace/Log)

Tracked-on: #1738

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-11-06 16:14:49 -08:00
David B. Kinder 27fffb96b9 doc: update HLD Power Management
Transcode, edit, and upload HLD 0.7 section 8 (Power Management)

Tracked-on: #1736

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-11-06 13:51:35 -08:00
David B. Kinder b3d21683de doc: update HLD VM Management
Transcode, edit, and upload HLD 0.7 section 7 (VM Management)

Tracked-on: #1734

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-11-06 12:23:25 -08:00
David B. Kinder dfcc06df30 doc: update HLD Virtio Devices
Transcode, edit, and upload HLD 0.7 section 6.5 (Supported Virtio
Devices), merging with existing reviewed content.

Tracked-on: #1732

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-11-06 11:37:29 -08:00
Shiqing Gao 366042cac2 hv: fix integer violations
- Fix the integer violations related to the following rules:
  1. The operands to shift operations (<<, >>) shall be unsigned
     integers.
  2. The operands to bit operations (&, |, ~) shall be unsigned
     integers.

- Replace 12U with CPU_PAGE_SHIFT when it is address shift case.

v1 -> v2:
 * use existed MACRO to get bus/slot/func values
 * update PCI_SLOT MACRO to make it more straightforward
 * remove the incorrect replacement of 12U with CPU_PAGE_SHIFT
   dmar_fault_msi_write

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-11-06 16:18:56 +08:00
Yuan Liu 65a2613ab6 IOC mediator: fix wakeup reason issue when UOS resuming
IOC mediator should keep sending acnrd boot reason until received
UOS heartbeat init message, then turn to send SOS wakeup reason
through read native cbc lifecycle cdev.

Tracked-On: #1727
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-11-06 16:18:35 +08:00
Huihuang Shi a2516ecc85 fix "Casting operation to a pointer"
The print_param struct's member emit who is used for callback,
the forth parameter of it is used for transmit the private data
of the "print_param".

The type translation between "void *" and private date broke the
violations.

Use the same type to fix it out.

Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Xu Anthony <anthony.xu@intel.com>
2018-11-06 13:37:33 +08:00
Xinyun Liu ad1e2ab678 DM/sos_bootargs: remove unused parameters for graphics
remove these options from legacy release:

i915.tsd_init=7 i915.tsd_delay=2000
i915.enable_preemption=1 i915.context_priority_mode=2

Tracked-On: #1697
Signed-off-by: Xinyun Liu <xinyun.liu@intel.com>
Reviewed-by: He, Min <min.he@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-11-06 13:13:36 +08:00
Manisha Chinthapally ee918f8533 HV:debug:profiling Fixed inappropriate condition check
Fixed the condition to be able to collect MSR sample data
Also populating addition information to help identifity appropriate data

Tracked-On: #1693
Signed-off-by: Manisha Chinthapally <manisha.chinthapally@intel.com>
2018-11-06 09:19:33 +08:00
Yin Fengwei 7f57a74fe7 hypercall doc: Sync the comments for each hypercall from .h to .c
For all the hypercalls, we sync the comments from .h to .c as
comments in .h file are used in architectural design and the
comments in .c are used in module design.

Tracked-On: #1595
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
2018-11-06 09:12:40 +08:00
Xiangyang Wu 99586e32cc HV:treewide:rename vm data structure
For data structure types "struct vm", its name is identical
with variable name in the same scope. This is a MISRA C  violation.

Naming convention rule:If the data structure type is used by multi
modules, its corresponding logic resource is exposed to external
components (such as SOS, UOS), and its name meaning is simplistic
(such as vcpu, vm), its name needs prefix "acrn_".

The following udpates are made:
struct vm *vm-->struct acrn_vm *vm

Tracked-On: #861

Signed-off-by: Xiangyang Wu <xiangyang.wu@linux.intel.com>
2018-11-05 15:35:49 +08:00
Xiangyang Wu ace4f48c9a HV:treewide:rename vcpu_arch data structure
For data structure types "struct vcpu_arch", its name
shall follow Naming convention.

Naming convention rule:If the data structure type is
used by multi modules, its corresponding logic resource
is exposed to external components (such as SOS, UOS),
and its name meaning is simplistic (such as vcpu, vm),
its name needs prefix "acrn_". Variable name can be
shortened from its data structure type name.

The following udpates are made:
struct vcpu_arch arch_vcpu-->struct acrn_vcpu_arch arch

Tracked-On: #861

Signed-off-by: Xiangyang Wu <xiangyang.wu@linux.intel.com>
2018-11-05 15:35:49 +08:00
Xiangyang Wu fa26a16645 HV:treewide:rename vcpu data structure
For data structure types "struct vcpu", its name is identical
with variable name in the same scope. This is a MISRA C  violation.

Naming convention rule:If the data structure type is used by multi
modules, its corresponding logic resource is exposed to external
components (such as SOS, UOS), and its name meaning is simplistic
(such as vcpu, vm), its name needs prefix "acrn_".

The following udpates are made:
struct vcpu *vcpu-->struct acrn_vcpu *vcpu

Tracked-On: #861

Signed-off-by: Xiangyang Wu <xiangyang.wu@linux.intel.com>
2018-11-05 15:35:49 +08:00
Zhao Yakui 969f7cf071 DM:Check the device file of /dev/vbs_ipu to determine IPU mode
The /dev/vbs_ipu is used as the backend driver of IPU mediator on SOS kernel.
If the file of /dev/vbs_ipu exists, it indicates that IPU works in mediator mode.
Other it will fall back to the pass-through mode.

Tracked-on: https://github.com/projectacrn/acrn-hypervisor/issues/1373
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2018-11-05 14:45:38 +08:00
Jason Chen CJ 8efd9edb82 hv: vPCI needs to handle reset IO port CF9 differently
Currently vpci treats IO port CF9 as a regular PCI CONFIG_ADDRESS port,
so that SOS can't do system reboot through port CF9.

This patch handles port CF9 in this way:
- SOS (vm0): it is allowed to actually access the physical IO port for byte
  accesses.
- UOS (non-vm0) or partitioning guests: any accesses to port CF9 are
  ignored.

Tracked-On: #1568
Signed-off-by: Zide Chen zide.chen@intel.com
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
2018-11-05 14:42:50 +08:00
Shuo Liu d261b4bce2 doc: update virtio related functions doc comments
Update some virtio, VBS-K, vhost APIs documents.

Tracked-On: #1595
Signed-off-by: Shuo Liu <shuo.a.liu@intel.com>
2018-11-04 20:32:50 -08:00
Shuo Liu ea801a1672 dm: Remove unused duplicated API dm_gpa2hva
paddr_guest2host has same function with dm_gpa2hva. And There is no
usage of dm_gpa2hva. Remove it.

Tracked-On: #1595
Signed-off-by: Shuo Liu <shuo.a.liu@intel.com>
Acked-by: Fengwei Yin <fengwei.yin@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-11-04 20:32:50 -08:00
Junjie Mao 4e540e5494 HV: doc: use doxygen-generated API docs in HLD
This patch adds ioreq.h to the input of doxygen and replaces hard-coded API docs
with doxygen-generated ones.

Tracked-On: #1595
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2018-11-04 20:30:38 -08:00