qemu New QEMU Section for Virtualization Chapter in FreeBSD Handbook

Jim, may I ask you a question, does Qemu has support of hardware VT-d (or similar on other platforms) accelerators on FreeBSD ?
 
My understanding is, at this time (Fall, 2024) FreeBSD only supports the Tiny Code Generator (tcg) accelerator directly for QEMU. But TCG is not a hardware-based virtualization, it is code emulation. Most virtualization work in FreeBSD is directed towards bhyve, which is understandable (built from the ground up on FreeBSD).

QEMU itself supports several other accelerators as you can see on this page: https://www.qemu.org/docs/master/system/introduction.html#virtualisation-accelerators

FreeBSD also has support for Xen (both Dom0 and DomU) and you can run QEMU as a guest on Xen.

Also, NetBSD has nvmm, which is a supported accelerator for QEMU.

That's what I know about the current state of things.
 
Not that I know of. QEMU using TCG (Tiny Code Generator) is actually an emulator and not using any hypervisor which is why it's a bit slower.
 
For anyone who is following this thread, I've made some minor changes to the above draft.
The download link for FreeBSD was changed from the bootonly.iso to the dvd1.iso.
Jim B.
 
First problem there is not such thing as a tech community.
Secondly this bullet points looks mutually incoherent
  • QEMU can be used in several different ways.The most common is for System Emulation, where it provides a virtual model of an entire machine (CPU, memory, and emulated devices) to run a guest OS.In this mode the CPU may be fully emulated, or it may work with a hypervisor such as KVM, Xen or Hypervisor.Framework to allow the guest to run directly on the host CPU.
  • The second supported way to use QEMU is User Mode Emulation, where QEMU can launch processes compiled for one CPU on another CPU.In this mode the CPU is always emulated.
"Once the download is complete create a shorthand link." Why?

You may want to delete 24.6.3.1. unless you include the resize screen to windows size with "xrand Virtual-Monitor resize" thing.

Also in 24.6.3.2. is not the qemu window what runs the several graphical consoles, but the FreeBSD kernel. For serial console see 24.6.4.
 
Ferocious1881 - thanks for your notes.

The bullet points shown are from the QEMU documentation and describe two different ways QEMU can be utilized. System Emulation is the most common, where a virtual machine guest with the same architecture of the host can use emulation or take advantage of hypervisors such as KVM and the rest of those listed.

User Mode Emulation involves running a guest VM with an entirely different architecture than the host such as in Section 24.6.5, where a SPARC64 guest is run on an x86_64 host.

The two modes target different use cases.

Regarding the link to the downloaded file - it's just a convenience such that trying different versions of the operating system only requires changing the link in the ISO directory, and not in the startup script itself.

Section 24.6.3.1 simply points out that QEMU supports guests in both graphics and text mode.

Your note on Section 24.6.3.2 is correct - it's the FreeBSD kernel that provides console switching. I'm merely pointing out to the reader that this functionality exists in the QEMU main window and demonstrating how it works in the VM.
 
The bullet points shown are from the QEMU documentation and describe two different ways QEMU can be utilized. System Emulation is the most common, where a virtual machine guest with the same architecture of the host can use emulation or take advantage of hypervisors such as KVM and the rest of those listed.

User Mode Emulation involves running a guest VM with an entirely different architecture than the host such as in Section 24.6.5, where a SPARC64 guest is run on an x86_64 host.

The two modes target different use cases.
My point is that if System Emulation includes when the CPU is fully emulated, then it looks indistinguishable to User Mode emulation.

Section 24.6.3.1 simply points out that QEMU supports guests in both graphics and text mode.
May be redirecting to X11/Wayland in the already existing documentation with a note saying that is possible would do a better job. Still think that it should include the resize screen to window size, if is to be taken seriously.
 
Back
Top