ACRN IVSHMEM follows QEMU IVSHMEM spec. IVSHMEM supports MSIx interrupt
for doorbell mode. The document of ivshmem high level design is
out-of-date. This patch update the mmio register definition of doorbell
mode support.
Tracked-On: #5407
Signed-off-by: Jiayuan Yang <jiayuan.yang@intel.com>
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
This patch adds the description of newly added parameter of acrntrace analyzer,
as well as the user guide that how to analyze the cpu usage of VMs in cpu sharing
case.
Tracked-On: #8621
Signed-off-by: Na Cui <na.cui@intel.com>
This patch adds the description of newly added optional parameters for
PCI device passthrough. The new parameters are related to irq and
acpi dsdt info, which are designed for the passthrough of LPSS devices.
Tracked-On: #8615
Signed-off-by: Na Cui <na.cui@intel.com>
Mark hypervisor memory region as unusable in its e820 table to avoid
being overlapped by e820_alloc_memory(). As it is already filtered out
in hypervisor e820 table, there is no longer need to filter it out in
service VM e820.
Tracked-On: #8738
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Reviewed-by: Fei Li <fei1.li@intel.com>
The hypervisor image size is determined at link time, but now it is
calculated and stored in a global variable during mmu initialization,
and the helper function reads from that variable. Change to calculate
it inside helper function to avoid inconsistency.
Tracked-On: #8738
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Reviewed-by: Fei Li <fei1.li@intel.com>
The VM-exit instruction length(VMX_EXIT_INSTR_LEN) in VMCS is undefined
on EPT violation, except during delivery of a software interrupt,
privileged software exception, or software exception[1]. Although CPU
is likely to set the field, it can be incorrect in certain cases, such
as cmp+jcc and test+jcc.
Since hypervisor does not know exactly how much bytes needed, and GVA
translation is costly, it first copies at most 15 (VIE_INST_SIZE) bytes
within the page, then decodes the instruction. If more bytes are needed
during decoding and copied length is less than 15, it copies remaining
bytes.
[1] 29.2.5, https://cdrdv2-public.intel.com/671200/325462-sdm-vol-1-2abcd-3abcd.pdf
Tracked-On: #8756
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
The Access Size field in ACPI GAS was not introduced before ACPI 2.0,
Errata C. It is not guaranteed to be a non zero value, like QEMU
programs it to 0. As it only indicates how many bytes it can be
accessed at once, the register size should be determined by Bit Width
and Bit Offset. In IO space, Bit Offset is always 0, the size is
(Bit Width / 8).
Tracked-On: #8771
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
Reviewed-by: Li Fei <fei1.li@intel.com>
Device model uses polling mode to fetch the virtio blk request in RTVM.
When RTVM brings up with io uring, the threads handling io uring and vq are
not same, which would cause competition. To fix this issue, device
model should handle vq and io uring in the same thread to avoid conflict.
Tracked-On: #8737
Signed-off-by: YuanXin-Intel <xin.yuan@intel.com>
Reviewed-by: Jian Jun Chen <jian.jun.chen@intel.com>
In current code process, hyperv data in struct vm_arch is never cleared
during VM shutdown and is retained to next VM launch. As the enabled
bit of hypercall_page msr is not clear, hypercall page might cause fatal
error such as Windows VM BSOD during VM restart and memory
remapping. Hyperv page destory function can ensure hyperv page is
destory during each VM shutdown so hyperv related config such as
hypercall page is established correctly during each VM launch.
Tracked-On: #8755
Signed-off-by: Yichong Tang <yichong.tang@intel.com>
During init of hugetlb we check and create /run/hugepage/acrn folder.
Concurrent acrn-dm instances might race between the time of check and
create.
This commit ignore EEXIST error when creating directory.
Tracked-On: #8764
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
upgrade nanoid to 3.3.8
upgrade idna to 1.0.0
upgrade vite to >=3.2.11, actually locked at 6.0.3
upgrade rollup to >=2.79.2, actually locked at 4.28.1
Tracked-On: #8751
Signed-off-by: dongpingx <dongpingx.wu@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 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