#
c5359e2a |
|
22-Nov-2023 |
Mark Johnston <markj@FreeBSD.org> |
bhyve: Add a slirp network backend This enables a subset of the functionality provided by QEMU's user networking implementation. In particular, it uses net/libslirp, the same library as QEMU. libslirp is permissively licensed but has some dependencies which make it impractical to bring into the base system (glib in particular). I thus opted to make bhyve dlopen the libslirp.so, which can be installed via pkg. The library header is imported into bhyve. The slirp backend takes a "hostfwd" which is identical to QEMU's hostfwd. When configured, bhyve opens a host socket and listens for connections, which get forwarded to the guest. For instance, "hostfwd=tcp::1234-:22" allows one to ssh into the guest by ssh'ing to port 1234 on the host, e.g., via 127.0.0.1. I didn't try to hook up guestfwd support since I don't personally have a use-case for it yet, and I think it won't interact nicely with the capsicum sandbox. Reviewed by: jhb Tested by: rew MFC after: 1 month Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D42510
|
#
6a0e7f90 |
|
08-Sep-2023 |
Corvin Köhne <corvink@FreeBSD.org> |
bhyve: always generate ACPI tables Most systems don't work properly without sane ACPI tables. Therefore, we're always generating them. Reviewed by: markj MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D41778
|
#
6f7e9779 |
|
27-Jul-2022 |
Corvin Köhne <corvink@FreeBSD.org> |
bhyve: add config option to load ACPI tables into memory For backward compatibility, the ACPI tables are loaded into the guest memory. Windows scans the memory, finds the ACPI tables and uses them. It ignores the ACPI tables provided by the UEFI. We are patching the ACPI tables in the guest memory, so that's mostly fine. However, Windows will break when the ACPI tables become to large or when we add entries which can't be patched by bhyve. One example of an unpatchable entry, is a TPM log. The TPM log has to be allocated by the guest firmware. As the address of the TPM log is unpredictable, bhyve can't assign it in the memory version of the ACPI tables. Additionally, this makes it impossible for bhyve to calculate a correct checksum of the table. By default ACPI tables are still loaded into guest memory for backward compatibility. The new acpi_tables_in_memory config value can be set to false to avoid this behaviour. Reviewed by: markj MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D39979
|
#
67c26eb2 |
|
07-Oct-2021 |
Corvin Köhne <corvink@FreeBSD.org> |
bhyve: add cmdline option for TPM emulation At the moment, only a TPM passthru is supported. The cmdline looks like: -l tpm,passthru,/dev/tpm0 Reviewed by: markj MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D32961
|
#
c98d13fb |
|
28-Mar-2023 |
Corvin Köhne <corvink@FreeBSD.org> |
bhyve: fix spelling mistake of pcireg option The option is spelled "pcireg" not "pcir". MFC after: 1 week Fixes: f4ceaff56ddaacc151df07d2d205a2d7fcb736a8 Sponsored by: Beckhoff Automation GmbH & Co. KG
|
#
f4ceaff5 |
|
23-Nov-2021 |
Corvin Köhne <corvink@FreeBSD.org> |
bhyve: add config option to modify LPC IDs The Intel GOP driver checks the LPC IDs to detect the platform it's running on. The GOP driver only works on the platforms it's written for. Maybe other Intel driver have the same behaviour. For that reason, we should use the LPC IDs of the FreeBSD host for GPU passthrough to work properly. We don't know if setting different LPC IDs have any side effect. Therefore, don't use the host LPC IDs by default on Intel system. Give the user the opportunity to modify the LPC IDs. Reviewed by: jhb MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D28280
|
#
b72e06b1 |
|
06-Feb-2023 |
Corvin Köhne <corvink@FreeBSD.org> |
bhyve: make use of helper to read PCI IDs from bhyve config For compatibilty reasons, the old config values are still supported. Reviewed by: jhb MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D38403
|
#
d85147f3 |
|
18-Aug-2021 |
Corvin Köhne <corvink@FreeBSD.org> |
bhyve: add cmdline option to enable qemu's fwcfg Let the user decide if he wants to use bhyve's fwctl or qemu's fwcfg. He can set the interface by adding a fwcfg option to bootrom: -l bootrom,<path/to/rom>,fwcfg=bhyve -l bootrom,<path/to/rom>,fwcfg=qemu Reviewed by: markj MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D38337
|
#
baf753cc |
|
19-Aug-2022 |
John Baldwin <jhb@FreeBSD.org> |
bhyve: Support other schemes for naming pass-through devices. Permit naming pass through devices using the syntax accepted by pciconf (pci[<domain>:]<bus>:<slot>:<func>) as well as by device name (e.g. "ppt0"). While here, fix an error in the manpage that had the bus and slot arguments for the original /-delimited scheme swapped. Reviewed by: imp, markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D36147
|
#
e5ed417b |
|
30-Jun-2022 |
John Baldwin <jhb@FreeBSD.org> |
bhyve: Document the "type" config variable for network device models.
|
#
8284799a |
|
30-May-2022 |
Corvin Köhne <CorvinK@beckhoff.com> |
bhyve: use bhyve_config for SMBIOS strings Some software uses SMBIOS entries to identify the system on which it's running. In order to make it possible to use such software inside a VM, SMBIOS entries should be configurable. Therefore, bhyve_config can be used. While only a few SMBIOS entries might be of interest, it makes sense that all SMBIOS entries are configurable. This way all SMBIOS tables are build the same way and there's no special handling for some tables. Reviewed by: jhb Sponsored by: Beckhoff Automation GmbH & Co. KG MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D34465
|
#
81d1214e |
|
06-Apr-2022 |
Christian Weisgerber <naddy@FreeBSD.org> |
man pages: Fix typo s/the the/the/ Approved by: ygy (doc)
|
#
e47fe318 |
|
10-Mar-2022 |
Corvin Köhne <CorvinK@beckhoff.com> |
bhyve: add ROM emulation Some PCI devices especially GPUs require a ROM to work properly. The ROM is executed by boot firmware to initialize the device. To add a ROM to a device use the new ROM option for passthru device (e.g. -s passthru,0/2/0,rom=<path>/<to>/<rom>). It's necessary that the ROM is executed by the boot firmware. It won't be executed by any OS. Additionally, the boot firmware should be configured to execute the ROM file. For that reason, it's only possible to use a ROM when using OVMF with enabled bus enumeration. Differential Revision: https://reviews.freebsd.org/D33129 Sponsored by: Beckhoff Automation GmbH & Co. KG MFC after: 1 month
|
#
87f6367f |
|
03-Mar-2022 |
Corvin Köhne <CorvinK@beckhoff.com> |
bhyve: add varfile option to nvlist of lpc device Use seperate nvlist entries for the romfile and the varfile. While here, don't leak varfd in bootrom_loadrom(). Reviewed by: jhb, markj Differential Revision: https://reviews.freebsd.org/D33433
|
#
19eaa01b |
|
20-Jan-2022 |
Michael Reifenberger <mr@FreeBSD.org> |
Append Keyboard Layout specified option for using VNC. Part two: Append bhyve -K option for specified keyboard layout with layout setting files every languages. Since the cmd option '-k' was used in the meantime it was changed to '-K' PR: 246121 Submitted by: koinec@yahoo.co.jp Reviewed by: grehan@ Differential Revision: https://reviews.freebsd.org/D29473 MFC after: 4 weeks
|
#
48759c4e |
|
25-Sep-2021 |
John Baldwin <jhb@FreeBSD.org> |
bhyve_config.5: Document gdb.address.
|
#
c6efcb12 |
|
17-Sep-2021 |
John Baldwin <jhb@FreeBSD.org> |
bhyve: Support setting the disk serial number for VirtIO block devices. Reviewed by: allanjude Obtained from: illumos Differential Revision: https://reviews.freebsd.org/D31983
|
#
e31cc1d5 |
|
12-Sep-2021 |
Ka Ho Ng <khng@FreeBSD.org> |
bhyve: Fix pci device node key in bhyve_config.5 PCI device node key in the manual page is wrong. It should be pci.bus.slot.function. MFC after: 3 days
|
#
054accac |
|
08-Jun-2021 |
Corvin Köhne <C.Koehne@beckhoff.com> |
Add a virtio-input device emulation. This will be used to inject keyboard/mouse input events into a guest. The command line syntax is: -s <slot>,virtio-input,/dev/input/eventX Reviewed by: jhb (bhyve), grehan Obtained from: Corvin Köhne <C.Koehne@beckhoff.com> MFC after: 3 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D30020
|
#
e15bf05e |
|
20-Apr-2021 |
John Baldwin <jhb@FreeBSD.org> |
bhyve: Be explicit that setting config.dump will not start a VM. Suggested by: rpokala Reviewed by: bcr (manpages) Differential Revision: https://reviews.freebsd.org/D29738
|
#
9f40a3be |
|
24-Mar-2021 |
John Baldwin <jhb@FreeBSD.org> |
bhyve hostbridge: Rename "device" property to "devid". "device" is already used as the generic PCI-level name of the device model to use (e.g. "hostbridge"). The result was that parsing "hostbridge" as an integer failed and the host bridge used a device ID of 0. The EFI ROM asserts that the device ID of the hostbridge is not 0, so booting with the current EFI ROM was failing during the ROM boot. Fixes: 621b5090487de9fed1b503769702a9a2a27cc7bb
|
#
621b5090 |
|
26-Jun-2019 |
John Baldwin <jhb@FreeBSD.org> |
Refactor configuration management in bhyve. Replace the existing ad-hoc configuration via various global variables with a small database of key-value pairs. The database supports heirarchical keys using a MIB-like syntax to name the path to a given key. Values are always stored as strings. The API used to manage configuation values does include wrappers to handling boolean values. Other values use non-string types require parsing by consumers. The configuration values are stored in a tree using nvlists. Leaf nodes hold string values. Configuration values are permitted to reference other configuration values using '%(name)'. This permits constructing template configurations. All existing command line arguments now set configuration values. For devices, the "-s" option parses its option argument to generate a list of key-value pairs for the given device. A new '-o' command line option permits setting an individual configuration variable. The key name is always given as a full path of dot-separated components. A new '-k' command line option parses a simple configuration file. This configuration file holds a flat list of 'key=value' lines where the 'key' is the full path of a configuration variable. Lines starting with a '#' are comments. In general, bhyve starts by parsing command line options in sequence and applying those settings to configuration values. Once this is complete, bhyve then begins initializing its state based on the configuration values. This means that subsequent configuration options or files may override or supplement previously given settings. A special 'config.dump' configuration value can be set to true to help debug configuration issues. When this value is set, bhyve will print out the configuration variables as a flat list of 'key=value' lines. Most command line argments map to a single configuration variable, e.g. '-w' sets the 'x86.strictmsr' value to false. A few command line arguments have less obvious effects: - Multiple '-p' options append their values (as a comma-seperated list) to "vcpu.N.cpuset" values (where N is a decimal vcpu number). - For '-s' options, a pci.<bus>.<slot>.<function> node is created. The first argument to '-s' (the device type) is used as the value of a "device" variable. Additional comma-separated arguments are then parsed into 'key=value' pairs and used to set additional variables under the device node. A PCI device emulation driver can provide its own hook to override the parsing of the additonal '-s' arguments after the device type. After the configuration phase as completed, the init_pci hook then walks the "pci.<bus>.<slot>.<func>" nodes. It uses the "device" value to find the device model to use. The device model's init routine is passed a reference to its nvlist node in the configuration tree which it can query for specific variables. The result is that a lot of the string parsing is removed from the device models and centralized. In addition, adding a new variable just requires teaching the model to look for the new variable. - For '-l' options, a similar model is used where the string is parsed into values that are later read during initialization. One key note here is that the serial ports use the commonly used lowercase names from existing documentation and examples (e.g. "lpc.com1") instead of the uppercase names previously used internally in bhyve. Reviewed by: grehan MFC after: 3 months Differential Revision: https://reviews.freebsd.org/D26035
|