Commit Graph

4630 Commits

Author SHA1 Message Date
Junming Liu
e13c6dec92 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>
Signed-off-by: Junming Liu <junming.liu@intel.com>

Tracked-On: #4360
2020-01-23 15:15:38 +08:00
Junming Liu
9dd6ef600d 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.

Signed-off-by: Junming Liu <junming.liu@intel.com>

Tracked-On: #4360
2020-01-23 15:15:38 +08:00
Junming Liu
ca8f7fa4e4 dm:passthrough opregion to uos gpu
uos IGD driver need opregion when enable GVT-d.

This patch pass-thru opregion to uos gpu.
Here is the steps:
(1) set opregion gpa(guest physical addrress) 0xDFFFD000;
(2) get opregion hpa(host physical addrress);
(3) build EPT mapping for opregion.

v1 -> v2:
        * initialize the EPT mapping for passthrough GPU opregion region
        in passthru_init instead of reading the ASLS config space

v2 -> v3:
        * add EPT unmap when deinit
        * change some micro name

Tracked-On: #4360

Signed-off-by: Junming Liu <junming.liu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Liu XinYun <xinyun.liu@intel.com>
Reviewed-by: Shuo A Liu <shuo.a.liu@intel.com>
Reviewed-by: Wu Binbin <binbin.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2020-01-23 15:15:38 +08:00
Junming Liu
1c3aeab9ce dm:passthrough graphics stolen memory to uos gpu
gop driver and uos IGD driver will use
graphics stolen memory(gsm) when enable GVT-d.

This patch pass-thru gsm to uos gpu.

After set physical GPU gsm size 64MB in host BIOS:
Here is the steps:
(1) set gsm gpa(guest physical addrress) 0xDB000000;
(2) get gsm hpa(host physical addrress);
(3) build EPT mapping for gsm.

v1 -> v2:
        * initialize the EPT mapping for passthrough GPU gsm region
        in passthru_init instead of reading the BDSM config space

v2 -> v3:
        * add EPT unmap when deinit
	* change some micro name

Tracked-On: #4360

Signed-off-by: Junming Liu <junming.liu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Liu XinYun <xinyun.liu@intel.com>
Reviewed-by: Shuo A Liu <shuo.a.liu@intel.com>
Reviewed-by: Wu Binbin <binbin.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2020-01-23 15:15:38 +08:00
Junming Liu
c0d2238b35 dm:reserve 64M hole for graphics stolen memory in e820 table
Add 64M@0xDB000000 for GVT-d usage as below.
Currently, use 64M for graphics stolen memory,
gop driver and uos IGD driver will use this memory region.

start 	      end          size     Note
[0x 00000000, 0x 000A0000] 640K
[0x 000A0000, 0x 00100000] 384K
[0x 00100000, 0x 7ff00000] 2G-1M    lowmem-1M
[0x 80000000, 0x 88000000] 128M     [lowmem, +128M]
[0x DB000000, 0x DF000000] 64MB     graphics stolen memory for GVT-d
[0x DF000000, 0x E0000000] 16M 	    gvt
[0x e0000000, 0x100000000] 512M
[0x100000000, 0x140000000] 1G

Tracked-On: #4360

Signed-off-by: Junming Liu <junming.liu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Liu XinYun <xinyun.liu@intel.com>
Reviewed-by: Shuo A Liu <shuo.a.liu@intel.com>
Reviewed-by: Wu Binbin <binbin.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2020-01-23 15:15:38 +08:00
Junming Liu
ec4b4cf3ae dm:derive the prefetch property of PCI bar for pass-through device
Now the PCI bar uses the hardcoded prefetch property
for the pass-through device.
This doesn't work when trying to load windows GPU driver
for the pass-through GPU device.

For pass-through devices,
set the bar prefetchable property the same as physical bar.

Tracked-On: #4282

Signed-off-by: Junming Liu <junming.liu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2020-01-23 15:15:38 +08:00
Junming Liu
74672cc68b dm:keep pci bar property unchanged when updating pci bar address
When update pci bar addr,
DM may change the bar property by func pci_cfgrw.
PCI spec chapter 'Base Addresses' shows
bits 0~3 are readonly of memeory space BAR,
so this change won't happen.

This patch ensures pci bar property unchanged
when update pci bar addr.

Tracked-On: #4282

Signed-off-by: Junming Liu <junming.liu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2020-01-23 15:15:38 +08:00
Shuo A Liu
e15bb5f391 hv: Disable HLT and PAUSE-loop exiting emulation in lapic passthrough
In lapic passthrough mode, it should passthrough HLT/PAUSE execution
too. This patch disable their emulation when switch to lapic passthrough mode.

Tracked-On: #4329
Tested-by: Dongsheng Zhang <dongsheng.x.zhang@intel.com>
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-01-23 13:37:53 +08:00
Shuo A Liu
8af72acf97 hv: debug: show vcpu thread status in vcpu_list debug command
Due to vcpu and its thread are two different perspective modules, each
of them has its own status. Dump both states for better understanding
of system status.

Tracked-On: #4329
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-01-23 13:37:53 +08:00
Shuo A Liu
cb29f94b40 hv: Use HLT as the default idle action of service OS
This patch overwrites the idle driver of service OS for industry, sdc,
sdc2 scenarios. HLT will be used as the default idle action.

Tracked-On: #4329
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-01-23 13:37:53 +08:00
Shuo A Liu
655032e020 hv: HLT emulation in hypervisor
HLT emulation is import to CPU resource maximum utilization. vcpu
doing HLT means it is idle and can give up CPU proactively. Thus, we
pause the vcpu thread in HLT emulation and resume it while event happens.

When vcpu enter HLT, its vcpu thread will sleep, but the vcpu state is
still 'Running'.

VM ID    PCPU ID    VCPU ID    VCPU ROLE    VCPU STATE
=====    =======    =======    =========    ==========
  0         0          0       PRIMARY      Running
  0         1          1       SECONDARY    Running

Tracked-On: #4329
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-01-23 13:37:53 +08:00
Shuo A Liu
55b148ab01 hv: Add vlapic_has_pending_intr of apicv to check pending interrupts
Sometimes HV wants to know if there are pending interrupts of one vcpu.
Add .has_pending_intr interface in acrn_apicv_ops and return the pending
interrupts status by check IRRs of apicv.

Tracked-On: #4329
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-01-23 13:37:53 +08:00
Shuo A Liu
8e74c2cfd5 hv: vcpu: wait and signal vcpu event support
Introduce two kinds of events for each vcpu,
  VCPU_EVENT_IOREQ: for vcpu waiting for IO request completion
  VCPU_EVENT_VIRTUAL_INTERRUPT: for vcpu waiting for virtual interrupts events
vcpu can wait for such events, and resume to run when the
event get signalled.

This patch also change IO request waiting/notifying to this way.

Tracked-On: #4329
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-01-23 13:37:53 +08:00
Shuo A Liu
9927b021c5 hv: sched: simple event implemention
This simple event implemention can only support exclusive waiting
at same time. It mainly used by thread who want to wait for special event
happens.
  Thread A who want to wait for some events calls
	wait_event(struct sched_event *);

  Thread B who can give the event signal calls
	signal_event(struct sched_event *);

Tracked-On: #4329
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-01-23 13:37:53 +08:00
Shuo A Liu
5352463ceb hv: PAUSE-loop exiting support in hypervisor
As we enabled cpu sharing, PAUSE-loop exiting can help vcpu
to release its pcpu proactively. It's good for performance.

VMX_PLE_GAP: upper bound on the amount of time between two successive
executions of PAUSE in a loop.
VMX_PLE_WINDOW: upper bound on the amount of time a guest is allowed to
execute in a PAUSE loop

Tracked-On: #4329
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-01-23 13:37:53 +08:00
Deb Taylor
65bc460127 Updated grammer in ACRN industry scenario doc
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-01-22 09:16:50 +08:00
Xie, nanlin
7cc887ede2 doc: Modify CL version from 32030 to 31670
Signed-off-by: Xie, nanlin <nanlin.xie@intel.com>
2020-01-21 09:43:19 +08:00
Shuang Zheng
7c06895cb1 doc: reset clear linux version and ootb command in getting start guide
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
2020-01-16 13:59:20 +08:00
Jack Ren
6c554faab3 version: v1.5
Signed-off-by: Jack Ren <jack.ren@intel.com>
2020-01-10 19:34:15 +08:00
Deb Taylor
124b58c7da Doc: Updated one paragraph in re_industry doc.
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-01-10 09:23:20 +08:00
Deb Taylor
62c2778a5b Doc: Fixed spelling error in the acrn_config_tool file.
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-01-10 09:23:01 +08:00
Deb Taylor
c54ffa800f Doc: Style and grammar edits to GSG for ACRN Industry Scenario.
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-01-10 09:22:48 +08:00
Deb Taylor
63ea135bad Doc: Grammar updates to ACRN Config Tool doc.
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-01-10 09:22:34 +08:00
Victor Sun
123aadea7c doc: update some xml elements description
Signed-off-by: Victor Sun <victor.sun@intel.com>
2020-01-10 09:22:20 +08:00
Shuang Zheng
db43a7b870 doc: update getting start guide about clear linux version and ootb commands
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
2020-01-10 09:22:01 +08:00
fangfang.shen
9e3b713b3f doc: change version info
Signed-off-by: fangfang.shen <fangfang.shen@intel.com>
2020-01-10 09:21:46 +08:00
fuzhongl
f9721e297d Doc: releasenotes_1.5 update
adding this information to releasenotes:
Update to use ACRNGT GOP to install Windows

Signed-off-by: fuzhongl <fuzhong.liu@intel.com>
2020-01-10 09:21:32 +08:00
Deb Taylor
777ca4304b Doc: Grammar update to arcn_ootd.rst.
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-01-10 09:21:18 +08:00
fuzhongl
2c2bd9cd3b Doc: document update base on release_v1.5
Signed-off-by: fuzhongl <fuzhong.liu@intel.com>
2020-01-10 09:21:03 +08:00
Deb Taylor
6ec5db627d Doc: Grammatical edits to RN 1.5.
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-01-10 09:20:44 +08:00
fuzhongl
5e3e33486e Doc: releasenotes_1.5
Signed-off-by: fuzhongl <fuzhong.liu@intel.com>
2020-01-10 09:20:30 +08:00
Geoffroy Van Cutsem
e149f6dc0c doc: fix wrong Docker container image in tutorial
Fix the name of the Docker Container image that is used to build the kernel
for an RTVM (Preempt-RT kernel) when that image was built by the user
him/herself.

Tracked-On: #4322
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-01-10 09:20:12 +08:00
Deb Taylor
2f3546b6fa Doc: Added missing period in run_kata_containers file.
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-01-03 13:26:05 +08:00
lirui34
70a2847e70 doc: Update some of the wrong path in acrn configuration tool doc.
Signed-off-by: lirui34 <ruix.li@intel.com>
2020-01-03 13:25:52 +08:00
Geoffroy Van Cutsem
be3c7f99d2 doc: add more details to the Kata Containers with ACRN tutorial
* Add more details about Kata Containers and ACRN in the introduction
* Adjust and correct some of the instructions

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-01-03 13:25:39 +08:00
Deb Taylor
2d53d029ba Doc: Added Whiskey Lake specs to hardware ref page
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-01-03 13:25:26 +08:00
wenlingz
a5dbf41641 remove no support OS parts and add whl build
Signed-off-by: wenlingz <wenling.zhang@intel.com>
2020-01-03 13:25:13 +08:00
Conghui Chen
3660ff44d9 DOC: Content edits to CPU Sharing doc
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
2020-01-03 13:25:01 +08:00
Deb Taylor
4ad3c814f4 Doc: Content edits to Running Kata containers on a Service VM doc
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-01-03 13:24:49 +08:00
Deb Taylor
799b1bae9d Doc: More edits to CPU Sharing doc.
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-01-03 13:24:36 +08:00
Deb Taylor
55975688ad Doc: Add v1.5 release menu choice.
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-01-03 13:24:22 +08:00
Deb Taylor
6fc8aa2151 Doc: Content edit to cpu-sharing page
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-01-03 13:24:09 +08:00
Deb Taylor
6d6eab40e2 Doc: Content edit to rt_industry document.
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-01-03 13:23:56 +08:00
lirui34
a0c8f5845c doc: Add tutorial about how to launch kata vm.
Signed-off-by: lirui34 <ruix.li@intel.com>
2020-01-03 13:23:44 +08:00
fenglin.hu
10e0e33d8f doc: modify Configuration Tools
Signed-off-by: fenglin.hu <fenglin.hu@intel.com>
2020-01-03 13:23:32 +08:00
Conghui Chen
bb91377b7f doc: add document for cpu sharing
Add document and usage for cpu sharing.

Signed-off-by: Conghui Chen <conghui.chen@intel.com>
2020-01-03 13:23:18 +08:00
Deb Taylor
da1267b2d5 Doc: Content edits to Using WaaG VM on ACRN
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-01-03 13:23:06 +08:00
Deb Taylor
11cdaad03a Doc: Content edits to the introduction/index file.
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-01-03 13:22:52 +08:00
Deb Taylor
5fe2573218 Doc: Content edits to the acrntrace README file.
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-01-03 13:22:22 +08:00
Yuan Liu
c4e6924d66 doc: add windows 10 activation
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
2020-01-03 13:22:09 +08:00