For SOS BSP, we reuse native saved cs.limit
For UOS BSP, we set cs.limit in DM
For AP, we use initialized data from realmode_init_regs.
Tracked-On: #1231
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <Eddie.dong@intel.com>
Save the native cs limit and reuse it for SOS cs limit. To remove
the hardcode of cs limit for guest in hypervisor.
Tracked-On: #1231
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <Eddie.dong@intel.com>
For CS of UOS, we would like to pass all related info (cs attribute,
limit, base) from DM.
Tracked-On: #1231
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <Eddie.dong@intel.com>
1, replace strlen with strnlen
2, Return value check for strncpy function
Tracked-On: #1254
Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Kaige Fu <kaige.fu@intel.com>
Return value check for snprintf function
Tracked-On: #1254
Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Kaige Fu <kaige.fu@intel.com>
Return value check for snprintf function
Tracked-On: #1254
Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Kaige Fu <kaige.fu@intel.com>
1, Return value check for snprintf function
2, Replace 'atoi' with 'strtol'
Tracked-On: #1254
Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Kaige Fu <kaige.fu@intel.com>
--Config LOG_BUF_SIZE 256KB for per cpu
--Replace 'calloc' with static array for sbuf
--Rename 'alloc_earlylog_sbuf' to 'init_earlylog_sbuf'
--Remove deadcode sbuf_free
v2-->v3:
-- put the buffer into per_cpu data structure
v1-->v2:
-- add 'is_early_logbuf' in percpu data structure used for
check if need to do 'do_copy_earlylog'
Tracked-On: #861
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
-to avoid information leaking from secure world to
normal world on platform affected by L1TF.
Tracked-On: #1672
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
- flush L1 cache before VM entry only on platform
affected by L1TF
- flush operation is configurable by below MACRO:
--CONFIG_L1D_FLUSH_VMENTRY_ENABLED
Tracked-On: #1672
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
- detect if current processor is affected by L1TF
- detect the presence of of "IA32_FLUSH_CMD(MSR 0x10B)
if processor is affected by L1TF.
Tracked-On: #1672
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
- add a function to detect CPU capabilities for security
related features, it will print warning messages if
current ucode can't support the latest security features.
Tracked-On: #1672
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
For GP-MRB ACRN using ttyS0 as console,
since this is release bootargs file so ttyS0
will be skipped in booting but needed kernel
console ttyS2 in bootargs to get the Kernel console.
Tracked-On: #1655
Signed-off-by: santoshkumar <santoshkumar.laxminarayan.rai@intel.com>
For partition mode, there is no vm0_domain created for iommu.
In current code, it will return error when try to remove a device
from vm0_domain, which casue failure of device assignment in
partition mode.
Tracked-On: #1680
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
Transcode, edit, and upload HLD 0.7 section 4 (Device Model)
Incorporate changes from previously edited acpi-virt.rst and delete
separate doc.
Tracked-on: #1668
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
PR #1678 requires slight tweaking of doxygen/known-issues handling to
successfully generate documentation
Tracked-on: #1595
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The operands to shift operations (<<, >>) shall be unsigned integers.
v1 -> v2:
* replace 12U with CPU_PAGE_SHIFT when it is address shift case.
* replace 6UL with 0x6UL
Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
Replace list of iommu_domains with static array
Tracked-On: #861
Signed-off-by: Tw <wei.tan@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
Predefine a dmar_drhd_rt table for all possible dmar unit
Tracked-On: #861
Signed-off-by: Tw <wei.tan@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
%x could be used to replace the %o print option.
%x could be used to replace the %p print option also.
Tracked-On: #1656
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
The FW reset is currently detected from two points upon
a read failure from native read and from the reset
handler.
The fix removes the detection from the mevent rx callback,
leaving a single detection point.
To prevent reset hiccup, hw_ready is not set if a full rescan is
performed, it will be set only when virtio FW will request the FW reset.
Tracked-On: #1632
Signed-off-by: Aviad Nissel <aviad.nissel@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
vmei_host_client_to_vmei() may return NULL we need to check
for the return value.
Tracked-On: #1630
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Simplify the flow by adding mutex_type variable
and call pthread_mutexattr_destroy() on the error path.
Tracked-On: #1630
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
MEI HBM the disconnect replay doesn't have the address set,
breaking the protocol, fix the issue.
Tracked-On: #1570
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
Below functions are deprecated, remove them from hypercall.h
hc_assert_irqline()/hc_deassert_irqline()/hc_pulse_irqline()
Tracked-On: #861
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
Accoring to xHCI spec, there are some TRBs with zero data length
which used to pass command to xHCI. In the DM, those TRBs should
not be sent to native device through libusb. The logic in the
current implentation fails to process some corner cases, this
patch is used to fix it.
Tracked-On: #1639
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>
on 8GB MRB: cat /proc/meminfo|head -n 1|awk '{print $2}'
it is: 7993388, it is not 8000000, so set it compare
with 7500000, then it can allocate 6GB to UOS.
Tracked-On: #1657
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Transcode, edit, and upload HLD 0.7 section 3.10 (PM in hypervisor),
3.11 (Console, shell, vUART), 3.12 (Hypercall/VHM upcall), and
3.13 (Compile-time config)
Also scan/replace UTF-8 punctuation missed in previous PRs.
Add anchor targets in referenced docs.
Tracked-on: #1648
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Guest OS can use vLAPIC in x2APIC mode. Upon vlapic_reset, vLAPIC should
be set to xAPIC mode.
Tracked-On: #1626
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
- Put version.h, vmcfg_config.h, .config into DM_OBJDIR like what's
already done in hypervisor and tools, it does not have to stay in
source or else a extra entry in .gitignore is needed.
- Change some implicit targets to explicit targets, include:
vmcfg_header -> $(DM_OBJDIR)/include/vmcfg_config.h
$(PROGRAM) -> $(DM_OBJDIR)/$(PROGRAM)
then $(DM_OBJDIR)/include/vmcfg_config.h would be depended by
$(DM_OBJDIR)/%.o without the need involving in a extra implicit
target vmcfg_header. (And it's not set in .PHONY)
- These header targets vmcfg_config.h and version.h should be depended
by $(DM_OBJDIR)/%.o target instead of by all target, and this is done
since they are in HEADERS now.
- Drop redundant clean commands and fix some bad styled coding, like
multiple blanks in a line.
Tracked-On: #1599
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Some version.h files had been removed in commit 4627cd4d:
[ HV: build: drop useless files ]
drop the remaining references in .gitignore as well.
Also drop hypervisor/build and devicemodel/build, they are redundant
since the pattern 'build' exists.
Tracked-On: #1599
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Change kernel boot cmdline to load GuC firmware for SOS.
We want to enable GuC and HuC in Service OS and this is
an effort to enable use cases across all boards.
Tracked-on: #1638
Proposed-by: Charles, Daniel <daniel.charles@intel.com>
Signed-off-by: Chang, Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Change kernel boot cmdline to load GuC firmware for SOS.
We want to enable GuC and HuC in Service OS and this is
an effort to enable use cases across all boards.
Tracked-On: #1638
Proposed-by: Charles, Daniel <daniel.charles@intel.com>
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Instead of using the ACPI info template in the source tree, this patch requires
a board-specific ACPI info header to be created by the user and placed under
bsp/include. Currently we'll fall back to the current platform-specific template
if such board-specific info is not available.
A configuration symbol ACPI_ENFORCE_VALIDATED_ACPI_INFO is also added to enforce
the existance of board-specific ACPI info header. Default configurations can set
this symbol if the template does not work on a board.
Updates to the getting started guide will be updated accordingly after the
offline tools to generate such header is available.
v2 -> v3:
* Rephrase the ACPI-info-related messages.
v1 -> v2:
* The generated header should depend on .config so that whenever any
configuration changes, this header will be remade.
Tracked-On: #1520
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Anthony Xu <anthony.xu@intel.com>
Currently silentoldconfig uses the default values in Kconfig when .config does
not exist or is for a different platform from the one specified in command line
options. This makes it impossible to leverage defconfigs when a simple 'make' is
invoked to build the hypervisor, as 'make' calls oldconfig instead of defconfig
for creating a configuration file.
With DEFCONFIG_LIST in Kconfig, now silentoldconfig is also able to know which
defconfig is appropriate given the specified board. This patch changes the
behavior of oldsilentconfig as follows.
1. When an old .config for the given board exists, the script updates the
.config per configurations specified from the command line. Instead of
manually resetting all symbols, the script now relies on Kconfiglib's
internal logic to automatically update invisible symbols after symbol
value changes.
2. When an old .config does not exist or is not for the specified board, the
defconfig for that board is used as base line and further tweaked per
configurations from the command line.
v3 -> v4:
* Rephrase comments in silentoldconfig.py.
v2 -> v3:
* Keep backward compatibility of silentoldconfig.py since vmcfg also uses the
script.
v1 -> v2:
* Include .config when it is edited manually so that new configurations
overwritten the old (in the outdated config.mk).
* Compare the board in .config with the one in the defconfig instead of what is
specified in the environment variable BOARD, as defconfig and BOARD may use
different names (e.g. aliases or different cases)
Tracked-On: #1588
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Reviewed-by: Anthony Xu <anthony.xu@intel.com>
The current defconfigs are BIOS-specific which makes it difficult to maintain
multiple defconfigs for boards running the same BIOS.
This patch re-organizes the defconfigs to be board-specific. A command line
option BOARD is introduced to specify a board on which the current build targets
at. The original PLATFORM is kept for backward compatibility which redirects to
apl-mrb and nuc6cayh for sbl and uefi, respectively.
The getting started guide is also updated accordingly.
v1 -> v2:
* Rewrite 'up2' to 'UP2'.
Tracked-On: #1588
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Reviewed-by: Anthony Xu <anthony.xu@intel.com>
Without any command under the .config target, config.mk will not be remade in
the same execution of make after oldconfig changes .config. This can result to
inconsistency between .config and the built image right after .config is
changed.
Tracked-On: #1588
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Reviewed-by: Anthony Xu <anthony.xu@intel.com>
It is faster to check the existance of a certain library by trying importing
that library, instead of invoking pip3 for a complete list of installed
libraries. Time of the check can be significantly reduced.
# time pip3 list
...
real 0m6.038s
user 0m0.652s
sys 0m0.036s
# time python3 -c "import kconfiglib"
real 0m0.037s
user 0m0.036s
sys 0m0.000s
Tracked-On: #1588
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Reviewed-by: Anthony Xu <anthony.xu@intel.com>
Add help messages to all visible symbols except those heap-related ones which
will be dropped eventually.
v2 -> v3
* Fix typos and misleading descriptions.
v1 -> v2
* Per kconfig language, help messages shall have a larger indent level than the
attributes.
* Rephrase for clarify.
Tracked-On: #1588
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Reviewed-by: Anthony Xu <anthony.xu@intel.com>