summaryrefslogtreecommitdiffstats
path: root/usr.sbin/vmd/loadfile_elf.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* vmd(8)/vmctl(8) for i386. Some ugliness in #ifdef __i386__ areas will bemlarkin2016-10-261-1/+39
| | | | | | | | fixed in tree, but the changes required were pretty minimal. Note that i386 hosts are still presently limited to running i386 guests. ok deraadt, stefan, jca
* move the .SUNW_ctf section name definition to exec_elf.h and document it in elf(5)jasper2016-09-171-2/+2
| | | | | feedback from guenther@ ok guenther@ kettenis@
* sync with sys/lib/libsa/loadfile_elf.c -r1.12 and load the .SUNW_ctf sectionjasper2016-09-131-2/+3
| | | | pointed out by mlarkin@
* Make vcpu_reset_regs use new writeregs codestefan2016-09-011-6/+6
| | | | Makes reset code a little simpler. ok mlarkin@
* small bits of header cleanup; ok mlarkinderaadt2016-08-171-7/+7
|
* Copy ELF headers into guest VM memorystefan2016-05-261-12/+10
| | | | | This gives ddb access to the symbols of the kernel running inside the VM. ok mlarkin@
* Place a BOOTARG_END section at the end of the boot arguments list pushedmlarkin2016-04-071-1/+4
| | | | | | | | to the VM during boot. i386 guest kernels need this marker to boot, and with this diff, it is possible to install and run an OpenBSD i386 guest VM using vmm(4). Note that i386 guests require a host CPU that supports unrestricted guest mode (eg, post-Nehalem) for the time being, hopefully this can be addressed later.
* Support processors without unrestricted guest capability.mlarkin2016-04-051-5/+34
| | | | ok stefan
* Directly use physical addresses from ELF header for kernel loading.stefan2016-04-041-14/+12
| | | | | | | This allows us to remove the 'do_mask' parameters in read_mem and write_mem as well as the address mask operaton itself. ok mlarkin@
* Introduce memory ranges to support VMs with >= 4G RAMstefan2016-03-131-71/+104
| | | | | | | | | | | | | | | | | | | | | | | Kernel bits: - When creating a VM, a list of memory ranges has to be specified, similar to the BIOS memory map. This is necessary for VMs with RAM sizes approaching 4G because we'll need PCI MMIO space in the higher parts of the 32 bit address space. vmctl and vmd bits: - Construct appropriate memory ranges to create a VM with a given RAM size - Construct a corresponding BIOS memory map from the memory ranges and update the boot params page accordingly. - Make sure that all variables that represent guest physical addresses match the address width of the target CPU instead of using uint32_t. - Fix some integer promotion glitches that actually restricted VM RAM size to 2G. This changes the VM create ioctl interface, so update your kernel, vmd, and vmctl. ok mlarkin@
* Set root device to sd0a, instead of wd0a. Virtio devices show upstefan2016-03-041-2/+3
| | | | | | | | | as sd. Original diff from Patrick Wildt. In addition, using the MAKEBOOTDEV macro no longer makes bsd ask for the root disk on VM boot. ok mlarkin@
* vmd(8) sometimes attempts page-crossing data copies between the hoststefan2016-01-161-13/+13
| | | | | | | | | | | | | and guest. The readpage/writepage ioctls of vmm(4) do not support this and they return EINVAL on such attempts since recently. Avoid page-crossing guest memory accesses by changing read_page() and write_page() into read_mem() and write_mem() that can copy arbitrary lengths of data between host<->guest without page-crossing accesses. This also allows us to remove page-wise copy-loops in a few places. ok mlarkin@
* Make some things static that are only used in loadfile_elf.cmlarkin2016-01-051-5/+5
| | | | diff from Michal Mazurek, thanks!
* Fail fast if elf64_exec fails. No need to populate the bootargs/stackmlarkin2016-01-051-2/+5
| | | | | | and gdt pages if we couldn't load the kernel. diff from Michal Mazurek, thanks!
* more bzero -> memset conversionsmlarkin2016-01-051-10/+10
| | | | from Michal Mazurek, thanks!
* Move vcpu register state init to vmd. Allows vmd bootloader to make themlarkin2015-12-171-9/+17
| | | | | | | decision as to how the vcpu should be set up for initial start and reset. Also removes some hardcoded register constants from vmm(4). ok jsing@, mpi@
* un-needed extern which was removed a while backmlarkin2015-12-061-2/+1
|
* spacingreyk2015-12-031-7/+11
|
* Add support for logging to stderr or syslog, and to run vmd inreyk2015-11-231-7/+4
| | | | | | foreground with -d. OK mlarkin@ jung@
* vmd(8) - virtual machine daemon.mlarkin2015-11-221-0/+979
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.