mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-29 18:35:01 +00:00
DM: VMcfg: build-in vm configurations
use *args_buildin[] to hold build-in VM configurations Tracked-On: #1528 Acked-by: Yin Fengwei <fengwei.yin@intel.com> Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
This commit is contained in:
parent
646cc8c4b2
commit
ae5b32dcb3
@ -132,6 +132,8 @@ SRCS += core/timer.c
|
||||
# arch
|
||||
SRCS += arch/x86/pm.c
|
||||
|
||||
# vmcfg
|
||||
SRCS += vmcfg/vmcfg.c
|
||||
|
||||
OBJS := $(patsubst %.c,$(DM_OBJDIR)/%.o,$(SRCS))
|
||||
|
||||
|
19
devicemodel/include/vmcfg.h
Normal file
19
devicemodel/include/vmcfg.h
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright (C)2018 Intel Corporation
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#ifndef VMCFG_H
|
||||
#define VMCFG_H
|
||||
|
||||
struct vmcfg_arg {
|
||||
char **argv;
|
||||
int argc;
|
||||
int (*setup)(void);
|
||||
int (*clean)(void);
|
||||
};
|
||||
|
||||
extern struct vmcfg_arg **args_buildin;
|
||||
extern int num_args_buildin;
|
||||
|
||||
#endif
|
13
devicemodel/vmcfg/vmcfg.c
Normal file
13
devicemodel/vmcfg/vmcfg.c
Normal file
@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Copyright (C)2018 Intel Corporation
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include <vmcfg_config.h>
|
||||
#include <vmcfg.h>
|
||||
|
||||
static struct vmcfg_arg *vmcfg_buildin_args[] = {
|
||||
};
|
||||
|
||||
struct vmcfg_arg **args_buildin = vmcfg_buildin_args;
|
||||
int num_args_buildin = sizeof(vmcfg_buildin_args) / sizeof(struct vmcfg_arg *);
|
Loading…
Reference in New Issue
Block a user