Skip to content

Commit b9865fd

Browse files
ZideChen0wenlingz
authored andcommitted
acrn-dm: change command option name from "pcpu_list" to "cpu_affinity"
commit 71bdc27 ("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>
1 parent a6ea34b commit b9865fd

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

devicemodel/core/main.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ usage(int code)
164164
#endif
165165
" --vsbl: vsbl file path\n"
166166
" --ovmf: ovmf file path\n"
167-
" --pcpu_list: list of pCPUs assigned to this VM\n"
167+
" --cpu_affinity: list of pCPUs assigned to this VM\n"
168168
" --part_info: guest partition info file path\n"
169169
" --enable_trusty: enable trusty for guest\n"
170170
" --debugexit: enable debug exit function\n"
@@ -719,7 +719,7 @@ sig_handler_term(int signo)
719719
enum {
720720
CMD_OPT_VSBL = 1000,
721721
CMD_OPT_OVMF,
722-
CMD_OPT_PCPU_LIST,
722+
CMD_OPT_CPU_AFFINITY,
723723
CMD_OPT_PART_INFO,
724724
CMD_OPT_TRUSTY_ENABLE,
725725
CMD_OPT_VIRTIO_POLL_ENABLE,
@@ -759,7 +759,7 @@ static struct option long_options[] = {
759759
#endif
760760
{"vsbl", required_argument, 0, CMD_OPT_VSBL},
761761
{"ovmf", required_argument, 0, CMD_OPT_OVMF},
762-
{"pcpu_list", required_argument, 0, CMD_OPT_PCPU_LIST},
762+
{"cpu_affinity", required_argument, 0, CMD_OPT_CPU_AFFINITY},
763763
{"part_info", required_argument, 0, CMD_OPT_PART_INFO},
764764
{"enable_trusty", no_argument, 0,
765765
CMD_OPT_TRUSTY_ENABLE},
@@ -877,8 +877,8 @@ main(int argc, char *argv[])
877877
errx(EX_USAGE, "invalid ovmf param %s", optarg);
878878
skip_pci_mem64bar_workaround = true;
879879
break;
880-
case CMD_OPT_PCPU_LIST:
881-
if (acrn_parse_pcpu_list(optarg) != 0)
880+
case CMD_OPT_CPU_AFFINITY:
881+
if (acrn_parse_cpu_affinity(optarg) != 0)
882882
errx(EX_USAGE, "invalid pcpu param %s", optarg);
883883
break;
884884
case CMD_OPT_PART_INFO:

devicemodel/core/vmmapi.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ static void add_one_pcpu(int pcpu_id)
9999

100100
/*
101101
* example options:
102-
* --pcpu_list 1,2,3
103-
* --pcpu_list 1-3
104-
* --pcpu_list 1,3,4-6
105-
* --pcpu_list 1,3,4-6,9
102+
* --cpu_affinity 1,2,3
103+
* --cpu_affinity 1-3
104+
* --cpu_affinity 1,3,4-6
105+
* --cpu_affinity 1,3,4-6,9
106106
*/
107-
int acrn_parse_pcpu_list(char *opt)
107+
int acrn_parse_cpu_affinity(char *opt)
108108
{
109109
char *str, *cp;
110110
int pcpu_id;

devicemodel/include/vmmapi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ int vm_set_ptdev_intx_info(struct vmctx *ctx, uint16_t virt_bdf,
134134
int vm_reset_ptdev_intx_info(struct vmctx *ctx, uint16_t virt_bdf,
135135
uint16_t phys_bdf, int virt_pin, bool pic_pin);
136136

137-
int acrn_parse_pcpu_list(char *arg);
137+
int acrn_parse_cpu_affinity(char *arg);
138138
int vm_create_vcpu(struct vmctx *ctx, uint16_t vcpu_id);
139139
int vm_set_vcpu_regs(struct vmctx *ctx, struct acrn_set_vcpu_regs *cpu_regs);
140140

0 commit comments

Comments
 (0)