Commit Graph

3609 Commits

Author SHA1 Message Date
Zhao Yakui
b7cce16403 ACRN/hv:change the max memory size of UOS from 8G to 16G
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Tested-by: Yang Ronnie <ronnie.yang@intel.com>
2019-11-05 09:34:05 +08:00
Zhao Yakui
a7706e0c39 HV: Use the mwait instead of pause for cpu_idle
Now it will use the pause when cpu is in idle state. It will consume
more power. If the mwait is supported, it will use the monitor/mwait to
enter the deep CPU C-state. It helps to save power.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2019-08-27 16:25:39 +08:00
Zhao Yakui
21bd1c8bd3 Disable fbc power feature for GVT-D in UOS 2019-07-30 14:33:24 +08:00
Zhao Yakui
3e7f32cced remove the CL release number and use the default name for uos image.
Later it can be updated/changed by installation script.
2019-07-23 08:59:58 +08:00
Zhao Yakui
d0f7f4d658 HV: Remove the mixed usage of inline assembly in wait_sync_change
When monitor/mwait is not supported, it still uses the inline assembly in
wait_sync_change. As it is not allowed based on MISRA-C, the asm wrapper
is used for pause scenario in wait_sync_change.

Tracked-On: #3442
Suggested-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2019-07-22 15:29:03 +08:00
Zhao Yakui
3d65188e54 HV: Refine the usage of monitor/mwait to avoid the possible lockup
Based on SDM Vol2 the monitor uses the RAX register to setup the address
monitored by HW. The mwait uses the rax/rcx as the hints that the process
will enter. It is incorrect that the same value is used for monitor/mwait.
The ecx in mwait specifies the optional externsions.

At the same time it needs to check whether the the value of monitored addr
is already expected before entering mwait. Otherwise it will have possible
lockup.

V1->V2: Add the asm wrappper of monitor/mwait to avoid the mixed usage of
inline assembly in wait_sync_change

v2-v3: Remove the unnecessary line break in asm_monitor/asm_mwait.
       Follow Fei's comment to remove the mwait ecx hint setting that
treats the interrupt as break event. It only needs to check whether the
value of psync_change is already expected.

Tracked-On: #3442
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
2019-07-22 15:28:56 +08:00
Zhao Yakui
37f5f0771e Import the change of enabling tap0 in SOS in acrn_quick_setup.sh
Otherwise when the doc/getting-started/acrn_quick_setup.sh is used,
it will skip the setting of "enabling tap0 in SOS".
2019-07-17 11:38:16 +08:00
Zhao Yakui
d75b5eebf4 Assign 0d.0 USB controller to UOS
USB controller should be 0000:00:0d.0 instead of 0000:00:08.0
2019-07-11 10:57:44 +08:00
Zhao Yakui
b2b28d0a7e Enable four CPUS for UOS for better performance 2019-07-11 09:54:48 +08:00
Zhao Yakui
bbc2412344 Obtain the GPU device id from /sys/bus/pci/devices/0000:00:02.0/device
The drm.debug=xxx is also removed to avoid printing the debug info.
2019-07-10 15:19:10 +08:00
Zhao Yakui
58dcb0af1b Revert "Refine the BSP/AP boot flowchart to match BIOS boot flow"
This reverts commit ff9d667b49.
2019-06-26 13:37:09 +08:00
Zhao Yakui
8c357a849f Add CF9 reboot
This is for the debug purpose. Otherwise it will crash when trying to
execute the reboot in hypervisor

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2019-06-25 10:10:46 +08:00
Jack Ren
ff9d667b49 Refine the BSP/AP boot flowchart to match BIOS boot flow
This is only for the debug purpose. It is still unclear whether it can work on
ICL.

WhiskyLake BIOS will start APs and then each AP will call mwait to wait for BSP to
write monitor memory location to wake them up. Currently the hypervisor
will send SIPI to each AP and re-initialize them after the hypervisor
boots up. So APs can't respond to the wakeup requests from BSP anymore.

Fix: the hypervisor should send SIPI to the APs only after BIOS wakes up the AP.

Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2019-06-24 11:50:16 +08:00
Zhao Yakui
7e34be2d09 Always disable the iommu_snoop when enabling the IOMMU for GPU
The IOMMU for GPU doesn't support the snoop_control.
So the iommu_snoop is disabled.

This can fix the issue of consolefb in SOS.
2019-06-19 09:35:41 +08:00
Zhao Yakui
625d339961 Delete the hvlog boot parameter for SOS to workaround the kernel panic in acrn_hvlog_init 2019-06-10 13:36:26 +08:00
Zhao Yakui
879118b26f Enable two CPUS for UOS 2019-06-06 05:54:50 +00:00
Anitha Chrisanthus
4752ce0a1e hv: More changes to enable GPU passthru
Allow the IOMMU for GPU PCI device.

Signed-off-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2019-06-05 16:56:45 +08:00
Zhao Yakui
dcf8704af2 DM: Enable the GPU as pass-through for UOS
At the same time the "i915.alpha_support=1" should be added for UOS.
Otherwise the I915 driver won't be loaded.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2019-05-27 15:51:10 +08:00
Zhao Yakui
642e2b1dfa ACRN: Add the "i915.alpha_support=1" for SOS
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2019-05-27 15:50:06 +08:00
Zhipeng Gong
e5b21a2e90 dm: passthrough opregion to uos gpu 2019-05-27 15:49:56 +08:00
Zhipeng Gong
3a0f83ed73 dm: increase interrupt storm threshold for gpu passthrough 2019-05-27 15:49:50 +08:00
Zhao Yakui
c332443c5c ACRN: Initialize the depriv_boot env to avoid the uninitialized RSDP
Currently when get_rsdp is called, the EFI depriv_boot env is not initialized.
In such case it will fail to get the ACPI table.
On the old platform it still can parse the ACPI table from legacy platform.
But it will fail on the new platform.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2019-05-27 15:49:37 +08:00
Zhao Yakui
e8499054e2 ACRN: Change the board configuration for ICL-U board
This is the temporary workaround. Later it needs to be configured by adding
new board configuration.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2019-05-27 15:49:31 +08:00
Binbin Wu
b833e2f90c hv: vtd: fix a logic error when set iommu page walk coherent
Fix a logic error when set iommu page walk coherent.

Tracked-On: #3160
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-05-27 14:57:46 +08:00
Vijay Dhanraj
517707dee4 DM/HV: Increase VM name len
VM Name length is restricted to 32 characters. kata creates
a VM name with GUID added as a part of VM name making it around
80 characters. So increasing this size to 128.

v1->v2:
It turns out that MAX_VM_OS_NAME_LEN usage in DM and HV are for
different use cases. So removing the macro from acrn_common.h.
Definied macro MAX_VMNAME_LEN for DM purposes in dm.h. Retaining
original macron name MAX_VM_OS_NAME_LEN for HV purposes but defined
in vm_config.h.

Tracked-On: #3138
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-27 12:13:51 +08:00
Vijay Dhanraj
f010f99d67 DM: Decouple and increase kernel boot args length
Currently, we use STR_LEN for all checking the size of all the
acrn-dm parameters. But some parameters like kernel boot args
can grow based on different needs. For example, when kata launches
guest VM using acrn, the kernel boot args increases by 256 bytes
(i.e 1024 +256).

Just increasing STR_LEN will unnecessarily increase allocations
for other acrn-dm parameters. So decoupling only boot_args
length and increasing it to 2048.

PS: If other parameters like ramdisk path, kernel path,
elf_path etc. don't need 1024 bytes, we can reduce STR_LEN
to 256 or 512 bytes.

Tracked-On: #3138
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-27 12:13:51 +08:00
Victor Sun
f2fe35472b HV: remove mptable in vm_config
Define a static mptable array and each VM could index its vmptable by
vm id, then mptable is not needed in vm configurations;

Tracked-On: #2291

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-27 12:13:37 +08:00
Kaige Fu
26c7e372b1 Doc: Add tutorial about using VxWorks as uos
This patch adds tutorial about using VxWorks as guest.

Signed-off-by: Kaige Fu <kaige.fu@intel.com>
2019-05-24 08:59:05 -07:00
Xiaoguang Wu
b10ad4b311 DM USB: xHCI: refine the logic of CCS bit of PORTSC register
The CCS bit of PORTSC register should be set according to the mapped
native port connection status, use xdev->devices if equal NULL is not
enough due to devices only be clear in disable slot which can't reflect
the native connection state in some gaps.

Tracked-On: #3163
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-05-24 13:21:12 +08:00
Xiaoguang Wu
ae066689bb DM USB: xHCI: re-implement the emulation of extented capabilities
There are many quirks in Intel xHCI implementation and it is very hard
to debug under Microsoft Windows OS, hence use ACRN xHCI extented
capabilities as the default setting.

Tracked-On: #3163
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-05-24 13:21:12 +08:00
wenlingz
5f9cd25324 Revert "DM: Get max vcpu per vm from HV instead of hardcode"
This reverts commit 356bf18491.
2019-05-24 13:02:36 +08:00
yliu79
8bca0b1ae9 DM: remove unused function mptable_add_oemtbl
Change-Id: Icf92fd5bbbfe935960dc47307822827092a46369
Tracked-On: #3123
Signed-off-by: Ying Liu <ying2.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-24 11:51:00 +08:00
yliu79
bd3f34e952 DM: remove unused function vm_get_device_fd
Change-Id: I9056838bbf150983c8011706d3d0a07aed043917
Tracked-On: #3123
Signed-off-by: Ying Liu <ying2.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-24 11:51:00 +08:00
yliu79
9224277b5e DM: remove unused function vm_setup_ptdev_msi
Change-Id: Ia62d4a75ef6074cfd4f5b271ab21ff9ed0a64f51
Tracked-On: #3123
Signed-off-by: Ying Liu <ying2.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-24 11:51:00 +08:00
yliu79
bb8584dd4a DM: remove unused function vm_apicid2vcpu
Change-Id: I3bb503058df8e0048370f6c1ab77f63aadf1eb57
Tracked-On: #3123
Signed-off-by: Ying Liu <ying2.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-24 11:51:00 +08:00
yliu79
ec924385ae DM: remove unused function vm_create_devmem
Change-Id: I1d6b56688e533a00a484548ed97fd1968f01041d
Tracked-On: #3123
Signed-off-by: Ying Liu <ying2.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-24 11:51:00 +08:00
yliu79
75ef7e8458 DM: remove unused function vm_set_lowmem_limit
Change-Id: I0f9ad089b8e72c7ecd9c83a9115727140c945c4f
Tracked-On: #3123
Signed-off-by: Ying Liu <ying2.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-24 11:51:00 +08:00
yliu79
683e2416b1 DM: remove unused function console_ptr_event
Change-Id: If8dc5ba21d172a6794d86b048d61d9ccfc28cab4
Tracked-On: #3123
Signed-off-by: Ying Liu <ying2.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-24 11:51:00 +08:00
yliu79
12f55d1389 DM: remove unused function console_key_event
Change-Id: I6ab81750757fd12929fd60c9d7fa92fd96c9520b
Tracked-On: #3123
Signed-off-by: Ying Liu <ying2.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-24 11:51:00 +08:00
yliu79
aacc6e5926 DM: remove unused function console_refresh
Change-Id: I7ad16ecf3325e012fd738f2774aec6d957efd678
Tracked-On: #3123
Signed-off-by: Ying Liu <ying2.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-24 11:51:00 +08:00
yliu79
2711e553ce DM: remove unused function console_fb_register
Change-Id: I334b83c0b0a69f705c11ff7017a96dc6875e5c9a
Tracked-On: #3123
Signed-off-by: Ying Liu <ying2.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-24 11:51:00 +08:00
yliu79
d19d0e26c6 DM: remove unused function gc_init
Change-Id: I91f498b9ae98002bc86b78fce2a0836c508b3945
Tracked-On: #3123
Signed-off-by: Ying Liu <ying2.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-24 11:51:00 +08:00
yliu79
43c01f8e26 DM: remove unused function console_init
Change-Id: I5c06a1dd057cea0edd364c846958074ee3df4987
Tracked-On: #3123
Signed-off-by: Ying Liu <ying2.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-24 11:51:00 +08:00
yliu79
e6360b9b7f DM: remove unused function gc_resize
Change-Id: I82504374fed44f08d92910d0d34a02337d844fd0
Tracked-On: #3123
Signed-off-by: Ying Liu <ying2.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-24 11:51:00 +08:00
yliu79
d153bb8664 DM: remove unused function gc_set_fbaddr
Change-Id: I005edc5f69fcd3b4969c7c7d75f633d2219acbe5
Tracked-On: #3123
Signed-off-by: Ying Liu <ying2.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-24 11:51:00 +08:00
yliu79
475c51e53a DM: remove unused function console_set_fbaddr
Change-Id: Ia0d96880a53a7564492ec4d7943b3040e32dd6e0
Tracked-On: #3123
Signed-off-by: Ying Liu <ying2.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-24 11:51:00 +08:00
yliu79
4e7703161e DM: remove unused function swtpm_reset_tpm_established_flag
Change-Id: I8253df84ef490418e37ac3d565dcdc7bb8123f3b
Tracked-On: #3123
Signed-off-by: Ying Liu <ying2.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-24 11:51:00 +08:00
yliu79
2a33d52ec6 DM: remove unused function vrtc_reset
Change-Id: If0dbd40cf54eb81ca4ced9acae273d291e99b25c
Tracked-On: #3123
Signed-off-by: Ying Liu <ying2.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-24 11:51:00 +08:00
yliu79
1a726ce010 DM: remove unused function vrtc_get_time
Change-Id: I2074295234f8cfaf5f325bfbacab9c86779653bf
Tracked-On: #3123
Signed-off-by: Ying Liu <ying2.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-24 11:51:00 +08:00
yliu79
8cb64cc71f DM: remove unused function vrtc_nvram_read
Change-Id: I0b8c42879256e53762aeb031f63fc043ae2d9128
Tracked-On: #3123
Signed-off-by: Ying Liu <ying2.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-05-24 11:51:00 +08:00