Age | Commit message (Collapse) | Author |
|
|
|
|
|
Use a secure idiom instead.
ok mlarkin@
|
|
If a VM exits, terminate it and remove it from the list of
available VMs. That allows a VM with name `foo' to be restarted
after it has exited.
This changes structures shared between vmd and vmctl. You need to
rebuild vmctl also.
ok mlarkin@
|
|
ok mlarkin
|
|
This splits the handling of received data into a separate function
that can later be called in parallel to the VCPU thread instead of
handling received packets on VCPU exits only.
It also makes virtq accesses in the rx path safe to run in parallel
to the VCPU thread: the last index into the 'avail' ring the driver
has notified to the host is kept track of. It also makes sure that
the host only writes back to the 'avail' ring instead of modifying
the whole receive virtq.
While there, describe what virtio_vq_info and virtio_io_cfg are used
for, as suggested by mlarkin@
ok mlarkin@
|
|
supported, and it looks like other emulators/hypervisors do a variety of
different things here. Most return 0, but at least one might return random
garbage. Returning 0 seems safest here, but leave a warning in place for
the logs in case a guest VM does this.
|
|
|
|
|
|
|
|
|
|
change this in all config parsers in our tree that support macros.
problem reported by sven falempin.
feedback from henning@, stsp@, deraadt@
ok florian@ mikeb@
|
|
|
|
read_mem() and write_mem() in vmd(8) now use memcpy() instead of the
vm_readpage() and vm_writepage() ioctls to read/write guest memory.
ok mlarkin@
|
|
vmm(4) then maps the pages allocated by the vmd(8) user process into the
address space of the guest. This gives vmm(4) and vmd(8) a shared view of
the guest RAM. This will allow us to have faster guest<->host data
exchange by ordinary memory loads/stores later, as well as remove the
vm_readpage and vm_writepage ioctls next.
ok mlarkin@
|
|
This gives ddb access to the symbols of the kernel running inside the VM.
ok mlarkin@
|
|
OK mlarkin
|
|
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.
|
|
ok mlarkin@
|
|
ok stefan
|
|
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@
|
|
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@
|
|
The unimplemented mode is MSB/LSB (8 bit), not 16 bit mode.
|
|
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@
|
|
This gives us the opportunity later to start VCPUs in real-mode, etc.
(for those CPUs that support unrestricted guest).
You need to build an updated kernel for this first, the ioctl interface
has changed.
ok mlarkin@, deraadt@
|
|
ok stefan@
|
|
control socket before free'ing the vm.
Found by and OK jsg@
|
|
titles (including flags) to distinguish between daemons, this makes it
possible to manage multiple copies of a daemon using the normal infrastructure
by symlinking rc.d scripts to a new name. ok jung@ ajacoutot@, smtpd ok gilles@
|
|
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@
|
|
|
|
sort the description of arguments for init_emulated_hw().
Pointed out my mlarkin
|
|
|
|
as there is some more expected progress in the kernel interface. It
can be tested, and should work, with the previous kernel commit of the
"vmm" pledge, but is not called.
|
|
ioports_map[VMM_PCI_IO_BAR_END (= 65535)]. Fixes an off-by-one.
ok mlarkin@, reyk@
|
|
diff from Michal Mazurek, thanks!
|
|
and gdt pages if we couldn't load the kernel.
diff from Michal Mazurek, thanks!
|
|
from Michal Mazurek, thanks!
|
|
function mappings. First step in reworking device support in vmd to better
handle interrupts.
|
|
|
|
of KNF.
Submitted by Michal Mazurek, thanks!
|
|
|
|
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@
|
|
components as well.
ok deraadt@
|
|
vmctl stop 3
vmctl stop "openbsd.vm"
|
|
ok reyk@
|
|
ok reyk@
|
|
|
|
|
|
counter has to be in sync in the parent and vmm processes. This fixes
reload after a previous load error.
|
|
while others return (errno) on error. We probably have to agree on
something.
|