DM: make removing vGSI capability option as local

Current option of removing vGSI capability is global, which exposes
vIOAPIC link for all ptdev even only one need this. This patch makes
it as ptdev local option to lower the system level impact. To keep
vGSI for MSI capable ptdev, just explicitly append ",keep_gsi" in
option list, like "-s 14,passthru,0/e/0,keep_gsi"

Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Edwin Zhai
2018-06-22 18:57:31 +08:00
committed by lijinxia
parent dafca1743d
commit b4aa981bc0
3 changed files with 17 additions and 20 deletions

View File

@@ -137,7 +137,6 @@ usage(int code)
" -H: vmexit from the guest on hlt\n"
" -l: LPC device configuration\n"
" -m: memory size in MB\n"
" -M: do not hide INTx link for MSI&INTx capable ptdev\n"
" -p: pin 'vcpu' to 'hostcpu'\n"
" -P: vmexit from the guest on pause\n"
" -s: <slot,driver,configinfo> PCI slot config\n"
@@ -619,7 +618,6 @@ static struct option long_options[] = {
{"kernel", required_argument, 0, 'k' },
{"ramdisk", required_argument, 0, 'r' },
{"bootargs", required_argument, 0, 'B' },
{"ptdev_msi", no_argument, 0, 'M' },
{"version", no_argument, 0, 'v' },
{"gvtargs", required_argument, 0, 'G' },
{"help", no_argument, 0, 'h' },
@@ -658,7 +656,7 @@ main(int argc, char *argv[])
if (signal(SIGINT, sig_handler_term) == SIG_ERR)
fprintf(stderr, "cannot register handler for SIGINT\n");
optstr = "abehuwxACHIMPSTWYvk:r:B:p:g:c:s:m:l:U:G:i:";
optstr = "abehuwxACHIPSTWYvk:r:B:p:g:c:s:m:l:U:G:i:";
while ((c = getopt_long(argc, argv, optstr, long_options,
&option_idx)) != -1) {
switch (c) {
@@ -774,9 +772,6 @@ main(int argc, char *argv[])
exit(1);
}
break;
case 'M':
ptdev_prefer_msi(false);
break;
case 'v':
print_version();
break;