Commit Graph

7160 Commits

Author SHA1 Message Date
Weiyi Feng 3d8fa80949 configurator: update configurator version to 0.3.0
update configurator version to 0.3.0

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-04-01 12:19:40 +08:00
Weiyi Feng ce71921011 configurator: fix some schema field does not provide display name issue
fix some schema field does not provide display name issue

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-04-01 12:19:40 +08:00
Weiyi Feng 3f1057b747 configurator: fix single vm scenario load issue
fix single vm scenario load issue

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-04-01 12:19:40 +08:00
Weiyi Feng 578a482626 configurator: fix displayed scenario path
fix displayed scenario path

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-04-01 12:19:40 +08:00
Zhao Yakui 34bfaa71f6 ACRN:DM: Export BLOB feature to guest
The DMABuf sharing is based on the BLOB feature. This will
check the attribute of system memory for guest_vm and udmabuf.list_limit
parameter. If it meets with the requirement, export the BLOB feature
so that the FE driver in guest_vm can send the blob cmd.
VIRTIO_GPU_CMD_CREATE_BLOB:
VIRTIO_GPU_CMD_SET_SCANOUT_BLOB:
VIRTIO_GPU_CMD_SET_FLUSH(BLOB)

Tracked-On: #7210

Acked-by: Wang Yu <yu1.wang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2022-04-01 11:40:43 +08:00
Zhao Yakui c19b2bed18 ACRN:DM: Add the support of blob_buffer from guest_vm
Now Virtio-gpu FE is using the below cmds to submit the framebuffer that
needs to be displayed.
   VIRTIO_GPU_CMD_TRANSFER_TO_HOST_2D
   VIRTIO_GPU_CMD_SET_SCANOUT
   VIRTIO_GPU_CMD_FLUSH

This will introduce twice copy. In order to optimize the twice copy, the below
cmds are added and the virtio-gpu BE can use the dma-buf sharing.
   VIRTIO_GPU_CMD_CREATE_BLOB
   VIRTIO_GPU_CMD_SET_SCANOUT_BLOB
   VIRTIO_GPU_CMD_FLUSH

V2->V3: Remove the inlined header file of devicemodel/include/public/udmabuf.h
to avoid the license issue

Tracked-On: #7210

Acked-by: Wang Yu <yu1.wang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2022-04-01 11:40:43 +08:00
Zhao Yakui f9aa6f754a ACRN:DM: Add Texture based on DMAbuf to support dmabuf_sharing rendering
Now the Opengl rendering is used implicitly in SDL backend. But sometimes
it needs to create the texture explicitly based on DMABuf so that it can
render the framebuffer submitted from virtio-gpu.

Tracked-On: #7210

Acked-by: Wang Yu <yu1.wang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2022-04-01 11:40:43 +08:00
Zhao Yakui 3645a9557d ACRN:DM: Add one API to query the memfd/offset for the given GPA
After using the memfd to allocate memory for guest vm, it needs to
query the offset in memfd for the given GPA. In order to search the
memfd/offset, the added memory_region from memfd needs to be kept in
one arrary.

Tracked-On: #7210

Acked-by: Wang Yu <yu1.wang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2022-04-01 11:40:43 +08:00
Zhao Yakui a46b0058d8 ACRN:DM: Use the memfd to allocate anonymous hugetlb file
The ACRN-DM uses the explicit hugetlb file to allocate the memory
for guest and the 2M/1G hugetlb can be used. This is based on mounting
hugetlb filesystem.
Now the Linux provides one flexbile memfd mechanism to allocate the memory
and this can make it possible to create the udmabuf for sharing. And the
memfd still can be based on Hugetlb 1G/2M policy. This can bring the below
benefits besides the 1G/2M hugetlb support.
a. memfd is based on anonymous file
b. possible dmabuf mechanism

v2->v3: After completing the mmap for memfd, it will call the ftruncate to
set the desired size and then add the F_SEAL_SEAL flag.

Tracked-On: #7210

Acked-by: Wang Yu <yu1.wang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2022-04-01 11:40:43 +08:00
Zhao Yakui 3bf11d9285 ACRN:DM: Check the alignment of mem_size
Now the memory region is aligned down to 2M if 2M hugetlb is supported.
Maybe some contents are dropped if it is not aligned. 

Tracked-On: #7210

Acked-by: Wang Yu <yu1.wang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2022-04-01 11:40:43 +08:00
Reyes, Amy 9a4cb33f39 config_tools: Update Configurator UI XSD
- Update labels and descriptions

Tracked-On: #5692
Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-04-01 10:04:57 +08:00
Weiyi Feng a79d2ded7e configurator: update configurator dependencies to latest version
update configurator dependencies to latest version

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-04-01 09:14:43 +08:00
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