commit(4d274a5 Tools: acrn-manager-interface) change location and naming scheme
to the follow.
/run/acrn/mngr/vmname.monitor.pid.socket
This patch adapt parse vmname according new naming scheme.
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This reverts commit 5b1c536eee.
For normal case, we connected two HDMI monitors, one for SOS, another for UOS.
Previously UOS has problem when only see one display, it was the bug of
user space driver, then to work around this issue, submit temp patch to let
UOS see two displays.
From latest info, after switch to use github latest user spce driver in stable
branch, such problem was resolved. Then we need revert previous workaround
patch, otherwise, UOS will show on both HDMI1 and HDMI2.
In virtio_heci struct there have deiniting/pending_reset/resetting
variables. All these variables represent the status of virtio heci devices.
Change them into one enum type variable for vheci status.
Signed-off-by: Long Liu <long.liu@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
Reviewed-by: Shuo Liu <shuo.a.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
- 'dispatch' will be null and be referenced if
'basic_exit_reason < ARRAY_SIZE(dispatch_table)'
if false.
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
cbc_attach is one SOS service that enable IOC CBC line discipline feature.
It started by systemd by default, and exit if failed to set the line
discipline that means the platform does not support IOC.
Signed-off-by: Vineetha G Jaya Kumaran <vineetha.g.jaya.kumaran@intel.com>
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Signed-off-by: Yu Wang <yu1.wang@intel.com>
Reviewed-by: Vineetha G Jaya Kumaran <vineetha.g.jaya.kumaran@intel.com>
Reviewed-by: Key Seong Lim <key.seong.lim@intel.com>
Reviewed-by: Alex Du <alek.du@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This patch adds build architecture for misc directory and support cbc_lifecycle
build.
Signed-off-by: Yu Wang <yu1.wang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This patch turn on WIFI/BT in launch_UOS.sh based on WIFI BDF on SBL,
which is different from ABL. Still need WIFI/BT driver in Android to
make WIFI/BT passthrough work.
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Make it clear that some commands mentionned in the 'acrnlog' tool
documentation are meant to be run in the hypervisor shell and *not*
the Service OS shell (as are the other commands throughout the rest
of that document).
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
NHLT table is used by some audio driver for topology data, but current
default audio driver doens't depend on it. Disable it by default due
to possible boot failure with different SOS firmware.
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
The cbc_lifecycle service will listen on /dev/cbc-lifecycle tty port to
receive "wakeup reason" information from ioc controller as well as send
heartbeat to ioc to set different power cycle method.
The RTC funtionality is not implemented by current ioc firmware yet,
hence the service leaves it as an empty handler now.
Signed-off-by: Alek Du <alek.du@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
To send open channel command after opening CBC signal channel successfully.
For the latest IOC firmware, the IOC mediator needs to send open channel command
to activate CBC signal channel. Otherwise, there will be no any signal data will
be received.
The open channel command is forward compatible that it would not impact for
older IOC firmware.
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
The following massages is not fatal error but should be print to serial and
sbuf at the same time. pr_fatal is not a good choice. pr_acrnlog is designed
to deal with the situation. So replace the following misused pr_fatal with
pr_acrnlog.
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Hypervisor shouldn't deal with errno return by hypercall.
The SOS should do this. Here just return the errno to SOS.
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Hypercall will return errno to SOS (Now is linux kernel).
Let's define this more general.
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
vm_attr_name, vm_state_info_privilege & vm_created are not used
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Xu, Anthony <anthony.xu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
vm_state_info in struct vm_arch is not used, remove it
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Xu, Anthony <anthony.xu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This patch implements scalable xHCI parameter for extended capabilities.
For future supported platform, user can be easy to specify their
platform to emulate corresponding xHCI capabilities.
The new usage:
-s <n>,xhci,[bus1-port1,bus2-port2]:[tablet]:[log=x]:[cap=x]
The old usage:
-s <n>,xhci,[bus1-port1,bus2-port2]:[tablet]:[log=x]
Change-Id: Ie8ba056d57cac9446bcf3f39b342c7ac22245c61
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>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
This patch implements Intel ApolloLake xHCI extended capabilities. It
includes two dual role switch registers for switching shared
USB2&USB3 phys between xHCI and xDCI.
Change-Id: I2533537d8a4224da3cf9b2e7475aab9f65347a4a
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>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Some xHCI extended capabilities are writable. This patch adds the
writing function for excap.
Change-Id: Ie8b144b47ffa261f97d0461bf97b0c4d312a9333
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>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Every platform should have their own xHCI specific extended
capabilities, but the current xHCI DM is not scalable for them. This
patch refines related logic to make it scalable.
Current code only support 4 registers(4*32) as basic extended
capabilites. Base on this new implementation, the mmio range from
excapoff to regsend will cover real excap size according to the cap
parameter.
Change-Id: Ic55a4494e090ec255939cdb8f32950e3c8a66082
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>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
monitor_vm_ops and its helpers is added to allow DM to register operations
, so thant vm manager could trigger the power state changes of VM.
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Wang, Yu <yu1.wang@intel.com>
signed-off-by: Yan Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Adapt dm-monitor and acrnctl to use the helper functions and new message
definitions in acrn_mngr.h.
These jobs must be done in one commit to avoid build problems:
1. message transmission and callback registration code are moved
to libacrn-mngr.a, so old functions in dm-monitor could be removed to
make code clean;
2. remove unnecessary monior_msg.h;
3. minor changes to acrnctl accordingly.
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Wang, Yu <yu1.wang@intel.com>
signed-off-by: Yan Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
We define messages into three types, accroding to which component is
responsible to handle it:
1. message handled by sos lifecycle service, from vm manager;
2. message handled by vm manager, from sos lifecycle service&dm;
3. message handled by dm, from vm manager.
Reviewed-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Wang, Yu <yu1.wang@intel.com>
signed-off-by: Yan Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Add lib to help IPC between components, including SOS lifecycle service,
acrn manager and devicemodule.
Following helper functions are included:
int mngr_open_un() - create a descripter for vm management IPC
void mngr_close() - close descripter and release the resouces
int mngr_add_handler() - add a handler for message specified by msg
int mngr_send_msg() - send a message and wait for ack
Reviewed-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Wang, Yu <yu1.wang@intel.com>
Sigbed-off-by: Yan Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
The VIRTIO_PCI_CAP_PCI_CFG capability creates an alternative access
method to the common configuration, notification, ISR and device-
specific configuration regions.
To access a device region, the driver writes into the capability
structure (ie. within the PCI configuration space) as follows:
- The driver sets the BAR to access by writing to cap.bar
- The driver sets the size of the access by writing 1, 2 or 4 to
cap.length
- The driver sets the offset within the BAR by writing to cap.offset
At that point, pci_cfg_data will provide a window of size cap.length
into the given cap.bar at offset cap.offset.
Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com>
Reviewed-by: Hao Li <hao.l.li@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
Virtio 1.0 introduced several PCIY_VENDOR capabilities. When trying to
write to these capabilities no action is taken so the registers in
the capability of VIRTIO_PCI_CAP_PCI_CFG such as bar, offset and length
remain the default value 0. Later a read or write of pci_cfg_data needs
these information to perform the indirect read or write to the bar
region.
Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com>
Reviewed-by: Hao Li <hao.l.li@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
pci_emul_find_capability can be used to get the offset of a PCI
capability in PCI configuration space.
Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com>
Reviewed-by: Hao Li <hao.l.li@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
Changes to the nested unnamed unions in type definitions require a tweak
to the pattern matching used to detect known issues reported by the API
doc generation.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Add a mention of the weekly Technical Community meeting to the repo's
README, with links to the meeting information in the wiki.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
This continues the editing from PR #276 with formatting and clarity
edits to have these tool documents blend in with the rest of the ACRN
documentation. It also builds on PR #307 that set up the doc build
infrastructure to allow leaving these tool docs within the tools/
folder.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Guest CR3 read/write operations are not trapped.
Remove CR3 handling in cr_access_vmexit_handler.
Also remove unused API vmx_read_cr3.
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Move from vmexit.c to vmx.c
Declare the functions in vmx.h
Rename the functions' name with prefix vmx_.
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
There are some massages which is not fatal error but should to print
to serial and sbuf(hvlog) at the same time. pr_fatal is for fatal error
massages and it is not good choice for the situation above.
Introduce a new API pr_acrnlog to deal with the situation. And replace the
following printf with pr_acrnlog for massages should be print to sbuf and
serial. Then developers can get those massages on serial and BTM(Boot Time
Measurement) can use acrnlog to get those massages from sbuf.
BTM refers to Boot Time Measurement which will read acrnlog file to get
timestamps of steps we want.
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
We have two sbuf for hvlog: one is allocated by hv for "early hvlog" and
the other one is allocated by SOS. Once SOS allocate the later one, the
hv allocated sbufs would be released after the contents being copied, we
call it sbuf switch.
And there is a trick here to guarantee that the switch of a certain per_cpu
sbuf is being done on exactly the certain physical CPU, that is doing the
switch at the first print after SOS allocated and setup its sbuf.
Because there are few logmsg within our current code, so will wait a bit long
for the next print. For ordinary case, it should be ok. However, for the
BTM(Boot Time Measurement) case, we need the content of "early hvlog" for
boot time calculation and it is not ok. So, we print those prints to force
the sbuf switch.
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
When we create an UOS, we didn't indicate the vmid.
Thus we can't get the vm description for the vm
description array.
Instead we use a temporary vm description to save data to
fill the vm structure when crate an UOS. It's uselesss once
UOS has created. So we don't need to maintain vm description
array here for UOS.
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Don't panic system when execute vmxon instruction failed.
And let's follow that only print error info when error return
from library function.
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
We cleanup ASSERT. This serial try to only panic when create
SOS failed.
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Pointer arithmetic is currently used to calculate the address of a specific
Local Vector Table (LVT) register (except LVT_CMCI) in lapic, since the
registers are continuously placed with fixed padding in between. However each of
these registers are declared as a single uint32_t in struct lapic, resulting
pointer arithmetic on a non-array pointer which violates MISRA C requirements.
This patch refactors struct lapic by converting the LVT registers fields (again
except LVT_CMCI) to an array named lvt. The LVT indices are reordered to reflect
the order of the LVT registers on hardware, and reused to index this lvt array.
The code before and after the changes is semantically equivalent.
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>