mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-04 12:52:15 +00:00
Add the "-I" option to control whether or not an ioapic is visible to the guest.
Obtained from: NetApp
This commit is contained in:
parent
1ff856dbd7
commit
96b1c4db60
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/bhyve/; revision=239043
@ -126,13 +126,14 @@ usage(int code)
|
||||
{
|
||||
|
||||
fprintf(stderr,
|
||||
"Usage: %s [-ehBHP][-g <gdb port>][-z <hz>][-s <pci>][-p pincpu]"
|
||||
"[-n <pci>][-m lowmem][-M highmem] <vm>\n"
|
||||
"Usage: %s [-ehBHIP][-g <gdb port>][-z <hz>][-s <pci>]"
|
||||
"[-S <pci>][-p pincpu][-n <pci>][-m lowmem][-M highmem] <vm>\n"
|
||||
" -g: gdb port (default is %d and 0 means don't open)\n"
|
||||
" -c: # cpus (default 1)\n"
|
||||
" -p: pin vcpu 'n' to host cpu 'pincpu + n'\n"
|
||||
" -B: inject breakpoint exception on vm entry\n"
|
||||
" -H: vmexit from the guest on hlt\n"
|
||||
" -I: present an ioapic to the guest\n"
|
||||
" -P: vmexit from the guest on pause\n"
|
||||
" -e: exit on unhandled i/o access\n"
|
||||
" -h: help\n"
|
||||
@ -522,7 +523,7 @@ vm_loop(struct vmctx *ctx, int vcpu, uint64_t rip)
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int c, error, gdb_port, inject_bkpt, tmp, err;
|
||||
int c, error, gdb_port, inject_bkpt, tmp, err, ioapic;
|
||||
struct vmctx *ctx;
|
||||
uint64_t rip;
|
||||
|
||||
@ -530,8 +531,9 @@ main(int argc, char *argv[])
|
||||
progname = basename(argv[0]);
|
||||
gdb_port = DEFAULT_GDB_PORT;
|
||||
guest_ncpus = 1;
|
||||
ioapic = 0;
|
||||
|
||||
while ((c = getopt(argc, argv, "ehBHPxp:g:c:z:s:S:n:m:M:")) != -1) {
|
||||
while ((c = getopt(argc, argv, "ehBHIPxp:g:c:z:s:S:n:m:M:")) != -1) {
|
||||
switch (c) {
|
||||
case 'B':
|
||||
inject_bkpt = 1;
|
||||
@ -572,6 +574,9 @@ main(int argc, char *argv[])
|
||||
case 'H':
|
||||
guest_vmexit_on_hlt = 1;
|
||||
break;
|
||||
case 'I':
|
||||
ioapic = 1;
|
||||
break;
|
||||
case 'P':
|
||||
guest_vmexit_on_pause = 1;
|
||||
break;
|
||||
@ -661,7 +666,7 @@ main(int argc, char *argv[])
|
||||
/*
|
||||
* build the guest tables, MP etc.
|
||||
*/
|
||||
vm_build_tables(ctx, guest_ncpus, oem_tbl_start, oem_tbl_size);
|
||||
vm_build_tables(ctx, guest_ncpus, ioapic, oem_tbl_start, oem_tbl_size);
|
||||
|
||||
/*
|
||||
* Add CPU 0
|
||||
|
Loading…
Reference in New Issue
Block a user