diff options
author | neel <neel@FreeBSD.org> | 2012-08-04 22:48:04 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2012-08-04 22:48:04 +0000 |
commit | 72240bed65f0a58f17a96e6a3931f12e92eb37f1 (patch) | |
tree | dfe529f0e0725369e8018a09143ffa6041b9042f /usr.sbin/bhyve | |
parent | ac88464d24af550cd19d2c9aefd2f431e6ae89ed (diff) | |
download | FreeBSD-src-72240bed65f0a58f17a96e6a3931f12e92eb37f1.zip FreeBSD-src-72240bed65f0a58f17a96e6a3931f12e92eb37f1.tar.gz |
Add the "-I" option to control whether or not an ioapic is visible to the guest.
Obtained from: NetApp
Diffstat (limited to 'usr.sbin/bhyve')
-rw-r--r-- | usr.sbin/bhyve/fbsdrun.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/usr.sbin/bhyve/fbsdrun.c b/usr.sbin/bhyve/fbsdrun.c index f5a7efc..cb34477 100644 --- a/usr.sbin/bhyve/fbsdrun.c +++ b/usr.sbin/bhyve/fbsdrun.c @@ -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 |