| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
The vm is already being assigned by a call in the if-condition.
|
|
|
|
|
|
|
|
|
|
| |
and bootp renewals with vmd(8)'s built-in dhcp server. Previous behavior
ignored did not intercept these packets and instead transmitted them.
This should make vmd(8)'s dhcp behave more as a true dhcp server should and
allows it to work properly with the new dhcpleased(8) attempting a renewal.
OK mlarkin@
|
|
|
|
|
|
|
|
| |
This cleans up events on a pause or resume, but also fixes an issue
where the vm_pipe event channels are not properly reinitialized on a
received guest leading to broken serial console.
OK pd@, mlarkin@
|
|
|
|
|
| |
in a ring bundle.
ok florian
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Diff and (slightly tweaked) text below from
Dave Voutila < dave at sisu dot io >, thanks!
--
Since 6.7 switched to FFS2 as the default filesystem for new installs,
the ability for vmd(8) to load a kernel and boot.conf from a disk image
directly (without SeaBIOS) has been broken.
A diff from tb to add FFS2 support never mdae it into the tree.
On 5th Jan 2021, new ramdisks for amd64 have started shipping gzipped,
breaking the ability to load the bsd.rd directly as a kernel image for a vmd
guest without first uncompressing the image.
Using BIOS works, the FFS2 change happend ten months ago and few if any have
complained about the breakage. vmctl(8) is still vague about supporting it
per its man page and one still has to pass the disk image twice as a "-b"
and "-d" argument to boot an OpenBSD guest *without* BIOS.
Josh Rickmar reported the gzip issue on bugs@ and provided patches to add
support for compressed ramdisks and kernel images. The easiest way to do so
is to drop support for FFS images since they require a call to fmemopen(3)
while all the other logic uses fopen(3)/fdopen(3) calls and a file
descriptor. It is much easier to get thsoe patches merged if they don't
have to account for extracting files from disk images.
--
No objections anyone
"Removing it makes sense" reyk (who wrote the FFS module)
OK mlarkin
|
|
|
|
| |
ok mlarkin@
|
|
|
|
| |
ok mvs@ mlarkin@
|
|
|
|
|
| |
Feedback jmc
OK dlg
|
|
|
|
|
| |
tested by josh rickmar
ok kn@
|
| |
|
|
|
|
|
| |
to privsep_procid.
ok mortimer
|
|
|
|
|
| |
VMs with addition package daemons were not given enough time to shutdown
gracefully.
|
|
|
|
| |
ok mlarkin@ tb@
|
|
|
|
| |
OK kettenis@
|
|
|
|
|
|
| |
may in fact modify the string buffer.
truncation check requested and ok florian@
|
|
|
|
| |
requested by deraadt@
|
|
|
|
|
| |
This is based around VM-MIB from RFC7666,but does not export the full
spec. People more knowledgeable of vmd are encouraged to expand on this.
|
|
|
|
|
|
| |
separated from the non-register state.
Committed on behalf of jordan@
|
|
|
|
| |
use the new SID_SCSI2_RESPONSE.
|
|
|
|
|
|
| |
struct scsi_rw_10.
ok gnezdo@ jmatthew@ (who also did sparc64 compile test)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libevent functions for com, pic and rtc are now only called on event_thread.
vcpu exit handlers send messages on a dev pipe and callbacks on these events do
the event management (event_add, evtimer_add, etc). Previously, libevent state
was mutated by two threads, event_thread, that runs all the callbacks and the
vcpu thread when running exit handlers. This could have lead to libevent state
corruption.
Patch from Dave Voutila <dave@sisu.io>
ok claudio@
tested by abieber@ and brynet@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inject a pending interrupt even if the rcv_pending flag is set to avoid the
endless EV_READ loop where a byte lingers read to be read but the vcpu never
gets the interrupt to read it. (e.g. the result of spamming RETURN via the
serial console)
Also, protect com ratelimit handler with mutexes to avoid corruption of the
device state.
These changes help preventing linux vm crashes when the return key is held on
boot.
Discovered by and patch from Dave Voutila <dave@sisu.io>
ok tb@
|
|
|
|
|
|
|
| |
vm would get stuck if disconnected from console and get unstuck once console is
attached.
Spotted by tb@
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inject pending interrupt if com has receive pending. This was previously
accidently checked in with an unrelated change by Mike Larkin and was backed out
as it didn't fix the intended problem.
Also, protect com ratelimit handler with mutexes to avoid corruption of the
device state. These changes help preventing linux vm crashes when the return
key is held on boot.
Discovered by and patch from Dave Voutila <dave@sisu.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of a round about way of sending a message to vmm that 'send is
successful' and terminating by vm_remove from vmm, we can send the imsg and
exit in the vm process. The sigchld handler in vmm will vm_remove it from its
structures. This is how a normal vm is terminated as well.
Previously, vm_remove was called in vmm_dispatch_vm (ie. the event handler to
receive messages from vm process) when hanlding the IMSG_VMDOP_SEND_VM_RESPONSE
(ie. the vm process has written the vm state to the fd passed on by vmctl
send). This is not how vm_remove was intented to be used as it does a
free(vm). The vm struct holds the buffers for imsg and so after handling this
IMSG_VMDOP_SEND_VM_RESPONSE message, vmm_dispatch_vm loops again to do
imsg_get(ibuf, &imsg) to read the next message (and we had just freed this
*ibuf when we freed the vm struct) causing it to segfault.
reported by kn@
ok kn@
|
|
|
|
|
|
|
|
| |
Previous implementation hit a deadlock sometimes as the pthread_cond_broadcast
for the pause mutex could happen before pthread_cond_wait. This implementation
uses a barrier which is hit when all vpcus are paused.
ok mpi@
|
|
|
|
|
|
|
|
|
|
|
|
| |
This exposes VMM_IOC_MPROTECT_EPT which can be used by vmd to lock in physical
pages. Currently, vmd just terminates the vm in case it gets a protection fault
in the future.
This feature is used by solo5 which uses vmm(4) as a backend hypervisor.
ok mpi@
Patch from Adam Steen <adam@adamsteen.com.au>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I completely missed that part from vmctl.5's "LOCAL INTERFACES" section.
Reading `-L's description itself and the fact that it functions as a
boolean switch contrary to how `-i' expects a number, I made the wrong
assumption that it can only work for the first interface.
"vmctl -Li2" configures two interfaces, one witch DHCP and one without.
"vmctl -L -L" however configures two interfaces with DHCP IPs each.
My second mistake was to imply analogue behaviour for the configuration.
Now that you stated the obvious about `local' being per `interface' line,
it makes absoloutely no sense to above mentioned behaviour for static VM
definitions.
Pointed out by tb
|
|
|
|
|
|
|
| |
A VM can have multiple interfaces, but only the first one gets DHCP
if "-L" (vmctl) or "local" (vm.conf) is specified.
Positive feedback Mike Larkin
|
|
|
|
|
| |
manual pages that document the corresponding configuration files;
OK jmc@, and general direction discussed with many
|
|
|
|
|
|
|
|
|
|
| |
try to document and enumerate them.
This is most helpful when you try to assign the 5th interface to a guest,
and are confused why vmd(8) won't start the guest when only 4 tap devices
exist.
OK jmc@, kn@, pamela@
|
|
|
|
| |
The parameter block must not be omitted, so remove the Op markup.
|
|
|
|
| |
applied to "owner" too;
|
|
|
|
|
|
| |
into one logical item;
ok pd
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Omitting the owner value is not documented and ought to be rather invalid
syntax, but it parses as "[socket] owner root:wheel" which is the same as
simply omitting the owner line entirely.
Require a value, that is treat "socket owner" and "owner" as invalid syntax
and fail.
OK denis
|
|
|
|
|
|
|
|
|
|
|
|
| |
This addresses 'thundering herd' problem when a lot of
vms are configured in vm.conf. A lot of vms booting in parallel can
overload the host and also mess up tsc calibration in openbsd guests as
it uses PIT which doesn't fire reliably if the host is overloaded.
We default to starting vms with parallelism of ncpuonline and a delay 30 seconds
between batches. This is configurable in vm.conf.
ok mlarkin@ (also addressed comments from cheloha@)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removes an XXX which slept for 1s waiting for the vcpu thread to reach HLT and
pause. We now define a paused and unpaused condition so that a call to
pause_vm() / vmctl pause blocks till the vm really reaches a paused state.
Also, detach events for devices from event loop when pausing and add them back
when unpausing. This is because some callbacks call pthread_mutex_lock and if
the vm is paused, it would block also causing the libevent thread to block.
This would mean that we would not be able to process any IMSGs received from vmm
(parent process) including a message to unpause.
ok mlarkin@
|
|
|
|
|
|
|
|
|
| |
the "Fix at least one cause of VMs spinning at 100% host CPU" commit)
accidentally included some pieces of a different WIP. These pieces
remained in the tree after the revert and caused vmd to busy loop
after attaching to and detaching from a VM's console.
"please commit" mlarkin
|
|
|
|
|
|
| |
we ended up accidentally breaking vmctl. This will need more thought.
ok ori@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After debugging with ori@, it looks like an event ends up on the wrong
libevent queue, and we end continually de-queueing and re-queueing the
event continually. While it's unclear exactly why this happened, a clue
on libevent's github issues page for the same problem pointed us to using
a different event base for the device events. This seems to have unstuck
ori@'s problematic VM, and I have also seen no more hangs after this.
We have not completely separated the queues; ori@ will work on setting
new libevent bases for those later. But those events are pretty
frequency.
with help from and ok ori@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
error prone than manually editing rc.conf.local, and also works to
enable ipsec and accounting.
tweak from schwarze@ to use the \(dq\(dq syntax for quotes in '.Dl
foo_flags="" lines' instead of \&"\&".
while at it, fix a reference to a bogus /dev/dhclient.conf file that
recently snuck in.
ok jmc@ deraadt@ schwarze@
|
|
|
|
|
|
|
|
|
|
| |
The function argument is not checked at all and the only caller in config.c
always passes a buffer valid buffer.
Defer the error case's default value to the end to avoid rewriting in case
a node is opened.
Feedback and OK reyk
|
|
|
|
|
|
|
| |
Print the guest %rip when it tries to do I/O to a nonexistent port.
Also convert the message to a DPRINTF so that it doesn't leak
guest address information into any logging the host might be doing
under normal non-debug conditions.
|
|
|
|
| |
ok deraadt@
|
|
|
|
| |
ok reyk, mpi, benno, tb
|
| |
|
|
|
|
| |
ok mlarkin@
|
|
|
|
| |
Found by Hiltjo Posthuma, thanks!
|
|
|
|
|
|
|
| |
start. Favoring 'invalid template' over 'permission denied' should give
the user a better hint on what went wrong.
ok kn@ mlarkin@
|