mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-21 21:19:35 +00:00
dm: remove guest cpu number option
Remove the guest cpu number option '-c', as the guest cpu number is defined in hypervisor vm configuration file, and the number can be return by vm_create(). Tracked-On: #3663 Signed-off-by: Conghui Chen <conghui.chen@intel.com> Acked-by: Yin Fengwei <fengwei.yin@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
d8acff1f44
commit
16ad062d1a
@ -77,7 +77,6 @@ typedef void (*vmexit_handler_t)(struct vmctx *,
|
|||||||
|
|
||||||
char *vmname;
|
char *vmname;
|
||||||
|
|
||||||
int guest_ncpus;
|
|
||||||
char *guest_uuid_str;
|
char *guest_uuid_str;
|
||||||
char *vsbl_file_name;
|
char *vsbl_file_name;
|
||||||
char *ovmf_file_name;
|
char *ovmf_file_name;
|
||||||
@ -90,6 +89,7 @@ bool lapic_pt;
|
|||||||
bool is_rtvm;
|
bool is_rtvm;
|
||||||
bool skip_pci_mem64bar_workaround = false;
|
bool skip_pci_mem64bar_workaround = false;
|
||||||
|
|
||||||
|
static int guest_ncpus;
|
||||||
static int virtio_msix = 1;
|
static int virtio_msix = 1;
|
||||||
static bool debugexit_enabled;
|
static bool debugexit_enabled;
|
||||||
static char mac_seed_str[50];
|
static char mac_seed_str[50];
|
||||||
@ -132,7 +132,7 @@ static void
|
|||||||
usage(int code)
|
usage(int code)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Usage: %s [-hAWYv] [-B bootargs] [-c vcpus] [-E elf_image_path]\n"
|
"Usage: %s [-hAWYv] [-B bootargs] [-E elf_image_path]\n"
|
||||||
" %*s [-G GVT_args] [-i ioc_mediator_parameters] [-k kernel_image_path]\n"
|
" %*s [-G GVT_args] [-i ioc_mediator_parameters] [-k kernel_image_path]\n"
|
||||||
" %*s [-l lpc] [-m mem] [-r ramdisk_image_path]\n"
|
" %*s [-l lpc] [-m mem] [-r ramdisk_image_path]\n"
|
||||||
" %*s [-s pci] [-U uuid] [--vsbl vsbl_file_name] [--ovmf ovmf_file_path]\n"
|
" %*s [-s pci] [-U uuid] [--vsbl vsbl_file_name] [--ovmf ovmf_file_path]\n"
|
||||||
@ -143,7 +143,6 @@ usage(int code)
|
|||||||
" %*s [--pm_by_vuart vuart_node] <vm>\n"
|
" %*s [--pm_by_vuart vuart_node] <vm>\n"
|
||||||
" -A: create ACPI tables\n"
|
" -A: create ACPI tables\n"
|
||||||
" -B: bootargs for kernel\n"
|
" -B: bootargs for kernel\n"
|
||||||
" -c: # cpus (default 1)\n"
|
|
||||||
" -E: elf image path\n"
|
" -E: elf image path\n"
|
||||||
" -G: GVT args: low_gm_size, high_gm_size, fence_sz\n"
|
" -G: GVT args: low_gm_size, high_gm_size, fence_sz\n"
|
||||||
" -h: help\n"
|
" -h: help\n"
|
||||||
@ -247,12 +246,12 @@ start_thread(void *param)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
add_cpu(struct vmctx *ctx, int guest_ncpus)
|
add_cpu(struct vmctx *ctx, int vcpu_num)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
for (i = 0; i < guest_ncpus; i++) {
|
for (i = 0; i < vcpu_num; i++) {
|
||||||
error = vm_create_vcpu(ctx, (uint16_t)i);
|
error = vm_create_vcpu(ctx, (uint16_t)i);
|
||||||
if (error != 0) {
|
if (error != 0) {
|
||||||
fprintf(stderr, "ERROR: could not create VCPU %d\n", i);
|
fprintf(stderr, "ERROR: could not create VCPU %d\n", i);
|
||||||
@ -735,7 +734,6 @@ enum {
|
|||||||
|
|
||||||
static struct option long_options[] = {
|
static struct option long_options[] = {
|
||||||
{"acpi", no_argument, 0, 'A' },
|
{"acpi", no_argument, 0, 'A' },
|
||||||
{"ncpus", required_argument, 0, 'c' },
|
|
||||||
{"elf_file", required_argument, 0, 'E' },
|
{"elf_file", required_argument, 0, 'E' },
|
||||||
{"ioc_node", required_argument, 0, 'i' },
|
{"ioc_node", required_argument, 0, 'i' },
|
||||||
{"lpc", required_argument, 0, 'l' },
|
{"lpc", required_argument, 0, 'l' },
|
||||||
@ -774,7 +772,7 @@ static struct option long_options[] = {
|
|||||||
{0, 0, 0, 0 },
|
{0, 0, 0, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
static char optstr[] = "hAWYvE:k:r:B:p:c:s:m:l:U:G:i:";
|
static char optstr[] = "hAWYvE:k:r:B:p:s:m:l:U:G:i:";
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
@ -786,7 +784,6 @@ main(int argc, char *argv[])
|
|||||||
int option_idx = 0;
|
int option_idx = 0;
|
||||||
|
|
||||||
progname = basename(argv[0]);
|
progname = basename(argv[0]);
|
||||||
guest_ncpus = 1;
|
|
||||||
memsize = 256 * MB;
|
memsize = 256 * MB;
|
||||||
mptgen = 1;
|
mptgen = 1;
|
||||||
|
|
||||||
@ -808,9 +805,6 @@ main(int argc, char *argv[])
|
|||||||
case 'A':
|
case 'A':
|
||||||
acpi = 1;
|
acpi = 1;
|
||||||
break;
|
break;
|
||||||
case 'c':
|
|
||||||
dm_strtoi(optarg, NULL, 0, &guest_ncpus);
|
|
||||||
break;
|
|
||||||
case 'E':
|
case 'E':
|
||||||
if (acrn_parse_elf(optarg) != 0)
|
if (acrn_parse_elf(optarg) != 0)
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
#define MAX_VMNAME_LEN 128U
|
#define MAX_VMNAME_LEN 128U
|
||||||
|
|
||||||
struct vmctx;
|
struct vmctx;
|
||||||
extern int guest_ncpus;
|
|
||||||
extern char *guest_uuid_str;
|
extern char *guest_uuid_str;
|
||||||
extern uint8_t trusty_enabled;
|
extern uint8_t trusty_enabled;
|
||||||
extern char *vsbl_file_name;
|
extern char *vsbl_file_name;
|
||||||
|
Loading…
Reference in New Issue
Block a user