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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>