History log of /src/sys/riscv/include/vmm_dev.h (Results 1 – 12 of 12)
Revision Date Author Comments
# 7377c87e 04-Nov-2025 Mark Johnston <markj@FreeBSD.org>

vmm: Consolidate VM name length checking

vm_create() is only called from one place. Rather than having similar
checks everywhere, move them to vmmdev_create().

We can safely assume that the name i

vmm: Consolidate VM name length checking

vm_create() is only called from one place. Rather than having similar
checks everywhere, move them to vmmdev_create().

We can safely assume that the name is nul-terminated, the vmmctl ioctl
handler and the legacy sysctl handler ensure this. So, don't bother
with strnlen().

Finally, make sure that the name buffers are the same size on all
platforms. VM_MAX_NAMELEN is supposed to be the maximum, not including
the nul terminator.

Reviewed by: corvink
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D53422

show more ...


# a4197ea4 08-Sep-2024 Bojan Novković <bnovkov@FreeBSD.org>

vmm: Add support for guest NUMA emulation

This change adds the necessary kernelspace bits required for
supporting NUMA domains in bhyve VMs.

The layout of system memory segments and how they're cre

vmm: Add support for guest NUMA emulation

This change adds the necessary kernelspace bits required for
supporting NUMA domains in bhyve VMs.

The layout of system memory segments and how they're created has
been reworked. Each guest NUMA domain will now have its own memory
segment. Furthermore, this change allows users to tweak the domain's
backing vm_object domainset(9) policy.

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

show more ...


# 043999b1 05-Nov-2024 Mark Johnston <markj@FreeBSD.org>

riscv/vmm: Fix the build after a97f683fe3c4

- Make machine/vmm_dev.h self-contained.
- Check for errors from vmmdev_init().
- Make VM_MAX_NAMELEN visible to userspace.

Reported by: Jenkins
Fixes: a

riscv/vmm: Fix the build after a97f683fe3c4

- Make machine/vmm_dev.h self-contained.
- Check for errors from vmmdev_init().
- Make VM_MAX_NAMELEN visible to userspace.

Reported by: Jenkins
Fixes: a97f683fe3c4 ("vmm: Add a device file interface for creating and destroying VMs")

show more ...


# d3916eac 31-Oct-2024 Ruslan Bukin <br@FreeBSD.org>

riscv/vmm: Initial import.

Add kernel code for 'H' — Hypervisor Extension[1] to support
virtualization on RISC-V ISA.

This comes with a separate userspace patch allowing us to boot
unmodified freeb

riscv/vmm: Initial import.

Add kernel code for 'H' — Hypervisor Extension[1] to support
virtualization on RISC-V ISA.

This comes with a separate userspace patch allowing us to boot
unmodified freebsd/riscv guest. Other operating systems are untested.

This also comes with a U-Boot port that is configured to run in bhyve
guest environment — in RISC-V virtual supervisor mode.
The vmm SBI code emulates RISC-V machine-mode for the guest, handling
SBI calls partly in vmm kernel and partly in bhyve userspace.

Developed in Spike simulator during short period of time, the support
is considered experimental. The first real hardware with hypervisor
spec included should have just reached the market, so this was tested
in Spike and QEMU only. Note that this depends on Sstc extension
presence in the hardware (both Spike and QEMU have it).

Note that booting multiple guests at the same time is not tested and
may require additional work. Some TODOs are indicated within the
code, and some listed in the project's home page[2].

Many thanks to Jessica Clarke, Mitchell Horne and Mark Johnston
for help with parts, test and review.

1. https://riscv.org/technical/specifications/
2. https://wiki.freebsd.org/riscv/bhyve

Sponsored by: UK Research and Innovation
Differential Revision: https://reviews.freebsd.org/D45553

show more ...


# 7377c87e 04-Nov-2025 Mark Johnston <markj@FreeBSD.org>

vmm: Consolidate VM name length checking

vm_create() is only called from one place. Rather than having similar
checks everywhere, move them to vmmdev_create().

We can safely assume that the name i

vmm: Consolidate VM name length checking

vm_create() is only called from one place. Rather than having similar
checks everywhere, move them to vmmdev_create().

We can safely assume that the name is nul-terminated, the vmmctl ioctl
handler and the legacy sysctl handler ensure this. So, don't bother
with strnlen().

Finally, make sure that the name buffers are the same size on all
platforms. VM_MAX_NAMELEN is supposed to be the maximum, not including
the nul terminator.

Reviewed by: corvink
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D53422

show more ...


# a4197ea4 08-Sep-2024 Bojan Novković <bnovkov@FreeBSD.org>

vmm: Add support for guest NUMA emulation

This change adds the necessary kernelspace bits required for
supporting NUMA domains in bhyve VMs.

The layout of system memory segments and how they're cre

vmm: Add support for guest NUMA emulation

This change adds the necessary kernelspace bits required for
supporting NUMA domains in bhyve VMs.

The layout of system memory segments and how they're created has
been reworked. Each guest NUMA domain will now have its own memory
segment. Furthermore, this change allows users to tweak the domain's
backing vm_object domainset(9) policy.

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

show more ...


# 043999b1 05-Nov-2024 Mark Johnston <markj@FreeBSD.org>

riscv/vmm: Fix the build after a97f683fe3c4

- Make machine/vmm_dev.h self-contained.
- Check for errors from vmmdev_init().
- Make VM_MAX_NAMELEN visible to userspace.

Reported by: Jenkins
Fixes: a

riscv/vmm: Fix the build after a97f683fe3c4

- Make machine/vmm_dev.h self-contained.
- Check for errors from vmmdev_init().
- Make VM_MAX_NAMELEN visible to userspace.

Reported by: Jenkins
Fixes: a97f683fe3c4 ("vmm: Add a device file interface for creating and destroying VMs")

show more ...


# d3916eac 31-Oct-2024 Ruslan Bukin <br@FreeBSD.org>

riscv/vmm: Initial import.

Add kernel code for 'H' — Hypervisor Extension[1] to support
virtualization on RISC-V ISA.

This comes with a separate userspace patch allowing us to boot
unmodified freeb

riscv/vmm: Initial import.

Add kernel code for 'H' — Hypervisor Extension[1] to support
virtualization on RISC-V ISA.

This comes with a separate userspace patch allowing us to boot
unmodified freebsd/riscv guest. Other operating systems are untested.

This also comes with a U-Boot port that is configured to run in bhyve
guest environment — in RISC-V virtual supervisor mode.
The vmm SBI code emulates RISC-V machine-mode for the guest, handling
SBI calls partly in vmm kernel and partly in bhyve userspace.

Developed in Spike simulator during short period of time, the support
is considered experimental. The first real hardware with hypervisor
spec included should have just reached the market, so this was tested
in Spike and QEMU only. Note that this depends on Sstc extension
presence in the hardware (both Spike and QEMU have it).

Note that booting multiple guests at the same time is not tested and
may require additional work. Some TODOs are indicated within the
code, and some listed in the project's home page[2].

Many thanks to Jessica Clarke, Mitchell Horne and Mark Johnston
for help with parts, test and review.

1. https://riscv.org/technical/specifications/
2. https://wiki.freebsd.org/riscv/bhyve

Sponsored by: UK Research and Innovation
Differential Revision: https://reviews.freebsd.org/D45553

show more ...


# 7377c87e 04-Nov-2025 Mark Johnston <markj@FreeBSD.org>

vmm: Consolidate VM name length checking

vm_create() is only called from one place. Rather than having similar
checks everywhere, move them to vmmdev_create().

We can safely assume that the name i

vmm: Consolidate VM name length checking

vm_create() is only called from one place. Rather than having similar
checks everywhere, move them to vmmdev_create().

We can safely assume that the name is nul-terminated, the vmmctl ioctl
handler and the legacy sysctl handler ensure this. So, don't bother
with strnlen().

Finally, make sure that the name buffers are the same size on all
platforms. VM_MAX_NAMELEN is supposed to be the maximum, not including
the nul terminator.

Reviewed by: corvink
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D53422

show more ...


# a4197ea4 08-Sep-2024 Bojan Novković <bnovkov@FreeBSD.org>

vmm: Add support for guest NUMA emulation

This change adds the necessary kernelspace bits required for
supporting NUMA domains in bhyve VMs.

The layout of system memory segments and how they're cre

vmm: Add support for guest NUMA emulation

This change adds the necessary kernelspace bits required for
supporting NUMA domains in bhyve VMs.

The layout of system memory segments and how they're created has
been reworked. Each guest NUMA domain will now have its own memory
segment. Furthermore, this change allows users to tweak the domain's
backing vm_object domainset(9) policy.

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

show more ...


# 043999b1 05-Nov-2024 Mark Johnston <markj@FreeBSD.org>

riscv/vmm: Fix the build after a97f683fe3c4

- Make machine/vmm_dev.h self-contained.
- Check for errors from vmmdev_init().
- Make VM_MAX_NAMELEN visible to userspace.

Reported by: Jenkins
Fixes: a

riscv/vmm: Fix the build after a97f683fe3c4

- Make machine/vmm_dev.h self-contained.
- Check for errors from vmmdev_init().
- Make VM_MAX_NAMELEN visible to userspace.

Reported by: Jenkins
Fixes: a97f683fe3c4 ("vmm: Add a device file interface for creating and destroying VMs")

show more ...


# d3916eac 31-Oct-2024 Ruslan Bukin <br@FreeBSD.org>

riscv/vmm: Initial import.

Add kernel code for 'H' — Hypervisor Extension[1] to support
virtualization on RISC-V ISA.

This comes with a separate userspace patch allowing us to boot
unmodified freeb

riscv/vmm: Initial import.

Add kernel code for 'H' — Hypervisor Extension[1] to support
virtualization on RISC-V ISA.

This comes with a separate userspace patch allowing us to boot
unmodified freebsd/riscv guest. Other operating systems are untested.

This also comes with a U-Boot port that is configured to run in bhyve
guest environment — in RISC-V virtual supervisor mode.
The vmm SBI code emulates RISC-V machine-mode for the guest, handling
SBI calls partly in vmm kernel and partly in bhyve userspace.

Developed in Spike simulator during short period of time, the support
is considered experimental. The first real hardware with hypervisor
spec included should have just reached the market, so this was tested
in Spike and QEMU only. Note that this depends on Sstc extension
presence in the hardware (both Spike and QEMU have it).

Note that booting multiple guests at the same time is not tested and
may require additional work. Some TODOs are indicated within the
code, and some listed in the project's home page[2].

Many thanks to Jessica Clarke, Mitchell Horne and Mark Johnston
for help with parts, test and review.

1. https://riscv.org/technical/specifications/
2. https://wiki.freebsd.org/riscv/bhyve

Sponsored by: UK Research and Innovation
Differential Revision: https://reviews.freebsd.org/D45553

show more ...