acrn-dm: change command option name from "pcpu_list" to "cpu_affinity"

commit 71bdc27a0f ("acrn-dm: implement cpu_affinity command line argument")
doesn't use correct name.

Tracked-On: #4616
Signed-off-by: Zide Chen <zide.chen@intel.com>
This commit is contained in:
Zide Chen 2020-04-23 13:58:18 -07:00 committed by wenlingz
parent 1da7e4145f
commit 2c9c681e6d
3 changed files with 11 additions and 11 deletions

View File

@ -164,7 +164,7 @@ usage(int code)
#endif #endif
" --vsbl: vsbl file path\n" " --vsbl: vsbl file path\n"
" --ovmf: ovmf file path\n" " --ovmf: ovmf file path\n"
" --pcpu_list: list of pCPUs assigned to this VM\n" " --cpu_affinity: list of pCPUs assigned to this VM\n"
" --part_info: guest partition info file path\n" " --part_info: guest partition info file path\n"
" --enable_trusty: enable trusty for guest\n" " --enable_trusty: enable trusty for guest\n"
" --debugexit: enable debug exit function\n" " --debugexit: enable debug exit function\n"
@ -719,7 +719,7 @@ sig_handler_term(int signo)
enum { enum {
CMD_OPT_VSBL = 1000, CMD_OPT_VSBL = 1000,
CMD_OPT_OVMF, CMD_OPT_OVMF,
CMD_OPT_PCPU_LIST, CMD_OPT_CPU_AFFINITY,
CMD_OPT_PART_INFO, CMD_OPT_PART_INFO,
CMD_OPT_TRUSTY_ENABLE, CMD_OPT_TRUSTY_ENABLE,
CMD_OPT_VIRTIO_POLL_ENABLE, CMD_OPT_VIRTIO_POLL_ENABLE,
@ -759,7 +759,7 @@ static struct option long_options[] = {
#endif #endif
{"vsbl", required_argument, 0, CMD_OPT_VSBL}, {"vsbl", required_argument, 0, CMD_OPT_VSBL},
{"ovmf", required_argument, 0, CMD_OPT_OVMF}, {"ovmf", required_argument, 0, CMD_OPT_OVMF},
{"pcpu_list", required_argument, 0, CMD_OPT_PCPU_LIST}, {"cpu_affinity", required_argument, 0, CMD_OPT_CPU_AFFINITY},
{"part_info", required_argument, 0, CMD_OPT_PART_INFO}, {"part_info", required_argument, 0, CMD_OPT_PART_INFO},
{"enable_trusty", no_argument, 0, {"enable_trusty", no_argument, 0,
CMD_OPT_TRUSTY_ENABLE}, CMD_OPT_TRUSTY_ENABLE},
@ -877,8 +877,8 @@ main(int argc, char *argv[])
errx(EX_USAGE, "invalid ovmf param %s", optarg); errx(EX_USAGE, "invalid ovmf param %s", optarg);
skip_pci_mem64bar_workaround = true; skip_pci_mem64bar_workaround = true;
break; break;
case CMD_OPT_PCPU_LIST: case CMD_OPT_CPU_AFFINITY:
if (acrn_parse_pcpu_list(optarg) != 0) if (acrn_parse_cpu_affinity(optarg) != 0)
errx(EX_USAGE, "invalid pcpu param %s", optarg); errx(EX_USAGE, "invalid pcpu param %s", optarg);
break; break;
case CMD_OPT_PART_INFO: case CMD_OPT_PART_INFO:

View File

@ -99,12 +99,12 @@ static void add_one_pcpu(int pcpu_id)
/* /*
* example options: * example options:
* --pcpu_list 1,2,3 * --cpu_affinity 1,2,3
* --pcpu_list 1-3 * --cpu_affinity 1-3
* --pcpu_list 1,3,4-6 * --cpu_affinity 1,3,4-6
* --pcpu_list 1,3,4-6,9 * --cpu_affinity 1,3,4-6,9
*/ */
int acrn_parse_pcpu_list(char *opt) int acrn_parse_cpu_affinity(char *opt)
{ {
char *str, *cp; char *str, *cp;
int pcpu_id; int pcpu_id;

View File

@ -134,7 +134,7 @@ int vm_set_ptdev_intx_info(struct vmctx *ctx, uint16_t virt_bdf,
int vm_reset_ptdev_intx_info(struct vmctx *ctx, uint16_t virt_bdf, int vm_reset_ptdev_intx_info(struct vmctx *ctx, uint16_t virt_bdf,
uint16_t phys_bdf, int virt_pin, bool pic_pin); uint16_t phys_bdf, int virt_pin, bool pic_pin);
int acrn_parse_pcpu_list(char *arg); int acrn_parse_cpu_affinity(char *arg);
int vm_create_vcpu(struct vmctx *ctx, uint16_t vcpu_id); int vm_create_vcpu(struct vmctx *ctx, uint16_t vcpu_id);
int vm_set_vcpu_regs(struct vmctx *ctx, struct acrn_set_vcpu_regs *cpu_regs); int vm_set_vcpu_regs(struct vmctx *ctx, struct acrn_set_vcpu_regs *cpu_regs);