Commit Graph

4439 Commits

Author SHA1 Message Date
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
Lei, Lu d1796d7565 doc: update gsg and acrn_quick_setup.sh
1. From Clear Linux 31030, we could use kernel-iot-lts2018-sos kernel
   command line as Service OS kernel command line directly, so update
   the setps and codes to set the Service OS kernel command line.
2. Command "swupd verfiy" and the flag "-m" is superseded, use "swupd
   repair" and the flag "-V" instead
3. As UOS is launched by OVMF, the old steps and code to set up UOS does
   not work on Clear Linux 31030, update its related steps and code.
4. Update install Clear Linux steps.
5. Fix some small issues.

Signed-off-by: Lei, Lu <leix.lu@intel.com>
2019-09-24 09:48:24 -04:00
Geoffroy Van Cutsem 76da81370b doc: tweak vUART tutorial for improved rendering
Tweak the "vUART configuration" tutorial to fix a few typos and change some
formatting to improve its readability.

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2019-09-24 08:47:07 -04:00
Deb Taylor 698ec4c4f4 Doc: Update image and text in Virtio-i2c doc
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2019-09-24 08:01:27 -04:00
Deb Taylor 960c508bab Doc: Initial vuart configuration doc and images--4979
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2019-09-24 07:10:51 -04:00
David B. Kinder 018a04c183 fix foldernames in CODEOWNERS
Folder names need to end with a slash

Tracked-On: #3723

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-09-24 11:59:29 +08:00
Shuo A Liu 2096c43e5c hv: create all VCPUs for guest when create VM
To enable static configuration of different scenarios, we configure VMs
in HV code and prepare all nesserary resources for this VM in create VM
hypercall. It means when we create one VM through hypercall, HV will
read all its configuration and run it automatically.

Tracked-On: #3663
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Signed-off-by: Yu Wang <yu1.wang@intel.com>
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-09-24 11:58:45 +08:00
Shuo A Liu 9a23ec6b5a hv: remove unused pcpu assignment functions
As we introduced vcpu_affinity[] to assign vcpus to different pcpus, the
old policy and functions are not needed. Remove them.

Tracked-On: #3663
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-09-24 11:58:45 +08:00
Shuo A Liu 1c526e6d16 hv: use vcpu_affinity[] in vm_config to support vcpu assignment
Add this vcpu_affinity[] for each VM to indicate the assignment policy.
With it, pcpu_bitmap is not needed, so remove it from vm_config.
Instead, vcpu_affinity is a must for each VM.

This patch also add some sanitize check of vcpu_affinity[]. Here are
some rules:
  1) only one bit can be set for each vcpu_affinity of vcpu.
  2) two vcpus in same VM cannot be set with same vcpu_affinity.
  3) vcpu_affinity cannot be set to the pcpu which used by pre-launched VM.

v4: config SDC with CONFIG_MAX_KATA_VM_NUM
v5: config SDC with CONFIG_MAX_PCPU_NUM

Tracked-On: #3663
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Signed-off-by: Yu Wang <yu1.wang@intel.com>
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
2019-09-24 11:58:45 +08:00
Shuo A Liu ca2540fe8c hv: return pre-defined vcpu_num from HV to upper layer
There is plan that define each VM configuration statically in HV and let
DM just do VM creating and destroying. So DM need get vcpu_num
information when VM creating.

This patch return the vcpu_num via the API param. And also initial the
VMs' cpu_num for existing scenarios.

Tracked-On: #3663
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Signed-off-by: Yu Wang <yu1.wang@intel.com>
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-09-24 11:58:45 +08:00
Shuo A Liu 59e39c5fbb hv: move MAX_PCPU_NUM from Kconfig to header file
MAX_PCPU_NUM is different on various BOARDs. So we move the generic
definition from Kconfig to each board's config header file.

Tracked-On: #3663
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
2019-09-24 11:58:45 +08:00
Shuo A Liu d588703976 hv: Add a helper to account bitmap weight
Sometimes we need know the number of 1 in one bitmap. This patch provide
a inline function bitmap_weight for it.

Tracked-On: #3663
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Signed-off-by: Yu Wang <yu1.wang@intel.com>
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-09-24 11:58:45 +08:00
Shuo A Liu f4ce9cc4a2 hv: make hypercall HC_CREATE_VCPU empty
Now, we create vcpus while VM being created in hypervisor. The
create vcpu hypercall will not be used any more. For compatbility,
keep the hypercall HC_CREATE_VCPU do nothing.

v4: Don't remove HC_CREATE_VCPU hypercall, let it do nothing.

Tracked-On: #3663
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
2019-09-24 11:58:45 +08:00
Conghui Chen 0ea12a45d4 dm: script: remove guest cpu number
Remove the '-c' option from all scripts as it has been removed from
dm code.

Tracked-On: #3663
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2019-09-24 11:58:45 +08:00
Conghui Chen 16ad062d1a dm: remove guest cpu number option
Remove the guest cpu number option '-c', as the guest cpu number is
defined in hypervisor vm configuration file, and the number can be
return by vm_create().

Tracked-On: #3663
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-09-24 11:58:45 +08:00
Shuo A Liu d8acff1f44 dm: get vcpu num from hypervisor when create VM
Now, we pre-define VM configuration statically in HV. So HV can create
vcpus instead of DM when VM create.

This patch get the created vcpu_num from HV. vm_create_vcpu can be
removed later if kernel can get vcpu_num correctly without
IC_CREATE_VCPU ioctl.

v4: Keep vm_create_vcpu in DM for compatbility. We might remove it when
kernel is ready.

Tracked-On: #3663
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
2019-09-24 11:58:45 +08:00
Mingqiang Chi 489937f7b8 hv:check pcpu numbers during init_pcpu_pre
it will panic if phys_cpu_num > CONFIG_MAX_PCPU_NUM
during init_pcpu_pre,after that no need to check it again.

Tracked-On: #861
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
2019-09-24 09:02:05 +08:00
Mingqiang Chi 5a03a5df05 hv:fix MISRA-C violation for variable-length array
C99 supports variable-length array,
but misra-c required "variable-length array types shall not be used"

Tracked-On: #861
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
2019-09-24 09:02:05 +08:00
Mingqiang Chi c36908dce2 hv:remove redundant memset in some cases
No need to memset since it will overwrite the memory
by copy_from_gpa in some cases.

Tracked-On: #861
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
2019-09-24 09:02:05 +08:00
Deb Taylor 9e759bcfa0 Initial virtio i2c doc and images.
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2019-09-23 11:13:30 -04:00
Victor Sun 9c46354311 acrn-config: remove hvlog support for generic board
hvlog is for debug purpose and its address is board specific,
so remove the param in sos cmdline.

If user want to support hvlog in his own board, then he can add
the param in sos cmdline manually.

Tracked-On: #3602

Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-09-23 20:57:33 +08:00
Victor Sun 79d6dc1fa7 acrn-config: add apl-up2-n3350 config xmls
ATOM-N3350 only has two cores, so we only support SDC and
logical_partition scenario.

Tracked-On: #3602

Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-09-23 20:57:33 +08:00
Victor Sun 25544e31b7 acrn-config: update board xml of apl-up2
Change default apl-up2 CPU support from ATOM-N3350 to ATOM-N4200.
For apl-up2 N3350 support, we will add another apl-up2-n3350 board xml.

Tracked-On: #3602

Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-09-23 20:57:33 +08:00
Wei Liu 172d5ee6e5 acrn-config: update README for acrn-config
align the usage of acrn-config tool and their README

Tracked-On: #3602
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-09-23 20:55:09 +08:00
Wei Liu d35ca113d9 acrn-config: reserve 16M memory for hv start
Need to reserved 16M for HV debug usage like sbuf/ramoops before HV RAM START
to avoid possible conflict with HV memory.

Tracked-On: #3602
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-09-23 20:55:09 +08:00
Wei Liu 6d7592b7cb acrn-config: fix parameter error in launch script
1. fix duplicated '-s 1:0,lpc'
2. fix extra '-l'
3. fix wrong uuid parameter

v1-v2:
    1). remove ethernet pass through to keep align with sample script

Tracked-On: #3602
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-09-23 20:55:09 +08:00
Li, Fei1 535a83e24b hv: vpci: refine vPCI BAR initialization
Initialize vBAR configure space when doing vPCI BAR initialization. At this time,
we access the physical device as we needs, no need to cache physical PCI device
BAR information beforehand.

Tracked-On: #3475
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
2019-09-23 11:16:48 +08:00
Victor Sun 153a5992f5 Makefile: add build tag for acrn-config tool in version.h
Add " with acrn-config" tag in build info when user build hypervisor with
acrn-config xmls would be helpful to identify the hypervisor configuration
in current build is from acrn-config xml or from source code.

Tracked-On: #3602

Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-09-20 19:39:22 +08:00
Victor Sun 3f3ec3865e Makefile: generate config patch in hypervisor/Makefile
Previously we generate config patch based on config xml in toplevel Makefile,
it brings two issues:

1. we could not generate xml configuration patch with hypervisor source only;

2. The github commit info of current code base which is defined in version.h
will be overwritten by the new generated config patch, then the lost commit
info would impact build identify and bug reproducing.

This patch fixed these two issues. Besides, the patch also modify the logic of
platform_acpi_info file existence judgement, which need to be depends on the
acrn-config patch.

Tracked-On: #3602

Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-09-20 19:39:22 +08:00
Victor Sun 5d7d7cf910 acrn-config: add launch sample xmls for acrn-config
add launch sample xmls for acrn-config to generate launch scripts.

launch script will generated by acrn-config/launch_config tool,
acrn-config/launch_config need launch config xml as input.

Tracked-On: #3602
Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2019-09-20 14:39:48 +08:00
Wei Liu 86e73a4610 acrn-config: generate launch script file and apply to the souce file
1. generate launch script file and apply to the source file

usage: launch_cfg_gen.py [h]--board <board_info_file> --scenario <scenario_info_file>
		--launch <launch_info_file> --uosid <uosid id>
board_info_file :  file name of the board info
scenario_info_file :  file name of the scenario info
launch_info_file :  file name of the launch info
uosid :  the uos id which to launch:[0..max uos id]

sample:
    $ python3 launch_cfg_gen.py --board ../xmls/board-xmls/apl-mrb.xml
      --scenario ../xmls/config-xmls/apl-mrb/sdc.xml
      --launch ../xmls/launch_config/mrb_launch.xml --uosid 0

v1-v2:
    1). usage: '--vm' -> '--uosid'
    2). add 'uuid' option for acrn-dm
    3). support parse tag from 'rootfs' to 'rootfs_dev'
    4). support parse tag from 'hard_rtos' to 'Preempt-Rt Linux'
    5). support pasre tag from 'redirect_console' to 'console_type'
    6). add 'nvme' passthrough option
    7). modify uos_type to upper string in webUI
    8). support to generate launch file by uosid, this map to scenario
id

Tracked-On: #3602
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2019-09-20 14:39:48 +08:00
Wei Liu 911be1d3b6 acrn-config: modify rootfs tag in board information
1. grap 'ext4' rootfs, and store it as "BLOCK_DEVICE_INFO" tag
2. remove 'Tab' from app tools
3. add support to parse ' ' from scenario xml

v1-v2:
    1). modify the board info "ROOT_DEVICE_INFO" -> "BLOCK_DEVICE_INFO"

Tracked-On: #3602
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2019-09-20 14:39:48 +08:00
Qi Yadong 3ebeecf060 hv: save/restore TSC in host's suspend/resume path
TSC would be reset to 0 when enter suspend state on some platform.
This will fail the secure timer checking in secure world because
secure world leverage the TSC as source of secure timer which should
be increased monotonously.

This patch save/restore TSC in host suspend/resume path to guarantee
the mono increasing TSC.

Note: There should no timer setup before TSC resumed.

Tracked-On: #3697
Signed-off-by: Qi Yadong <yadong.qi@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-09-19 13:50:50 +08:00
Xie, nanlin b888d50c6a Modify the maintainer of each sub directory
Tracked-On: #3419
Signed-off-by: Xie, nanlin <nanlin.xie@intel.com>
2019-09-19 08:46:57 +08:00
Andy ad9e61b23c Fix the last problem: check_name function, print info error
Tracked-On:#3675
Signed-off-by: Andy andyx.liu@intel.com
2019-09-19 08:44:45 +08:00
Andy 04d5638745 Fix the second problem: The Extended Model ID needs to be examined only when the Family ID is 06H or 0FH
Tracked-On:#3675
Signed-off-by: Andy <andyx.liu@intel.com>
2019-09-19 08:44:45 +08:00