diff --git a/usr.sbin/bhyveload/bhyveload.8 b/usr.sbin/bhyveload/bhyveload.8 index 918e1f024bce..b5663435277c 100644 --- a/usr.sbin/bhyveload/bhyveload.8 +++ b/usr.sbin/bhyveload/bhyveload.8 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 7, 2015 +.Dd February 26, 2016 .Dt BHYVELOAD 8 .Os .Sh NAME @@ -35,6 +35,7 @@ guest inside a bhyve virtual machine .Sh SYNOPSIS .Nm +.Op Fl C .Op Fl S .Op Fl c Ar cons-dev .Op Fl d Ar disk-path @@ -125,6 +126,12 @@ respectively. The default value of .Ar mem-size is 256M. +.It Fl C +Include guest memory in the core file when +.Nm +dumps core. +This is intended for debugging an OS loader as it allows inspection of +the guest memory. .It Fl S Wire guest memory. .El diff --git a/usr.sbin/bhyveload/bhyveload.c b/usr.sbin/bhyveload/bhyveload.c index 60598b5203c6..8417f2a7efa3 100644 --- a/usr.sbin/bhyveload/bhyveload.c +++ b/usr.sbin/bhyveload/bhyveload.c @@ -674,7 +674,7 @@ main(int argc, char** argv) consin_fd = STDIN_FILENO; consout_fd = STDOUT_FILENO; - while ((opt = getopt(argc, argv, "Sc:d:e:h:l:m:")) != -1) { + while ((opt = getopt(argc, argv, "CSc:d:e:h:l:m:")) != -1) { switch (opt) { case 'c': error = altcons_open(optarg); @@ -709,6 +709,9 @@ main(int argc, char** argv) if (error != 0) errx(EX_USAGE, "Invalid memsize '%s'", optarg); break; + case 'C': + memflags |= VM_MEM_F_INCORE; + break; case 'S': memflags |= VM_MEM_F_WIRED; break;