Commit Graph

1064 Commits

Author SHA1 Message Date
Jie Deng 74203e39d9 dm: virtio_console: read only when the virtqueue is ready.
The read should not continue if the virtqueue is not ready.

Tracked-On: #5544
Signed-off-by: Jie Deng <jie.deng@intel.com>
2020-11-27 15:01:14 +08:00
Liu Long b37442564b DM: Add the return value check in case cause Null pointer exception
paddr_guest2host may return NULL, this patch checks the return value
to avoid null pointer dereference.

Tracked-On: #5514
Signed-off-by: Liu Long <long.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-11-18 09:51:42 +08:00
Tomas Winkler 9ab1110f80 dm: mei: vmei_proc_tx check buffer length before accessing the memory
Prevent memory and information leaks by checking boundaries of
the incoming buffers from the hypervisor.

1. We check that the buffer is sufficent to hold a valid header.
2. We that each hbm message has valid size
   vmei_hbm_handler() now returns -EINVAL if the size too small.
3. hdr->length < data_length.

Tracked-On: #5451
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-11-17 10:01:36 +08:00
Geoffroy Van Cutsem 14ea52c42f dm: update acrn-dm built-in list and description of args
Update and light clean-up of the buit-in list of arguments from 'acrn-dm'
* Added options in the top part (list with no explanation)
* Remove a couple of arguments that are no longer valid ('vmcfg' and 'dump')

Tracked-On: #5445
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-11-17 09:58:51 +08:00
Peter Fang 3d99082411 dm: support OVMF split images
In addition to a single OVMF image (OVMF.fd), split images
(OVMF_CODE.fd, OVMF_VARS.fd) can be used to facilitate VM management.

From the OVMF Whitepaper:

  The variable store and the firmware executable are also available in
  the build output as separate files entitled: "OVMF_VARS.fd" and
  "OVMF_CODE.fd". This enables central management and updates of the
  firmware executable, while each virtual machine can retain its own
  variable store.

An example to launch acrn-dm with the split images:

  --ovmf code=/usr/share/acrn/bios/OVMF_CODE.fd, \
  vars=/usr/share/acrn/bios/OVMF_VARS.fd

v1 -> v2:
- use memory-mapped file I/O for writeback
- use fcntl to lock OVMF image files

Tracked-On: #5487
Signed-off-by: Peter Fang <peter.fang@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-11-11 09:53:28 +08:00
Tomas Winkler 188ab4f85b dm: virtio: check for paddr_guest2host return value
paddr_guest2host can return NULL, but code paths in virtio
are not checking the return value.
_vq_record() initializes iov_base pointer using paddr_guest2host()
but there is nothing in the flow that checks for NULL.
Chane _vq_record to return -1 in case the address translation
has failed.

Tracked-On: #5452
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-11-06 15:08:30 +08:00
Sun Peng 73f21a41ad DM: gvt: Identical mapping for GPU DSM
Windows graphic driver obtains DSM address from in-BAR mmio register
which has passthroughed. Not like the other platforms obtained from
pci configure space register which has virtualized. So TGL has to
keep identical mapping to avoid trap mmio BAR to do the emulation.

To keep simple, this patch hardcode the TGL DSM region in vE820
table, this will cause memory waste here. In the near future, we
need refine the entire vE820 logic as it is hard to maintained
due to many reserved regions have introduced in recently.

Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
Tracked-On: #5461
2020-11-04 11:24:49 +08:00
Liu Long 853a50a2da ACRN:DM:xHCI Fix the unsigned integer conversion bug
When libusb_control_transfer function return a negative number, because
 the function clear_uas_desc's argument is unsigned int this will cause
 unsigned integer conversion.

Tracked-On: #5463
Signed-off-by: Liu Long <long.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-11-04 10:35:38 +08:00
Qian Wang 7bd0f7507e DM: add command line parameter for pSRAM
dm: pSRAM: added a command line parameter "--psram" to enable pSRAM
support for post-launched RTVM

Added "--psram" in DM command line to enable pSRAM support for
post-launched RTVM

Tracked-On: #5330
Signed-off-by: Qian Wang <qian1.wang@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-11-02 15:56:30 +08:00
Qian Wang 46afb946da DM: modify vE820 to adapt to pSRAM
dm: modify vE820 to adapt to pSRAM for post-launched RTVM

When pSRAM is enabled for post-launched RTVM, we add a segment in vE820 for
pSRAM, and therefore the lowmem RAM will be split into part1 and part2.
Also, code of post vE820 initialization is refined

Tracked-On: #5330
Signed-off-by: Qian Wang <qian1.wang@intel.com>
2020-11-02 15:56:30 +08:00
Qian Wang 2fdd1374a9 DM: add vPTCT for post-launched RTVM
dm: vptct: add vPTCT for post-launched RTVM

We added vPTCT support for post-launched RTVM:
1. Added a function create_and_inject_vptct. Currently, we
pass-through the whole pSRAM to one RTVM, so we will also pass-
through the PTCT to the very same RTVM. This function will
read the native PTCT from SOS and inject it into post-
launched VM's vACPI.
2. Added some definitions for vPTCT.

Tracked-On: #5330
Signed-off-by: Qian Wang <qian1.wang@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-11-02 15:56:30 +08:00
Tao Yuhong a371815462 dm: pci uart support create vuart-pci at HV land
If acrn-dm create pci vuart with
'-s,<slot>,uart,vuart_idx:<value>', then acrn-dm will not
create pci uart at DM land, but create an vuart-pci virtual device
at HV land.
When create a HV land vuart-pci vdev, user must specify its vuart id.
Which is defined in vm_config, is the acrn_vm_pci_dev_config.vuart_idx

Tracked-On: #5394
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-10-30 20:41:34 +08:00
Peter Fang d55dd1c0b9 OVMF release v2.3
- Explicitly reserve memory regions based on the input E820 map
- Revert "ovmf: reserve e820 table for PTCM"

Tracked-On: #5442
Signed-off-by: Peter Fang <peter.fang@intel.com>
2020-10-30 15:45:31 +08:00
Li Fei1 460124f984 dm: e820: refine e820 layout
We don't reserve PCI MMIO in e820 Table, it's included in DSDT ACPI Table.
About 0xA0000 - 0x100000 entry, we don't have any ACPI Table touch this region.
So we could remove it too.

After this change, we could only pass the reserved e820 table which we must
reserve to OVMF. In this case, the OVMF could trust ACRN-DM and pass the
reserved e820 table to guest instead of dropping it.

This patch needs the corresponding modify in OVMF. Otherwise, the guest could
not boot.

Tracked-On: #4550
Signed-off-by: Li Fei1 <fei1.li@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-10-30 15:45:31 +08:00
Peter Fang 830b7749de dm: correctly handle EAGAIN in pm_vuart when listening
pm_vuart stops listening and relays the message right away if it
encounters EAGAIN during read(). This causes the messages relayed to be
fragmented.

Only relay the message when it encounters a null character or a newline
character, or when the buffer is full.

Tracked-On: #5429
Signed-off-by: Peter Fang <peter.fang@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-10-29 10:11:25 +08:00
Yonghua Huang 30bbfa0d26 dm: confiure msix bar for hv-land ivshmem devices
This patch configures MSIX entry table bar for hv-land ivhsmem devices.

Tracked-On: #5407
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Li, Fei <fei1.li@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-10-26 08:44:13 +08:00
Li Fei1 53165c3332 dm: fix typo error to pass through TPM device
Fix typo error "--apicdev_pt HID" to pass through a TPM device. Fix it to
"--acpidev_pt HID"

Tracked-On: #5401
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-10-21 16:40:33 +08:00
Liu Long d85d66141c dm: fix fault Injection into VirtIO console backend
Add Null pointer check in init vq ring and add vq ring descriptor
check in case cause Nullpointer exception.

Tracked-On: #5355
Signed-off-by: Liu Long <long.liu@intel.com>
2020-10-19 11:08:32 +08:00
Liu Long 2c75f3606c dm: fix fault Injection into VirtIO console backend
Add Null pointer check in init vq ring and add vq ring descriptor
 check in case cause Nullpointer exception.

Tracked-On: #5355
Signed-off-by: Liu Long <long.liu@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-27 20:17:23 +08:00
Jie Deng 51d1d6fb12 virtio: add virtio callbacks check
We can only call these callbacks when they are not NULL.

Tracked-On: #5342

Signed-off-by: Jie Deng <jie.deng@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-24 11:41:48 +08:00
Yuan Liu fe722ba085 dm: refine ivshmem usage interface
Change shared memory name prefix from sos to dm
Change shared memory size unit from byte to megabyte

Tracked-On: #4853

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-15 09:41:43 +08:00
Peter Fang 3dff03eb66 OVMF release v2.2
- GvtGopDxe: Adjust the offset of gop in pvinfo page

Tracked-On: #5303
Signed-off-by: Peter Fang <peter.fang@intel.com>
2020-09-14 16:28:59 +08:00
Sun Peng 60df242643 dm: uart: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng fd671047ed dm: blockif: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng 31a9525fa8 dm: ioc: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng c655313abd dm: timer: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng 7beed5ca8a dm: tpm: Convert print output to acrn-dm logger
Refine the DPRINTF/WPRINTF to pr_* based log interface for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng db53212132 dm: rbmp: Convert print output to acrn-dm logger
Refine the DPRINTF/WPRINTF to pr_* based log interface for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng 2d2d5e6e28 dm: usb: Convert print output to acrn-dm logger
Refine the UPRINTF to pr_* based log interface for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng 3f37fabc2e dm: pci_passthrough: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng ac6111080c dm: npk: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng 6a3816c289 dm: gvt: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng 2a81061aae dm: gsi: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng 62c9745765 dm: pci_core: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng 72dbac0448 dm: ahci: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng 00a739cf32 dm: virtio: Convert console print output to acrn-dm logger
Refine the DPRINTF/WPRINTF to pr_* based log interface instead of printf directly.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng 7414a237b4 dm: mmio: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng a567cbf12f dm: core: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Liu Long c2d85b13d6 DM: xHCI: Add Null pointer check in Set TR Dequeue command
Add Null pointer check in Set TR Dequeue command handle function
 to avoid Null pointer exception. Fllow xHCI spec 4.6.10, for Set
 TR Dequeue pointer command, when the slot is not enabled the
 completion code should be Slot Not Enabled Error.

Tracked-On: #5263
Signed-off-by: Long Liu <long.liu@intel.com>
Acked-by: Yu Wang yu1.wang@intel.com
2020-09-03 13:50:34 +08:00
Liu Long b66e8797fa ACRN: xHCI: Fix Transfer TRBs error transfer handler
According to xHCI Spec 4.10.1 Transfer TRBS chapter, there have three
scenarios shall generate a Transfer Event TRB when transfer TRBS:
1. If upon transfer completion of a TRB the Interrupt On Completion(IOC)
flag is set, the xHC shall generate a Transfer Event TRB.
2. A Short Packet will trigger the generation of a Transfer Event TRB on
the Event Ring if the Interrupt-on-Short (ISP) or Interrupt On Completion
(IOC) flags are set in the TRB that the Short Packet was detected on.
3. The detection of an error during a transfer shall always generate a Transfer
Event, irrespective of whether the Interrupt-on-Short or Interrupt On Completion
(IOC) flags are set in the Transfer TRB.
When an error condition is encountered which requires an endpoint to halt; the xHC
shall stop on the TRB in error, the endpoint shall be halted, and
software shall use a Set TR Dequeue Pointer Command to advance
the Transfer Ring to the next TD.

Tracked-On: #5263
Signed-off-by: Long Liu <long.liu@intel.com>
Acked-by: Yu Wang yu1.wang@intel.com
2020-09-03 13:50:34 +08:00
Yonghua Huang 07ed6841f5 dm:Remove deprecated terms
- remove usages of maste/slave:

Tracked-On: #5249
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
2020-09-01 09:30:08 +08:00
Yuan Liu 91e2fcfecf dm: implement ivshmem inter-vm communication for hv-land
This patch is used to create and destroy an ivshmem device which
is emulated in hypervisor.

Tracked-On: #4853

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-08-28 16:53:12 +08:00
Yuan Liu 1d084073d6 dm: refine ivshmem creation and destruction
add create_ivshmem_from_dm and destroy_ivshmem_from_dm for
ivshmem device creation and destruction in dm-land

Tracked-On: #4853

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-08-28 16:53:12 +08:00
Yuan Liu a977d35e0c dm: add new ioctl to create and destroy a device
Add IC_CREATE_DEVICE and IC_DESTROY_DEVICE ioctls to create and
destroy an emulated device in hypervisor

v3: change IC_CREATE_DEVICE and IC_DESTROY_DEVICE to IC_CREATE_HV_VDEV
    and IC_DESTROY_HV_VDEV

Tracked-On: #4853

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-08-28 16:53:12 +08:00
Long Liu ab522e7517 DM: xHCI: Extend the max Native Bus number
Extend the max native USB bus number to 5. After IceLake platform, there
has 2 physical xHCI controllers in the SOC which involves 4 USB buses.

Tracked-On: #5172
Signed-off-by: Long Liu <long.liu@intel.com>
Acked-by: Yu Wang yu1.wang@intel.com
2020-08-12 10:39:41 +08:00
Wei Liu 72dab3f9dc acrn-config: refactor xmls/samples folder for acrn-config
Add xmls/samples folders under misc/vm_configs, and make soft link for
them.

Tracked-On: #5077
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-07-28 10:46:27 +08:00
Long Liu 03fdb297d6 DM: xHCI: Implement reset/stop endpiont error handler
Add Null pointer check in reset and stop endpoint command handle
function to avoid Null pointer exception. Fllow xHCI spec 4.6.8 and
4.6.9, for stop and reset endpoint command, when the slot state is
Disabled the error code should be Slot Not Enabled Error, when the
slot have been enabled by an Enable Slot Command the error code should
be Context State Error.

Tracked-On: #5066
Signed-off-by: Long Liu <long.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>

Signed-off-by: Long Liu <long.liu@intel.com>
2020-07-23 21:55:21 +08:00
Li Fei1 f13d5c25b6 dm: mmio_dev: add mmio device pass through support
We could add MMIO device pass through by two ways:
a) If the MMIO device only has MMIO regions and no ACPI Table touched, using
"--mmiodev_pt MMIO_regions",
b) If the MMIO device touches ACPI Table, using "--acpidev_pt HID"

Now only support TPM2 MSFT0101 MMIO device pass through through launch script
using "--acpidev_pt MSFT0101". When we want to pass through the TPM2 deivce,
we would not allow to emulate the vTPM2 at the same time. This is becuase
the ACRN-DM emulate the TPM2 as MSFT0101 too. Otherwise, the VM can't boot.

Besides, we could only support one TPM2 device PT and one MMIO device PT.
For TPM2 device PT, the MMIO resources are hard-coded. For the MMIO device PT,
we could pass through the MMIO resources on the cmdline.

ToDo:
1. We may use HID to discover the MMIO regions and ACPI Table instaed of
hard-coded.
2. To identify a MMIO device only by MMIO regions.
3. To allocate virtual MMIO regions in a reserved guest MMIO regions.

Tracked-On: #5053
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-07-23 20:13:20 +08:00
Li Fei1 158f3d17a2 dm: mmio_dev: add hypercall to support mmio device pass through
Add two hypercalls to support MMIO device pass through.

Tracked-On: #5053
Signed-off-by: Li Fei1 <fei1.li@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
2020-07-23 20:13:20 +08:00
Long Liu 4b03f3002e DM: PT: Add "d3hot_reset" sub-parameter for passthrough device
Some passthrough devices have no reset mechanisms which cause the device stay
in unknown status during boot/reboot flow. And such unknown status cause
unexpected behaviors in the guest. Except the ordinary reset mechanisms
like FLR, we can utilize enter/exit D3cold as the reset that D3cold will
power gate the entire hardware. But the D3cold is implemented as ACPI
method which has no user interface in the SOS side. But the D3cold is
implemented as ACPI method which has no user interface in the SOS side.
But base on our experience, some devices can utilize D3hot instead of
D3cold. But it is not useful for all PCI devices as the power status
of D3hot is implementation defined.
Provide one new API to program PowerState(D0/D1/D2/D3hot) in PMCSR
register.
Add "d3hot_reset" sub-parameter for passthrough device to enable utilize
enter/exit D3hot flow to implement reset mechanisms.

Tracked-On: #5067

Signed-off-by: Long Liu <long.liu@intel.com>
Reviewed-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2020-07-23 10:10:27 +08:00