Update the Makefiel to sync the compiler options with devicemode
and enable options to harden software.
Tracked-On: #1122
Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
To be sure hypervisor and DM are position independent
and executable.
Tracked-On: #1122
Signed-off-by: wenshelx <wenshengx.wang@intel.com>
Acked-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
As first step to separate misc folder into github/intel/ioc-cbc-tools we
need let acrn create devel package. This package will let ioc-cbc-tools
use acrn manager interface API to control lifecycle.
The Clear Linux autospec script will *detect* /usr/include/acrn/*.h and
thus help us create the devel package. This devel pacakge will be in the
build_req for ioc-cbc-tools autospec.
Signed-off-by: Alek Du <alek.du@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
Reviewed-by: Like Yan <like.yan@intel.com>
$(OUT_DIR)/acrm_mngr.h miss dependence of ./acrm_mngr.h, that can
cause build problems.
DM & SOS-LCS are built with $(OUT_DIR)/acrm_mngr.h, which is a
copy of tools/acrn-manager/acrm_mngr.h. So when
tools/acrn-manager/acrm_mngr.h is modified, $(OUT_DIR)/acrm_mngr.h
should be updated too.
Acked-by: Yan Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
There will be a daemon running on SOS: to forward wakeup_reason to
acrn-dm; to co-ordinate the lifecycle of VMs and SOS; to handle
ioc-timed wakeup/poweron.
1.to forward wakeup_reason to acrn-dm
acrnd is responsible to retrive wakeup_reason from SOS lifecycle
service and attach the wakeup_reason to acrn-dm parameter for ioc-dm;
2.co-ordinate the lifecycle of VMs and SOS
When SOS is about to suspend/shutdown, SOS lifecycle service will
send a request to acrnd to guarantee all guest VMs are suspended
or shutdown before SOS suspending/shutdown process continue. On
receiver the request, acrnd starts polling the guest VMs state, and
notify SOS lifecycle service when all guest VMs are put in proper
state gracefully.
3.handle ioc-timed wakeup/poweron
For vechile specific mode like garage mode, guest UOS may need to
wakeup/poweron in a future time for tasks such as map updating etc.
To setup a timed wakeup/poweron, ioc-dm will send request to acrnd,
acrnd maintains a list of timed requests from guest VMs, and acrnd
selects the nearest request and send it to SOS lifecycle service
who will setup the physical IOC.
Reviewed-by: Yan Like <like.yan@intel.com>
Acked-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
There are some problems to use VM operations in a deamon process,
such as Acrnd. the list_vm() does not return VM informations, it
just print VM information to stdio, so we have get_vm_list()
to get VM list head vmngr_head; get_vm_list() always creates a
new fresh vm list every time, and must use put_vm_list() to delete
old list. So Acrnd need to create and destroy vm list frequently.
In fact we just need the vmngr_head to be an extern variable. And
to make it refreshable.We can insert new VMs, remove dead ones,
and update their state.
Reviewed-by: Yan Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
1. mkdir ./tools/build if it does not exist;
2. correct static lib path for acrn-manager;
3. do not remove acrnlog.service if build under source code dir by default.
Reviewed-by: Geoffroy VanCutsem <geoffroy.vancutsem@intel.com>
Signed-off-by: Yan, Like <like.yan@intel.com>
The debug macro -DMNGR_DEBUG is selected by RELEASE value.
E.g., run 'make RELEASE=1' at the root of source code.
Acked-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
this patch aim at
1. Use new IPC lib to connect acrn-dm.
2. Export list_vm, start_vm and stop_vm and acrnd will use them later.
3. Rename vmm releated struct and function
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
Add a Makefile under ./tools to avoid changing top-level Makefile frequently
Acked-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Signed-off-by: Yan, Like <like.yan@intel.com>
Running 'make' will leave 3 files in the source code tree that
are not cleaned by a subsequent 'make clean'. These are:
* tools/acrn-crashlog/acrnprobe/include/version.h
* tools/acrn-crashlog/usercrash/include/version.h
* tools/acrn-manager/acrn_mngr.o
(as reported by 'git status' after 'make')
This patch changes the location of these files so they are
created in the target build directory and hence properly
cleaned when running 'make clean'
Other minor changes to the Makefiles include:
* Remove BASEDIR by the built-in CURDIR variable
* Add .PHONY targets
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@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>
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 make install target was missing. This commits adds the intall target
which uses the install target from subprojects.
Also a make install target was created in each tool program.
Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
it can be used as following:
make ==> to make hypervisor & devicemodel & tools
also modify tools makefile to support out-dir setting.
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Jack Ren <jack.ren@intel.com>
The tools directory is moved out of ./devicemodle, to be in parallel with
hypervisor, devicemodel and doc.
Signed-off-by: Yan, Like <like.yan@intel.com>