Skip to content

Commit 909d157

Browse files
Wei LiuNanlinXie
authored andcommitted
dm: cleanup the cmd options for acrn-dm
For acrn-dm cmd options, there are some mismatch usage from acrn-dm help message. This patch will cleanup them. Tracked-On: #1469 Signed-off-by: Wei Liu <weix.w.liu@intel.com> Reviewed-by: Jason Chen <jason.cj.chen@intel.com> Reviewed-by: Eddie Dong <eddie.dong@intel.com>
1 parent 2202b7f commit 909d157

File tree

1 file changed

+3
-23
lines changed

1 file changed

+3
-23
lines changed

devicemodel/core/main.c

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ char *vsbl_file_name;
8080
uint8_t trusty_enabled;
8181
bool stdio_in_use;
8282

83-
static int guest_vmexit_on_hlt, guest_vmexit_on_pause;
8483
static int virtio_msix = 1;
8584
static int x2apic_mode; /* default is xAPIC */
8685

@@ -136,14 +135,11 @@ usage(int code)
136135
" -b: enable bvmcons\n"
137136
" -c: # cpus (default 1)\n"
138137
" -C: include guest memory in core file\n"
139-
" -e: exit on unhandled I/O access\n"
140138
" -g: gdb port\n"
141139
" -h: help\n"
142-
" -H: vmexit from the guest on hlt\n"
143140
" -l: LPC device configuration\n"
144141
" -m: memory size in MB\n"
145142
" -p: pin 'vcpu' to 'hostcpu'\n"
146-
" -P: vmexit from the guest on pause\n"
147143
" -s: <slot,driver,configinfo> PCI slot config\n"
148144
" -S: guest memory cannot be swapped\n"
149145
" -u: RTC keeps UTC time\n"
@@ -171,7 +167,7 @@ usage(int code)
171167
static void
172168
print_version(void)
173169
{
174-
fprintf(stderr, "DM version is: %s-%s (daily tag:%s), build by %s@%s\n",
170+
fprintf(stdout, "DM version is: %s-%s (daily tag:%s), build by %s@%s\n",
175171
DM_FULL_VERSION,
176172
DM_BUILD_VERSION, DM_DAILY_TAG, DM_BUILD_USER, DM_BUILD_TIME);
177173

@@ -695,12 +691,11 @@ static struct option long_options[] = {
695691
{"ncpus", required_argument, 0, 'c' },
696692
{"memflags_incore", no_argument, 0, 'C' },
697693
{"gdb_port", required_argument, 0, 'g' },
694+
{"ioc node", required_argument, 0, 'i' },
698695
{"lpc", required_argument, 0, 'l' },
699696
{"pci_slot", required_argument, 0, 's' },
700697
{"memflags_wired", no_argument, 0, 'S' },
701698
{"memsize", required_argument, 0, 'm' },
702-
{"ioapic", no_argument, 0, 'I' },
703-
{"vmexit_pause", no_argument, 0, 'P' },
704699
{"rtc_localtime", no_argument, 0, 'u' },
705700
{"uuid", required_argument, 0, 'U' },
706701
{"strictmsr", no_argument, 0, 'w' },
@@ -747,7 +742,7 @@ main(int argc, char *argv[])
747742
if (signal(SIGINT, sig_handler_term) == SIG_ERR)
748743
fprintf(stderr, "cannot register handler for SIGINT\n");
749744

750-
optstr = "abehuwxACHIPSWYvk:r:B:p:g:c:s:m:l:U:G:i:";
745+
optstr = "abhuwxACSWYvk:r:B:p:g:c:s:m:l:U:G:i:";
751746
while ((c = getopt_long(argc, argv, optstr, long_options,
752747
&option_idx)) != -1) {
753748
switch (c) {
@@ -801,21 +796,6 @@ main(int argc, char *argv[])
801796
if (error)
802797
errx(EX_USAGE, "invalid memsize '%s'", optarg);
803798
break;
804-
case 'H':
805-
guest_vmexit_on_hlt = 1;
806-
break;
807-
case 'I':
808-
/*
809-
* The "-I" option was used to add an ioapic to the
810-
* virtual machine.
811-
*
812-
* An ioapic is now provided unconditionally for each
813-
* virtual machine and this option is now deprecated.
814-
*/
815-
break;
816-
case 'P':
817-
guest_vmexit_on_pause = 1;
818-
break;
819799
case 'u':
820800
vrtc_enable_localtime(0);
821801
break;

0 commit comments

Comments
 (0)