Commit Graph

7763 Commits

Author SHA1 Message Date
Kunhui-Li 3653b268ed config_tools: format vitio input in configurator
This patch formats virtio input entry as "Device name: xxx, Device physical path: xxx".

Tracked-On: #6691
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-05-16 14:28:46 +08:00
David B. Kinder 3a133d3138 Fix make configurator not picking up schema changes
Artificates left over from a previous make configurator build prevented
changes to a schema (.xsd) file from getting incorporated into a
subsequent make configurator build.

Tracked-on: #7461

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-05-16 09:43:26 +08:00
David B. Kinder 8ffb0dee4d schema changes for DX configurator option presentation
Edit the schema (.xsd) files to modify the order options are presented.
None of these changes invalidate existing scenario XML files, as they
only reorder elements within the existing parent element, or tweak the
acrn:views, acrn:title, or documentation content.

Move simple type elements before complex type options (under the same
parent element) to avoid the confusion where options look like they're
part of a section based on the title that's added before complex typed
options but not simple typed options.

* add acrn:title to pcpu (pCPU list)
* change documentation for binary option saying "checked" instead of 'y'
* move HYPERV_ENABLED before RDT (simple type before complex type)
* move vuart_connections before FEATURES
* move name before vm_type
* move console_vuart, os_type, vuart0, vbootloader, usb_xhci before
  lapic_passthrough
* add acrn:title to epc_section
* add acrn:title to memory
* move gpu to top of virtio_devices (simple type before completx type)

Tracked-On: #5692

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-05-16 09:12:20 +08:00
Junjie Mao 72445d01b4 config_tools: add placeholders in input widgets
The configurator today shows "Please Input" as the placeholder of input
widgets, which is far from informative.

This patch specifies element or type specific placeholders in the XML
schema by reusing the `acrn:widget-options` annotation mechanism. For
manually-designed widgets such as ivshmem or vUART the placeholders are
added in the corresponding vue directly.

Tracked-On: #6691
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-05-13 15:50:20 +08:00
Chenli Wei c96fb1cb0a hv: move the MAX_VUART_NUM_PER_VM to offline tool
Current code limit the MAX vUART number to 8 which is not enough for
Service VM which should config S5 UART for each user VM.

We could count how many vUARTs we need by offline tool, so remove the
define of MAX_VUART_NUM_PER_VM to offline tool is a simple and accurate
way to allocate vUARTs.

Tracked-On: #8782
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-05-13 13:50:07 +08:00
Chenli Wei c972aeae22 misc: define the MAX_VUART_NUM_PER_VM by offline tool
The current code define MAX_VUART_NUM_PER_VM for all VM and it's a hard
code which can't match our vUART logic which need dynamic setting.

This patch move the define of MAX_VUART_NUM_PER_VM to offline tool and
calculate it automatically.

Tracked-On: #8782
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-13 13:50:07 +08:00
Chenli Wei 2045577f12 misc: add vUART channel for s5 feature
"S5" is one of the ACPI sleep states which means the function to shut
down the VMs.

On ACRN, the User VM must be shut down before powering off the Service
VM, so we need a vUART channel to communicate between the Service VM
and User VMs.

This patch adds a vUART channel for each User VM connect to Service VM

Tracked-On: #8782
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-13 13:50:07 +08:00
Fei Li d625ce0677 misc: acrnd: fix a minor build Werror
The comparison ((argv + 1)) will always evaluate as 'true' for the pointer
operand in 'argv + 8' must not be NULL.

Tracked-On: #7453
Signed-off-by: Fei Li <fei1.li@intel.com>
2022-05-13 12:57:32 +08:00
Yifan Liu 1651863584 misc: configurator: Fix minor bug of vUART label error
The connection label should be consistent with vUART name

Tracked-On: #7455
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-05-13 11:38:45 +08:00
Yuanyuan Zhao 27222e1583 config_tools: change JSON Schema source file
Use the JSON Schema convered while building.
The file will be updated in time.

Tracked-On: #7459
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-05-13 11:13:42 +08:00
Yuanyuan Zhao 38c73cc6e2 config_tools: remove JSON Schema in repo
The JSON Schema converted from schema while building.
Remove the JSON Schema in repo.

Tracke-On: #7459
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-05-13 11:13:42 +08:00
Yuanyuan Zhao db53f21404 config_tools: create json schema path
Create a temporary directroy to write JSON Schema while build packages.

Tracked-On: #7459
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-05-13 11:13:42 +08:00
Fei Li d233a0d30f hv: crypto: fix a minor build Werror
The comparison "ctx->md_info == NULL" (if ctx is not NULL) will always evaluate
as 'false' for the address of 'hmac_ctx' will never be NULL.
This patch remove this unnecessary check.

Tracked-On: #7453
Signed-off-by: Fei Li <fei1.li@intel.com>
2022-05-13 10:47:51 +08:00
lirui34 722561fbf5 config tool: fix d3hot_reset unbind tap create issue
The config tool supports auto add d3hot_reset option to
the windows vm script when user configure the usb passthru event,
but it's not handled in the template script or not the pci event
will not unbind successfully while launching the windows guest.
One more fix is for the existing tap network interface check function.

Tracked-On: #7363
Signed-off-by: lirui34 <ruix.li@intel.com>
2022-05-13 09:36:58 +08:00
David B. Kinder 8af0e9b9ef doc: remove unreferenced images in doc tree
Over time we've deleted or change documents but didn't remove
unreferenced images.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-05-12 15:41:51 -07:00
Reyes, Amy f4b217b059 doc: remove unused images from get-started folder
Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-05-12 11:41:58 -07:00
Liu Long 49426147aa ACRN: DM: Fix the virtio negotiated features bug.
The virtio feature bits is 64bits but the access will be split
as two times 32bits access. This patch fixes the bug which overwrites
another side 32bits, and causes feature bits are lost.

Tracked-On: #7456
Signed-off-by: Liu Long <long.liu@linux.intel.com>
Reviewed-by: Conghui <conghui.chen@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-05-12 16:15:24 +08:00
Liu Long 46e41390b5 ACRN: DM: Implement the vhost vsock
This patch supports the user space logic of vhost vsock which
is majorly for its initialization phase.

Tracked-On: #7456
Signed-off-by: Liu Long <long.liu@linux.intel.com>
Reviewed-by: Conghui <conghui.chen@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-05-12 16:15:24 +08:00
Liu Long 231f986bd9 ACRN: DM: Expose the vhost kernel ioctrl API
The patch expose the vhost kernel ioctrl API and remove the virtio_net
operation functions to the virtio_net code module.

Tracked-On: #7456
Signed-off-by: Liu Long <long.liu@linux.intel.com>
Reviewed-by: Conghui <conghui.chen@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-05-12 16:15:24 +08:00
hangliu1 3afb222d90 [config tool][doc]: remove old configurator
remove configurator in misc/config_tools/config_app, since
there is new configurator in misc/config_tools/configurator.
remove related document.

Tracked-On: #7466

Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-05-12 15:42:26 +08:00
Yuanyuan Zhao a65a347f34 hv: vRTC monotonic growth
For physical RTC is monotonic growth, ensure vRTC monotonicity.
Periodical calibration and physical RTC modification may have
impact. Check it before reading

Tracked-On: #7440
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-12 13:20:21 +08:00
Yuanyuan Zhao 145a56d448 hv: calibrate vrtc when modify physical time
For Service VM modify physical rtc time and vrtc will calibrate
time by read physical rtc. So when Service VM modify physical
time, calibrate all vrtc.

Tracked-On: #7440
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-12 13:20:21 +08:00
Yuanyuan Zhao 4bad719fd3 hv: vrtc calibrate function
For TSC's precision (20~100ppm) is lower than physical RTC (less than 20ppm),
vRTC need to be calibrated by physical RTC. A timer tiggers calibration for
vRTC every 3 hours. This can improve efficiency because physical RTC can be
read once and calibrate all vRTC.

Tracked-On: #7440
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-12 13:20:21 +08:00
Yuanyuan Zhao 08e8161f51 hv: add time modification of vrtc
VRTC for hv used to ignore writes to vRTC register.

This patch add time modification to vRTC.
Add base RTC time and TSC offset to get the current time. Convert
current time to vRTC register values (`struct rtcdev`). Then
modify a register, and calculate a new time. Get RTC offset by
substrcting new time from current time.
Thereafter, add RTC offset also when get current time. Then user
can get the modified time.

Tracked-On: #7440
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-12 13:20:21 +08:00
Yuanyuan Zhao bca21648a3 hv: add Service VM write physical RTC register
Service VM write physical RTC register.
Both RTC time modify and Configuration register is available.

Tracked-On: #7440
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-12 13:20:21 +08:00
Yuanyuan Zhao dfdf79ffa9 hv: add vRTC reg_b and reg_c support
During setting RTC time, driver will halt RTC update. So support
bit 7 of reg_b. When it set to 0, time will be updated. And
when it's set to 1, rtc will keep the second it was set.

In the process of getting RTC time, driver sets alarm interrupt,
waits 1s, and get alarm interrupt flag. So support alarm interrupt
flag update. If alarm interrupt is enabled (bit 5, reg_b set to 1),
interrupt flag register will be set (bit 7 & bit 5 of reg_c) at
appropriate time.

Tracked-On: #7440
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-12 13:20:21 +08:00
Yuanyuan Zhao 6ade2b6b0c hv: support 12 hour mode
Add support for hour format.
Bit 1 of register B indicates the hour byte format. When it's 0,
twelve-hour mode is selected. Then the seventh bit of hour register
presents AM as 0 and PM as 1.

Tracked-On: #7440
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-12 13:20:21 +08:00
Yuanyuan Zhao ac89244cf5 hv: support vrtc BCD data mode
Add judging of the vRTC data mode. If BCD data mode is inuse,
make conversion of data.

Tracked-On: #7440
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-12 13:20:21 +08:00
Yuanyuan Zhao 23177d0a1d hv: add `rtcdev` emulate vrtc
Current code would read physical RTC register and return it directly to guest.

This patch would read a base physical RTC time and a base physical TSC time
at initialize stage. Then when guest tries to read vRTC time, ACRN HV would
read the real TSC time and use the TSC offset to calculate the real RTC time.

This patch only support BIN data mode and 24 hour mode.
BCD data mode and 12 hour mode will add in other patch.
The accuracy of clock provided by this patch is limited by TSC, and will
be improved in a following patch also.

Tracked-On: #7440
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-12 13:20:21 +08:00
Shiqing Gao f8de4178e4 doc: update GSG for virtio-gpu dependency libraries
commit 78f702e ("Use libdrm library for drm access") adds the dependency on
libdrm library. GSG needs to be updated accordingly. Otherwise, compilation
error occurs like below:
hw/pci/virtio/virtio_gpu.c:21:10: fatal error: libdrm/drm_fourcc.h: No such file or directory
   21 | #include <libdrm/drm_fourcc.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Tracked-On: #7464

Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
2022-05-11 22:00:49 -07:00
Reyes, Amy e1fc354c49 doc: Remove outdated RT tutorial
Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-05-11 19:19:47 -07:00
Weiyi Feng 856ef44bd7 config_tools: fix can't save cpu affinity config issue
fix can't save cpu affinity config issue

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-12 09:51:34 +08:00
Yuanyuan Zhao 9f08eeb999 config-tools: modify scenario.json in build directory
Copy scenrio.json to build directory, and modify the temporary file
to avoid pollution of hypervisor repo.

Tracked-On: #7459
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-05-12 09:29:27 +08:00
Yifan Liu 130266442e misc: configurator: Add vUART widget
Tracked-On: #7455
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-05-11 22:05:43 +08:00
Chenli Wei d5c0a40665 misc: modify the generate logic of vcat config
The current code generate vcat info by count the CLOS MASK and the
scenario xml should set multiple times.

It is not an ideal solution, so we add an "virtual_cat_number" element
to set the virtual CLOS number and get the MAX pcbm directly.

Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-05-11 17:00:51 +08:00
Chenli Wei a1b266f807 misc: refine CLOS module for expansibility
This patch refine CLOS module by the following aspects:

1 Unified CACHE_ID type to Hex Format
2 Rewrite policy merge with RDT Class
3 Modify the logic of generate CPU mask

Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-05-11 17:00:51 +08:00
Conghui f172502044 config-tools: bugfix for file related issue in UI
1. when using existing configuration, UI show the existing information.
2. remove launch script when removing post-launched VM.
3. new working folder created with no existing files.
4. automatically minimized.

Tracked-On: #7450
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-11 11:38:26 +08:00
Weiyi Feng c31cad225c config_tools: update project nodejs dependencies when windows build script run
update project nodejs dependencies when windows build script run

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-11 10:16:38 +08:00
Weiyi Feng 631de1d6fd config_tools: add default value for new vm cpu_affinity setting
add default value for new vm cpu_affinity setting

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-11 10:16:38 +08:00
Weiyi Feng b8d9e288bf config_tools: add custom cpu_affinity component
add custom cpu_affinity component

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-11 10:16:38 +08:00
Weiyi Feng ebef897088 config_tools: let windows build scripts auto exit when an error occurs
let windows build scripts auto exit when an error occurs

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-11 10:16:38 +08:00
Wu Zhou c12f3adee0 config-tools: ivshmem.vm_name changes with name edit
This patch is to fix the issue that when user edits VM name, the VM_NAME
field in IVSHMEM data doesn't sync.

To fix this, configForm emits a 'vmNameChange' when VM name is edited.
Then old name is replaced with new name. And when deleting VM, the old
name is replaced with null.

Tracked-On: #7445

Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
2022-05-11 09:47:29 +08:00
Wu Zhou c4f9146746 config-tools: limit the tooltip box max-width
The tooltip box's default width is inconsistent with the screen width.
It could run off the configurator window when the tooltip text is long.
Limit it to 50%.

Tracked-On: #7442

Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
2022-05-10 17:55:32 +08:00
Yonghua Huang 961b5d16f4 hv: update SSRAM regions EPT memory type to WB
when SSRAM regions are assigned to service VM
  to support virtulization of SSRAM for post-launched
  RTVMs, service VM need to access all SSRAM regions
  for management, typically, service VM does data
  cleanup in SSRAM region when it is reclaimed from
  a shutdown RTVM.

  This patch update memory type from UC(by default)
  to WB, else SSARM region will be evicted when access
  from guest happens.

Tracked-On: #7425
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
2022-05-10 15:45:52 +08:00
Weiyi Feng d6a69970c6 config_tools: update node-fetch version lock to 2.6.7
update node-fetch version lock to 2.6.7

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-10 13:21:50 +08:00
Helmut Buchsbaum ed9cc9409a debian: Update changelog for UNRELEASED package build
Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum 3bd6030e08 debian/configs: Remove proprietary configs, just provide a hook directory
Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum dc4a1548f3 debian/acrn-doc.doc-base: Fix typo
Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum 26ebe69ac4 debian: Convert INSTALL.md to INSTALL.rst
Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum 934fae6cc2 debian: Convert README.md to README.rst
Convert fro MarkDown To RestructuredText using
  pandoc debian/README.md --from markdown --to rst -s -o debian/README.rst

Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00