Commit Graph

7148 Commits

Author SHA1 Message Date
Reyes, Amy 325e033dfc doc: Remove tgl-rvp mention
- Remove mention of tgl-rvp XML because the file was removed from repo

Tracked-On: #6177
Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-03-31 13:42:31 -07:00
Kunhui-Li 74dc103d9e config_tools: remove board and scenario attributes
remove board and scenario attributes dependency for new configuration.

To do:
will remove board and scenario attributes in all scenario XML files
and update the upgrader.py after the new configuration works.

Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-03-31 19:32:52 +08:00
Weiyi Feng 12653aafad configurator: fix configurator build issue
fix configurator build issue

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-03-31 19:26:33 +08:00
Weiyi-Feng 260718d544 configurator: autoload board and scenario xml when exist
autoload board and scenario xml when exist

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-03-31 19:26:33 +08:00
Weiyi Feng 3c4f14ede7 configurator: add new configurator
add new configurator

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
(cherry picked from commit 1232a7229af7ed60706cc725acf955ccbd8ca035)
2022-03-31 19:26:33 +08:00
Junjie Mao cdb142397b config-tools: fix the generation of DM-land ivshmem regions
The device-model land ivshmem regions are not properly generated into the launch
scripts today because:

  1. Those regions are provided by "Device Model", not "Device model".

  2. VM names are not properly encoded in the XPATH that search for the
     ivshmem regions accessible to a VM.

This patch fixes both issues.

Fixes: 0d84ecc4a ("config_tools: merge data in launch XMLs into scenario XMLs")
Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-03-31 15:59:42 +08:00
Peter Fang 4fc4b84304 OVMF release v3.0
- VGA interface of virtio-gpu adapter support
- Ovmf:ACRN: Fix the building error
- acrn: fix how to get memory below 4G

Tracked-On: #7231
Signed-off-by: Peter Fang <peter.fang@intel.com>
2022-03-31 09:06:34 +08:00
Fei Li e17acec539 misc: life_mngr: add a separate config to allow trigger sysreboot
Tracked-On: #7215
Signed-off-by: Fei Li <fei1.li@intel.com>
2022-03-30 16:49:07 +08:00
Fei Li 187e19da2f misc: minor fix
Some minor comments refine and fix some typo

Tracked-On: #7215
Signed-off-by: Fei Li <fei1.li@intel.com>
2022-03-30 16:49:07 +08:00
jackwhich 4169bfc21c config-tools: updated nuc11/whl board files
Because the board inspector update uses XPATH
to extract available PCI devices or serial ports,
So the board xmls need to be updated for all boards.

Tracked-On: #6690
Signed-off-by: zhongzhenx.liu <zhongzhenx.liu@intel.com>
2022-03-30 11:42:25 +08:00
Fei Li 25d5f2452e Misc: life_mngr: system reboot support
Now reuse allow_trigger_s5 in life_mngr_config to allow WAAG to trigger
system reboot.

Tracked-On: #7215
Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
Signed-off-by: Fei Li <fei1.li@intel.com>
2022-03-30 10:04:00 +08:00
Fei Li 6ea861affc Misc: life_mngr: a new common function to handle socket
Add a new common function to handle socket request, this will make
it is easy to add more socket request in windows lifecycle manager.

Tracked-On: #7215

Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
Signed-off-by: Fei Li <fei1.li@intel.com>
2022-03-30 10:04:00 +08:00
Fei Li b555bdc8ae Misc: acrnd: acrnd servie should start after life_mngr.service
acrnd servie should start after life_mngr.service, otherwise,
lifecycle manager in service VM will start after lifecycle
manager in User VM.

Tracked-On: #6994

Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
Signed-off-by: Fei Li <fei1.li@intel.com>
2022-03-30 10:04:00 +08:00
Kunhui-Li c9de9b61a3 config_tools: add BIOS invalid setting check
1. check if VMX feature is enabled in the BIOS setting.
If disabled, board inspector will show error message.
2. check if Hyper-Threading is enabled in the BIOS setting.
If enabled, board inspector will show warning message.
3. check if VT-d is enabled in the BIOS setting.
If disabled, board inspector will show error message.

v2-->v3:
Use the class names instead of addresses, and invoke the rdmsr method
of each class.

v1-->v2:
1. For the Hyper-Threading BIOS check, update the log level to the warning.
2. For VMX invalid BIOS check, the XDS does the actual check,
the board inspector only collects information.

Tracked-On: #6689
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-03-30 09:43:31 +08:00
Kunhui-Li 7dfc3c683c config_tools: add CPU capability checks
Add CPU capability checks.
If a feature is not supported on this processor, the board inspector
will show error message because it would impact ACRN’s ability
to function properly.

v3-->v4:
Update the error messages.

v2-->v3:
1. For VMX features, split each feature as a separate property, capability
checks in XML schema will then check all those features.
2. Use the class names instead of addresses, and invoke the rdmsr method
of each class.

v1-->v2:
1. Define each register as a class inheriting the `MSR` class defined
in platformbase.py, and define each bit as fields of that class.
2. The board inspector simply collects the CPU capability and attribute,
and the XSD does the actual check

Tracked-On: #6689
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-03-30 09:43:31 +08:00
Junjie Mao 29e3dd7163 board_inspector: add schema-based board checks
This patch adds schema-based board checks mechanism.
This provides integrators with a mechanism that XSD does
the actual board data check.

Tracked-On: #6689
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-03-30 09:43:31 +08:00
Geoffroy Van Cutsem d66c994d33 doc: fix formatting issue and add more info (virtio-net)
Fix the formatting issue in the "ACRN Device Model parameters" document.

Add more details related to the 'virtio-net' device, specifically what
values can the 'device_type' take.

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Co-authored-by: David Kinder <david.b.kinder@intel.com>
Co-authored-by: Amy Reyes <amy.reyes@intel.com>
2022-03-29 17:02:16 -07:00
Fei Li 2aaf61bef8 hv: acpi: refine dmar acpi table parse
Now ACRN Hypervisor only support one PCI Segment, this patch add this check.
This patch also fix a small bug: it would trigger false error "DRHD with
INCLUDE_PCI_ALL flag is NOT the last one".

Tracked-On: #5907
Signed-off-by: Fei Li <fei1.li@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2022-03-29 16:38:40 +08:00
Fei Li 3f7501db38 hv: mmio: replace hi_mmio with mmio64
Now HI_MMIO_xxx is duplicate with MMIO64_xxx. This patch replace HI_MMIO_xxx
with MMIO64_xxx.

Tracked-On: #6011
Signed-off-by: Fei Li <fei1.li@intel.com>
2022-03-29 15:34:29 +08:00
Zhao Yakui 473c5819ea ACRN:DM: Add extra path header definition to support cross-compiler building
The virtio-gpu needs to include some system header files.
In order to support the cross-compiler building, the header
path is added.

Tracked-On: #7210

Reported-by: Naveen Kumar Saine <naveen.kumar.saini@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2022-03-29 11:16:40 +08:00
Minggui Cao d2a8e20117 misc: set PMU_PT flag for pre-launched RTVM
For post-launched RTVM, the acrn-dm can own PMU_PASSTHROUGH flag; for
pre-launched RTVM, need set it in configuration file by default.

Tracked-On: #6966
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
2022-03-29 09:34:17 +08:00
Sun Peng e8934aeb41 doc: virtio-gpu dependency libraries
Add virtio-gpu dependency libararies in getting-started documents.

Tracked-On: #7210
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Sun Peng <peng.p.sun@linux.intel.com>
2022-03-28 15:26:20 +08:00
Sun, Peng 1ed96bfbf8 dm: virtio-gpu: VGA compability support
Legacy VGA & VBE interface as a common interface is supported by
many legacy and modern OS. Many installer of OS distribution use
this interface to display the GUI of installer when setup a refresh
new installation on bare-metal. Besides, Windows OS always use this
interface to display it's BSOD, recovery mode & safe mode GUI. It
is need because Windows don't include virtio-gpu driver as their
in-box driver, VGA interface will be used before the virtio-gpu
driver been installed.
To be compatiable with the PCI bar layout of legacy VGA, the layout
is refined to meet with the requirement of legacy VGA and modern
virtio-gpu.

BAR0: VGA Framebuffer memory, 16 MB in size.
BAR2: MMIO Space
  [0x0000~0x03ff] EDID data blob
  [0x0400~0x041f] VGA ioports registers
  [0x0500~0x0516] bochs display interface registers
  [0x1000~0x17ff] Virtio common configuration registers
  [0x1800~0x1fff] Virtio ISR state registers
  [0x2000~0x2fff] Virtio device configuration registers
  [0x3000~0x3fff] Virtio notification registers
BAR4: MSI/MSI-X
BAR5: Virtio port io

Tracked-On: #7210
Signed-off-by: Sun Peng <peng.p.sun@linux.intel.com>
Reviewed-by: Zhao, yakui <yakui.zhao@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-03-28 15:26:20 +08:00
Sun, Peng f2cfa761ae dm: virtio-gpu: cursor surpport
Hardware cursor emulation of virtio-gpu video adapter. Guest vm can
show its own cursor in virtual display, not share the cursor with
service vm. It also accelerated by SDL(OpenGL ES 2.0 backend) API
with hardware acceleration based on the GPU hardware own by service
vm.

Tracked-On: #7210
Signed-off-by: Sun, Peng <peng.p.sun@linux.intel.com>
Reviewed-by: Zhao, yakui <yakui.zhao@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-03-28 15:26:20 +08:00
Sun, Peng fae4286cb3 dm: virtio-gpu: 2D mode support
Implement 2D mode of virtio-gpu adapter which can transfer outputs
from guest vm framebuffer and store them to host 2D scanout buffers.
These 2D scanout buffer can be shown by calling vdpy_surface_set/update
API provided device/include/vdisplay.h.

Virtio-gpu 2D commands calling sequence:
  1) VIRTIO_GPU_CMD_GET_EDID
  2) VIRTIO_GPU_CMD_GET_DISPLAY_INFO
  3) VIRTIO_GPU_CMD_RESOURCE_CREATE_2D
  4) VIRTIO_GPU_CMD_RESOURCE_ATTACH_BACKING
  5) VIRTIO_GPU_CMD_SET_SCANOUT
  6) VIRTIO_GPU_CMD_TRANSFER_TO_HOST_2D
  7) VIRTIO_GPU_CMD_RESOURCE_FLUSH

Tracked-On: #7210
Signed-off-by: Sun, Peng <peng.p.sun@linux.intel.com>
Reviewed-by: Zhao, yakui <yakui.zhao@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-03-28 15:26:20 +08:00
Sun, Peng eba0820bc7 dm: virtio-gpu: EDID emulation of virtual monitor
Extended display identification data(EDID) is a data to store
display timings which are supported by ACRN virtual monitor.
Virtio-gpu FE driver will request it to config crtc for display
resolutions.

Tracked-On: #7210
Signed-off-by: Sun, Peng <peng.p.sun@linux.intel.com>
Reviewed-by: Zhao, yakui <yakui.zhao@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-03-28 15:26:20 +08:00
Sun, Peng bca6464e9f dm: virtio-gpu: virtual display support
ACRN virtual monitor shown as a GUI system window of service vm.
It can display graphic outputs of guest vm which is stored in
service vm's buffers by virtio-gpu. Display operation is accelerated
by Intel GPU PF(SRIOV) device with SDL(OpenGL ES 2.0 backend) API.
This provides one generic display solution. When the virtio-gpu is
added, it will firstly try to setup the connection to graphics system
and then display the framebuffer from the guest vm in the created
window region.

Tracked-On: #7210
Signed-off-by: Sun, Peng <peng.p.sun@linux.intel.com>
Reviewed-by: Zhao, yakui <yakui.zhao@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-03-28 15:26:20 +08:00
Sun, Peng 37a4cdc2e0 dm: virtio-gpu: basic framework
Virtio-gpu is a virtio based graphic adapter. It supports 2D mode
which can transfer the guest vm's framebuffer into service vm's
buffers for displaying. It can co-work with Intel GPU VF(SRIOV)
device and provide thransport for the accelerated contents. With
this, guest vm can benefit Intel GPU hardware to accelerate media
coding, 3D rendering and compute.

Tracked-On: #7210
Signed-off-by: Sun, Peng <peng.p.sun@linux.intel.com>
Reviewed-by: Zhao, yakui <yakui.zhao@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-03-28 15:26:20 +08:00
Minggui Cao 1bc2921c27 Revert "Revert "dm: set PMU_PT flag for CPU ...""
This reverts commit 6750d5a277.

the bug is root caused and fixed, so recovery the original patch.

Tracked-On: #6966
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
2022-03-28 12:00:01 +08:00
Minggui Cao 05ca1d7641 hv: fix a bug about host/guest msr store/load
Unify the handling of host/guest MSR area in VMCS. Remove the emum value
as the element index when there are a few of MSRs in host/guest area.
Because the index could be changed if one element not used. So, use a
variable to save the index which will be used.

Tracked-On: #6966
Acked-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
2022-03-28 12:00:01 +08:00
Junjie Mao 9be4a282c4 config_tools: extract serial ttys in board XML
This patch extracts all serial ttys in the native environment and updates
the XML schema to specify the XPATH that evaluates to the available ttys
for users to choose as the hypervisor console port.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-03-28 09:43:38 +08:00
Kunhui-Li e47765d8e5 config_tools: extract virtio device input basic information
Add a new extractor 70-device-classes.py which extracts virtio device
input basic information such as: name and phys.

An example:
<device_classes>
  <inputs>
    <input>
      <name>Power Button</name>
      <phys>LNXPWRBN/button/input0</phys>
    </input>
  <inputs>
</device_classes>

Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-03-28 09:43:38 +08:00
Junjie Mao 8c46c2306f config_tools: format BDF in descriptions of PCI devices
This patch adds the BDF (in the format BBBB:DD.F) of each PCI device into
its description, which helps the configurator to fetch all available PCI
devices via XPATH rather than text manipulating functions.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-03-28 09:43:38 +08:00
Reyes, Amy 95c2849cee config_tools: Update Configurator UI XSD
- Update XSD files to match field names and tooltips in parameter spreadsheet

Tracked-On: #5692
Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-03-25 15:06:24 +08:00
Yonghua Huang d8c0d5eebb dm: update virtio-i2c bus counter when device is deinit
i2c bus counter 'acpi_i2c_adapter_num' shall be updated
 when virtio-i2c device is de-initialized, else in user VM
 reboot case, this global counter will not be reset and
 keep the value last user VM boot, which is not expected
 and cause iasl(building ACPI data) program crash finally
 because the i2c device name space overflow.

Tracked-On: #7208
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
2022-03-23 10:37:52 +08:00
Reyes, Amy 05cc6664ca doc: Remove outdated tutorials
- Remove Ubuntu and Debian tutorials, as GSG is sufficient
- Remove Yocto tutorial, as it is just a reference to a repo that supports ACRN v2.4

Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-03-22 13:30:33 -07:00
Reyes, Amy 4d49876366 doc: Update sdc reference in overview hld
- Clarify that sdc predefined scenario is no longer supported
- Minor cleanup

Tracked-On: #6701
Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-03-22 12:08:26 -07:00
Junjie Mao 9197193e12 config_tools/upgrader: convert the old SERVICE_VM type
In the old days SERVICE_VM was also an acceptible VM type. It is now converted
to the load_order, with the vm_type field replaced by STANDARD_VM. This patch
adds this conversion logic into the upgrader.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-03-22 16:37:13 +08:00
Kunhui-Li e1f5c32ea2 config_tools: remove CONFIG_IOMMU_BUS_NUM
Since PR #6943 has landed, the `CONFIG_IOMMU_BUS_NUM` has been renamed
to `ACFG_MAX_PCI_BUS_NUM`, this patch removes the obsolete code about
`CONFIG_IOMMU_BUS_NUM`.

v1-->v2:
Update the upgrader.py to add a description of this obsoleted item.

Tracked-On: #6942
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-03-22 16:37:13 +08:00
Kunhui-Li b6538a4299 config_tools: fix the issue that got wrong device name after specifying mac address
If user add the specific mac address (eg: mac=00:16:3E:77:A9:41)
in launch script, we will get the device name with the specified mac address.
This is unexpected. This patch updates the parser to fix the issue.

v1-->v2:
Update the parser with regex.

Tracked-On: #7197
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-03-22 11:33:09 +08:00
Kunhui-Li 95a9c05a25 config_tools: remove the assume of virtio-net device name
Since PR #7185 has removed the assume of virtio-net device name,
we also remove it in the launch script generation logic.

Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-03-22 11:33:09 +08:00
Chenli Wei b9431b8da4 dm: remove the assume of virtio-net device name
Now, the DM assumes the device name entered by user is dependent on
the type.

For example, the device of tap type is named tap_TAAG, this patch
remove the above assumption.

User could set any name, no matter the code of DM or actually created,
it is represented by user input.

Tracked-On: #6690
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
Signed-off-by: Chenli Wei<chenli.wei@linux.intel.com>
2022-03-22 11:33:09 +08:00
Reyes, Amy 04eefc9516 doc: Add poweroff step to gsg
- Add an optional step in GSG to power off User VM.

Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-03-21 17:21:36 -07:00
jackwhich f8763cc953 config-tools: remove WHL sdc scenario/launch file
Because there is no SDC scenario in the generic template,
We remove the SDC specific scenario

Tracked-On: #6701
Signed-off-by: zhongzhenx.liu <zhongzhenx.liu@intel.com>
2022-03-21 15:04:38 +08:00
Yuanyuan Zhao 8f9a47c30f dm: add warning for `-A` param
DM dynamic param '-A' has been removed.
For compability, add a warning for `-A` instead of terminate the launch
process.

Tracked-On:#6690
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-03-21 14:06:02 +08:00
Chenli Wei 7dec39a9e8 doc: change the parameter of virtio-net
Remove device name requirement for “tap” and "vmnet", change the
parameter format like:
"-s 4,virtio-net,tap/vmnet=dev_name".
change mac_seed to virtio-net sub-parameter
As a parameter of acrn-dm,the mac_seed is only used for virtio-net.
So this patch change it to the sub-parameter of virtio-net.
The final format is:
-s 4,virtio-net,tap/vmnet=dev_name,mac_seed=XXXX

Tracked-On: #6690
Signed-off-by: Chenli Wei chenli.wei@linux.intel.com
2022-03-20 20:21:56 -07:00
Reyes, Amy f5b021b1b5 doc: Minor style cleanup
- Remove "currently"
- Capitalize titles and Device Model

Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-03-18 16:35:00 -07:00
Reyes, Amy 21aeb4f422 doc: Style cleanup in host bridge hld
Style changes per Acrolinx recommendations and for consistency

Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-03-18 15:38:52 -07:00
Reyes, Amy a3ebc4f19e doc: Style cleanup in hypercall hld
Style changes per Acrolinx recommendations and for consistency

Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-03-18 12:24:01 -07:00
Reyes, Amy 09980e778e doc: Style cleanup in CPU virt hld
Style changes per Acrolinx recommendations and for consistency

Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-03-18 11:28:34 -07:00