<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/amd64/include/vmm_dev.h, branch release/13.2.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F13.2.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F13.2.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2023-01-26T22:07:24Z</updated>
<entry>
<title>vmm: Don't lock a vCPU for VM_PPTDEV_MSI[X].</title>
<updated>2023-01-26T22:07:24Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2022-12-09T18:26:23Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3bedbb1008a82641b785d58f5c0def8ce5ec5377'/>
<id>urn:sha1:3bedbb1008a82641b785d58f5c0def8ce5ec5377</id>
<content type='text'>
These are manipulating state in a ppt(4) device none of which is
vCPU-specific.  Mark the vcpu fields in the relevant ioctl structures
as unused, but don't remove them for now.

Reviewed by:	corvink, markj
Differential Revision:	https://reviews.freebsd.org/D37639

(cherry picked from commit 91980db1beecd52e34a1550a247e374cfcc746a2)
</content>
</entry>
<entry>
<title>Extend the VMM stats interface to support a dynamic count of statistics.</title>
<updated>2022-04-29T23:08:17Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2022-02-07T22:11:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ffd150099ca0fbbecb62814e73dff9388fbe3b87'/>
<id>urn:sha1:ffd150099ca0fbbecb62814e73dff9388fbe3b87</id>
<content type='text'>
- Add a starting index to 'struct vmstats' and change the
  VM_STATS ioctl to fetch the 64 stats starting at that index.
  A compat shim for &lt;= 13 continues to fetch only the first 64
  stats.

- Extend vm_get_stats() in libvmmapi to use a loop and a static
  thread local buffer which grows to hold the stats needed.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D27463

(cherry picked from commit 64269786170ffd8e3348edea0fc5f5b09b79391e)
</content>
</entry>
<entry>
<title>bhyve: support relocating fbuf and passthru data BARs</title>
<updated>2021-03-26T13:50:41Z</updated>
<author>
<name>D Scott Phillips</name>
<email>scottph@FreeBSD.org</email>
</author>
<published>2021-03-18T16:08:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7590d7800c44ebe2f5410874d393eaf218f543ff'/>
<id>urn:sha1:7590d7800c44ebe2f5410874d393eaf218f543ff</id>
<content type='text'>
We want to allow the UEFI firmware to enumerate and assign
addresses to PCI devices so we can boot from NVMe[1]. Address
assignment of PCI BARs is properly handled by the PCI emulation
code in general, but a few specific cases need additional support.
fbuf and passthru map additional objects into the guest physical
address space and so need to handle address updates. Here we add a
callback to emulated PCI devices to inform them of a BAR
configuration change. fbuf and passthru then watch for these BAR
changes and relocate the frame buffer memory segment and passthru
device mmio area respectively.

We also add new VM_MUNMAP_MEMSEG and VM_UNMAP_PPTDEV_MMIO ioctls
to vmm(4) to facilitate the unmapping needed for addres updates.

[1]: https://github.com/freebsd/uefi-edk2/pull/9/

Originally by:	scottph
Sponsored by:	Intel Corporation
Reviewed by:	grehan
Approved by:	philip (mentor)
Differential Revision:	https://reviews.freebsd.org/D24066

(cherry picked from commit f8a6ec2d572758da6cfd29fcb4ecf4430463661d)
</content>
</entry>
<entry>
<title>Honor the disabled setting for MSI-X interrupts for passthrough devices.</title>
<updated>2020-11-24T23:18:52Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2020-11-24T23:18:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1925586e03bed086b78fda5d8d758912aea7ecc7'/>
<id>urn:sha1:1925586e03bed086b78fda5d8d758912aea7ecc7</id>
<content type='text'>
Add a new ioctl to disable all MSI-X interrupts for a PCI passthrough
device and invoke it if a write to the MSI-X capability registers
disables MSI-X.  This avoids leaving MSI-X interrupts enabled on the
host if a guest device driver has disabled them (e.g. as part of
detaching a guest device driver).

This was found by Chelsio QA when testing that a Linux guest could
switch from MSI-X to MSI interrupts when using the cxgb4vf driver.

While here, explicitly fail requests to enable MSI on a passthrough
device if MSI-X is enabled and vice versa.

Reported by:	Sony Arpita Das @ Chelsio
Reviewed by:	grehan, markj
MFC after:	2 weeks
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D27212
</content>
</entry>
<entry>
<title>vmm(4): Add 12 user ABI compat after r349948</title>
<updated>2020-05-20T17:27:54Z</updated>
<author>
<name>Conrad Meyer</name>
<email>cem@FreeBSD.org</email>
</author>
<published>2020-05-20T17:27:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f4ce062964227a8adfecddf7b34d8cc4cc64b650'/>
<id>urn:sha1:f4ce062964227a8adfecddf7b34d8cc4cc64b650</id>
<content type='text'>
Reported by:	kp
Reviewed by:	jhb, kp
Tested by:	kp
Differential Revision:	https://reviews.freebsd.org/D24929
</content>
</entry>
<entry>
<title>vmm(4), bhyve(8): Expose kernel-emulated special devices to userspace</title>
<updated>2020-05-15T15:54:22Z</updated>
<author>
<name>Conrad Meyer</name>
<email>cem@FreeBSD.org</email>
</author>
<published>2020-05-15T15:54:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8a68ae80f67adcb35e6f9712384a3da6dca26de2'/>
<id>urn:sha1:8a68ae80f67adcb35e6f9712384a3da6dca26de2</id>
<content type='text'>
Expose the special kernel LAPIC, IOAPIC, and HPET devices to userspace
for use in, e.g., fallback instruction emulation (when userspace has a
newer instruction decode/emulation layer than the kernel vmm(4)).

Plumb the ioctl through libvmmapi and register the memory ranges in
bhyve(8).

Reviewed by:	grehan
Differential Revision:	https://reviews.freebsd.org/D24525
</content>
</entry>
<entry>
<title>Initial support for bhyve save and restore.</title>
<updated>2020-05-05T00:02:04Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2020-05-05T00:02:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=483d953a86a2507355f8287c5107dc827a0ff516'/>
<id>urn:sha1:483d953a86a2507355f8287c5107dc827a0ff516</id>
<content type='text'>
Save and restore (also known as suspend and resume) permits a snapshot
to be taken of a guest's state that can later be resumed.  In the
current implementation, bhyve(8) creates a UNIX domain socket that is
used by bhyvectl(8) to send a request to save a snapshot (and
optionally exit after the snapshot has been taken).  A snapshot
currently consists of two files: the first holds a copy of guest RAM,
and the second file holds other guest state such as vCPU register
values and device model state.

To resume a guest, bhyve(8) must be started with a matching pair of
command line arguments to instantiate the same set of device models as
well as a pointer to the saved snapshot.

While the current implementation is useful for several uses cases, it
has a few limitations.  The file format for saving the guest state is
tied to the ABI of internal bhyve structures and is not
self-describing (in that it does not communicate the set of device
models present in the system).  In addition, the state saved for some
device models closely matches the internal data structures which might
prove a challenge for compatibility of snapshot files across a range
of bhyve versions.  The file format also does not currently support
versioning of individual chunks of state.  As a result, the current
file format is not a fixed binary format and future revisions to save
and restore will break binary compatiblity of snapshot files.  The
goal is to move to a more flexible format that adds versioning,
etc. and at that point to commit to providing a reasonable level of
compatibility.  As a result, the current implementation is not enabled
by default.  It can be enabled via the WITH_BHYVE_SNAPSHOT=yes option
for userland builds, and the kernel option BHYVE_SHAPSHOT.

Submitted by:	Mihai Tiganus, Flavius Anton, Darius Mihai
Submitted by:	Elena Mihailescu, Mihai Carabas, Sergiu Weisz
Relnotes:	yes
Sponsored by:	University Politehnica of Bucharest
Sponsored by:	Matthew Grooms (student scholarships)
Sponsored by:	iXsystems
Differential Revision:	https://reviews.freebsd.org/D19495
</content>
</entry>
<entry>
<title>Tie the name limit of a VM to SPECNAMELEN from devfs instead of a</title>
<updated>2019-07-12T18:37:56Z</updated>
<author>
<name>Scott Long</name>
<email>scottl@FreeBSD.org</email>
</author>
<published>2019-07-12T18:37:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=422a8a4d3a8b4f02298cf10cd02f09202b8e2d16'/>
<id>urn:sha1:422a8a4d3a8b4f02298cf10cd02f09202b8e2d16</id>
<content type='text'>
hard-coded value. Don't allocate space for it from the kernel stack.
Account for prefix, suffix, and separator space in the name. This
takes the effective length up to 229 bytes on 13-current, and 37 bytes
on 12-stable. 37 bytes is enough to hold a full GUID string.

PR:		234134
MFC after:	1 week
Differential Revision:	http://reviews.freebsd.org/D20924
</content>
</entry>
<entry>
<title>Add the ability to control the CPU topology of created VMs</title>
<updated>2018-04-08T19:24:49Z</updated>
<author>
<name>Rodney W. Grimes</name>
<email>rgrimes@FreeBSD.org</email>
</author>
<published>2018-04-08T19:24:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=01d822d33b0cd1f801ce39d0ed25fa7f57b5a429'/>
<id>urn:sha1:01d822d33b0cd1f801ce39d0ed25fa7f57b5a429</id>
<content type='text'>
from userland without the need to use sysctls, it allows the old
sysctls to continue to function, but deprecates them at
FreeBSD_version 1200060 (Relnotes for deprecate).

The command line of bhyve is maintained in a backwards compatible way.
The API of libvmmapi is maintained in a backwards compatible way.
The sysctl's are maintained in a backwards compatible way.

Added command option looks like:
bhyve -c [[cpus=]n][,sockets=n][,cores=n][,threads=n][,maxcpus=n]
The optional parts can be specified in any order, but only a single
integer invokes the backwards compatible parse.  [,maxcpus=n] is
hidden by #ifdef until kernel support is added, though the api
is put in place.

bhyvectl --get-cpu-topology option added.

Reviewed by:	grehan (maintainer, earlier version),
Reviewed by:	bcr (manpages)
Approved by:	bde (mentor), phk (mentor)
Tested by:	Oleg Ginzburg &lt;olevole@olevole.ru&gt; (cbsd)
MFC after:	1 week
Relnotes:	Y
Differential Revision:	https://reviews.freebsd.org/D9930
</content>
</entry>
<entry>
<title>Add a way to temporarily suspend and resume virtual CPUs.</title>
<updated>2018-04-06T22:03:43Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2018-04-06T22:03:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fc276d92ae91bc7d48bda15996c70837c88f7d99'/>
<id>urn:sha1:fc276d92ae91bc7d48bda15996c70837c88f7d99</id>
<content type='text'>
This is used as part of implementing run control in bhyve's debug
server.  The hypervisor now maintains a set of "debugged" CPUs.
Attempting to run a debugged CPU will fail to execute any guest
instructions and will instead report a VM_EXITCODE_DEBUG exit to
the userland hypervisor.  Virtual CPUs are placed into the debugged
state via vm_suspend_cpu() (implemented via a new VM_SUSPEND_CPU ioctl).
Virtual CPUs can be resumed via vm_resume_cpu() (VM_RESUME_CPU ioctl).

The debug server suspends virtual CPUs when it wishes them to stop
executing in the guest (for example, when a debugger attaches to the
server).  The debug server can choose to resume only a subset of CPUs
(for example, when single stepping) or it can choose to resume all
CPUs.  The debug server must explicitly mark a CPU as resumed via
vm_resume_cpu() before the virtual CPU will successfully execute any
guest instructions.

Reviewed by:	avg, grehan
Tested on:	Intel (jhb), AMD (avg)
Differential Revision:	https://reviews.freebsd.org/D14466
</content>
</entry>
</feed>
