Commit Graph

1893 Commits

Author SHA1 Message Date
Liang Yang 14bc961f03 DM USB: xHCI: remove old hub support code.
Previous design use bus and port(root hub port) for the identification
to the native USB device. It cannot work properly under the multi-hub
situation due to external USB hub is introduced.

This patch removes old hub implementation code, and subsequent patches
will be add support for mutiple hubs.

Tracked-On: #1434
Signed-off-by: Liang Yang <liang3.yang@intel.com>
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-10-19 22:39:50 +08:00
Victor Sun 8b5d357f92 HV: move default ACPI info to default_acpi_info.h
Given the reality that some of ACPI configrations are unlikey changed,
move these MACROs to a default header file.

The platform_acpi_info.h still has chance to override the default
definition by #undef with offline tool.

Tracked-On: #1520
Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-10-19 22:38:25 +08:00
Yonghua Huang bd042352cd hv: fix potential buffer overflow in vpic_set_pinstate()
Input 'pin' should be less than 'NR_VPIC_PINS_TOTAL'

Tracked-On: #1479
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-19 22:37:35 +08:00
Shuo Liu 268a9f1453 [REVERTME] dm: script: disable xHCI runtime PM to WA USB role switch hang issue
When do USB role switch between host and device mode, we hit hang issue.
It might be caused by accessing suspended xHCI during that. This issue
need to be root caused later in xHCI driver.

This is a workaround solution, which will be reverted when got a fix.

Tracked-On: #1516
Signed-off-by: Shuo Liu <shuo.a.liu@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
2018-10-19 22:34:40 +08:00
Huang, Yang ffcf62982d dm: rpmb: DM customized changes for RPMB mux kernel module
As RPMB mux kernel module is going to be created,
there are two corresponding changes required for DM:
1. The name has been changed to /dev/rpmbmux.
2. DM does NOT check MAC of RPMB result returned by kernel
   module because DM doesn't own the real key.

Tracked-On: #1508
Signed-off-by: Huang, Yang <yang.huang@intel.com>
Acked-by: Zhu Bing <bing.zhu@intel.com>
2018-10-19 22:31:28 +08:00
Kaige Fu 193da97103 tools: acrnd: Refine log msg to avoid confusing.
When guest enter S5, its monitor socket will be closed. If we try to use it to
query the vm state, an error msg will be print out. Acctually, we should not take
it as an error.

So, this patch refine the log msg to show more details when guest trying to enter
S3/S5.

Tracked-On: #1506
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2018-10-19 22:30:17 +08:00
Jason Chen CJ 1c7d2f653a vuart: change irq from 4 to 6
irq 4 is sharing with idma, after change vuart to level trigger, the idma
driver could handle this irq 4 and send out EOI, which cause the irq storm.

move vuart irq to a not used 6.

Tracked-On: https://github.com/projectacrn/acrn-hypervisor/issues/1476
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
2018-10-19 18:06:31 +08:00
Jason Chen CJ 6485666a93 Revert "hv: x2apic support for acrn"
This reverts commit 348e2ba168.
2018-10-19 17:24:56 +08:00
Mingqiang Chi 85ececd2d7 hv:Simplify for-loop when walk through the vcpu
-- Not return NULL for vcpu_from_vid
  We have replaced dynamic memory with static memory for vcpu,
  then if vcpu_id is valid, this API should not return NULL.
-- Simplify the for-loop when walk through the vcpu

Tracked-On: #861
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Reviewed-by: Li, Fei1 <fei1.li@intel.com>
Reviewed-by: Anthony Xu <anthony.xu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-19 14:23:08 +08:00
David B. Kinder 813e3abccc doc: Update contrib doc with Tracked-On
For traceability, all changes must include a Tracked-On: line indicating
the issue driving this change.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Tracked-On: #1420
2018-10-18 15:04:34 -07:00
Geoffroy Van Cutsem 30c2901546 Documentation: typo in Ubuntu tutorial and additional note
Fix one typo (in a command) in the tutorial entitled "Using
Ubuntu as the Service OS".

Add a note explaining that a script may have to be adjusted
based on the HW set-up (network interface name).

Tracked-On: #1502

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-10-18 14:56:47 -07:00
Mingqiang Chi fabe607247 hv:Replace dynamic memory with static for microcode
Reserve 256KB static memory for microcode

v1-->v2:
  -- add spinlock when update microcode

Tracked-On: #861
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-10-18 09:32:27 +08:00
Victor Sun de10df2693 DM: add MSI and INTR support for i6300esb watchdog
Per i6300esb spec, when WDT_INT_TYPE(bit 0 and 1 of WDT config register)
are set to 00, IRQ feature should be supported.

The WDT_INT_ACTIVE bit is set when the first stage of the 35-bit
down-counter reaches zero. An interrupt will be generated if WDT_INT_TYPE
is configured to do so (See WDT Configuration Register). This is a sticky
bit and is only cleared by writing a 1.

SMI feature(WDT_INT_TYPE are set to 0x10) is not supported.

Tracked-On: #1498
Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-10-18 09:30:01 +08:00
Victor Sun 25719db8f1 HV: move DRHD data to platform acpi info
In current code, the DRHD data is hardcoded in sbl.c. Replace the data
with MACROs which defined in platform_acpi_info.h as it could be parsed
by offline tool.

Tracked-On: #1500
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-18 09:26:59 +08:00
Victor Sun ca65e8c727 HV: refine APIC base address to platform acpi info
The base address of LAPIC and IOAPIC should be parsed from MADT table,
so move the definition to platform_acpi_info.h.

Tracked-On: #1500
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-18 09:26:59 +08:00
Victor Sun 8f701b0ff7 HV: move NR_IOAPICS to platform acpi info
The I/O APIC number should be parsed from host ACPI table, so move the
definition from Kconfig to platform_acpi_info.h.

Tracked-On: #1500
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-18 09:26:59 +08:00
Victor Sun bf834072d4 HV: platform acpi info refactor
Replace platform_acpi_info.c with platform_acpi_info.h and define needed
host ACPI info in MACROs. Then the struct host_acpi_info is not needed
any more.

This header file should be generated by offline tool automatically;

Tracked-On: #1500
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-18 09:26:59 +08:00
Geoffroy Van Cutsem 4ed87f90e9 Documentation: add note and instructions for Ubuntu 16.04
There is a compilation error when using the stock gcc compiler
from Ubuntu 16.04. This adds a note to our Getting Started
Guide to indicate what the error is and how to work around it.

Tracked-On: #1482

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-10-17 05:56:43 -07:00
Geoffroy Van Cutsem 2b449680ff Documentation: minor update to the tutorial about Ubuntu as SOS
Minor update to the tutorial on how to use Ubuntu as the Service OS
with ACRN. Specifically, the instructions for making the Grub menu
visible at boot time now involved modify the /etc/default/grub file
and not the /boot/grub/grub.cfg as before.

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-10-17 05:54:49 -07:00
Conghui Chen 21458bddff dm: storage: banned functions replace
1. replace sscanf with string API.
2. replace sprintf with snprintf
3. replace strlen with strnlen

Tracked-on: #1496
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Reviewed-by: Shuo Liu <shuo.a.liu@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-10-17 16:22:00 +08:00
Conghui Chen e1dab512c2 dm: add string convert API
As function sscanf is banned, to get value from parameter buffer,strto*
is recommended. To reduce the inspection code when using strto*, it's
better to use a string convert API.

Usage:
    For virtio-blk, it has parameters:
        range=<start lba>/<subfile size>
    sscanf:
        if (sscanf(cp, "range=%ld/%ld", &sub_file_start_lba,
                &sub_file_size) == 2)
            sub_file_assign = 1;
    string API:
        if (strsep(&cp, "=") &&
                !dm_strtol(cp, &cp, 10, &sub_file_start_lba) &&
                *cp == '/' &&
                !dm_strtol(cp + 1, &cp, 10, &sub_file_size))
            sub_file_assign = 1;

Tracked-on: #1496
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Reviewed-by: Shuo Liu <shuo.a.liu@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-10-17 16:22:00 +08:00
Huihuang Shi 4620b935de fix "use of single line comments(s) //"
Replace "//" with '/*','*/' couples.

V1->V2:
    Correct comment "Tracked-On" format

V2->V3:
    Remove "/* ==...===*/" comment

Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-17 16:16:31 +08:00
Yin Fengwei 75b03bef3b dm: add io port 0xF4 writing to force DM exit
This patch addes the debugexit function to DM. If it's enabled
by DM cmdline (by add --debugexit), the guest could write a
32bit value to port 0xF4 to trigger guest shutdown.

Tracked-on: #1465
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-10-17 14:32:33 +08:00
Yin Fengwei 9f7642648b dm: add elf loader to dm
This patch adds a simple 32bit static elf binary loader to acrn DM.
And if the elf binary follow multiboot protocol, only memory info
will be included in multiboot info.

Tracked-On: #1465
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-10-17 14:32:33 +08:00
Victor Sun 0e897c0a6a DM: use acrn_timer api to emulate rtc
Current RTC emulation is based on sigevent mechanism, replace with
acrn_timer API which based on timerfd/epoll mechanism to avoid
potential resource accessing conflict in the async thread.

Tracked-On: #1489
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jian Jun Chen <jian.jun.chen@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-10-17 14:31:09 +08:00
Victor Sun 8fdea84a63 DM: use acrn_timer api to emulate wdt
In the current implementation sigev_notify is configured as
SIGEV_THREAD. When wdt expires an async thread is created and
the registered timer callback is called in the context of this
thread, then the watchdog interrupt emulation would require the
thread to assert intr on this pci dev.

There would be a race condition that when the wdt pci device is
freed in pci device deinit and then a timer expires. In this case
the wdt expired thread will access a freed buffer which would cause
problem such as heap corruption and segment fault.

In this patch we replace timer API with acrn_timer which is based
on timerfd/epoll mechanism to avoid the race condition.

Tracked-On: #1489
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jian Jun Chen <jian.jun.chen@intel.com>
Reviewed-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-10-17 14:31:09 +08:00
Victor Sun 6ffa1aa367 DM: add acrn_timer api for timer emulation
We will use timerfd and epoll mechanism to emulate kinds of timers like
PIT/RTC/WDT/PMTIMER/... in device model under Linux. The api is unified
in this patch.

Compare with sigevent mechanism, timerfd has a advantage that it could
avoid race condition on resource accessing in the async sigev thread.

change log:
	v1 -> v2: add NULL pointer check for function parameter;
	v2 -> v3: rename file name of vtimer.* to timer.*;
		  rename structure name of vtimer to acrn_timer;
		  add read() in timer handler to consume I/O event;
	v3 -> v4: replace bool clock_realtime with int clockid;
		  close acrn_timer->fd properly;

Tracked-On: #1489
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jian Jun Chen <jian.jun.chen@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-10-17 14:31:09 +08:00
Qi Yadong d9df6e93f3 HV: parse seed from ABL
ABL pass seed_lists to HV through different interface/structures.
So, in this patch, add interface to retrieve seed from ABL and refactor
the seed parsing logic.

Tracked-On: #1488
Signed-off-by: Qi Yadong <yadong.qi@intel.com>
Acked-by: Zhu Bing <bing.zhu@intel.com>
2018-10-17 14:30:52 +08:00
Qi Yadong a98dd9e3fe HV: trusty: set cse_svn when derive dvseed for trusty
Bugfix: need to set cse_svn when derive dvseed for trusty.

Signed-off-by: Qi Yadong <yadong.qi@intel.com>
2018-10-17 14:30:52 +08:00
Yonghua Huang 102f5a0141 hv: fix potential buffer overflow in vioapic.c
@vioapic_set_pinstate() & vioapic_need_intr(),
 add checking input value range for 'pin'.

Tracked-On: #1479
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-17 14:30:28 +08:00
Yin Fengwei eb328d78ea hv: retain rip if the fault is injected to guest
According to SDM 6.5 exception classification, if the fault
happens, the CPU will return to the faulting instruction. So
we shouldn't change rip to the next instruction if inject fault
to guest.

Tracked-On: #1473
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-17 10:05:36 +08:00
Sainath Grandhi 348e2ba168 hv: x2apic support for acrn
All the platforms supported by ACRN supports x2APIC. So enabled
x2APIC for ACRN hv. Removed any code that is needed for xAPIC mode
of operation.

Tracked-On: #1455
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Reviewed by:  Yonghua Huang <yonghua.huang@intel.com>
2018-10-17 08:46:42 +08:00
Ming Liu a0fb1c4cf3 hypervisor: Makefile: let OBJS target depend on VERSION file
Let OBJS target depend on VERSION file instead of other targets like
install/all depending on it, since the version.h is being included in
.c files.

This fixes a following compilation issue:
| In file included from include/hv_debug.h:10,
|                  from include/hypervisor.h:37,
|                  from arch/x86/cpu.c:7:
| arch/x86/cpu.c: In function 'bsp_boot_post':
| arch/x86/cpu.c:453:4: error: 'HV_FULL_VERSION' undeclared...

Tracked-On: #1441
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
2018-10-16 14:24:46 +08:00
Huihuang Shi c6c1e42b79 HV:fix 'missing for discarded return value' violations
Return value should be checked,fix it by add
"void" when the function return value is not used.

V1->V2:
    replace printf with pr_warn.
V2->V3:
    change the commit to make read easily.

Tracked-On:#861

Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-16 13:31:02 +08:00
Binbin Wu 19e0bed593 script: re-enable audio passthru
This reverts partial of commit: 9bf5aafe "script: workarounds for UOS of
4.19-rc kernel", since our fixing patch for kernel crash when audio passthru
is ready.

Tracked-On:#1461
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
2018-10-16 13:30:07 +08:00
Yan, Like eb97b2f082 tools: acrn-manager: remove assumption of fd num less than 1024
mngr_send_msg() could take mngr descriptor or real socket fd as argument based on
an assuption that real socket fd is less than 1024, which may be an issue.
This commit takes the real socket fd as descriptor, to avoid the conversion between them.

Tracked-On: #1477
Signed-off-by: Tao, Yuhong <yuhong.tao@intel.com>
Signed-off-by: Yan, Like <like.yan@intel.com>
2018-10-16 11:31:57 +08:00
Yan, Like f582757dd4 tools: acrn-manager: fix fd leaking
close dir to avoid fd leaking.

Tracked-On: #1477
Signed-off-by: Tao, Yuhong <yuhong.tao@intel.com>
Signed-off-by: Yan, Like <like.yan@intel.com>
2018-10-16 11:31:57 +08:00
Yuan Liu dc05ffffaa dm: uart: fix acrn-dm crash issue
This patch resolves acrn-dm crash issue when acrnd boots up the acrn-dm.
The rootcause is mevent_enable and mevent_disable have NULL pointer as
its parameter if uart backend is not tty capable, so add check code for
the uart backend before invoking mevent_enable and mevent_disable.

The issue can be reproduced when acrnd boots up the acrn-dm.

Tracked-On: #1466
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Reviewed-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-10-16 10:24:01 +08:00
David B. Kinder e7b63aec9d doc: add static core partitioning doc
Update HLD with the static core partitioning doc

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-10-15 12:45:16 -07:00
Wei Liu 96412ac147 hv: add suffix(U/UL) to come up MISRA-C into include
MISRA-C required the suffix(U/UL), such as:
(1) ---> (1U)
(1) ---> (1UL)
(1U << 0) ---> (1U << 0U)
This patch will add the suffix(U/UL) to come up MISRA-C into
hypervisor/include directory.

Tracked-On: #1468
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-15 22:33:30 +08:00
Wei Liu 909d157630 dm: cleanup the cmd options for acrn-dm
For acrn-dm cmd options, there are some mismatch usage from acrn-dm help
message.
This patch will cleanup them.

Tracked-On: #1469
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Reviewed-by: Jason Chen <jason.cj.chen@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
2018-10-15 22:32:53 +08:00
Peter Fang 2202b7f578 dm: virtio: reject requests that violate the virtio-block spec
VirtIO v1.0 spec 04 5.2.5:
- Protocol unit size is always 512 bytes.
- blk_size (logical block size) and physical_block_exp (physical block
  size) do not affect the units in the protocol, only performance.

VirtIO v1.0 spec 04 5.2.6.1:
- A driver MUST NOT submit a request which would cause a read or write
  beyond capacity.

Reject the requests that violate these terms.

v1 -> v2:
- add more comments for clarity

Tracked-On: #1422
Signed-off-by: Peter Fang <peter.fang@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-10-15 22:20:04 +08:00
Peter Fang ba4e72bd0a dm: virtio: add debugging information in virtio-blk
Output debugging message when virtio-blk completes with error.

v1 -> v2:
- fix coding style
- refine debugging message

Tracked-On: #1422
Signed-off-by: Peter Fang <peter.fang@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-10-15 22:20:04 +08:00
Peter Fang 7101ce87a7 dm: storage: remove GEOM support
There is no GEOM framework in Linux. Remove dead code.

v1 -> v2:
- complete removal of the entire GEOM logic

Tracked-On: #1422
Signed-off-by: Peter Fang <peter.fang@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-10-15 22:20:04 +08:00
Minggui Cao b4a7a1ea1a HV: allow no IRR when pending bit set if no APIC-V
An issue reported on KBL NUC (No APIC-V), when runing GVT test
case, it is easily to cause SOS/UOS hung. This patch is to root
cause it and how to avoid it.

On some platforms with no APIC-V support, this modidication can
avoid SOS hung when no IRR but event pending bit set.

If no APIC-V, interrupt injection will use IRR in vLAPIC and
event pending bitmap; work logic as following (set ABC for notes):
1. in ISR or when UOS send an interrupt to SOS/VHM (like IO request),
    step A: set IRR --> step B: set event pending bit;
2. in SOS event handing,  step C: check/clear event pending bit -->
  step D: probe/get IRR --> step E: clear/handle IRR.
3. after that, it will probe IRR again to check if other IRR left:
  step F: probe IRR --> step G: set event pending bit --> step H:
  enable IRQ window in VMX.

Before, from step C to D, if pending bit checked, but no IRR, it will
return -1, then the CPU will goto ZOMBIE status. It can cause
SOS hung. It can happen occasionally under following case :
4. between UOS step A and step B, SOS can goto step F, so it
gets IRR, and step G --> step H, then SOS enter non-root mode, for
IRQ window enabled, it will cause vmexit to continue step C/D/E.
5. then UOS does step B, to set pending bit, but no IRR now. When next
vmexit, SOS does step C and D, it can't get IRR, failure happens.

In summary, a failed case steps: A-->F-->G-->H-->C-->D-->E-->B-->C-->D

So we allow that when event pending bit checked, IRR could be cleared
already.It just wastes one probe time occasionally.

Tracked-On: #1363
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-15 22:19:14 +08:00
Yonghua Huang 38d5df723d hv:enable APICv-Posted Interrupt
to enable APICv Posted interrupt supported, following the
 specifications defined in Intel SDM Section #29.6, Volume3.

 Posted-interrupt processing is a feature by which a processor
 processes the virtual interrupts by recording them as pending
 on the virtual-APIC page.

 Injecting interrupts to VCPU from remote CPU without causing
 VM exit on the destination, following steps in SDM Section 29.6,volume3:

Tracked-On: #1447
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-15 22:18:24 +08:00
Jason Chen CJ a028567b9c vpic: change assert/deassert method
use pin_state[pin] to record vpic pin signal, and change the interface name
accordingly.

Tracked-On: #1269
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
2018-10-15 15:50:55 +08:00
Binbin Wu f9a163954d dm: passthru: fix hardcoded nhlt table length
NHLT table contains the settings some audio drivers need.
An ACPI method is used to get NHLT table address & length.
In current DM code, the NHLT talbe length in the ACPI method
is hardcoded, which will cause troubles when the length of the
table changed.
This patch replaces the hardcoded NHLT table length according to
the table length read from SOS.

Tracked-On: #1461
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-10-15 13:44:48 +08:00
Mingqiang Chi 1d725c89c0 hv:Replace dynamic memory with static for vcpu
-- Replace dynamic memory allocation with static memory
-- Remove parameter check if vcpu is NULL

Tracked-On: #861
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Reviewed-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-15 13:44:25 +08:00
junjunshan1 7dd35cb72e hv: Fix identifier reuse
Now we have name reuse definitions in hypervisor as following:
"enum cpu_state cpu_state" in per_cpu.h,
"struct shell_cmd *shell_cmd" in shell_priv.h.
MISRAC requires that tag names shall not be reused anywhere
with in a program.So these definitions violate MISRAC rules
"identifier resue".This patch is used to fix it.

1. modify the definitions to "enum pcpu_boot_state boot_state"
and "struct shell_cmd *cmds".
2. modifty the relevant usage.

v1->v2
    update commit message to be more explicit.

v2->v3
    update the enum definition.

Tracked-On: #861
Signed-off-by: Junjun Shan <junjun.shan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-10-15 09:04:34 +08:00