Commit Graph

2489 Commits

Author SHA1 Message Date
Xiaoguang Wu
5b39fd0ed3 DM USB: xHCI: fix error logic of allocating xHCI slot
The 'slot_allocated[]' field of pci_xhci_vdev is used as flag of
slot allocation. In current design, this variable is not set to
false in disconnection callback 'pci_xhci_native_usb_dev_disconn_cb'.
This patch is used to fix it.

Tracked-On: #1894
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Reviewed-by: Liang Yang <liang3.yang@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-04 19:59:00 +08:00
Xiaoguang Wu
32c4ce9b9a DM USB: xHCI: refine the xHCI S3 process
In the old implementation, function vm_get_suspend_mode is used
as the interface to check whether the UOS is in the S3, That is
not saft way.

This patch use Port Link State (PLS) to substitute the old logic.
According to xHCI spec 5.4.8, the PLS should be U3 during the
UOS is in the S3 state.

Tracked-On: #1893
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Reviewed-by: Liang Yang <liang3.yang@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-04 19:59:00 +08:00
Xiaoguang Wu
9e471d7258 DM USB: xHCI: refine the PLC bit emulation logic during S3
According to xHCI 5.4.8, the Port Link State Change (PLC) bit
should not be set to 1 during suspend process. This patch is used
to fix it.

Tracked-On: #1893
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Reviewed-by: Liang Yang <liang3.yang@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-04 19:59:00 +08:00
Xiaoguang Wu
29e81501c5 DM USB: xHCI: refine error handling logic for ctrl transfer
Under current implementation, when USB control transfer failed
with Endpoint Stall error, there is no response reporting to UOS.
This logic will result of timeout in UOS kernel and hence a longer
enumeration process.

This patch reports the Stall Error to UOS by xHCI Completion Event,
which will fix this issue.

Tracked-On: #1895
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Reviewed-by: Liang Yang <liang3.yang@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-04 19:59:00 +08:00
Shiqing Gao
f73cf21187 hv: fix 'Unused procedure parameter'
remove the unused procedure parameter

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-12-04 18:28:32 +08:00
Jie Deng
b261e74dd5 dm: virtio poll mode support for RT
Device trap has great impact on latency of real time (RT) tasks.
This patch provide a virtio poll mode to avoid trap.

According to the virtio spec, backend devices can declare the
notification is not needed so that frontend will never trap.
This means the backends make commitment to the frontends they have a
poll mechanism which don’t need any frontends notification.

This patch uses a periodic timer to give backends pseudo notifications
so that drive them processing data in their virtqueues. People should
choose a appropriate notification peroid interval to use this poll
mode. Too big interval may cause virtqueue processing latency while
too small interval may cause high SOS CPU usage. The suggested interval
is between 100us to 1ms.

The poll mode is not enabled by default and traditional trap
notification mode will be used. To use poll mode for RT with interval
1ms. You can add following acrn-dm parameter.

	--virtio_poll 1000000

Tracked-On: #1956
Signed-off-by: Jie Deng <jie.deng@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-04 18:27:53 +08:00
Shiqing Gao
7cc8566d37 hv: fixes related to unused API and uninitialized variable
This patch does:
- remove the unused API declaration
- fix use of uninitialized variable in instr_emul.c

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-12-04 16:49:49 +08:00
Chen Gang G
f0d3f1c984 HV: Remove some comments for crypto library
The code in comments was removed from md_wrap.c, so modify comments
to avoid confusion

Tracked-On: #1966
Signed-off-by: Chen Gang G <gang.g.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-12-04 16:48:22 +08:00
Li, Fei1
d7232ebb57 hv: trusty: refine struct trusty_mem
Since "uint8_t page[CPU_PAGE_SIZE]" wants to ensure the first_page only
took PAGE_SIZE memory space and aligned to PAGE_SIZE. However, it couldn't.
So just make it simpler.

Tracked-On: #861
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Reviewed-by: Qi, Yadong <yadong.qi@intel.com>
2018-12-04 15:14:36 +08:00
Li, Fei1
5fd6021dee doc: hv: add comments to timer APIs for documentation
This patch adds more comment to describe functions that are
interfaces to the other modules in the hypervisor. The comments
are in doxygen-style for document generation.

Tracked-On: #1595
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
2018-12-04 15:09:47 +08:00
David B. Kinder
2dbb0cbafc doc: fix citation references in modularity doc
Modularity Design doc had replicated references to citatation docs.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-12-03 21:04:23 -08:00
Junjie Mao
e2a8989ff4 doc: add a document on considerations and current status of hypervisor modularization
To kick off the efforts on modularization, this patch introduces a document
describing the goals and general principles of modular design as well as a brief
introduction on the current status of component/module decomposition.

A detailed assignment of source files to components will be added in the future.

v2 -> v3:

* Expand mailing list address in the doc

v1 -> v2:

* Add more description on complexity measures, cyclic dependency avoidance, and
  the reverse dependency of boot on hypervisor initialzation.
* Fix typos.

Tracked-On: #1842
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2018-12-03 20:49:28 -08:00
Xie Zhengtian
3b54dd2abd doc: add some "sudo" for code 2018-12-03 20:48:10 -08:00
Xie Zhengtian
945fdd8a4a doc: update the directory to "~/" 2018-12-03 20:48:10 -08:00
Xie Zhengtian
0ff74b1367 doc: delete "install build tool" about 2018-12-03 20:48:10 -08:00
Xie Zhengtian
1a959d0f54 doc: Update note for the directory of UOS image 2018-12-03 20:48:10 -08:00
Xie Zhengtian
e2e9a3e9b9 doc: Add the note for the directory of UOS image 2018-12-03 20:48:10 -08:00
Xie Zhengtian
1052242319 doc: add note for the directory of UOS image 2018-12-03 20:48:10 -08:00
Xie Zhengtian
099c605eda doc: Modify to "/boot/efi"
1. No more mount needed, use the directory "/boot/efi"
2. The kernel of UOS stored in "~/uos-kernel-build"
3. (Pending) the image of UOS stored in "~/" or "/root"
2018-12-03 20:48:10 -08:00
Xie Zhengtian
ceed310661 Update using_ubuntu_as_sos.rst 2018-12-03 20:48:10 -08:00
Xie Zhengtian
b1db77eb81 doc: Update the grub part and add code for NVMe 2018-12-03 20:48:10 -08:00
Xie Zhengtian
4b2e7f1123 Delete AGL about 2018-12-03 20:48:10 -08:00
Xie Zhengtian
be70145f4c Delete AGL about 2018-12-03 20:48:10 -08:00
Xie Zhengtian
96a2946d72 Delete AGL about 2018-12-03 20:48:10 -08:00
Xie Zhengtian
6c8c46af8f delete AGL about 2018-12-03 20:48:10 -08:00
Xie Zhengtian
ce89d26e76 Delete using_AGL_as_uos.rst 2018-12-03 20:48:10 -08:00
Xie Zhengtian
3d96e35643 Rename using_AGL_as_uos to using_AGL_as_uos.rst 2018-12-03 20:48:10 -08:00
Xie Zhengtian
90c27157e4 Create using AGL as UOS 2018-12-03 20:48:10 -08:00
Xie Zhengtian
2bc24f8789 Upload the images for "using_AGL_as_uos" 2018-12-03 20:48:10 -08:00
coneypo
12e66b989a Update using_ubuntu_as_sos.rst 2018-12-03 20:48:10 -08:00
coneypo
ecff0bf9e8 Update the layout of packages 2018-12-03 20:48:10 -08:00
coneypo
50f1783200 Update using_ubuntu_as_sos.rst 2018-12-03 20:48:10 -08:00
coneypo
1afb0f13c4 Update using_ubuntu_as_sos.rst 2018-12-03 20:48:10 -08:00
coneypo
06b2ab55e3 Update using_ubuntu_as_sos.rst 2018-12-03 20:48:10 -08:00
coneypo
e4941b2225 Update using_ubuntu_as_sos.rst 2018-12-03 20:48:10 -08:00
coneypo
65f21a77e2 Update the version of Ubuntu to 18.04 2018-12-03 20:48:10 -08:00
coneypo
abfa1c1644 update the length of * 2018-12-03 20:48:10 -08:00
coneypo
1664ba5fa7 Update using_ubuntu_as_sos.rst 2018-12-03 20:48:10 -08:00
coneypo
f3527c638c Update using_ubuntu_as_sos.rst 2018-12-03 20:48:10 -08:00
coneypo
e4b616d5fd Update using_ubuntu_as_sos.rst 2018-12-03 20:48:10 -08:00
coneypo
ab005bc8a8 Update using_ubuntu_as_sos.rst 2018-12-03 20:48:10 -08:00
coneypo
2d685a13ee Update with Clear Linux 26440 2018-12-03 20:48:10 -08:00
Shiqing Gao
b38629b85e hv: fix 'Space missing before or after binary operator'
This patch adds the necessary space before or after binary operator.

v1 -> v2:
 * minor fix related to integer
   [i - 1] ====> [i - 1U]

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
2018-12-04 09:16:04 +08:00
Huihuang Shi
e32b2b4c11 hv: remove dead code
remove dead code dump_lapic.

Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-12-04 09:12:49 +08:00
Huihuang Shi
42e38dfb53 hv: fix "No prototype for non-static function"
The function not used in extern c file, must add static.

Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-12-04 09:12:49 +08:00
Huihuang Shi
48b3cd92ed hv: fix "Expression is not boolean"
The result of evaluate expression,it's type should be boolean.

Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-12-04 09:12:49 +08:00
Shiqing Gao
11102cfa45 hv: change the param type of mmio_write**
Input parameter of mmio_write64/mmio_write32/mmio_write16/mmio_write8
should be 'void *addr' rather than 'const void *addr' since the object
pointed by 'addr' is modified in these operations.

This patch change the param type of mmio_write** and update its usage
accordingly.

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Reviewed-by: Li, Fei1 <fei1.li@intel.com>
2018-12-04 09:10:54 +08:00
Xie Zhengtian
daaff43350 doc: upload the images of UP2's serial port 2018-12-03 16:34:33 -08:00
coneypo
592bd51333 doc: update the serial port part of UP2 2018-12-03 16:34:33 -08:00
Shiqing Gao
dd43f3ba0a hv: replace CPU_PAGE_MASK with PAGE_MASK
replace CPU_PAGE_MASK with PAGE_MASK
These two MACROs are duplicated and PAGE_MASK is a more reasonable name.

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-12-03 15:14:57 +08:00