Commit Graph

6243 Commits

Author SHA1 Message Date
David B. Kinder
cd4dc73ca5 doc: push doc updates for v2.5 release
Cumulative changes to docs since the release_2.5 branch was made

Tracked-On: #5692

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-06-24 21:19:05 -07:00
Kunhui-Li
7e9d625425 config_tools: remove nuc11tnbi5 scenario xml except industry.xml
Remove hybrid.xml, hybrid_rt.xml, logical_partition.xml and
industry_launch_2uos.xml files because validation team found
that these scenario files not working. And these documents will be
resubmitted after them are verified successfully.

Tracked-On: #6244

Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-06-24 14:43:08 +08:00
Kunhui-Li
25fa3466c5 config_tools: modify README file
1. Update python script name that is executed to generate board xml file
from run.py to cli.py in README file.
2. Update the OS requirement under native Linux in
misc/config_tools/board_inspector/README file.

Tracked-On: #6134
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-06-17 10:31:11 +08:00
Victor Sun
9aff6b1fbd config_tools: Revert "update scenario xml" for MAX_MSIX_TABLE_NUM
This reverts commit 24af7f8f9d which leaves
MAX_MSIX_TABLE_NUM item as empty for most of platforms except ehl-crb-b and
expect config tool to calculate a correct MAX_MSIX_TABLE_NUM for hypervisor
use. Unfortunately current config tool just calculate maximum native MSIX
number without evaluating the maximum MSI vectors that ACRN needed for vMSIX
emulation, thus introduce big risk on the device vMSIX table initialization.

If customer has special device that need larger MAX_MSIX_TABLE_NUM to enable
ACRN, he can input the number in his own scenario file.

Tracked-On: #6186

Signed-off-by: Victor Sun <victor.sun@intel.com>
2021-06-17 10:23:32 +08:00
Victor Sun
0321f6c4bc HV: remove unused multiboot.h
The multiboot.h has not been deleted in commit of "HV: modularization:
rename multiboot.h to boot.h" by mistake when do rebase, remove it.

Tracked-On: #5661

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-11 16:43:13 +08:00
Long Liu
8d81914350 ACRN: DM: Free the console in the unify API
Use the teardown API as the unify free console API in virtio console,
in case the console have already been freed by deinit when the teardwon
API is called.

Tracked-On: #6157
Signed-off-by: Liu Long <long.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2021-06-11 16:05:49 +08:00
Kunhui-Li
24af7f8f9d config_tools: update scenario xml
1. Update the value of the tag MAX_MSIX_TABLE_NUM from 64 to empty
for all scenario xml except ehl-crb-b board.
2. Update the value of the tag MAX_MSIX_TABLE_NUM to 96 for the
scenario xml on the ehl-crb-b board.

Tracked-On: #6186

Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-06-11 14:30:52 +08:00
Kunhui-Li
d63083a285 config_tools: update scenario xml
Update the value of the tag MAX_PT_IRQ_ENTRIES from 64 to 128
in TGL-RVP scenario xml.

Tracked-On: #6185

Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-06-11 14:30:52 +08:00
Kunhui-Li
814419beb8 config_tools: update clang-format file
Remove the AlwaysBreakTemplateDeclarations setting in clang-format file
to fix the issue about "make defconfig".

Tracked-On: #6199

Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-06-11 13:40:58 +08:00
Yang,Yu-chu
5bec1e8b1d config-tools: allocate the first unused bar for vmsix
A vmsix supported passthrough device expects the first unused bar region
for vmsix. Pop the first unused_bar_index in gpa.py instead.

Reference code: init_vmsix_on_msi of hypervisor\dm\vpci\vmsix_on_msi.c

Tracked-On: #6192
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2021-06-11 10:31:38 +08:00
Rong Liu
d33a8afc75 dm: get native rootport's max payload
Get and save native root port's max payload in dev cap register in
vrp_config data structure which will be used to configure vrp's max
payload by hv.

Tracked-On: #5915

Signed-off-by: Rong Liu <rong.l.liu@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-11 10:13:06 +08:00
Rong Liu
a302dca80b hv: add max payload to vrp
It seems important that passthru device's max payload settings match
the settings on the native device otherwise passthru device may not work.
So we have to set vrp's max payload capacity as native root port
otherwise we may accidentally change passthru device's max payload
since during guest OS's pci device enumeration, pass-thru device will
renegotiate its max payload's setting with vrp.

Tracked-On: #5915

Signed-off-by: Rong Liu <rong.l.liu@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-11 10:13:06 +08:00
Jie Deng
dba49b38df hv: add bitmap_clear_lock of split-lock after completing emulation
Suppose the current vcpu is 0, the other vcpus (1, 2, 3) may wait on the
"get_split_lock", the current vcpu need clear the ACRN_REQUEST_SPLIT_LOCK
explicitly here after finishing the emulation. Otherwise, it make cause
dead lock. for example:
	1. Once vcpu 0 "put_split_lock", let's say vcpu 1 will "get_split_lock".
	2. vcpu 1 call "vcpu_make_request" to pause vcpu 0, 2, 3.
	3. vcpu 1's VCPU_EVENT_SPLIT_LOCK is still not cleared because
	   the vcpu 0 called "vcpu_make_request" ever.
	4. All vcpus will wait for VCPU_EVENT_SPLIT_LOCK in acrn_handle_pending_request.
We should avoid this dead lock case.

Please note: this patch is only for release 2.5 test.

Tracked-On: #6051
Signed-off-by: Jie Deng <jie.deng@intel.com>
2021-06-10 13:00:15 +08:00
Jie Deng
070385c4f6 hv: using a dedicate lock
On the original WaaG, split-lock was rarely triggered by WaaG kernel.
We didn't find any problems when removing this patch. So this patch
was discarded in the final patch set merge.

Now, the latest Windows graphic driver will trigger lots of
split-lock very frequently. The test team reports this patch will
affect the stability.

Add this patch back to improve stability by using a dedicate lock.

Please note: This patch is only for release 2.5 test.

Tracked-On: #6051
Signed-off-by: Jie Deng <jie.deng@intel.com>
2021-06-10 13:00:15 +08:00
Shuang Zheng
1e478fc6a9 config_tools: add hybrid, hybrid_rt, logical partition scenario on adl board
add hybrid, hybrid_rt, logical_partition scenario and add launch
config xml on adl-s-crb board, add launch config xml on adl-rvp board.

Tracked-On: #5929
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
2021-06-10 11:00:32 +08:00
Kunhui-Li
d4b5db93e4 config_tools: clean up the board folders
1. Remove apl-up2, apl-up2-n3350, apl-mrb, nuc6cayh board
   folders from the latest code base.
2. Copy tgl-rvp.xml to generic_board.xml.

Tracked-On: #6175

Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-06-10 09:54:25 +08:00
Shuo A Liu
bef6dbc238 hv: WA ACRN-6886: Interrupt the target CPU and let it do PI with VMENTRY
Tracked-On: #5866
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
2021-06-09 17:07:37 +08:00
Yonghua Huang
59635fb984 dm: fix memory leakage risk in create_and_inject_vrtct
Reading native RTCT failure induces leakage of
 memory pointered by 'buf'.

Tracked-On: #6157
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
2021-06-09 13:37:22 +08:00
Yonghua Huang
cb59ac1cfe dm: remove redundant null check in unregister_mem_init
return value 'err' of mmio_rb_lookup() being 0 ensures
  'entry' is not NULL, hence checking it before 'free(entry)'
  is unnecessary.

Tracked-On: #6157
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
2021-06-09 10:41:03 +08:00
Liu Long
1ff7df8601 DM: xHCI: Add the trb pointer check
The trb pointer may be NULL when get the address from user space,
add the pointer check before use the trb.

Tracked-On: #6172
Signed-off-by: Liu Long long.liu@intel.com
Reviewed-by: Shuo A Liu shuo.a.liu@intel.com
Acked-by: Yu Wang yu1.wang@intel.com
2021-06-09 10:19:13 +08:00
Yang,Yu-chu
559d40a939 config-tools: refine get_pt_intx_table and check_pt_intx
Refine get_pt_intx_table. The method parse the <pt_inx> of scenario and
append the pair of phys_gsi and virt_gsi if there is any.

Refine check_pt_intx. Add a condition that the method returns if the
phys_gsi and virt_gsi are empty dictionary.

Tracked-On: #6178
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2021-06-09 10:17:46 +08:00
Zide Chen
a6fe51debd hv: deny access to HV owned legacy PIO UART from SOS
We need to deny accesses from SOS to the HV owned UART device, otherwise
SOS could have direct access to this physical device and mess up the HV
console.

If ACRN debug UART is configured as PIO based, For example,
CONFIG_SERIAL_PIO_BASE is generated from acrn-config tool, or the UART
config is overwritten by hypervisor parameter "uart=port@<port address>",
it could run into problem if ACRN doesn't emulate this UART PIO port
to SOS. For example:

- none of the ACRN emulated vUART devices has same PIO port with the
  port of the debug UART device.
- ACRN emulates PCI vUART for SOS (configure "console_vuart" with
  PCI_VUART in the scenario configuration)

This patch fixes the above issue by masking PIO accesses from SOS.
deny_hv_owned_devices() is moved after setup_io_bitmap() where
vm->arch_vm.io_bitmap is initialized.

Commit 50d852561 ("HV: deny HV owned PCI bar access from SOS") handles
the case that ACRN debug UART is configured as a PCI device. e.g.,
hypervisor parameter "uart=bdf@<BDF value>" is appended.

If the hypervisor debug UART is MMIO based, need to configured it as
a PCI type device, so that it can be hidden from SOS.

Tracked-On: #5923
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2021-06-09 10:07:28 +08:00
Shuo A Liu
2325d83665 hv: Enlarge E820_MAX_ENTRIES to 64
e820_alloc_memory() splits one E820 entry into two entries. With vEPT
enabled, e820_alloc_memory() is called one more. On some platforms, the
e820 entries might exceed 32.

Enlarge E820_MAX_ENTRIES to 64. Please note, it must be less than 128
due to constrain of zeropage. Linux kernel defines it as 128.

Tracked-On: #6168
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2021-06-09 08:15:01 +08:00
Victor Sun
c70b450ed3 HV: correct bootargs module size
The bootargs module represents a string buffer and there is a NULL char at
the end so its size should not be calculated by strnlen_s(), otherwise the
NULL char will be ignored in gpa copy and result in kernel boot fail;

Tracked-On: #6162

Signed-off-by: Victor Sun <victor.sun@intel.com>
2021-06-08 16:48:20 +08:00
Victor Sun
695e09a194 HV: relocate SOS kernel before boot modules for SBL
SBL would load multiboot modules to the maximum usable ram below 4GB, in this
case the SOS kernel would be failed to load because no room for kernel in
the range of end of modules and MEM_4G. So kernel must be relocated to the
range of MEM_1M and start of modules, or other appropriate place according
to modules layout.

Tracked-On: #6162

Signed-off-by: Victor Sun <victor.sun@intel.com>
2021-06-08 16:48:20 +08:00
Victor Sun
79bd3f498f HV: avoid pre-launched VM modules being corrupted by SOS kernel load
When hypervisor boots, the multiboot modules are loaded by bootloader(GRUB)
from HPA 0x100000 in order. The space range of pre-launched VM modules is also
exposed to SOS VM, so SOS VM kernel might pick this range to extract kernel
when KASLR enabled. This would corrupt pre-launched VM modules and result in
pre-launched VM boot fail.

This patch will try to fix this issue. The SOS VM will not be loaded to guest
space until all pre-launched VMs are loaded successfully.

Tracked-On: #5879

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
f66517e913 HV: place kernel and ramdisk by find_space_from_ve820()
We should not hardcode the VM ramdisk load address right after kernel
load address because of two reasons:
	1. Per Linux kernel boot protocol, the Kernel need a size of
	   contiguous memory(i.e. init_size field in zeropage) from
	   its load address to boot, then the address would overlap
	   with ramdisk;
	2. The hardcoded address could not be ensured as a valid address
	   in guest e820 table, especially with a huge ramdisk;

Also we should not hardcode the VM kernel load address to its pref_address
which work for non-relocatable kernel only. For a relocatable kernel,
it could run from any valid address where bootloader load to.

The patch will set the VM kernel and ramdisk load address by scanning
guest e820 table with find_space_from_ve820() api:
	1. For SOS VM, the ramdisk has been loaded by multiboot bootloader
	   already so set the load address as module source address,
	   the relocatable kernel would be relocated to a higher address
	   after hypervisor and all multiboot modules to avoid guest
	   memory copy corruption;
	2. For pre-launched VM, the kernel would be loaded to pref_address
	   first. If kernel end address is higher than maximum ramdisk
	   address limit, hypervisor would try to locate ramdisk load
	   address from 0x100000 to kernel load address; If kernel end
	   address is lower than maximum ramdisk address limit, hypervisor
	   would try to locate ramdisk address from kernel end address
	   to the maximum ramdisk address limit under 4GB;

Tracked-On: #5879

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
58cabb6d2b HV: create guest efi memmap for SOS VM
The SOS VM should not use host efi memmap directly, since there are some
memory ranges which reserved by hypersior and pre-launched VM should not
be exposed to SOS VM. These memory ranges should be filtered from SOS VM
efi memmap, otherwise it would caused unexpected issues. For example, The
SOS kernel kaslr will try to find the random address for extracted kernel
image in EFI table first. So it's possible that these reserved memory is
picked for extracted kernel image. This will make SOS kernel boot fail.

The patch would create efi memmory map for SOS VM and pass the memory map
info to zeropage for loading SOS VM kernel. The boot service related region
in host efi memmap is also kept for SOS VM so that SOS VM could have full
capability of EFI services as host.

Tracked-On: #5626

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
97e52fe12b HV: boot guest with boot params
Previously the load GPA of LaaG boot params like zeropage/cmdline and
initgdt are all hard-coded, this would bring potential LaaG boot issues.

The patch will try to fix this issue by finding a 32KB load_params memory
block for LaaG to store these guest boot params.

For other guest with raw image, in general only vgdt need to be cared of so
the load_params will be put at 0x800 since it is a common place that most
guests won't touch for entering protected mode.

Tracked-On: #5626

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
bf22e8f194 HV: add find_space_from_ve820() api
The API would search ve820 table and return a valid GPA when the requested
size of memory is available in the specified memory range, or return
INVALID_GPA if the requested memory slot is not available;

Tracked-On: #5626

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
e5db6f8cae HV: modify low 1MB area for pre-launched VM e820
The memory range of [0xA0000, 0xFFFFF] is a known reserved area for BIOS,
actually Linux kernel would enforce this area to be reserved during its
boot stage. Set this area to usable would cause potential compatibility
issues.

The patch set the range to reserved type to make it consistent with the
real world.

BTW, There should be a EBDA(Entended BIOS DATA Area) with reserved type
exist right before 0xA0000 in real world for non-EFI boot. But given ACRN
has no legacy BIOS emulation, we simply skipped the EBDA in vE820.

Tracked-On: #5626

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
adc5a61925 HV: init hv_e820 from efi mmap if boot from uefi
Hypervisor use e820_alloc_memory() api to allocate memory for trampoline code
and ept pages, whereas the usable ram in hv_e820 might include efi boot service
region if system boot from uefi environment, this would result in some uefi
service broken in SOS. These boot service region should be filtered from
hv_e820.
This patch will parse the efi memory descriptor entries info from efi memory
map pointer when system boot from uefi environment, and then initialize hv_e820
accordingly, that all efi boot service region would be kept as reserved in
hv_e820.

Please note the original efi memory map could be above 4GB address space,
so the efi memory parsing process must be done after enable_paging().

Tracked-On: #5626

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
dbc86a005c HV: add efi memory map parsing function
When hypervisor boot from efi environment, the efi memory layout should be
considered as main memory map reference for hypervisor use. This patch add
function that parses the efi memory descriptor entries info from efi memory
map pointer and stores the info into a static hv_memdesc[] array.

Tracked-On: #5626

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
4c2213594c HV: init paging before init e820
With this patch, the hv_e820 will be initialized after enable paging. This
is because the hv_e820 will be initialized from efi mmap when system boot
from uefi, which the efi mmap could be above 4G space.

Tracked-On: #5626

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
655511932f HV: modularization: remove multiboot_priv.h
Leave a multiboot_priv.h in multiboot folder is redundant, so remove it.
Also, as a public interface, boot.h need not to include multiboot_std.h;

Tracked-On: #5661

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
33c864fae6 HV: modularization: rename mi_acpi_rsdp_va to acpi_rsdp_va
The simply rename mi_acpi_rsdp_va in acrn_boot_info struct to acpi_rsdp_va;

Tracked-On: #5661

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
c09e55c376 HV: modularizatoin: use abi_efi_info struct in acrn boot info
Previousely the efi_info structure in acrn_boot_info struct is defined as
same as Linux kernel so that the native efi info from host could be passed
to SOS zeropage with memcpy() api directly. Now replace it with abi_efi_info
struct to make the content more generic;

Tracked-On: #5661

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
57d7225901 HV: modularization: use abi_mmap struct in acrn boot info
Use more generic abi_mmap struct to replace multiboot_mmap struct in
acrn_boot_info;

Tracked-On: #5661

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
45d56a8173 HV: modularization: use abi_module struct in acrn boot info
Use more generic abi_module struct to replace multiboot_module struct in
acrn_boot_info;

Tracked-On: #5661

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
aa5502c5a4 HV: modularization: rename mi_loader_name to loader_name
The patch has below changes:
	1. rename mi_loader_name in acrn_boot_info struct to loader_name;
	2. remove mi_drivers_length and mi_drivers_addr which are never used;

Tracked-On: #5661

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
acff2959ff HV: modularization: rename mi_cmdline to cmdline in acrn boot info
The name of mi_cmdline in acrn_boot_info structure would cause confusion with
mi_cmdline in multiboot_info structure, rename it to cmdline;

Tracked-On: #5661

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
56c52d0b95 HV: modularization: remove mi_flags from acrn boot info
The mi_flags is not needed any more so remove it from acrn_boot_info struct;

Tracked-On: #5661

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
23222d0192 HV: modularization: rename multiboot.h to boot.h
Given the structure in multiboot.h could be used for any boot protocol,
use a more generic name "boot.h" instead;

Tracked-On: #5661

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
fd75fcdef0 HV: modularization: add boot.c to wrap multiboot module
Add a wrapper API init_acrn_boot_info() so that it could be used to boot
ACRN with any boot protocol;

Another change is change term of multiboot1 to multiboot because there is
no such term officially;

Tracked-On: #5661

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
c9841d7618 HV: modularization: name change on acrn_multiboot_info
The acrn_multiboot_info structure stores acrn specific boot info and should
not be limited to support multiboot protocol related structure only.

This patch only do below changes:

	1. change name of acrn_multiboot_info to acrn_boot_info;
	2. change name of mbi to abi because of the change in 1, also the
	   naming might bring confusion with native multiboot info;

Tracked-On: #5661

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-06-04 16:29:33 +08:00
Victor Sun
bc828dff19 HV: modularization: move module check to sanitize multiboot info
ACRN used to support deprivileged boot mode which do not need multiboot
modules, while direct boot mode need multiboot modules at lease for
service VM bzImage, so ACRN postponed the multiboot modules sanity check
in init_vm_boot_info.

Now deprivileged boot mode was totally removed, so we can do multiboot
module check in sanitize_acrn_multiboot_info().

Tracked-On: #5661

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2021-06-04 16:29:33 +08:00
Shuo A Liu
a5839e7269 dm: Reset virtio device before release
With virtio polling mode enabled, a timer is running in the virtio
backend service. And the timer will also be triggered if its frondend
driver didn't do the device reset in shutdown. A freed virtio device
will be accessed in the polling timer handler.

Do the virtio reset() callback specifically to clear the polling timer
before the free.

Tracked-On: #6147
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
2021-06-04 16:29:17 +08:00
Tao Yuhong
a945846e7c DM: TPM: tpm passthrough device must use fixed base GPA
The TPM driver will access some mmio registers using absolute address,
That means TPM base GPA must use same HPA value, when passthough it to VM

Tracked-On: #6126
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2021-06-04 15:19:14 +08:00
Tao Yuhong
a420100704 DM: TPM2: Fix remove hard code GPA base miss control register info
CRB_REGS_CTRL_REQ is offset of control register to TPM mmio base,
need use the address to generate TPM2 acpi table

Tracked-On: #6126
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2021-06-04 15:19:14 +08:00
Yonghua Huang
94d450b38b dm: validate inputs in vq_endchains
inputs shall be validated to avoid NULL pointer access.

Tracked-On: #6129
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
2021-06-04 15:18:17 +08:00