When cloning the ACRN source code to a folder, which is not named "acrn-hypervisor",
the debian package created by the "make" call does not contain all needed files.
Because the file ".deb.conf" contains hardcoded folder names which contain the
folder name "acrn-hypervisor".
Tracked-On: #7022
Signed-off-by: Hu Fenglin <fenglin.hu@intel.com>
Update description of passthrough usecase additions, and improved
description of Issue #76631 (Kata support broken)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Flow Table 6-95 from xHCI spec, Ring Segment Size defines
the number of TRBs supported by the ring segment, valid
values for this field are 16 to 4096.
Tracked-On: #6981
Signed-off-by: Liu Long <long.liu@intel.com>
for VMX_PROCBASED_CTLS2_XSVE_XRSTR, it has been
checked in is_valid_xsave_combination, here
remove the redundant check.
for VMX_PROCBASED_CTLS2_PAUSE_LOOP, now it will panic
if run ACRN over QEMU, here remove it from essential check,
and it will print error information when set this bit
if there is no the hardware capability.
Tracked-On: #6584
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Currently, if board.xml and scenario.xml are specified,
the variable $(BOARD) and $(SCENARIO) are path, but the
parameters passed in to generate debian package should be
board and scenario name. So add a conversion function to
ensure that the function passed to the generated debian
package is board and scenario name.
Tracked-On: #6688
Signed-off-by: Hu Fenglin <fenglin.hu@intel.com>
When CPUID executes with EAX set to 02H, the processor returns information about cache and TLB information.
This information is percpu related, and should be obtained directly from the physical cpu.
Tracked-On: #6931
Signed-off-by: Tw <wei.tan@intel.com>
HMAC_*, MD5_* and SHA256_* are deprecated since openssl3.0, replace them with the corresponding equivalents.
Tracked-On: #6743
Signed-off-by: Tw <wei.tan@intel.com>
When CPUID executes with EAX set to 1AH, the processor returns information about hybrid capabilities.
This information is percpu related, and should be obtained directly from the physical cpu.
Tracked-On: #6899
Signed-off-by: Wen <qian.wen@intel.com>
Signed-off-by: Tw <wei.tan@intel.com>
Rename get_sos_wakeup_reason to get_service_vm_wakeup_reason in acrn manager.
rename set_sos_timer to set_service_vm_timer.
rename sos_pci_devs to service_vm_pci_devs.
rename gen_sos_vm to gen_service_vm.
rename sos_used_bdf to service_vm_used_bdf.
rename is-sos-vm to is-service-vm.
rename sos_mmio_range to service_vm_mmio_range.
rename sos_guest_flags to service_vm_guest_flags.
rename get_sos_vmid to get_service_vmid.
rename sos_cpu_affinity to service_vm_cpu_affinity.
rename allocation_sos_vm_node to allocation_service_vm_node.
rename cpus_for_sos to cpus_for_service_vm.
rename sos_vm_cpus to service_vm_cpus.
rename get_sos_vuart_settings to get_service_vm_vuart_settings.
rename sos_extend_all_cpus to service_vm_extend_all_cpus.
rename sos_vm_id to servier_vm_id.
rename sos_vm_index to service_vm_index.
rename sos_vm_num to service_vm_num.
re-generate the board and scenario code by the new python and xml.
delete tdf8532 kernel module in python and shell script.
Tracked-On: #6744
Signed-off-by: Liu Long <long.liu@linux.intel.com>
Currently, in RTVM with multi vCPUs, lapic pass through is
configured, each vCPU works in x2apic mode. When one vCPU sends
IPI to all other vCPUs, writes ICR register with the value
0x00000000000c00f8, this ICR writting will trigger VM exit,
the hypervisor passes destination shorthand field 11B (All Excluding
Self) in the virtual ICR value into physical ICR value,
this IPI will be sent to each physical CPU core
in the platform according to 10.6.1 Interrupt Command Register (ICR),
Vol 3, SDM. This will cause one User VM with lapic pass through
configuration can send IPI with any vector (such as NMI or reboot
vector) to other VM, this interference may cause other VM hang.
In this patch, set "Destination Shorthand" field of the
ICR value as 00B (No Shorthand) since the emulation is done
through sending IPI to each VCPU in dmask one by one.
Tracked-On: #6908
Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
When a new thread is wakeup and added to runqueue, it will get the
smallest avt (svt) from runqueue to initiate its avt. But when all
threads are blocked, and removed from the runqueue, the svt is 0. The
new thread will get avt=0. avt=0 means very high priority, and can run
for a very long time until it catchup with other thread's avt in
runqueue.
To fix it, adjust the new thread's avt when there is another thread in
runqueue.
Tracked-On: #6888
Signed-off-by: Conghui <conghui.chen@intel.com>
The lifecycle manager in Service VM checks sync message every
5 seconds, so need add 5 seconds to sync delay for WaaG
lifecycle manager to avoid to unnecessary sync resending.
Tracked-On: #6652
Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
Currently, the lifecycle manager in Service VM will issue poweroff
command to shutdown service VM when User VM fails to shutdown. The
post-launched RTVM with virtio device may hang after Service VM
shutdown.
In this patch, the lifecycle manager in Service VM will stop to
shut down service VM when User VM fails to shutdown. Users have
chance to fix User VM shutdown failure (such as forcelly shutdown
User VM or execute poweroff command in User VM), after the failure
is fixed, user can trigger S5 in service VM to shutdown platform
gracefully.
Tracked-On: #6652
Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
If a file descriptor being monitored by epoll_wait is closed
in another thread, the result is unspecified. So add all mevents
removed in other threads to delete list. And drain the list in
the dispatch mevent thread.
Tracked-On: #6877
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
Variable should not have a prefix of '_' per MISRA C standard. The patch
removes the prefix for _ld_ram_start and _ld_ram_end.
Tracked-On: #6885
Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
In previous commit df7ffab441
the CONFIG_HV_RAM_SIZE was removed and the hv_ram_size was calculated in
link script by following formula:
ld_ram_size = _ld_ram_end - _ld_ram_start ;
but _ld_ram_start is a relative address in boot section whereas _ld_ram_end
is a absolute address in global, the mix operation cause hv_ram_size is
incorrect when HV binary is relocated.
The patch fix this issue by getting _ld_ram_start and _ld_ram_end respectively
and calculated at runtime.
Tracked-On: #6885
Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
this patch validates input of virtio_console_control_tx()
function to avoid potential progream crash with malicious
input from guest.
Tracked-On: #6851
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This patch is to eliminate kernel error msgs:
'ACPI Error: AE_NOT_FOUND, Evaluating _PSS'
This is caused by missing of _PSS table in guest ACPI. It would
happen when pstate is not injected to the guest.
Kernel ACPI pstate driver first probes
_PPC(performance capabilites) and _PCT(performance control)
in ACPI. If they exist, then it loads the _PSS(performance state).
If _PPC/_PCT are presented while _PSS is missing, it prints
the error msg.
In acrn-dm, _PPC/_PCT are hard-coded to all vCPUs, while _PSS
are constructed with the pCPUs' pstate data. This is base on
assumption that all VMs can have pstate.
Now the pstate is given to VM only when the VM is not sharing
any CPU(and no RTVM is setup in the scenario).
When the VM doesn't have pstate, the hypercall will return px_cnt=0,
and the _PSS is not constructed. In this case, _PPC/PCT should not
be injected, too.
Tracked-On: #6848
Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Acked-by: Eddie Dong <eddie.dong@Intel.com>
Avoid failing hypercalls by returning 0 for empty PX and CX tables on
HC_PM_GET_CPU_STATE/PMCMD_GET_PX_CNT and
HC_PM_GET_CPU_STATE/PMCMD_GET_CX_CNT.
Tracked-On: #6848
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Acked-by: Eddie Dong <eddie.dong@Intel.com>
replace MAX_VMNAME_LEN with MAX_VM_NAME_LEN
to keep sync with HV and devicemodel
Tracked-On: #6685
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
-- refine get_vmid_by_name, return the first matching vm_id
-- the GUEST_FLAG_STATIC_VM is added to identify the static or
dynamic VM, the offline tool will set this flag for
all the pre-defined VMs.
-- only clear name field for dynamic VM instead of clear entire
vm_config
-- only set DM owned guest_flags in hcall_create_vm
-- add check dynamic flag in get_unused_vmid
Tracked-On: #6685
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
The HV will be built failed with below compiler message:
common/efi_mmap.c: In function ‘init_efi_mmap_entries’:
common/efi_mmap.c:41:11: error: unused variable ‘efi_memdesc_nr’
[-Werror=unused-variable]
uint32_t efi_memdesc_nr = uefi_info->memmap_size / uefi_info->memdesc_size;
^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
The root cause is ASSERT() api is for DEBUG only so efi_memdesc_nr is not used
in RELEASE code.
The patch fix this issue by removing efi_memdesc_nr declaration;
Tracked-On: #6834
Signed-off-by: Victor Sun <victor.sun@intel.com>
GUEST_FLAG_SECURITY_VM only for pre-launch vm, should not be
programmed by device model, so we remove it in DM_OWNED_GUEST_FLAG_MASK.
Tracked-On: #6366
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
GET_PLATFORM_INFO interface is not supported from
hypervisor any more, remove this wrapper API in DM.
Tracked-On: #6724
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
- GET_PLATFORM_INFO will not be supported in ACRN.
- This patch removes the dependency on this interface
to build virtual ACPI table of post-launched VM:
Instead of calling 'vm_get_config()' to get local
APIC IDs, virtual ACPI builder calls new wrapper API
'lapcid_from_pcpuid()'.
Tracked-On: #6724
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
- GET_PLATFORM_INFO ioctl will not be supported by ACRN.
- This patch removes the dependency on above interface in
vRTCT ACPI table building:
1) Get cache hierarchy information (threads sharing shift)
through 'cpuid' instruction (leaf 0x04) instead of
call vm_get_config() API.
2) Get local APIC IDs of guest VM CPUs through new wrapper
API 'plapicid_from_pcpuid()'.
Tracked-On: #6724
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
GET_PLATFORM_INFO interface will be removed from ACRN hypervisor,
Service VM /ACRN-DM and other userland applications shall not use it any more.
For dm the lapic id was get from acrn_platform_info.
So in version 2.7, SOS madt table is parsed to get the lapic id for each pcpu.
There has an assumption. The SOS owned pcpu starts from physical cpu 0,
otherwise SOS doesn't know the mapping relationship between its vcpu0
and pcpu_id.
Tracked-On: #6724
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
ACRN get messy default values for some CAT CBM MSRs,
these unexpected default value will result in TCC
Software SRAM initializes crash.
This patch resets above error default values before calling
CRL(cache reserve library) ABI initializaion function.
Tracked-On: #6780
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Rename function name to get-common-clos-count and refine the
calculation. Some platforms have odd clos counts. Using "floor" to get
integer numbers for macros.
Tracked-On: #6755
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
Commit cbf3825 "hv: Pass-through IA32_TSC_AUX MSR to L1 guest"
lets guest own the physical MSR IA32_TSC_AUX and does not handle this MSR
in the hypervisor.
If multiple vCPUs share the same pCPU, when one vCPU reads MSR IA32_TSC_AUX,
it may get the value set by other vCPUs.
To fix this issue, this patch does:
- initialize the MSR content to 0 for the given vCPU, which is consistent with
the value specified in SDM Vol3 "Table 9-1. IA-32 and Intel 64 Processor
States Following Power-up, Reset, or INIT"
- save/restore the MSR content for the given vCPU during context switch
v1 -> v2:
* According to Table 9-1, the content of IA32_TSC_AUX MSR is unchanged
following INIT, v2 updates the initialization logic so that the content for
vCPU is consistent with SDM.
Tracked-On: #6799
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Reviewed-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
1. ensure cpu affinity in launch xml is subset of its scenario settings.
2. cpu_affinity is a must have parameter for acrn_dm, if the user did not provide cpu affinity in launch xml, load it from scenario settings.
Tracked-On: #6724
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
when we add two or more virtio block devices and rename them for a VM
in launch xml files, then generate launch scripts through the UI.
After ensuring the devices names are different, we repeat these operations
continuously. Finally we will get the duplicate PT_SLOT value for
different virtio block devices in a launch script. This is wrong.
After user click the "Generate Launch Script" button to generate the
launch scripts every time, we will reset PT_SLOT variate to fix the issue.
Tracked-On: #6767
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
When some communication vuarts are configured in hypervisor
scenario files, serial.conf will be generated and should be
installed in the etc folder of service VM.
In this patch, update deb configuration file to install
serial.conf into etc folder of service VM.
Tracked-On: #6652
Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>