Commit Graph

302 Commits

Author SHA1 Message Date
Vijay Dhanraj 290886d4d0 acrn-config: Platform xml file support to run ACRN on QEMU
This patch adds xml file, both board as well scenario files
that are need to run ACRN on top of QEMU as a nested hypervisor.

Currently support is only for SDC scenario.

Tracked-On: #3198
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-21 15:34:38 +08:00
Vijay Dhanraj 2175c17c97 acrn-config: Set defaults on empty leaf for generated <board>.xml file
This patch sets defaults similar to generic platform configuration
when leaf features like PM_INFO, S3_INFO, S5_INFO, DRHD_INFO, CPU_BRAND,
CX_INFO, PX_INFO, MMCFG_BASE_INFO are not generated via either target
offline tool or user supplies empty field in case of emulation.

Tracked-On: #3198
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-21 15:34:38 +08:00
Minggui Cao a335679ce9 Makefile: remove 'clean' when building HV/DM
1. not need 'clean' when building ACRN-HV/DM each time
2. correct efi-stub wrong dependency

Tracked-On: #2412
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2020-05-21 15:12:21 +08:00
Wei Liu fca8750ba6 acrn-config: generate console=ttyS0 for PRE Launched VM
Remove pre-launched VM console setting in scenario xml and leave it
configured in bootargs directly.

Tracked-On: #4808
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-20 13:51:31 +08:00
Wei Liu 65c0cc7362 acrn-config: remove rootfs item from PRE Launched VM
The bootarg of rootfs for pre-launched VM is for Linux only and it
should not limited to physical block device which is selectable from
native rootfs list, it might be a USB or RAM device that "X" is variable
in root=/dev/sdX or /dev/ramX. So remove the rootfs setting in XML and
leave it configured in kernel bootargs directly.
Given the SOS must be Linux and its rootfs must be a physical block
device, rootfs item tag is still reserved in xml for SOS VM section.

Tracked-On: #4808
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-20 13:51:31 +08:00
Wei Liu 3ecaa62510 acrn-config: remove configurable="0" for hybrid scenario config
remove configurable="0" for hybrid scenario pci_devs of Pre Launched VM.

Tracked-On: #4808
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-20 13:51:31 +08:00
Wei Liu 39ab45f06b acrn-config: generate pci_dev.c file for logical partition
With current acrn-config code, there would be no pci_dev.c generated
if no PCI devices were selected. This would cause a bug for logical_partition
scenario because of an old pci_dev.c is already in the folder and involved
for compiling. The configure tool should override the pci_dev.c, in this case,
to avoid building error.

Tracked-On: #4813
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-20 13:36:03 +08:00
Wei Liu 8b736cc131 acrn-config: generate correct IRQ for VUART1
As VUART is not supported PCI VUART, use native PCI ttySn's IRQ for
VUART1 would cause communication failed, allocate a free IRQ for it.

Tracked-On: #4798
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-15 13:25:09 +08:00
Wei Liu f644b3705b acrn-config: refine the 'vm_name' parameter for launch script
Use post_vm_id$(relative id) to identify each post-launched VM to
make sure simultaneous launching successfully.

Tracked-On: #4797
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-15 13:25:09 +08:00
Shuang Zheng 515c70010f acrn-config: add board and default config xmls for ehl
add board xml and default scenario config xmls and launch config
xmls for ElkhartLake boards.

Tracked-On: #4798
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-05-15 13:25:09 +08:00
Wei Liu 8ebf89eaa8 acrn-config: refinement acrn-dm arguments for "Soft RT/Hard RT" VMs
Assign the right acrn-dm arguments for "Soft RT/Hard RT" VMs by
'uos_type' in webUI item tag.

Tracked-On: #4799
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-15 13:25:09 +08:00
Wei Liu d4c9a5fa77 acrn-config: refine ttys type for mapping MMIO
add ttys type for mapping MMIO

Tracked-On: #4798
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-15 13:25:09 +08:00
Wei Liu 843579adf1 acrn-config: remove 'idle=halt' from sos bootargs
Remove "idle=halt" from SOS boot args since the param could be handled
automatically by acrn-config according to CPU scheduler setting.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-15 13:25:09 +08:00
yuhong.tao@intel.com c04c5a5bf0 Doc: cleanup acrnctl usage has pause/continue
Tools: cleanup acrn_mngr pause/continue message

The 'pause/continue' acrnctl cmd is never used and their action are not
defined for ACRN VMs. Remove them from README.

Tracked-On: #4790
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
2020-05-14 12:52:59 +08:00
yuhong.tao@intel.com 5a4e488872 Tools: cleanup acrn_mngr pause/continue message
The 'pause/continue' acrnctl cmd is never used and their action are not
defined for ACRN VMs. should be removed. Remove them from acrn_mngr.

Tracked-On: #4790
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
2020-05-14 12:52:59 +08:00
yuhong.tao@intel.com bd5e6cec50 Tools: cleanup acrnctl support pause/continue cmd
The 'pause/continue' acrnctl cmd is never used and their action are not
defined for ACRN VMs. should be removed.

Tracked-On: #4790
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
2020-05-14 12:52:59 +08:00
Zide Chen 1bc5c7ac5b hv/acrn-config/efi-stuf: assign hvlog and ramoops buffer address < 256MB
If HV relocation is enabled, either ACRN efi-stub or GRUB relocates
hypervisor image above HPA 256MB, thus we put hvlog and ramoops buffer
under 256MB to avoid conflict with hypervisor owned address.

This patch hardcodes these addresses:

0xa00000 - 0xdfffff: 4MiB for ramoops buffer
0xe00000 - 0xffffff: 2MiB for hvlog buffer

However, user can customize them to other addresses as long as it's under
256MB, available in host e820, and SOS bootarg "nokaslr" is not specified.

If HV relocation is disabled, need to make sure that these buffer
addresses are not between HV_RAM_START and HV_RAM_START + HV_RAM_SIZE.

Tracked-On: #4760
Signed-off-by: Zide Chen <zide.chen@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2020-05-13 08:36:54 +08:00
Zide Chen be4797a10c efi-stub: don't relocate hypervisor to address lower than 256MB
With this patch, we relocate hypervisor image to HPA 256MB and above,
thus the hardcoded hvlog and ramoops buffer for SOS can safely reside at
addresses under HPA 256MB, given that 1:1 mapping between SOS GPA and HPA.

Tracked-On: #4760
Signed-off-by: Zide Chen <zide.chen@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2020-05-13 08:36:54 +08:00
Zide Chen 0629c5c8c2 hv/acrn-config: changed name from cpu_affinity_bitmap to cpu_affinity
Tracked-On: #4616
Signed-off-by: Zide Chen <zide.chen@intel.com>
2020-05-08 11:04:31 +08:00
Wei Liu da749bcf84 acrn-config: update tgl-rvp board information
Update tgl-rvp board information.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-05-06 11:37:14 +08:00
Wei Liu 0a3ca1974e acrn-config: fix log macros for board defconfig
fix macros log level for board defconfig.

Tracked-On: #4752
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-06 11:25:57 +08:00
Wei Liu d03d6e96e0 acrn-config: add clearlinux UOS for launch config xmls
add 6 clearlinux UOSes for launch config xmls.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2020-05-06 11:25:57 +08:00
Wei Liu 1d1270766c acrn-config: enable gvtd for waag for nuc7/nuc6 board
enable gvtd for waag of nuc7/nuc6 board by default.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-06 11:25:57 +08:00
Wei Liu a94f04fb94 acrn-config: add 4 POST_STD_VM and 1 KATA_VM for industry config xmls
For nuc7/nuc6/whl-ipci5/whl-ipc-i7 board, add 4 POST_STD_VM and 1
KATA_VM in their industry config xmls, and assign PCPU0-1 to these
PRE_LAUNCHED_VM.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-06 11:25:57 +08:00
Wei Liu db14c2f89f acrn-config: parse KATA VM count number with vm_type 'KATA_VM'
Parse KATA VM count number from scenario config with vm_type 'KATA_VM'
and Remove MAX_KATA_VM_NUM from scenario config xmls.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-06 11:25:57 +08:00
Wei Liu 5936bf431c acrn-config: refine slot assignment for launch config
When passthrough device for VM, if there is no fun0 of the slot was passed
in, PCI expansion card can not respond as a device, it must implement at
least function number 0.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-29 09:52:37 +08:00
Wei Liu c8eda07323 acrn-config: refinement for CPU affinity check
Refine CPU affinity sanity check for both scenario and launch config
xmls.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-29 09:52:37 +08:00
Wei Liu 3078595da5 acrn-config: add vm type sanity check
Refinement for VM type sanity check relays on VM UUID number.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-24 16:19:55 +08:00
Wei Liu 539905e1f4 acrn-config: refinement for pci_devs in scenario config xmls
remove configurable="0" for pci_devs of pre-launched VM so that the
passthru devices could be configurable on webUI.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-24 16:19:55 +08:00
Wei Liu a43b42b2a0 acrn-config: parse cpu_affinity from launch config xmls
Parse cpu_affinity from launch config xmls and generate '--cpu_affinity' as
acrn-dm args.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-24 16:19:55 +08:00
Wei Liu 233f2deb4b acrn-config: add cpu_affinity for launch config xmls
1.Remove cpu_sharing item from launch config xml.
2.Add cpu_affinity for launch config xmls to configurable POST VM cpu
affinity from webUI.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-24 16:19:55 +08:00
Zide Chen 1e3df01362 acrn-config: update cpu_affinity in scenrio configuration xml files
Change the tag name from "vcpu_affinity" to 'cpu_affinity" in all the per
board scenario xml files, and change the descritpions.

Tracked-On: #4641
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-23 09:38:54 +08:00
Zide Chen fafce7aa5f acrn-config: change names for vcpu_affinity[] related items
hypervisor is replacing vm_configs[].vcpu_affinity[] array with
cpu_affinity_bitmap, the meaning of which has some changes as well.

This patch changes the names in generated vm_configuration.c:
-.vcpu_affinity = VMx_CONFIG_VCPU_AFFINITY,
+.cpu_affinity_bitmap = VMx_CONFIG_CPU_AFFINITY,

Changes in vm_configuration.h:
-#define  VMx_CONFIG_VCPU_AFFINITY {AFFINITY_CPU(xU), AFFINITY_CPU(xU)}
+#define  VMx_CONFIG_CPU_AFFINITY  (AFFINITY_CPU(xU) | AFFINITY_CPU(xU))

Also don't generate default assignment of vcpu_num in vm_configuration.c,
because now hypervisor can easily calculate it from cpu_affinity_bitmap.

Accordingly, in the scenario xml files, tag "vcpu_affinity" is changed
to "cpu_affinity".

Tracked-On: #4641
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-23 09:38:54 +08:00
Shuang Zheng f7594f0a93 acrn-config: assign VM IDs for dynamic scenario and launch setting
When dynamically creating or adding or deleting VMs, acrn config app
will assign VM IDs for the VMs with the orders of prelaunched VMs and SOS
VM and postlaunched VMs to be consistent with the VM order of vm_configs
in vm configuration. When dynamically creating launch scripts, acrn
config app will let users to specify the VM ID before launch setting.

Tracked-On: #4641

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-22 20:10:17 +08:00
Shuang Zheng 44ec68dc49 acrn-config: add attributes for scenario and launch setting
There are no board/scenario/uos_launcher attributes for created
scenario and launch settings, which causes xml mismatch error
when generating configuration files or launch scripts.
This patch is to add the attributes for scearnio and launch
settings.

Tracked-On: #4641

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-22 20:10:17 +08:00
Wei Liu ea61900a80 acrn-config: add max VM count check when generating scenario XML file
Add max VM count check when generating scenario XML file.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-22 20:10:17 +08:00
Wei Liu 374cd99ed9 acrn-config: refine template xmls
Refine some items for configuarable="0"

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-22 20:10:17 +08:00
Wei Liu 71b3743a75 acrn-config: add 2 UUIDs for post-launched Standard VM
Add 2 UUIDs for post-launched Standard VM.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-22 20:10:17 +08:00
Victor Sun 27fb606d7a acrn-config: add SOS_IDLE for SOS cmdline
Add SOS_IDLE for SOS cmdline so that "idle=halt" paramter will be needed
only when CPU sharing is enabled;

Tracked-On: #4329

Signed-off-by: Victor Sun <victor.sun@intel.com>
2020-04-22 14:49:04 +08:00
Geoffroy Van Cutsem b22d9e5e15 acrn-config: fix typos and text in board_parser.py tool
Enhance and fix some typos in the text that gets printed out from the
board_parser.py script.

Tracked-On: #4630
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-04-22 10:42:54 +08:00
Wei Liu 28ef2f509b acrn-config: remove sdc2 config xmls
Remove sdc2 scenario since the VM launch requirement under this scenario
will be satisfied by industry scenario.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Wei Liu 72892926c8 acrn-config: refine the HV_RAM_SIZE/HV_RAM_START for board_defconfig
Leave HV_RAM_SIZE/HV_RAM_START default to blank, and config tool would
generate for them, otherwise, they would be set by the UI.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Wei Liu a1a8807268 acrn-config: set HV_RAM_SIZE/HV_RAM_START to blank from config xmls
Leave HV_RAM_SIZE/HV_RAM_START default to blank, and config tool would
generate for them, otherwise, they would be set by the UI.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Wei Liu 602c87acb8 acrn-config: refine template xmls
1. Set default value for HV template.
2. Refine vuartx in template vm setting xmls.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Wei Liu 369547aa63 acrn-config: modify epc_section to configurable="0"
1. modify epc_section to configurable="0".
2. add 'idle=halt' for sos bootargs to impove performance.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Wei Liu d4236bc02d acrn-config: fix syntax for new logical partition xmls
UI got syntax warning while loading new logical partitons xml, add
missed '</clos>' for it.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Wei Liu b69e2685d5 acrn-config: refine GPU vpid format for launch script
Refine GPU vpid format for launch script.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Wei Liu a0e18eec34 acrn-config: refine '--out' for config tool
Currently, '--out' is relative scripts run dir if it gets relative path,
Refine '--out' to source root tree if it gets relative path.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Sainath Grandhi c548ba10b9 acrn-config: Generate info in pci_dev file for Pre-Launched VMs
Pre-Launched VMs need the vbar_base values pre-populated
for pass-thru PCI devices.

This patch moves the pci parser logic from board_cfg_gen to library
so that scenario_cfg_gen scripts can use pci parser routines while
generating pci_dev file logical partition scenario.

Tracked-On: #4666
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
2020-04-20 21:59:23 +08:00
Victor Sun 09212cf4b6 HV: Kconfig: enable CPU sharing by default
The patch enables CPU sharing feature by default, the default scheduler is
set to SCHED_BVT;

Tracked-On: #4661

Signed-off-by: Victor Sun <victor.sun@intel.com>
2020-04-20 14:59:23 +08:00