Commit Graph

287 Commits

Author SHA1 Message Date
Xinyun Liu 4344832700 Revert "DM sample: force enabling HDMI1 and HDMI2 connectors"
This reverts commit 47116e8c4b.

if eDP panel connected, something wrong happens:

eDP	HDMI1	HDMI2
---------------------------------------------------------
SOS	UOS1	UOS1	Good.
SOS	UOS1		BAD. SOS is OK. NO show in HDMI1
SOS		UOS1	BAD. SOS is OK. NO show in HDMI2
SOS			BAD.

This is also a temp solution: if only HDMI2 is connected, SOS will be
shown on HDMI2. But UOS1 is expected in some cases.

Signed-off-by: Xinyun Liu <xinyun.liu@intel.com>
Reviewed-by: Min He <min.he@intel.com>
2018-07-24 12:49:31 +08:00
Huihuang Shi bd6979925c fix assign.c interger violations
fix all assign.c integer violations except related
"Implicit conversion: actual to formal param".

Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-07-23 10:31:57 +08:00
Xiaoguang Wu 9ac1be2c5e DM USB: enable isochronous transfer
Enable isochronous transfer to support related USB devices

Change-Id: Id9fe0714e937fafc47de090ba6d349713cbe1b8b
Tracked-On:
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-07-20 10:42:34 +08:00
Xiaoguang Wu b95f93927b DM USB: temporary solution for corner case of control transfer
In the process of implementation for USB isochronous transfer, the
timeout (100ms) is not enough for Plantronics USB headset. So pass
longer timeout (300ms) to function libusb_control_transfer will
make USB headset of Plantronics work.

This change only results a longer execution time in ENUMERATION process
for few devices like Plantronics USB headset which need more time to do
its internal operations. For most USB devices, time less than 100ms are
enough to complete the execution of libusb_control_transfer. So basically
it will not affect the whole system performance.

In the long term, a better solution (eg: async control transfer) will be
introduced to replace current implementation.

Change-Id: I380e0cc337ec5741b1e4ce989abacce826b7dde4
Tracked-On:
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-07-20 10:42:34 +08:00
Xiaoguang Wu 3389e83177 DM USB: add some BCD codes
BCD code is USB Specification Release Number in Binaray-Coded
Decimal. Add some BCD codes for some USB devices.

Change-Id: I40f04ef2ebaf5b0da554ff8f432415e8e3cebe01
Tracked-On:
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-07-20 10:42:34 +08:00
Xiaoguang Wu b9597d4fa8 DM USB: xHCI: add microframe index(MFINDEX) register emulation support
Add microframe index register support, which is an important timing
component for isochronous transport.

Change-Id: I615664275b539cfb713d7795edd3f213b0302b92
Tracked-On:
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-07-20 10:42:34 +08:00
Xiaoguang Wu a49d483cd0 DM USB: process LIBUSB_TRANSFER_STALL error
Handle the LIBUSB_TRANSFER_STALL error comes from libusb.

Change-Id: Id6911e9aaffafb256def5265a0ed9778b147d99a
Tracked-On:
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-07-20 10:42:34 +08:00
Xiaoguang Wu 640d896508 DM USB: change TRB ring processing logic for ISOC transfer
Current ring buffer processing logic assumes every transaction
will be submited to physical device before next transaction
coming. So it use two states 0 (free) and 1 (used) to represent
the state of every data block in the ring buffer. With the help
of the two state, the ring buffer could accept and process data
normally.

But this logic is not proper for ISOC transfer, which generally
submits many transactions even none of them arrive the physical
device. So this patch uses three values to represent the state
of data block in the ring buffer:
USB_XFER_BLK_FREE: this block could be filled with new data;
USB_XFER_BLK_HANDLING: this block is submited to physical device
but response from device is still not received;
USB_XFER_BLK_HANDLED: this block has been processed by physical
device.

The new logic will do different things for each state, which will
make the ISOC transfer work successfully.

Change-Id: I5559cae24c739633289742d64dd51751797b81a7
Tracked-On:
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-07-20 10:42:34 +08:00
Xiaoguang Wu d24213db2d DM USB: xHCI: fix xhci speed emulation logic
The xHCI speed emulation is not right, which will cause failure
during enumeration of certain USB device. This patch is used to
fix it.

Change-Id: I2d996298983882ed6921a75a10dec9e8684a393e
Tracked-On:
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-07-20 10:42:34 +08:00
Xiaoguang Wu d6cc701c89 DM USB: refine logic of toggling interface state
Refine the logic of usb interface state transition.

The libusb uses two pair of APIs to deal with usb interface:
1. libusb_claim_interface & libusb_detach_kernel_driver;
2. libusb_release_interface & libusb_attach_kernel_driver.

The calling sequences of those APIs are very important, so this
patch add some error handling code to make this process more
robust.

Change-Id: I0f7950aae806dee9a21f16cc293f51609eede0d8
Tracked-On:
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-07-20 10:42:34 +08:00
Xiaoguang Wu 531712405e DM USB: xHCI: add support for USB 3.0 devices
This patch is used to add support for USB 3.0 devices. Currently
USB 3.0 disk is supported and tested successfully.

Change-Id: I3fbfbe9c28bc4b14af0417104f8fa822f9758908
Tracked-On:
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-07-20 10:42:34 +08:00
Xiaoguang Wu 8317dea64c DM USB: fix guest kernel short packets warning
There are many 'short packet' warnings in the UOS kernel dmesg output,
which are result from bad short packet identification algorithm. This
patch is used to fix it.

Change-Id: Idfa0b87fc96893b80d5c9fe8dab4db35aa5bfe84
Tracked-On:
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-07-20 10:42:34 +08:00
Xiaoguang Wu 7431a9021c DM USB: add code for error processing
add error processing logic for error code from libusb.

Change-Id: I39883ddcb0ad80bcd8304b887cd4d2f32da3fa22
Tracked-On:
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-07-20 10:42:34 +08:00
Xiaoguang Wu 00fbfd6da3 DM USB: fix an USB endpoint reset flow issue
Original code will reset the whole USB device when xHCI Reset
Endpoint command is received, this behavior is not right. This
patch is used to fix it.

And according to xhci spec 4.6.8, if the endpoint is not in the
halted state, xHC should reject to execute this command and the
Context State Error should be returned. This patch also add this
logic.

Change-Id: I55a5918148d82d103fb3eb27d582f9676f9f61d3
Tracked-On:
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-07-20 10:42:34 +08:00
Xiaoguang Wu cb938870b4 DM USB: modify some logs to help debug
Mainly change the logs for transfer submission and completion,
which are very important parts in USB emulation code.

Change-Id: I4e04f1426e164ca3693e70946ed51380201e49ee
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-07-20 10:42:34 +08:00
Xiaoguang Wu aecb67bcea DM USB: support multiple interfaces USB device
This patch correct the USB request type which set wrong direction in
original code. It caused these important usb control transfer packets
send to phsical USB devices via libusb_control_transfer instead of
calling standard libusb APIs, likes libusb_set_configuration. From
libusb document, this is not the correct way:

"You should always use this function rather than formulating your own
SET_CONFIGURATION control request. This is because the underlying
operating system needs to know when such changes happen."

Change-Id: I7a6aade326220bee3b685086584920dacd37f87c
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-07-20 10:42:34 +08:00
Junjie Mao 3571afc683 HV: hypercall: revisit types in structure parameters
While fixing the MISRA C violations related to integral types, we have unified
the type of the following data:

    uint8_t:
        phys_pin, virt_pin, vpic_pin, ioapic_pin, vioapic_pin

    uint16_t:
        vm_id, pcpu_id, vcpu_id, vpid

    uint32_t:
        vector, irq

This patch revisits the types of the fields in vhm_request as well as the
structures used as parameters in the hypercalls, and make them aligned with the
types the hypervisor uses for such data. Reserved fields are added to keep the
size and layout of the structures. Implicit paddings are also made explicit as
reserved fields.

Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-07-19 14:38:15 +08:00
yuhong.tao@intel.com 9695d3bd15 tools: replace payload[0] of struct mngr_msg with an union
acrn-manager message structure has a flexible member
payload[0], that risks to out-of-boundary memory access,
and usage of uninitialized variable.
And the req/ack message pairs has various types, which
extend mngr_msg. mngr_send_msg() requires programmer cast
the type of input messages to struct mngr_msg, that is
inconvenient.
We replace payload[0] with an union, which contains all
payload data. So that type cast for mngr_send_msg() is no
longer needed. And we can avoid potential out-of-boundary
memory accessing and using of uninitialized variable

Acked-by: Yan Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2018-07-19 11:08:18 +08:00
Huihuang Shi f2774e496b HV:common:fix "integer type violations"
fix integer type violations,keep some violations which
related to hypcall and msix_entry_index.

V1->V2:1.modified API_MAJOR_VERSION from Makefile
       2.sync acrn_common.h changed to device model

Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-07-18 12:31:14 +08:00
Yin Fengwei 9878543356 DM: add system reset (with RAM content kept)
This function add high level reset_vdev function. Which is
implemented to call deinit/init pairing to emulate the virtual
device reset operation.

This patch also add the system reset which keep the UOS RAM
content functionality to DM.

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-07-17 14:11:12 +08:00
Yin Fengwei b33012aee8 DM: add vm reset API
vm reset API will be used by guest system reset and S3.

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-07-17 14:11:12 +08:00
Yin Fengwei 8d12c06270 dm: introduce system/full reset and suspend
Guest has erquirement to support system/full reboot and S3. Which could
trigger different reset path in guest

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-07-17 14:11:12 +08:00
Yin Fengwei 76662a634f loader: Update the memory address of GUEST_CFG_OFFSET
GUEST_CFG_OFFSET is used to pass the memory top info from DM
to HV. The address should be in E820 reserved range to prevent
guest use it for other purpose.

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-07-17 14:11:12 +08:00
ailin,yang 11239ae654 update launch_uos.sh to align with ACRN v0.1
update the kernel version to align with ACRN v0.1 and Clear version for UOS

Signed-off-by: ailun258 ailin.yang@intel.com
2018-07-17 11:53:49 +08:00
Jie Deng 6ad150834f dm: virtio-net: add variable name in function declaration
We should keep variable name in function declaration. It makes
things clearer and easier to be understood.

Signed-off-by: Jie Deng <jie.deng@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-07-13 13:08:32 +08:00
Yonghua Huang 83361018b5 DM: Fix potential buffer overflow and uninitialized variable
- @'rpmb_check_frame()', avoid buffer overflow access
    when calling 'memcmp()'

Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
2018-07-12 17:32:20 +08:00
Liang Yang d3e8c29d0e DM USB: xHCI: Update the native DRD interfaces.
There has one new DRD driver followed usb role framework which is just
upstreamed to Linux community. This patch updates the xHCI DM to be
compatible with it. DM DRD code follows DRD spec to implement and make
it more reasonable.

Signed-off-by: Liang Yang <liang3.yang@intel.com>
Reviewed-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-07-10 13:42:17 +08:00
Liang Yang c638010b66 DM USB: xHCI: Set correct PCI VID/PID for APL DRD cap.
For dedicated xHCI extended capability, it need set corresponding PCI VID/PID.
This patch sets the Intel Apollo Lake platform PCI VID/PID for DRD
capability which will be checked for enabling DRD fucntion in new DRD
driver. Besides, this patch refines the PCI VID/PID related code.

Signed-off-by: Liang Yang <liang3.yang@intel.com>
Reviewed-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-07-10 13:42:17 +08:00
Yin Fengwei 7ed292eeef DM: extend i6300esb device to support watchdog timeout query
6300esb has bit in its register to show whether the watchdog
timeout is hit.

This patch adds this bit support. So the guest could query
whether last reset is triggered by watchdog reset.

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Reviewed-by: Cao Minggui <minggui.cao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
Tested-by: Binbin Wu <binbin.wu@intel.com>
2018-07-10 11:53:42 +08:00
Yuan Liu 1f54b92170 lpc: resolve UOS boot-up issue caused by lpc.
The lpc dm causes that UOS can't boot if the parameters are set incorrectly,
it is not friendly to users.

This patch optimizes the lpc error handle flow. UOS always can boot successfully
whatever the lpc settings are.

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
2018-07-10 11:52:52 +08:00
Zhao Yakui a0fbb2da8c DM: Add boot option of "i915.enable_guc_submission=0" to disable guc submission on UOS
Now the guc loading is disabled on UOS. In such case it won't use
"GUC" mode to submit the GPU commands. So it is disabled explicitily
to avoid the useless check on UOS. This is also aligned with that on SOS.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: He, Min <min.he@intel.com>
2018-07-10 11:16:44 +08:00
Zhao Yakui 018aac6b86 DM: Add UOS boot option of "i915.enable_guc_loading=0" to fix incorrect memory allocation on APL-NUC
The Global GTT on i915 GPU is allocated from SOS based on the partition rule.
As there is no parameter of "enable_guc_loading" for UOS, it causes that the
allocated range of Global GTT is beyond the supported range on UOS. Then the
i915 driver fails to be loaded.

V1->V2: Fix one typo error. It should be "i915.enable_guc_loading=0"
instead of "i915.enable_guc_loading=1".

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: He, Min <min.he@intel.com>
2018-07-10 11:16:44 +08:00
Jason Chen CJ 09859348d8 samples: add cma reservation into sos cmdline
it's needed for trusty memory reservation.

Tracked-on: ccm0001001-242199
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-07-10 11:03:49 +08:00
Xiangyang Wu 49d1dc1534 HV:treewide: Clean up -1U or -1UL
According to C99 standard, -1 integer constant with 'U/UL'
suffix has no type.

To explicit the integer constant:
Update -1U or -1UL as ~0U or ~0UL, or invalid number according
to usage case.

V1-->V2:
	Update parameter name and type of send_startup_ipi since
	the second parameter is used as pcpu_id;
	Update related comments for code clearity.
V2-->V3:
	Update comments of struct acrn_irqline;
	rename  cpu_startup_dest as dest_pcpu_id in the second
	parameter of send_startup_ipi.

Tracked-on: ccm0001001-247033
Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-07-10 10:27:33 +08:00
Jack Ren d924482ca7 hv: update versioning scheme
* introduce EXTRA_VERSION to replace RC_VERSION
* add daily tag into the version information
* unify the hypervisor and device model version

Signed-off-by: Jack Ren <jack.ren@intel.com>
2018-07-09 18:12:14 +08:00
Madeeha Javed 078178b23b DM: Fixes issue #592 NHLT is not detected on audio passthru.
When XSDT is created by DM, if audio passthru is enabled for
audio device (0:e:0), an entry is added in XSDT that references
the NHLT table. With this fix, NHLT appears in the kernel boot
log for ACPI and entry can be seen in /sys/firmware/acpi/tables/NHLT.

Signed-off-by: Madeeha Javed <madeeha_javed@mentor.com>
2018-07-09 13:10:00 +08:00
Fei Jiang 3b6c885286 launch_uos: remove enable_initial_modeset for UOS
Some UOS need use FB device to display, while initial_modeset will disable fb,
so we need remove correlation between plane restriction and initial modeset
in kernel driver, also don't need set enable_initial_modeset in launch script.

Signed-off-by: Fei Jiang <fei.jiang@intel.com>
Reviewed-by: Min He <min.he@intel.com>
2018-07-09 09:25:47 +08:00
Junjie Mao d457874cf5 treewide: instr_emul: rename vm_reg to cpu_reg
The current register names in instr_emul are misleading since the register names
are not VM-specific. Rename VM_REG(_GUEST) to CPU_REG in both the hypervisor and
device model.

v1 -> v2:

    * Introduced.

Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2018-07-05 13:14:07 +08:00
Huang Yang 0621b24819 DM: Add write sync in fwrite
An immediate reset or power down will cause a loss of write content.
The cause is the data write to disk is at cache within a short
time window before it's synced to storage media.
An explicit fsync() forces to sync the data to storage to prevent
the data loss of such immediate reset.

Signed-off-by: Huang Yang <yang.huang@intel.com>
Signed-off-by: duminx <minx.du@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-07-05 11:38:06 +08:00
Huihuang Shi b3fa2efe56 public:fix "signed/unsigned conversion without cast"
Misra C required signed/unsigned conversion with cast.

V1->V2:
  a.split patch to patch series

Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-07-04 12:18:38 +08:00
Yonghua Huang 61cd6946d0 DM: Remove 'strictio' from UOS bootargs' options
- UOS will boot fail if 'strictio' is enabled ('-e' option), in this
   case (with '-e'), device model will block all PIO accesses whose
   handlers were not registered, after that, device model program will
   exit, hence UOS boot fail.

   actually, such kind of accesses exist, e.g. UOS would program
   PIT registers (port address: 0x43) if hpet is disabled.

 - For debug, we can trap unexpected PIO access in 'default_inout()'

Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
2018-07-02 12:33:52 +08:00
Li, Fei1 6f097b1633 dm: remove set vm memory by cma
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2018-06-29 13:11:48 +08:00
Li, Fei1 652e37e908 dm: use hugetlb by default
use hugetlb to set vm memory by default.

Signed-off-by: Li, Fei1 <fei1.li@intel.com>
2018-06-29 13:11:48 +08:00
Shuo Liu 1c605a4f50 build: Using id tool to get builder username
Some build environment might has no USER pre-defined. So use id tool to
get builder username instead of USER environemnt.

Also add a version cleanup for tools to keep them updated.

Signed-off-by: Shuo Liu <shuo.a.liu@intel.com>
Acked-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-06-29 11:55:03 +08:00
Edwin Zhai 81b113cfa5 DM: add 'reset' option for ptdev
WIFI dev has no FLR, so 'reset' in sysfs calls secondary bus reset,
which cause PCI configuration mess(all FF) then passthrough failure.
To fix it, this patch makes no reset before passthrough by default,
until append this option.

Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-06-29 09:50:15 +08:00
Edwin Zhai 15f651e5ab DM: change passthrough parameter
Use right parameter in launch_uos.sh after updating prefer_msi option

Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-06-29 09:50:15 +08:00
Edwin Zhai b4aa981bc0 DM: make removing vGSI capability option as local
Current option of removing vGSI capability is global, which exposes
vIOAPIC link for all ptdev even only one need this. This patch makes
it as ptdev local option to lower the system level impact. To keep
vGSI for MSI capable ptdev, just explicitly append ",keep_gsi" in
option list, like "-s 14,passthru,0/e/0,keep_gsi"

Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-06-29 09:50:15 +08:00
Edwin Zhai dafca1743d DM: reset each ptdev before assignment
This helps achieving valid dev state after UOS restart

Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-06-29 09:50:15 +08:00
Shuo Liu 4ec690fde3 DM/samples: remove clocksource assignment
HPET reading is much slower than TSC. Using it will hurt SOS performance
a lot, and then the whole system performance.

Remove the strict assignment from cmdline. Then SOS kernel will pickup
TSC as default clocksource.

Signed-off-by: Shuo Liu <shuo.a.liu@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-06-29 00:50:01 +08:00
Li Zhijian fcbc56439c DM: virtio_rnd: fix rnd->fd and vbs_k->fd leak
Previously, either rnd->fd or vbs_k->fd isn't be closed in some cases.
this patch will close them in time.

V2: fix vbs_k->fd leak as well

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
2018-06-29 00:50:01 +08:00