Date: Sat, 4 Aug 2012 22:48:05 +0000 (UTC) From: Neel Natu <neel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r239043 - projects/bhyve/usr.sbin/bhyve Message-ID: <201208042248.q74Mm5CW005195@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: neel Date: Sat Aug 4 22:48:04 2012 New Revision: 239043 URL: http://svn.freebsd.org/changeset/base/239043 Log: Add the "-I" option to control whether or not an ioapic is visible to the guest. Obtained from: NetApp Modified: projects/bhyve/usr.sbin/bhyve/fbsdrun.c Modified: projects/bhyve/usr.sbin/bhyve/fbsdrun.c ============================================================================== --- projects/bhyve/usr.sbin/bhyve/fbsdrun.c Sat Aug 4 22:46:29 2012 (r239042) +++ projects/bhyve/usr.sbin/bhyve/fbsdrun.c Sat Aug 4 22:48:04 2012 (r239043) @@ -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, uin 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208042248.q74Mm5CW005195>