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>
This patch is to allow user to pin vUART timer to specific pCPU via ACRN
config tool. User can configure by setting "vUART timer pCPU ID" under
Hypervisor->Advanced Parameters.
Tracked-On: #8648
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
Introduce an interface to define Tx/Tx buffer size via ACRN config tool.
User can configure under Hypervisor->Advanced Parameters.
Tracked-On: #8644
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
rtc_halted() is not invoked anywhere in the code.
This patch removes this unused function to fix below error.
error: unused function 'rtc_halted' [-Werror,-Wunused-function]
Tracked-On: #861
Signed-off-by: Gao, Shiqing <shiqing.gao@intel.com>
This patch fixes the following error:
error: variable 'sid' is used uninitialized whenever 'if' condition is true
[-Werror,-Wsometimes-uninitialized]
Tracked-On: #861
Signed-off-by: Gao, Shiqing <shiqing.gao@intel.com>
elf64_r_type() is only invoked when CONFIG_RELOC is defined.
This patch encloses its definition with `#ifdef CONFIG_RELOC`,
otherwise, it is dead code.
Tracked-On: #861
Signed-off-by: Gao, Shiqing <shiqing.gao@intel.com>
Commit `512c98fd7 hv: trace: show cpu usage of vms in pcpu sharing case`
causes the compilation error in release mode:
hypervisor/common/schedule.c:190: undefined reference to `TRACE_16STR'
This patch fixes this issue.
Tracked-On: #861
Signed-off-by: Gao, Shiqing <shiqing.gao@intel.com>
1. Enable Service VM to power off or restart the whole platform even when RTVM is running.
2. Allow Service VM stop the RTVM using acrnctl tool with option "stop -f".
3. Add 'Service VM supervisor role enabled' option in ACRN configurator
Tracked-On: #8618
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>
To maximize the cpu utilization, core 0 is usually shared by service
vm and guest vm. But there are no statistics to show the cpu occupation
of each vm.
This patch is to provide cpu usage statistic for users. To calculate
it, a new trace event is added and marked in scheduling context switch,
accompanying with a new python script to analyze the data from acrntrace
output.
Tracked-On: #8621
Signed-off-by: nacui <na.cui@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Reviewed-by: Haiwei Li <haiwei.li@intel.com>
As ivshmem has switched from static allocation to E820 allocation,
the hv_ram_size no longer needs to include ivshmem size.
Tracked-On: #8522
Signed-off-by: Wu Zhou <wu.zhou@intel.com>
When resume from s3, Service VM OS will hang because timer interrupt on
BSP is not triggered. Hypervisor won't update physical timer because
there are expired timers on pcpu timer list.
Add suspend and resume ops for modules that use timers.
This patch is just for Service VM OS. Support for User VM will be added
in the future.
Tracked-On: #8623
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
When guests resume form s3, an error occurs in guest:
```
pcieport 0000:00:1c.0: refused to change power state from D0 to D3hot
```
PCI bridge (type 1 device) will access configuration space header but
now acrn is not supported. So add handling support.
Tracked-On: #8623
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
After some kind of reset, such as s3, pci bridge tries to restore the
bus and memory/IO info (from 0x18 to 0x32, except for Secondary Latency
Timer 0x1b) to resume device state.
This patch is to restore these info by hypervisor.
Tracked-On: #8623
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
Now only BSP is reset. After Service VM OS resumes from s3, APs'
apic_base_msr are incorrect with x2apic bit en.
To avoid incorrect states, do `reset_vm` after resume.
Tracked-On: #8623
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
After Service VM OS resumes from s3, BSP starts APs asynchronously,
followed by IPIs to APs to resume tsc. This process takes place in
function `host_enter_s3`. While, APs' lapic are not ready to accept IPI
interrupt, so BSP fails to resume tsc.
So enable lapic earlier to make sure that APs are ready.
Tracked-On: #8623
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
If the root partition is bind mounted with / and another, the current
postinst script (using command lsblk) will fail to find the partition:
$type will be "/" only and cause the following command may find the
wrong partition.
Ubuntu 22.04 desktop with firefox snap by default:
```
> lsblk
nvme0n1 259:19 0 931.5G 0 disk
├─nvme0n1p1 259:20 0 243M 0 part /boot/efi
├─nvme0n1p2 259:21 0 927.5G 0 part /var/snap/firefox/common/host-hunspell
│ /
```
And current command forces the root partition to be ext4.
This patch fixes the two issues.
Tracked-On: #8532
Signed-off-by: Xin Zhang <xin.x.zhang@intel.com>
For an elf-loaded or beImage-loaded User VM, acrn-dm is responsible for
handling s3 related matters.
After resume from S3, acrn-dm should read waking_vector and set related
registers to make guest to resume.
Tracked-On: #8536
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
For ovmf-booted User VM, we should set CMOS shutdown status register
(index 0xF) as S3_resume(0xFE). So ovmf will read it and start S3 resume
at POST entry.
And ovmf will read waking vector from FACS table and transfer control to
guest.
Tracked-On: #8624
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
- OvmfPkg: resolve AcrnS3Lib
- OvmfPkg: add AcrnS3Lib to support S3
- OvmfPkg: introduce AcrnS3Lib class
- OVMF:ACRN:PCI: Try to load ROM image for the PCI device with PCI_ROM
- OVMF:ACRN:PCI: Add LoadOpRomImageLight to Load the PCI Rom
- OVMF:ACRN:PCI: Write back the original value of PCI ROM
The first three above are related to S3.
Tracked-On: #8624
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
- In 'MMIO Registers Definition', the names of interrupt status/mask registers are wrong
Tracked-On: #8568
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com>
In current implementation, if there are multiple continous 4k-aligned
modules, 0-sized e820 entries will be created between these regions.
And for non-4k-aligned modules, when two of them are located in one
page, the second memory range will not be reserved as it was not in
one e820 entry after the first is reserved, making it vulnerable.
This patch fixes it by marking the exact memory range of multiboot
modules as unusable first, then shrinking the e820 entries to page
boundary. If the module crosses multiple e820 entries, possibly due
to a buggy bootloader, hypervisor will panic immediately to prevent
modules getting corrupted.
Tracked-On: #8617
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Some cpuids will return invalid values on hybrid platform because of the
error in the pointer arithmetic. Add `(void *)` before
`cpu_cpuids.leaves`.
Leaf 0x14 is used to report Intel Processor Trace Enumeration and varies
between P-cores and E-cores on hybrid platform. So add it to
`hybrid_leaves`.
Tracked-On: #8608
Fixes: 59a8cc4c2 ("hv: cpuid: make leaf 0x4 per-cpu in hybrid architecture")
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
iothreads are created by emulated block devices like virtio. These
devices are resetted on vm reset, but these iothreads are not freed,
causing a resource leak. Fix it by deinit all iothreads on vm reset.
Tracked-On: #8612
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Reviewed-by: Jian Jun Chen <jian.jun.chen@intel.com>
In HV, cpuid uses the lower 32 bits of rax\rbx\rcx\rdx registers to pass parameters,
But the software does not clear the upper 32-bit registers, if the guest
uses 64-bit variables to pass parameters to cpuid,guest will use rax\rbx\rcx\rdx,
not eax\ebx\ecx\edx, the previous value of the high 32 registers will affect the guest.
Tracked-On: #8605
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: andi6 <andi6@xiaomi.com>
Passthrough of lpss devices, such as sdio, spi, uart, is not supported for user
vm due to irq and acpi info missing.
Here provides new pci device passthrough options to pass irq and acpi dsdt info
by users. Considering spi dsdt info varies from HW, to add the flexibility of
configuration, it is designed to pass dsdt file of spi device by users rather
than hard code. Besides, remove the limit of the lpss device passthrough for rtvm.
Tracked-On: #8615
Signed-off-by: nacui <na.cui@intel.com>
Reviewed-by: Jian Jun Chen <jian.jun.chen@intel.com>