dm: remove unsupported "pincpu" option
ACRN-DM does not support "pincpu" option to pin 'vcpu' to 'hostcpu', ACRN support vcpu to pcpu static mapping via vm_config. This commit removes the "pincpu" option. Tracked-On: #3600 Signed-off-by: Yan, Like <like.yan@intel.com> Acked-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
parent
1399f47987
commit
2fab3c5198
|
@ -124,8 +124,6 @@ struct mt_vmm_info {
|
||||||
int mt_vcpu;
|
int mt_vcpu;
|
||||||
} mt_vmm_info[VM_MAXCPU];
|
} mt_vmm_info[VM_MAXCPU];
|
||||||
|
|
||||||
static cpuset_t *vcpumap[VM_MAXCPU] = { NULL };
|
|
||||||
|
|
||||||
static struct vmctx *_ctx;
|
static struct vmctx *_ctx;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -150,7 +148,6 @@ usage(int code)
|
||||||
" -k: kernel image path\n"
|
" -k: kernel image path\n"
|
||||||
" -l: LPC device configuration\n"
|
" -l: LPC device configuration\n"
|
||||||
" -m: memory size in MB\n"
|
" -m: memory size in MB\n"
|
||||||
" -p: pin 'vcpu' to 'hostcpu'\n"
|
|
||||||
" -r: ramdisk image path\n"
|
" -r: ramdisk image path\n"
|
||||||
" -s: <slot,driver,configinfo> PCI slot config\n"
|
" -s: <slot,driver,configinfo> PCI slot config\n"
|
||||||
" -U: uuid\n"
|
" -U: uuid\n"
|
||||||
|
@ -193,43 +190,6 @@ print_version(void)
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
pincpu_parse(const char *opt)
|
|
||||||
{
|
|
||||||
int vcpu, pcpu;
|
|
||||||
char *cp;
|
|
||||||
|
|
||||||
if (dm_strtoi(opt, &cp, 10, &vcpu) || *cp != ':' ||
|
|
||||||
dm_strtoi(cp + 1, &cp, 10, &pcpu)) {
|
|
||||||
fprintf(stderr, "invalid format: %s\n", opt);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vcpu < 0 || vcpu >= VM_MAXCPU) {
|
|
||||||
fprintf(stderr, "vcpu '%d' outside valid range from 0 to %d\n",
|
|
||||||
vcpu, VM_MAXCPU - 1);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pcpu < 0 || pcpu >= CPU_SETSIZE) {
|
|
||||||
fprintf(stderr,
|
|
||||||
"hostcpu '%d' outside valid range from 0 to %d\n",
|
|
||||||
pcpu, CPU_SETSIZE - 1);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vcpumap[vcpu] == NULL) {
|
|
||||||
vcpumap[vcpu] = malloc(sizeof(cpuset_t));
|
|
||||||
if (vcpumap[vcpu] == NULL) {
|
|
||||||
perror("malloc");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
CPU_ZERO(vcpumap[vcpu]);
|
|
||||||
}
|
|
||||||
CPU_SET(pcpu, vcpumap[vcpu]);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Convert guest physical address to host virtual address
|
* @brief Convert guest physical address to host virtual address
|
||||||
*
|
*
|
||||||
|
@ -743,7 +703,6 @@ enum {
|
||||||
|
|
||||||
static struct option long_options[] = {
|
static struct option long_options[] = {
|
||||||
{"acpi", no_argument, 0, 'A' },
|
{"acpi", no_argument, 0, 'A' },
|
||||||
{"pincpu", required_argument, 0, 'p' },
|
|
||||||
{"ncpus", required_argument, 0, 'c' },
|
{"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' },
|
||||||
|
@ -815,13 +774,6 @@ main(int argc, char *argv[])
|
||||||
case 'A':
|
case 'A':
|
||||||
acpi = 1;
|
acpi = 1;
|
||||||
break;
|
break;
|
||||||
case 'p':
|
|
||||||
if (pincpu_parse(optarg) != 0) {
|
|
||||||
errx(EX_USAGE,
|
|
||||||
"invalid vcpu pinning configuration '%s'",
|
|
||||||
optarg);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'c':
|
case 'c':
|
||||||
dm_strtoi(optarg, NULL, 0, &guest_ncpus);
|
dm_strtoi(optarg, NULL, 0, &guest_ncpus);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue