Date: Thu, 12 Dec 2013 20:34:05 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259275 - head/usr.sbin/bhyvectl Message-ID: <201312122034.rBCKY5hq072455@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Thu Dec 12 20:34:04 2013 New Revision: 259275 URL: http://svnweb.freebsd.org/changeset/base/259275 Log: Add a command to inject an NMI on a specific vcpu. It is a simple wrapper around the existing vm_inject_nmi(). Reviewed by: grehan, neel Modified: head/usr.sbin/bhyvectl/bhyvectl.c Modified: head/usr.sbin/bhyvectl/bhyvectl.c ============================================================================== --- head/usr.sbin/bhyvectl/bhyvectl.c Thu Dec 12 20:20:46 2013 (r259274) +++ head/usr.sbin/bhyvectl/bhyvectl.c Thu Dec 12 20:34:04 2013 (r259275) @@ -189,12 +189,14 @@ usage(void) " [--set-mem=<memory in units of MB>]\n" " [--get-lowmem]\n" " [--get-highmem]\n" - " [--get-gpa-pmap]\n", + " [--get-gpa-pmap]\n" + " [--inject-nmi]\n", progname); exit(1); } static int get_stats, getcap, setcap, capval, get_gpa_pmap; +static int inject_nmi; static const char *capname; static int create, destroy, get_lowmem, get_highmem; static uint64_t memsize; @@ -557,6 +559,7 @@ main(int argc, char *argv[]) { "run", NO_ARG, &run, 1 }, { "create", NO_ARG, &create, 1 }, { "destroy", NO_ARG, &destroy, 1 }, + { "inject-nmi", NO_ARG, &inject_nmi, 1 }, { NULL, 0, NULL, 0 } }; @@ -825,6 +828,10 @@ main(int argc, char *argv[]) vmcs_entry_interruption_info); } + if (!error && inject_nmi) { + error = vm_inject_nmi(ctx, vcpu); + } + if (!error && (get_lowmem || get_all)) { gpa = 0; error = vm_get_memory_seg(ctx, gpa, &len, &wired);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312122034.rBCKY5hq072455>