Commit Graph

581 Commits

Author SHA1 Message Date
Long Liu 5ab68eb97b dm: hw: Replace sscanf with permitted string API
Replace sscanf in device model hw directory

Tracked-On: #2079
Signed-off-by: Long Liu <long.liu@intel.com>
Reviewed-by: Shuo A Liu <shuo.a.liu@intel.com>
Reviewed-by: <yonghua.huang@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-17 19:17:29 +08:00
Long Liu 63b814e7e9 dm: hw: Replace strlen with strnlen
Replace strlen function with strnlen function in device-model

Tracked-On: #2079
Signed-off-by: Long Liu <long.liu@intel.com>
Reviewed-by: Shuo A Liu <shuo.a.liu@intel.com>
Reviewed-by: <yonghua.huang@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-17 19:17:29 +08:00
Long Liu eab7cd47ae dm: hw: Replace sprintf with snprintf
Replace function sprintf with snprintf in device model

Tracked-On: #2079
Signed-off-by: Long Liu <long.liu@intel.com>
Reviewed-by: Shuo A Liu <shuo.a.liu@intel.com>
Reviewed-by: <yonghua.huang@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-17 19:17:29 +08:00
Xiaoguang Wu d2627ecfcc DM USB: xHCI: fix an issues for failing to enumerate device
This is an obvious bug, which releases memory but still access the
data on the released memory. It is risky operation, and may result
failing to do normal enumlation 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-17 13:31:00 +08:00
Xiaoguang Wu 1c3344b782 DM USB: xHCI: change log level for S3 process
The USB S3 virtualization logic is complicated and heavily affected by system
timing. To make the debugging work easily, change related log level to facilitate
quick bug fixing.

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-17 13:31:00 +08:00
Xie, nanlin ed5e210d91 Doc: Update GSG for v0.4 version and launch and acrn.conf sample script
Signed-off-by: Xie, nanlin <nanlin.xie@intel.com>
2018-12-15 10:12:44 -08:00
Yin Fengwei 73ab727434 dm: set correct thread name
When issue happen, we could identify which thread is impacted.
This could help stability issue debugging.

Tracked-On: #2037
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-14 19:50:50 +08:00
Jian Jun Chen cb31381561 dm: vhost: remove support for non-msix devices
irqfd only supports msix devices. In the current code a mevent is
added to poll the callfd from userspace to support intx devices.
This patch removes the support for non-msix devices since they are
not used in the current device model.

Tracked-On: #1877
Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-14 19:49:55 +08:00
Jian Jun Chen b29fc619af dm: virtio-net: apply new mevent API to avoid race issue
Teardown callback is provided when mevent_add is called and it is
used to free the virtio-net resources.

Tracked-On: #1877
Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-12-14 19:49:55 +08:00
Jian Jun Chen 4f36244fef dm: virtio-console: apply new mevent API to avoid race issue
Teardown callback is provided when mevent_add is called. A ref_count
is added to virtio_console data structure. Teardown callback needs to
free the resources of the backend and when the ref_count of the
virtio_console is zero the whole virtio-console is freed.

Tracked-On: #1877
Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-12-14 19:49:55 +08:00
Jian Jun Chen baf8f8bdbf dm: virtio-input: apply new mevent API to avoid race issue
Teardown callback is provided when mevent_add is called and it is
used to free the virtio-input resources.

Tracked-On: #1877
Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-12-14 19:49:55 +08:00
Xiaoguang Wu c2df4a8557 DM USB: xHCI: no wait logic implementation for S3
On Intel Apllo Lake platform, the VBus will drop after the SOC suspended,
hence during the SOS resuming process, there will be a disconnecting event
and a connecting event sent to each native USB device in order.

This patch will use new strategy for S3 resuming emultion.
  1. The DM set PORTSC register to 'no device attached' state when S3
     suspending started,
  2. SOS resuming starts and do nothing for device disconnecting event,
  3. 'Cache' device connecting event and don't report it to UOS,
  4. UOS believe no device attached due to PORTSC register state and
     begin to clear the resource allocated for the device before S3
     suspending,
  5. DM receives the Disable Slot command from UOS and report the 'cached'
     device connecting event to UOS, hence trigger the emulation behavior
     for the device.

The purpose of this strategy is to let UOS resuming proceed as quickly as
possible, which means the UI will be turned on quickly to user.

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-14 19:40:44 +08:00
Xiaoguang Wu 82659831f0 DM USB: xHCI: refine emulation for command XHCI_CMD_RS
According to xHCI spec 5.4.1.1, this command hasn't ask to clear
PORTSC for R/S handling. So the PORTSC should always present the
physical usb bus status.

The old implementation changes the PORTSC according whether the
pci_xhci_dev_emu struct is allocated, it is not consistent with
spec and 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-14 19:40:44 +08:00
Xiaoguang Wu e5c98e6d9a DM USB: add usb_dev_path_cmp function for convenience
Comparing two USB devices' path is frequently used operation, abstract
it as an seperated function for convenience.

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-14 19:40:44 +08:00
Xiaoguang Wu 6c1ca13767 DM USB: xHCI: remove the waiting 5 seconds wa for s3
This workaround will delay the UOS resuming for 5 seconds, this
behavior is not right and should be replaced by dynamic style.

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-14 19:40:44 +08:00
yingbinx 6b998580d6 Fix KW issues for tpm_emulator
There are several KW issues which uninitialized variables
are used. This patch will fix those KW issues.

Signed-off-by: weideng <wei.a.deng@intel.com>
Signed-off-by: yingbinx <yingbinx.zeng@intel.com>
2018-12-14 09:05:28 +08:00
Yang Liang fbaecde6bb DM USB: xHCI: Fix banned API issue.
In USB mediator, sscanf, strtok and atoi API is banned, so replace them
with permitted API function.

Tracked-On: #1254
Signed-off-by: Yang Liang <liang3.yang@intel.com>
Reviewed-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Reviewed-by: Shuo Liu <shuo.a.liu@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-13 13:24:55 +08:00
Peter Fang e835f5f5d2 dm: enforce data size when accessing PCI BARs
Always enforce data size when using BAR access functions.

Currently, the size serves as a hint to the BAR access functions and
these functions are expected to behave accordingly. Some of the access
functions, e.g. virtio ones, don't always truncate the data but expect
the caller to take care of the data size. This causes problems with
OVMF's virtio drivers during I/O instruction emulation because RAX can
contain junk bits that shouldn't be written to the device.

v1 -> v2:
- improve readability

Tracked-On: #1935
Signed-off-by: Peter Fang <peter.fang@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-12-13 13:22:44 +08:00
Peter Fang d8c4e7d367 dm: add option to boot OVMF from acrn-dm
Use '--ovmf <OVMF image location>' when launching acrn-dm.

Tracked-On: #1832
Signed-off-by: Peter Fang <peter.fang@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-12-13 09:56:09 +08:00
Peter Fang 9e97fd0680 dm: add BIOS/ROM image loading support at High BIOS region
Generic infrastructure for loading BIOS/ROM and providing EPT pages at
High BIOS region.

The size of High BIOS is rounded up to a multiple of 2MB.

v2 -> v3:
- refine mmap_hugetlbfs* to reduce code replication

v1 -> v2:
- make this code generic instead of OVMF-specific

Tracked-On: #1832
Signed-off-by: Peter Fang <peter.fang@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-12-13 09:56:09 +08:00
Peter Fang 653a57958b dm: query and save image size during initial checking
This is preparation for the upcoming High BIOS work.

Tracked-On: #1832
Signed-off-by: Peter Fang <peter.fang@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-12-13 09:56:09 +08:00
Yan, Like a80f08ebad dm: add launch_uos.args sample file for AaaG
A sample args file is added, which will be linked to /usr/share/acrn/conf/add/[vmname].args at integration time.
Because it is needed for AaaG one-key startup enabled build.

Tracked-On: #2040
Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-12-13 09:09:41 +08:00
Tw bb768904ab config: add up2-sbl board related configs
Add up2-sbl's stuff including (launch_uos script, sos_bootargs and hv
config).

Tracked-On: #1995
Signed-off-by: Tw <wei.tan@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
2018-12-12 13:23:28 +08:00
Junjie Mao 064a31067f tools: vmcfg: use defconfig instead of default values in Kconfig
The current vmcfg uses the default values in Kconfig when a previous .config
does not exist. This leads to additional complexity to silentoldconfig.py which
has different logic depending on the environment variable 'BOARD'. This also
blocks the effort to make the top-level Makefile recognize BOARD because any
environment variable set in the top-level Makefile cascades to the other
Makefiles, leading the work around above to fail.

This patch introduces a generic defconfig for vmcfg and simplifies
silentoldconfig.py to always fail when neither .config nor the specified
defconfig exists.

Tracked-On: #1995
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Tw <wei.tan@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
2018-12-12 13:23:28 +08:00
Jie Deng ed1c576d08 dm: pass mac seed not to use vm name
Physical NIC mac address is used for generate UOS mac address.
This patch uses a new parameters to pass this information
instead of vm name.

Tracked-On: #1987

Signed-off-by: Jie Deng <jie.deng@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-12-12 13:22:18 +08:00
Binbin Wu a1435f332b dm: bios: update vSBL to V1.1
vSBL Version 1.1
- Change:
	Update vFastboot to v1.1
	Pass vrpmb key to vFastboot.

Tracked-On: #2028
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
2018-12-12 12:53:41 +08:00
Jian Jun Chen 2ef06450dc dm: virtio-input: ignore all MSC events from FE
EV_MSC is configured as INPUT_PASS_TO_ALL in input driver. There is
a loop in the use case of virtio-input. They should not be forwarded
back to BE since they have already been sent to native driver before
sending to FE.

Tracked-On: #2006
Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-12 09:31:57 +08:00
Yin Fengwei 19fb5fa03c dm: adjust the sequence of destroy client and wait for vm_loop exit
To fix the issue that watchdog reset hang issue. At previous change,
we assume the reset comes from guest. But watchdog reset or dm killed
by signal is different. It's possible the vm_loop stick on ioreq
attaching.

The new fixing has two parts:
- fixing from kernel side to remove the race issue in ioreq attach,
  req_complete_notify and client destory.
- Move the client destroy before waiting of vm_loop exit.

Tracked-On: #1986
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Reviewed-by: Liu Shuo <shuo.a.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-12 09:13:53 +08:00
Long Liu c5d827ab1f ACRN: Add runC container sample config file
This patch adds the runC container config file, we will run acrn-dm
in runC container, and set acrn QoS parameters based on runC.
In the config file we mount SOS root directory to the container and
disable network/mount/ipc namespace.

Tracked-On: projectacrn/acrn-hypervisor#2020
Signed-off-by: Long Liu <long.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-12 09:11:52 +08:00
Yang Liang da0cf3af71 DM: xHCI: unbind slot id and ndevices relationship.
After mutiple usb devices send enable slot commnad and get slot id each
other, address device setup flow is not sorted by slot id. According to
current design, it will casue assert failure. This patch takes off this
restriction.

Tracked-On: #2017
Signed-off-by: Yang Liang <liang3.yang@intel.com>
Reviewed-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-12 09:11:29 +08:00
Yin Fengwei 7fce2462a0 dm: apply new mevent API to avoid race issue in mei
Pass teardown callback when add mevent in mei mediator code.
Which could avoid run_callback calling after the related data
structure is freed.

Tracked-On: #1877
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-07 20:21:33 +08:00
Yin Fengwei 64d9c59aa1 dm: enhence the mevent API
There is one race issue between mevent callback (which is called
in mevent_dispatch thread) and mevent_delete (which could be called
in dev thread). And the callback is called after mevent_delete.

libevent have the exactly same issue. The issue is decripted here:
https://github.com/libevent/libevent/blob/master/whatsnew-2.1.txt

The fixing is:
We introduce a teardown callback to mevent and make sure there is
no race issue between callback and teardown call.

This patch updates the mevent API and the caller as well.

Tracked-On: #1877
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-07 20:21:33 +08:00
Yin, Fengwei eec3a342c4 dm: fix the race issue in mevent_del
Peter, Thomas and Shuo raised one race issue in mevent_del. It
happens like following:

      Thread                     mevent_dispatch Thread
 mevent_delete_event
    epoll_ctl_del
    free(evp)
                               mevent_handle with freed evp

The fixing is adding sync between mevent_delete_event and
mevent_handle in mevent_dispatch.

      Thread                     mevent_dispatch Thread
 mevent_delete_event
    add evp to del_list
    notify mevent_dispatch
    return
                                  mevent_handle
                                  Remove evp from del_list
                                  Remove evp from epoll_fd
                                  closefd()
                                  free(evp)

Tracked-On: #1877
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-07 20:21:33 +08:00
ailin,yang 87e7bdb90c DM: updating launch_uos.sh
this patch is for updating path of the UOS image in launch_uos.sh script to adapt latest getting started guide, 

Tracked-On: #2003 
Signed-off-by: Ailun258 <ailin.yang@intel.com>
2018-12-07 19:31:25 +08:00
Yin Fengwei 3ca64c5b02 dm: add "break" removed by mistake.
The tpm patch delete the "break" for CMD_OPT_DEBUGEXIT branch.

Tracked-On: #1978
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-12-05 19:31:09 +08:00
Xiaoguang Wu 9d4b5d7e1b DM USB: add some preparing time for xHCI emulation before resuming.
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>
2018-12-04 19:59:00 +08:00
Xiaoguang Wu b159d66fb3 DM USB: refine the polling thread for libusb events
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>
2018-12-04 19:59:00 +08:00
Xiaoguang Wu 966c587260 DM USB: xHCI: fix potential NULL pointer issue.
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>
2018-12-04 19:59:00 +08:00
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
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
Minggui Cao e2d093989d DM: remove ignored pci device from SOS bootargs
now hypervisor will support to hide ignored PCI device from SOS,
it need not modify SOS PCI driver to support this feature.

Tracked-On: #1923
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-12-03 13:20:35 +08:00
Libin Yang 7f08ad8375 use 4 vqs
Signed-off-by: Libin Yang <libin.yang@intel.com>
Tracked-On: #1915
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-03 10:35:38 +08:00
Zhu Yingjiang 333629682a change the vq count and vendor id
Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
Tracked-On: #1915
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-03 10:35:38 +08:00
Pawel Furtak 9bf7dd5ddc Enable audio virtualization for AaaG
Based on existence of /dev/vbs_k_audio file
launch AaaG with proper audio virtualization mode

Signed-off-by: Pawel Furtak <pawel.furtak@intel.com>
Tracked-On: #1915
Reviewed-by: Yu Wang <yu1.wang@intel.com>
2018-11-30 15:16:16 +08:00
Junjie Mao 584f6b7255 doc: replace return with retval
`@return` is dedicated for brief description of return values, not for comments
stating actual return values. In addition, sphinx + breathe does not join
multiple adjacent `@return`. This results in multiple `Return` sections in the
generated document, which is confusing.

This patch replaces `@return` with `@retval` for the lists of return
values. Adjacent `@retval` can be joined into one list by breathe.

v1 -> v2:

* Replace return value descriptions like `negative` and `positive` with
  expressions like `<0` and `>0` in `@retval`.
* Keep the list of `@retval` comprehensive, even when there is a `@return` to
  generally describe what the return value means.
* Drop duplicated `@return` when it does not give more information than the
  `@retval` list.

Tracked-On: #1595
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2018-11-30 14:55:17 +08:00
Junjie Mao 97eb72a4a0 doc: always use 'None' for functions not returning a value
It is preferred to state the absence of a return value explicitly in the
doxygen-stile comments. Currently there are different styles of doing this,
including:

  @return None
  @return NULL
  @return void
  @return N/A

This patch unifies the above with `@return None`.

Tracked-On: #1595
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2018-11-30 14:55:17 +08:00
Zheng, Kankan cbe1b74eee HDCP virtio back-end driver
Initial HDCP back-end driver.

Signed-off-by: Romli, Khairul Anuar <khairul.anuar.romli@intel.com>
2018-11-30 14:45:24 +08:00