If module acrn_hvlog is configured as "m" and we don't insert it before
launching acrnlog tool, acrnlog will run normally instead of throw
out an error in current implementation. And no log files are generated.
It will cause confusing here.
So, this patch throw out an error massage to user about the absence of acrn
hvlog devices.
BTW, this patch replaces cpuid/num related concept to devid/cnt which is more
suitable for /dev/acrn_hvlog_xxx.
Tracked-On: #1975
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
If module acrn_trace is configured as "m" and we don't insert it before
launching acrntrace tool, acrntrace will run normally instead of throw
out an error in current implementation. And no trace files are generated.
It will cause confusing here.
So, this patch throw out an error massage to user about the absence of acrn
trace devices.
BTW, this patch replaces cpuid/num related concept to devid/cnt which is more
suitable for /dev/acrn_trace_xxx.
Tracked-On: #1975
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
On platforms, that do not support APICv register virtualization, all the
x2APIC MSRs need to intercepted by ACRN for emulation.
Tracked-On: #1973
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
If the USB kernel drives and devices of SOS are not available and
functional ready after UOS is resumed from frozen state, the comming
USB command from UOS will cause a disaster because the DM has no
resourse to to emulation.
This patch add a dynamic time span (could change according to number
of native USB devices attached) to give USB drivers and devices of
SOS an opportunity to be ready.
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>
The thread function usb_dev_sys_thread is the source of libusb events,
which is also the basis of USB/xHCI emulation. During S3 process,
function libusb_handle_events_timeout may fail and return -1, which
could result of exit of the thread (BTW, this failure is resulted from
USB native reseting behavior during S3). Under this situation, the emulation
of USB/xHCI could never continue.
This patch fix this issue by continuing to call libusb_handle_events_timeout
even it reture -1. The return value will be finally ok after S3 process is
completed.
This patch will continue poll after failure and hence fix this issue.
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>
During S3 process, the dev in the function pci_xhci_device_doorbell
may be set to NULL when disconnection is detected by DM. This patch
is used to remove this risk.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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"
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>