the bitrig marco_vmm branch has been updated by marco with 28 new commits:

commit 9997e704d69f9a15ebd416b3177d6d4d1e9aec9d
diff: https://github.com/bitrig/bitrig/commit/9997e70
author: claudio <[email protected]>
date: Sat Dec 5 17:30:34 2015 +0000

Another imsg_read user I did miss in my EAGAIN rampage.

M       usr.sbin/vmctl/main.c
M       usr.sbin/vmd/control.c
M       usr.sbin/vmd/proc.c

commit 699ee068f0f98932484ade0b25c5e7d112f84f17
diff: https://github.com/bitrig/bitrig/commit/699ee06
author: reyk <[email protected]>
date: Fri Dec 4 10:54:21 2015 +0000

A VM has to run with at least 1 CPU.

M       usr.sbin/vmd/config.c

commit 5451f514df0a942fa8181bb25a16117566b2a536
diff: https://github.com/bitrig/bitrig/commit/5451f51
author: reyk <[email protected]>
date: Thu Dec 3 23:32:32 2015 +0000

Re-add the "load" and "reload" commands to vmctl: Instead of parsing
the configuration in vmctl directly, it now sends a (re)load request
to vmd.  The reload also resets the existing configuration status -
this doesn't do much difference yet but a future change will compare
if a specified VM is already running.  "load" will allow to add
configuration, while "reload" resets the state before loading.

M       usr.sbin/vmctl/main.c
M       usr.sbin/vmctl/vmctl.8
M       usr.sbin/vmctl/vmctl.h
M       usr.sbin/vmd/config.c
M       usr.sbin/vmd/control.c
M       usr.sbin/vmd/vmd.c
M       usr.sbin/vmd/vmd.h
M       usr.sbin/vmd/vmm.c

commit b4ca6a93237701381394737ff8d1b6385d10feba
diff: https://github.com/bitrig/bitrig/commit/b4ca6a9
author: jmc <[email protected]>
date: Thu Dec 3 22:18:37 2015 +0000

sort SEE ALSO;

M       usr.sbin/vmd/vm.conf.5

commit 9ebd16c31b4b1c598899179a83d1ec76aed51023
diff: https://github.com/bitrig/bitrig/commit/9ebd16c
author: reyk <[email protected]>
date: Thu Dec 3 21:45:45 2015 +0000

Replace vmmctl with vmctl.  Also remove parse.y from the "new" vmctl.

As discussed with mlarkin@ and deraadt@

A       usr.sbin/vmctl/Makefile
A       usr.sbin/vmctl/main.c
A       usr.sbin/vmctl/vmctl.8
A       usr.sbin/vmctl/vmctl.c
A       usr.sbin/vmctl/vmctl.h
M       usr.sbin/vmd/vm.conf.5
M       usr.sbin/vmd/vmd.8

commit 7315d19ab7d217e54f92a09f7fb1fe709b2e8a01
diff: https://github.com/bitrig/bitrig/commit/7315d19
author: reyk <[email protected]>
date: Thu Dec 3 16:18:13 2015 +0000

Add and document -D and -f flags to vmd.

M       usr.sbin/vmd/vmd.8
M       usr.sbin/vmd/vmd.c

commit 97b6498e23fb73ae7b59aa593a3430bb31abbae9
diff: https://github.com/bitrig/bitrig/commit/97b6498
author: reyk <[email protected]>
date: Thu Dec 3 16:13:04 2015 +0000

mlarkin's code has been moved to vmm.c, so it is ok to claim the copyright.

M       usr.sbin/vmd/vmd.c

commit 47c073cf06c2cbadf412560c130d10ddb47e91b2
diff: https://github.com/bitrig/bitrig/commit/47c073c
author: reyk <[email protected]>
date: Thu Dec 3 16:11:32 2015 +0000

Add support for an optional vm.conf(5) file in vmd.  This will replace
vmm.conf(5) in vmmctl.  For a short time, both vmd and vmmctl will
support a configuration file, but vmmctl will be changed to send
"load" requests to vmd instead of loading and parsing the file
directly.

M       usr.sbin/vmd/Makefile
M       usr.sbin/vmd/config.c
A       usr.sbin/vmd/parse.y
A       usr.sbin/vmd/vm.conf.5
M       usr.sbin/vmd/vmd.c
M       usr.sbin/vmd/vmd.h

commit 31835f55e1ea8e1d2f9f15068c1e05e42cd1419b
diff: https://github.com/bitrig/bitrig/commit/31835f5
author: reyk <[email protected]>
date: Thu Dec 3 13:27:14 2015 +0000

prepare config_getvm() for parse.y

M       usr.sbin/vmd/config.c
M       usr.sbin/vmd/vmd.c
M       usr.sbin/vmd/vmd.h
M       usr.sbin/vmd/vmm.c

commit 3a193059dc667f9d049baa9d27d0086aa96c6c31
diff: https://github.com/bitrig/bitrig/commit/3a19305
author: reyk <[email protected]>
date: Thu Dec 3 13:08:44 2015 +0000

Use PEERCRED to obtain the user id of the vmmctl user.  This is used to
restrict write operations (start/stop/terminate/load) to root for now,
but allow others to obtain the status.  A more sophisticated model will
follow later, but this change prevents non-root users, even if in the wheel
group, to start vms and thus to open any files read-writable as disks.

M       usr.sbin/vmd/control.c
M       usr.sbin/vmd/proc.h

commit 223a70869c6059c199b27e7a69f9b9446aeea5ca
diff: https://github.com/bitrig/bitrig/commit/223a708
author: reyk <[email protected]>
date: Thu Dec 3 08:42:11 2015 +0000

spacing

M       usr.sbin/vmd/loadfile_elf.c
M       usr.sbin/vmd/pci.c
M       usr.sbin/vmd/proc.h
M       usr.sbin/vmd/virtio.c
M       usr.sbin/vmd/virtio.h
M       usr.sbin/vmd/vmd.h
M       usr.sbin/vmd/vmm.c

commit e398c4a73e8130827998633dd76a0efd32a55fb5
diff: https://github.com/bitrig/bitrig/commit/e398c4a
author: reyk <[email protected]>
date: Wed Dec 2 23:33:43 2015 +0000

send the tty name to vmmctl and print it as a result.

M       usr.sbin/vmd/vmd.c
M       usr.sbin/vmd/vmd.h

commit 5f418cdde3a9a7773ba62dff0acd3557eb11b74a
diff: https://github.com/bitrig/bitrig/commit/5f418cd
author: reyk <[email protected]>
date: Wed Dec 2 22:19:11 2015 +0000

Split the fully privileged parent into two processes "parent" and
"vmm" with reduced privileges:
- the "parent" opens fds (disks, ifs, etc.) but runs as root but pledged as
  "stdio rpath wpath proc tty sendfd".
- the "vmm" process handles the creation and supervision of vm processes,
  and the primary communication with the vmm(4) subsystem.  It runs as _vmd
  in the chroot but does not use pledge, as the vmm ioctls are not allowed
  by any pledge model yet.
With this change, vmd starts to track the configuration state of VMs
in vmd and will allow other things later (like terminating a vm by
name, moving the configuration parser to vmd, ...).  More incremental
changes will follow.

M       usr.sbin/vmd/Makefile
A       usr.sbin/vmd/config.c
M       usr.sbin/vmd/control.c
M       usr.sbin/vmd/proc.h
M       usr.sbin/vmd/vmd.c
M       usr.sbin/vmd/vmd.h
M       usr.sbin/vmd/vmm.c

commit 2d9b5670b2d677c3d43952543d6dee26ef8752fb
diff: https://github.com/bitrig/bitrig/commit/2d9b567
author: reyk <[email protected]>
date: Wed Dec 2 13:43:36 2015 +0000

Sync with relayd, fix previous use of proc_compose*_imsg()

M       usr.sbin/vmd/proc.c
M       usr.sbin/vmd/proc.h
M       usr.sbin/vmd/vmm.c

commit b5b2edb7d7de6fee4f1552cb489d995e318f7879
diff: https://github.com/bitrig/bitrig/commit/b5b2edb
author: reyk <[email protected]>
date: Wed Dec 2 09:39:41 2015 +0000

Add back the "peerid" to the proc_compose*() functions: in relayd, I
initially left it out because I didn't have a need for it.  But it is
actually quite useful to carry a reference to the imsg data context
across processes.

M       usr.sbin/vmd/proc.c
M       usr.sbin/vmd/proc.h
M       usr.sbin/vmd/vmm.c

commit 7b80b559705baacd2276f35a4931a5d68596957a
diff: https://github.com/bitrig/bitrig/commit/7b80b55
author: reyk <[email protected]>
date: Wed Dec 2 09:14:25 2015 +0000

Start tweaking vmd's privsep and daemon model by splitting the main
process into multiple parts and adopting the "proc.c"-style from other
daemons.  This allows to further reduce the privileges, to give better
pledge(2), and to add some upcoming changes.

"please do" mlarkin@, deraadt@

M       usr.sbin/vmd/Makefile
A       usr.sbin/vmd/control.c
A       usr.sbin/vmd/proc.c
A       usr.sbin/vmd/proc.h
M       usr.sbin/vmd/vmd.c
M       usr.sbin/vmd/vmd.h
A       usr.sbin/vmd/vmm.c

commit 40bebaac9a873aea63e3016741159d7bdaa2cdb0
diff: https://github.com/bitrig/bitrig/commit/40bebaa
author: reyk <[email protected]>
date: Thu Nov 26 08:26:48 2015 +0000

Automatically start vmm(4) when the first VM is created and after the
last VM is terminated.  This allows to remove the explicit "vmm
enable" / "vmm disable" (VMM_IOC_START / VMM_IOC_STOP) ioctls.  You'll
have to update kernel and userland for this change, as the kernel ABI
changes.

OK mpi@ mlarkin@

M       sys/arch/amd64/amd64/vmm.c
M       sys/arch/amd64/include/vmmvar.h
M       usr.sbin/vmd/vmd.c

commit e3e0eaa22bd48bdf3c01643ab328118a684903e8
diff: https://github.com/bitrig/bitrig/commit/e3e0eaa
author: tedu <[email protected]>
date: Wed Nov 25 22:44:21 2015 +0000

typo: should be looking pid == -1

M       usr.sbin/vmd/vmd.c

commit 85bdf9b5c934c0bb50d310aed4c4e59f9c3c020a
diff: https://github.com/bitrig/bitrig/commit/85bdf9b
author: deraadt <[email protected]>
date: Mon Nov 23 23:41:49 2015 +0000

Do not need YFLAGS=

M       usr.sbin/vmd/Makefile

commit b79b8495e8458676a75dcd27708da06a2787763d
diff: https://github.com/bitrig/bitrig/commit/b79b849
author: reyk <[email protected]>
date: Mon Nov 23 21:07:29 2015 +0000

accept4() is restarted after signals which prevents vmd from exiting
in the current control socket loop.  Add a poll before the accept that
is not restarted and allows to escape the loop.  This code is kind of
temporary, as we're planning to replace the event handling, but it
allows to kill (or Ctrl+c) vmd for now.

OK tedu@, discussed with many

M       usr.sbin/vmd/vmd.c

commit 38e72d40c9344a75ffeee8fbd30f23ea36dd0e01
diff: https://github.com/bitrig/bitrig/commit/38e72d4
author: reyk <[email protected]>
date: Mon Nov 23 20:18:33 2015 +0000

I accidentally removed a newline in usage() when converting the log
messages to log_*.

>From Cesare Gargano

M       usr.sbin/vmd/vmd.c

commit b8f0efd9a5eee1e8fe9f10f9b77582c1e0fb9b5c
diff: https://github.com/bitrig/bitrig/commit/b8f0efd
author: reyk <[email protected]>
date: Mon Nov 23 13:04:49 2015 +0000

Add support for logging to stderr or syslog, and to run vmd in
foreground with -d.

OK mlarkin@ jung@

M       usr.sbin/vmd/Makefile
M       usr.sbin/vmd/loadfile_elf.c
A       usr.sbin/vmd/log.c
M       usr.sbin/vmd/pci.c
M       usr.sbin/vmd/virtio.c
M       usr.sbin/vmd/vmd.8
M       usr.sbin/vmd/vmd.c
M       usr.sbin/vmd/vmd.h

commit 1fad3cc75b3ecf1d57793c3aa72aaeb68c56fdfd
diff: https://github.com/bitrig/bitrig/commit/1fad3cc
author: deraadt <[email protected]>
date: Mon Nov 23 02:44:19 2015 +0000

install manpages global, since two architecture (will) use them.

M       usr.sbin/vmd/Makefile

commit 7246ba6c86f3b67f29d8ae9b0b9a237d3d6089e8
diff: https://github.com/bitrig/bitrig/commit/7246ba6
author: deraadt <[email protected]>
date: Sun Nov 22 22:29:48 2015 +0000

use PATH_MAX where needed

M       usr.sbin/vmd/vmd.c

commit b4f25a61b76b818088d3ad2e12d61768f4399235
diff: https://github.com/bitrig/bitrig/commit/b4f25a6
author: reyk <[email protected]>
date: Sun Nov 22 21:51:32 2015 +0000

Add $ Ids

M       usr.sbin/vmd/pci.c
M       usr.sbin/vmd/pci.h
M       usr.sbin/vmd/virtio.c
M       usr.sbin/vmd/virtio.h
M       usr.sbin/vmd/vmd.c
M       usr.sbin/vmd/vmd.h

commit b269ee262dda617812430d88611d7f9a57957bbe
diff: https://github.com/bitrig/bitrig/commit/b269ee2
author: jmc <[email protected]>
date: Sun Nov 22 21:24:48 2015 +0000

sundry tweaks;

M       usr.sbin/vmd/vmd.8

commit 7394274125165cb330c40302bce7b8e435c12ecf
diff: https://github.com/bitrig/bitrig/commit/7394274
author: mlarkin <[email protected]>
date: Sun Nov 22 20:20:32 2015 +0000


vmd(8) - virtual machine daemon.

There is still a lot to be done, and fixed, in these userland components
but I have received enough "it works, commit it" emails that it's time
to finish those things in tree.

discussed with many, tested by many.

A       usr.sbin/vmd/Makefile
A       usr.sbin/vmd/loadfile.h
A       usr.sbin/vmd/loadfile_elf.c
A       usr.sbin/vmd/pci.c
A       usr.sbin/vmd/pci.h
A       usr.sbin/vmd/virtio.c
A       usr.sbin/vmd/virtio.h
A       usr.sbin/vmd/vmd.8
A       usr.sbin/vmd/vmd.c
A       usr.sbin/vmd/vmd.h

commit 3bbe960fc37b9b49dab6d7d7e9768da22e956ba7
diff: https://github.com/bitrig/bitrig/commit/3bbe960
author: mlarkin <[email protected]>
date: Tue Nov 24 09:07:09 2015 +0000


Don't loop forever trying to handle NP faults in certain failure cases.

reported by Stefan Kempf with supplied patch, thanks.

M       sys/arch/amd64/amd64/vmm.c

Reply via email to