GAI Tooling Notice: These contents may have been developed with support from one
or more generative artificial intelligence solutions.
This patch is to add doxygen style comments for some elements in
vp-dm_vperipheral ivshmem module.
Tracked-On: #8665
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
Add missed ivshmem region ID. If no region ID in scenario,
will set 0 as default.
Tracked-On: #8645
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This patch fixes the following compilation error when including
`release/uart16550.c` into the module test.
./release/uart16550.c:14:6: error: conflicting types for ‘get_pio_dbg_uart_cfg’; have ‘bool(uint64_t *, uint64_t *)’ {aka ‘_Bool(long unsigned int *, long unsigned int *)’}
14 | bool get_pio_dbg_uart_cfg(__unused uint64_t *pio_address, __unused uint64_t *nbytes) {
| ^~~~~~~~~~~~~~~~~~~~
./include/debug/uart16550.h:142:6: note: previous declaration of ‘get_pio_dbg_uart_cfg’ with type ‘bool(uint16_t *, uint32_t *)’ {aka ‘_Bool(short unsigned int *, unsigned int *)’}
142 | bool get_pio_dbg_uart_cfg(uint16_t *pio_address, uint32_t *nbytes);
| ^~~~~~~~~~~~~~~~~~~~
Tracked-On: #861
Signed-off-by: Gao, Shiqing <shiqing.gao@intel.com>
When guest console is redirected to stdio, Ctrl-c is also passed to
guest. Add escape sequence Ctrl-a x to send SIGINT to exit acrn-dm
in such case.
Tracked-On: #8731
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Reviewed-by: Jian Jun Chen <jian.jun.chen@intel.com>
Add reset_control in acrn_vm. Use this reset_control to simulate
RESET_CONTROL(0xCF9) register in hypervisor.
Tracked-On: #8724
Signed-off-by: Yuan Lu <yuan.y.lu@intel.com>
Reviewed-by: Fei Li <fei1.li@intel.com>
For Service VM, the I/O APIC number and RTE number are from platform.
Otherwise, hypervisor emulates one I/O APIC and 48 RTEs. But
'MAX_IOAPIC_NUM' is always 1 and 'MAX_IOAPIC_LINES' is always 120 for
now.
This patch is introduced to fix these issues.
Tracked-On: #8725
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Suggested-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
Service VM may write 0x6 to port 0xcf9 to trigger a warm reset, but
current hypervisor always performs a cold reset by writing 0xE to CF9.
Hypervisor should reboot the system in the same mode as Service VM
specified. Specific OS features (like linux pstore) requires warm
reset to keep data across reboot.
The behavior of hv console's reboot command (cold reset) remains
unchanged.
Tracked-On: #8539
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Per SDM, VPDPBUSD/VPDPBUSDS/VPDPWSSD/VPDPWSSDS instructions depend on
CPUID Feature Flag 'AVX-VNNI, AVX512_VNNI, AVX512VL'. 'AVX512_VNNI' and
'AVX512VL' are already exposed to any VM.
'AVX-VNNI' is in CPUID.(EAX=07H,ECX=1):EAX.AVX-VNNI[bit 4]. This patch
is to expose all the CPUID.EAX=07H subleaf features to VMs.
Mask corresponding bits if want to disable some features in the future.
Tracked-On: #8710
Reviewed-by: Fei Li <fei1.li@intel.com>
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
GAI Tooling Notice: These contents may have been developed with support from one
or more generative artificial intelligence solutions.
This patch is to add doxygen style comments for some elements in
vp-dm_vperipheral vhost_bridge module.
Tracked-On: #8665
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
A vhostbridge can be emulated in hypervisor. Function `init_vhostbridge()` is
used to initialize a virtual host bridge and it configures the PCI configuration
space.
However, some configuration elements are not clearly described, which affects
maintainability and readability. This patch add some comments to address it.
Tracked-On: #8665
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
Remove unreachable code branch in line 163:
if CR0 enabled WP, supervisor-mode writing a read-only page have
been checked in line 109.
Merge redundant checking:
if smap is enabled, supervisor-mode can't access user-mode address
when eflags.ac disabled.
Tracked-On: #8708
Signed-off-by: Haoyu Tang <haoyu.tang@intel.com>
Some hypercalls return -ENODEV which should be set into RAX as return
value, e.g. HC_ASSIGN_PCIDEV. So, remove the check in
vmcall_vmexit_handler() and change return value to -EACCESS if the
hypercall is not sent from Service VM or allowed VM.
Tracked-On: #8598
Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com>
GAI Tooling Notice: These contents may have been developed with support from one
or more generative artificial intelligence solutions.
This patch is to add doxygen style comments for some elements in
vp-dm_vperipheral vuart module.
Tracked-On: #8665
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
GAI Tooling Notice: These contents may have been developed with support from one
or more generative artificial intelligence solutions.
This patch is to add doxygen style comments for some elements in
vp-dm_vperipheral vpci_bridge module.
Tracked-On: #8665
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
GAI Tooling Notice: These contents may have been developed with support from one
or more generative artificial intelligence solutions.
This patch is to add doxygen style comments for some elements in vp-dm_vperipheral
vrtc module.
Tracked-On: #8665
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
This patch fixes the following testability issues identified by the dynamic
module test.
Global variables defined in function scope cannot be referenced outside
the function, making it impossible to check the return value of these
functions.
Tracked-On: #861
Signed-off-by: Chen, Jinshi <jinshi.chen@intel.com>
After rebooting guest, CPPC initialization failed because _CST and _CPC
missed in DSDT table. When writing _CST and _CPC in DSDT table, it gets
cx_cnt or px_cnt as condition. Getting cx_cnt or px_cnt triggers
the hypercall hcall_get_cpu_pm_state. The hypercall hcall_get_cpu_pm_state
uses VM_CREATED as VM state's condition. While, after rebooting guest,
the VM state is VM_PAUSED when writing _CST and _CPC in DSDT table.
Therefore, changing VM state's condition from VM_CREATED to VM_CREATED or
VM_PAUSED for hcall_get_cpu_pm_state can solve the CPPC initialization
failed issue after rebooting guest.
Tracked-On: #8695
Signed-off-by: Yuan Lu <yuan.y.lu@intel.com>
Reviewed-by: Fei Li <fei1.li@intel.com>
Fix below compilation error when building the module test for multiboot_priv.h.
./boot/multiboot/multiboot_priv.h: In function ‘boot_from_multiboot’:
./boot/multiboot/multiboot_priv.h:33:27: error: ‘MULTIBOOT_INFO_MAGIC’ undeclared (first use in this function)
33 | return ((magic == MULTIBOOT_INFO_MAGIC) && (info != 0U));
Tracked-On: #861
Signed-off-by: Gao, Shiqing <shiqing.gao@intel.com>
After upgrading to guest kernel 6.1.80, it checks the CPPC V2 capability
in _OSC of DSDT. To support it for ACRN guest, add CPPC V2 capability in
_OSC of DSDT. Currently we only support CPPC V2 capability in _OSC of
DSDT.
Tracked-On: #8691
Signed-off-by: Yuan Lu <yuan.y.lu@intel.com>
Reviewed-by: Fei Li <fei1.li@intel.com>
Guest VM, such as Linux, may read RESET_CONTROL(0xCF9) register
before writing to, in this case, ACRN should not always return
dummy value.
Tracked-On: #8688
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Determine the size of drhd_dev_scope based on DRHD_MAX_DEVSCOPE_COUNT
in board file instead of hardcoding. The current default value 16 will
be used if it is not defined in board file to keep compatibility, a
warning will be raised in this case.
Tracked-On: #8494
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Add a new field DRHD_MAX_DEVSCOPE_COUNT in board file representing
maximum devscope count in a DMAR structure for statically allocating
drhd_dev_scope array in hypervisor.
Tracked-On: #8494
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
histapp.py cannot run on numpy>=2, thus specify numpy<2 via pip install
command.
Tracked-On: #8664
Signed-off-by: Jiayuan Yang <jiayuan.yang@intel.com>
In this release note:
1. New features
2. Configurator and Board inspector updates
3. Docs updates
4. Fixed issues and known issues
Signed-off-by: Jiayuan Yang <jiayuan.yang@intel.com>
In this guide, each VM continue to use 22.04. SOS upgrade is done in
GSG(22.04.2->22.04.4).
Tracked-On: #8664
Signed-off-by: Jiayuan Yang <jiayuan.yang@intel.com>
Since Ubuntu24.04 requires 6.8 kernel(as shown in Ubuntu linux kernel
release lifecycle), we need to revert the ubuntu24.04 support in GSG to
suit our 6.1 acrn kernel.
Tracked-On: #8664
Signed-off-by: Jiayuan Yang <jiayuan.yang@intel.com>
GAI Tooling Notice: These contents may have been developed with support from one
or more generative artificial intelligence solutions.
ACRN hypervisor is decomposed into a series of components and modules. The
module design in hypervisor is to add inline doxygen style comments above
functions, macros, structures, etc.
This patch is to add comments for some elements in hwmgmt_page module.
Tracked-On: #8665
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
`consistency` is used to describe the consistency rule and `alignment`
is used to describe the align info.
These two are used to enhance the documentation inside a struct comment
block.
Signed-off-by: Gao, Shiqing <shiqing.gao@intel.com>
Trivy scaned one vulnerability three days ago and we fixed it now.
The title for vulnerability is openssl's `MemBio:get_buf` has undefined
behavior with empty buffers.
I tested through building configurator, launching it and generating
scenario.xml & launch scripts. I confirmed the result is correct.
Signed-off-by: dongpingx <dongpingx.wu@intel.com>
Tracked-On: #8668
GUEST_FLAG_STATELESS indicates guest is running a stateless operating
system and need to be shutdown forcefully without data loss. This flag
is only appalicable to pre-launched VM. For TEE_VM, this flag will be
set implicitly.
Tracked-On: #8671
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Now multiboot modules memory is already reserved from e820 in function
`alloc_mods_memory()` and Service VM will not corrupt pre-launched VM
modules.
So remove the code of Service VM delayed loading.
Tracked-On: #8652
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
This patch is to support Main VM, i.e., the Main VM scenario is similar to
paritioned scenario, which select one VM as Main VM and owns the
physical resources.
I extracted all pcis from the board, substracted them with dispatched ones
and then make an assignment to replace the old enums.
This is implemented through two methods called updateSchema which is
to update schema on the current VM and updateLoadSchema which is
to maintain pcis, i.e. removed the pcis listed on the pre-launched VM,
while loading scenario.xml.
I tested locally and confirmed the functionalties above are implemented.
Signed-off-by: dongpingx <dongpingx.wu@intel.com>
Tracked-On: #8657
1.We updated libwebkit2gtk-4.0-dev install method for Canonical had
removed that package already, but Tauri need it, so we advice the user
to download the dependencies through Ubuntu22.04's repo or adopt our
links directly.
2.remove unnecessary package: libappindicator3-dev, we found it is possible
to build acrn without that dependency, so we remove it now.
Signed-off-by: dongpingx <dongpingx.wu@intel.com>
Tracked-On: #8659
This patch adds tutorials about using Celadon as user vm.
This tutorials contains: Build Celadon from source code with refined
configs and kernel; Launch Celadon vm with passthrough gpu and
passthrough disk.
Tracked-On: #8254
Signed-off-by: Jiayuan Yang <jiayuan.yang@intel.com>
In the newer version of elementpath and xmlschema, some camera releated
feature are missing, thus we need to specify them.
Signed-off-by: Jiayuan Yang <jiayuan.yang@intel.com>
- Update ACRN kernel version to 6.1.80.
- Update reference board to ASUS Mini PC PN64.
- Update development computer and target system SOS to Ubuntu 24.04
noble.
- Change User VM image to Ubuntu 24.04 cloud image.
- Add some necessary ACRN build tools.
- Modify mem parameter in launch script xml to 4096M.
- Modify the GRUB menu reference to suit the above changes.
Signed-off-by: Jiayuan Yang <jiayuan.yang@intel.com>
This patch is to change the vUART resource occupied by S5 function
between Service VM and guest VM to avoid the standard UART port
conflict when legacy UART passthrough to guest VM.
Tracked-On: #8622
Signed-off-by: YuanXin-Intel <xin.yuan@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Reviewed-by: Jian Jun Chen <jian.jun.chen@intel.com>
Add more iGPU pci device ids of ADL-N and RPL-P to make passthrough
work properly.
Tracked-On: #8640
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Reviewed-by: Jian Jun Chen <jian.jun.chen@intel.com>
The definition of elf32_prog_entry with wrong comments,
p_filesz should means size of segment in file and p_memsz
should means size of segment in memory.
Tracked-On: #8642
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
The elf images can't be loaded correctly because
the elf_loader copy_to_gpa with wrong size.
The p_filesz and p_memsz both belong to elf32_prog_entry,
this data structure describes segments loaded in ram.
p_filesz means size of segment in file and p_memsz
means size of segment in memory.
ELF loader should copy elf_img to gpa with the
size of p_prg_tbl_head32->p_filesz.
Tracked-On: #8642
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This patch enable guest multiboot support. Try to find
the multiboot header in normal elf guest image.
Introduce the multiboot related basic functions to
initialize multiboot structure. Including
prepare_multiboot_mmap, prepare_loader_name and
find_img_multiboot_header.
Tracked-On: #8642
Signed-off-by: Victor Sun <victor.sun@intel.com>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Define the multiboot_header data structure and
MULTIBOOT_MEMORY related definitions.
Tracked-On: #8642
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
For the TEE and android kernelflinger boot requirements,
elf_loader need to support the multiboot protocol.
This patch define a memory block to store ELF format VM load
params in guest address space. At the same time, prepare the elf
cmdline field and memory map for the guest kernel.
Tracked-On: #8642
Signed-off-by: Victor Sun <victor.sun@intel.com>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Except Linux guest, elf guest also need support bootargs.
Currently VM bootargs support all type of guest.
Tracked-On: #8642
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>