summaryrefslogtreecommitdiff
path: root/usr.sbin/vmd
AgeCommit message (Collapse)Author
2018-06-28sync DPADD with LDADD adding missing ${LIBPTHREAD} to ensureGleydson Soares
that binary is rebuilt in case of pthread library changes. OK deraadt@ reyk@
2018-06-26space between macro args and punctuation;Jason McIntyre
2018-06-26Add "socket owner" to allow changing the owner of the vmd control socket.Reyk Floeter
This allows to open vmctl control or console access to other users that are not in group wheel. Access for non-root users still defaults to read-only actions unless you change the owner (user/group) of each individual VM. Requested by Mischa Peters OK mlarkin@
2018-06-19print process name in debug messageReyk Floeter
2018-06-19knfReyk Floeter
2018-06-18remove the SECTIONS header, since a one line DESCRIPTION is a bit silly;Jason McIntyre
use a more general text for the sections, and avoid the catchup issue that was trying to document how many there were; ok benno rob
2018-06-11Fix an off-by-one line count when using include statements.denis
Thanks to otto@ for the initial diff. OK benno@
2018-05-23vmd(8): revert r1.23 (unlatched PIT reads), this made time go too fast onMike Larkin
some machines. Will investigate and commit a proper fix later.
2018-05-13vmd(8): enable pause / unpause for vm ownerspd
Patch from Mohamed Aslan. Thanks! ok kn@
2018-04-30vmd(8): unbreak i386Mike Larkin
2018-04-27vmd(8): implement vmd side of ELCR registersMike Larkin
ok guenther
2018-04-27vmd(8): allow counter state readback via misc port for square wave modeMike Larkin
2018-04-27vmd(8): allow unlatch PIT readsMike Larkin
ok ccardenas
2018-04-26vmd(8): fix some bugs in PIT mode settingMike Larkin
PIT modes are now properly handled, including INTTC mode. This fixes some bootloader timeouts. ok brynet
2018-04-26vmd(8): some more long lines that got missed last timeMike Larkin
2018-04-26vmd(8): handle PIT channel 2 status readback via port 0x61Mike Larkin
Allow PIT channel 2 status (fired/counting) readback via port 0x61 bit 5. ok guenther@
2018-04-26vmd(8): wrap some long linesMike Larkin
2018-04-26vmd(8): bump virtio network max queue size to 256 (to match qemu)Mike Larkin
2018-04-26vmd(8): use #defines for queue indices and cleanup some codeMike Larkin
ok phessler
2018-04-26vmd(8): fix broken networking on newer linux guest kernelsMike Larkin
Linux kernels after about 4.11.x or so exhibited problems with vmd(8)'s virtio implementation. This commit fixes two bugs - an descriptor index problem for the receive queue and a problem where the packet data was being copied into the secondary descriptor buffer (should now be the first descriptor's buffer, since that has enough size now for a non-jumbo frame). Verified on ubuntu 17.10 (linux 4.13.x) and regression tested on a variety of older linux guests and non-linux guests. ok ccardenas, phessler
2018-04-26Plug leak in error case of the common 'varset' implementations.Kenneth R Westerback
ok benno@
2018-04-26spelling error in log messageccardenas
2018-04-25vmd(8)'s early error messages weren't visible when started via /etc/rcMike Larkin
(such as errors relating to not having VMX/etc). Change the log_init to log to syslog so at least we have some chance of seeing these errors. requested and ok beck@
2018-04-21spelling error in log messageMike Larkin
2018-04-17Drive i8253 with CLOCK_MONOTONIC.cheloha
Ensures that the olatch decrements uniformly, independent of system wall clock jumps. While here, roll the olatch computation in i8253_do_readback() into a loop, and leverage the timespec macros in sys/time.h. Both make the code a lot more readable. ok mlarkin@
2018-04-13Close socket from vmm to parent after forking to vm process.Martijn van Duren
Ok ccardenas@
2018-03-29Make sure that the global config is send out immediately when it isMartijn van Duren
loaded. This makes sure that the local prefix specied in the config is always used. OK ccardenas@
2018-03-14block two VMs from using the same disk image file at the same time.Mike Larkin
Also changes an error message in vmctl to reflect same.
2018-02-28vmd: Fix 100% vmd cpu usage on linux receive / unpausepd
Use rtc_reschedule_per in mc146818_start instead of re arming the periodic interrupt without checking if it's enabled in REGB. reported by Dave Voutila ok phessler@
2018-02-18vmd: fix vmctl pause for non existing vm ids (never returns)pd
check if vm id is valid before sending to vmm for pausing. The 'lock' is caused by vmm sending back ENOENT for a non existent vm but vmd drops the message because it doesn't recogize the vmid vmm is talking about. This is an artifact of the 'policy' don't trust any imsg from a sibling priv sep process and do your own checking. reported by Abel Abraham Camarillo Ojeda ok mlarkin@ and ccardenas@
2018-02-15vmd(8): Properly return the correct byte when doing byte-aligned PCIMike Larkin
config space reads. ok kettenis@, ccardenas@
2018-02-05remove unused function prototypeMike Larkin
2018-02-01vmd: fix vioscsi dump and restorepd
This unbreaks send / receive. Also tested send / receive for vms with cdrom by booting install62.iso on a vm with a small empty disk, send to file, receive into a new vm and running an install of bsd* and base. ok ccardenas@
2018-01-26Fix Failure on Startccardenas
When attempting to start a vm from vm.conf that fails due to inadequate resources and such, do not remote vm entry from vm list. Reported by mpi@ ok mpi@
2018-01-19VMD: vioscsi - fix large ISO support in Linuxccardenas
Check if n_blocks is less than UINT32_MAX and not the image size in various places (READ_CAPACITY_* and GET_CONFIGURATION). ok mlarkin@ and dlg@
2018-01-16VMD: vioscsi - add support for REPORT_LUNS opcodeccardenas
ok mlarkin@
2018-01-15VMD: vioscsi refactorccardenas
Each opcode is now handled in the respective function (vioscsi_handle_xxx) which allows more functionality to be added easier. No functional changes confirmed by guest testing. ok mlarkin@
2018-01-10Don't require "disk" or "kernel", also allow just "cdrom" instead, a VM canStuart Henderson
still be useful with only cdrom storage. ok ccardenas@
2018-01-08Fix typo in comment; ok mpi@anton
2018-01-08Enable TIOCUCNTL to be able to set ns8250's break detected condition.Martin Pieuchot
It is now possible to send BREAK commands to vmd(8) independently of the serial terminal emulator. Happy virtual ddb(4) hacking! No objection from mlarkin@, ok nicm@, ccardenas@, deraadt@
2018-01-05Use log_warnx() in places where errno is irrelevant.Jeremie Courreges-Anglas
ok mlarkin@ ccardenas@
2018-01-04Address TOCTOU issue with checking to ensure disks are regular files.ccardenas
Reported by jca@. Ok mlarkin@ and deraadt@
2018-01-03Add initial CD-ROM support to VMD via vioscsi.ccardenas
* Adds 'cdrom' keyword to vm.conf(5) and '-r' to vmctl(8) * Support various sized ISOs (Limitation of 4G ISOs on Linux guests) * Known working guests: OpenBSD (primary), Alpine Linux (primary), CentOS 6 (secondary), Ubuntu 17.10 (secondary). NOTE: Secondary indicates some issue(s) preventing full/reliable functionality outside the scope of the vioscsi work. * If the attached disks are non-bootable (i.e. empty), SeaBIOS (vmd's default BIOS) will boot from CD-ROM. ok mlarkin@, jca@
2017-12-06Make vmd respect owner when starting non-disabled vms.Aaron Bieber
OK pd@, benno@
2017-11-30When performing vmctl reload and a previously configured vm is running,ccardenas
exit with an EALREADY vs EPERM. ok mlarkin@
2017-11-29vmd(8): fix broken IRR bit setting for the slave PIC. Noticed by claudioMike Larkin
when he tried to make a vm with 4 network interfaces. ok claudio
2017-11-29make vmm(4) less responsible for initial register state, preferring to letMike Larkin
usermode daemons handle that. ok pd@
2017-11-28fix some spelling errors in a few commentsMike Larkin
2017-11-27typo in comments "optionel" -> "optional"Mike Larkin
2017-11-11reads better as *an* rdomain, i think;Jason McIntyre