1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-29 08:08:37 +00:00
freebsd/usr.sbin/bhyve
Mark Johnston c5359e2af5 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
2023-11-22 15:18:46 -05:00
..
amd64 bhyve: ps2 implement command 0xf6 2023-10-31 14:52:22 -06:00
kbdlayout Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
acpi_device.c spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
acpi_device.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
acpi.c bhyve: Build the HPET ACPI table on amd64 only 2023-10-04 12:53:17 -04:00
acpi.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
ahci.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
audio.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
audio.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
basl.c bhyve: add config option to load ACPI tables into memory 2023-08-22 07:49:00 +02:00
basl.h bhyve: maintain RSDT and XSDT by basl 2023-06-20 10:56:23 +02:00
bhyve_config.5 bhyve: Add a slirp network backend 2023-11-22 15:18:46 -05:00
bhyve.8 bhyve: Add a slirp network backend 2023-11-22 15:18:46 -05:00
bhyvegc.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
bhyvegc.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
bhyverun.c bhyve: Remove init_snapshot() and initialize static vars 2023-10-17 14:26:51 -04:00
bhyverun.h bhyve: Move most early initialization into an MD routine 2023-10-04 12:53:17 -04:00
block_if.c bhyve: Replace many fprintf(stderr, ...) calls with EPRINTLN 2023-10-16 15:17:48 -07:00
block_if.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
bootrom.c bhyve: Replace many fprintf(stderr, ...) calls with EPRINTLN 2023-10-16 15:17:48 -07:00
bootrom.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
config.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
config.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
console.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
console.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
debug.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
gdb.c bhyve: Fix the GDB_LOG build 2023-11-11 12:15:30 -05:00
gdb.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
hda_codec.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
hda_reg.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
hdac_reg.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
iov.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
iov.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
ipc.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
libslirp.h bhyve: Add a slirp network backend 2023-11-22 15:18:46 -05:00
Makefile bhyve: Add a slirp network backend 2023-11-22 15:18:46 -05:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend.options Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
mem.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
mem.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
mevent_test.c Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
mevent.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
mevent.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
net_backend_netgraph.c bhyve: Split backends into separate files 2023-11-22 15:18:46 -05:00
net_backend_netmap.c bhyve: Split backends into separate files 2023-11-22 15:18:46 -05:00
net_backend_slirp.c bhyve: Add a slirp network backend 2023-11-22 15:18:46 -05:00
net_backends_priv.h bhyve: Split backends into separate files 2023-11-22 15:18:46 -05:00
net_backends.c bhyve: Split backends into separate files 2023-11-22 15:18:46 -05:00
net_backends.h bhyve: Split backends into separate files 2023-11-22 15:18:46 -05:00
net_utils.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
net_utils.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
pci_ahci.c bhyve: Replace many fprintf(stderr, ...) calls with EPRINTLN 2023-10-16 15:17:48 -07:00
pci_e82545.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
pci_emul.c bhyve: Make most I/O port handling specific to amd64 2023-10-04 12:53:17 -04:00
pci_emul.h bhyve: Move legacy PCI interrupt handling under amd64/ 2023-10-04 12:53:17 -04:00
pci_fbuf.c bhyve: increase fbuf display resolution limit 2023-11-20 16:17:53 -09:00
pci_hda.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
pci_hda.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
pci_hostbridge.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
pci_nvme.c bhyve nvme: Add NQN value 2023-10-12 15:08:05 -07:00
pci_passthru.c bhyve: Improve pcifd function naming 2023-10-04 12:53:16 -04:00
pci_passthru.h bhyve: Improve pcifd function naming 2023-10-04 12:53:16 -04:00
pci_uart.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
pci_virtio_9p.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
pci_virtio_block.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
pci_virtio_console.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
pci_virtio_input.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
pci_virtio_net.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
pci_virtio_rnd.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
pci_virtio_scsi.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
pci_xhci.c bhyve: Replace many fprintf(stderr, ...) calls with EPRINTLN 2023-10-16 15:17:48 -07:00
pci_xhci.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
pctestdev.c bhyve: Make most I/O port handling specific to amd64 2023-10-04 12:53:17 -04:00
pctestdev.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
qemu_fwcfg.c bhyve: fix buffer overflow in QemuFwCfg 2023-10-17 15:57:28 +02:00
qemu_fwcfg.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
qemu_loader.c bhyve: add helper struct for qemus acpi table loader 2023-04-25 08:29:25 +02:00
qemu_loader.h bhyve: add helper struct for qemus acpi table loader 2023-04-25 08:29:25 +02:00
rfb.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
rfb.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
smbiostbl.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
smbiostbl.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
snapshot.c bhyve: Remove init_snapshot() and initialize static vars 2023-10-17 14:26:51 -04:00
snapshot.h bhyve: Remove init_snapshot() and initialize static vars 2023-10-17 14:26:51 -04:00
sockstream.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
sockstream.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
tpm_device.c bhyve: add cmdline option for TPM emulation 2023-08-17 08:17:59 +02:00
tpm_device.h bhyve: add cmdline option for TPM emulation 2023-08-17 08:17:59 +02:00
tpm_emul_passthru.c bhyve: emulate TPM passthru by accessing /dev/tpmX 2023-08-10 09:23:42 +02:00
tpm_emul.h bhyve/tpm: create crb thread for sending tpm commands 2023-06-20 10:59:00 +02:00
tpm_intf_crb.c bhyve: add emulation for CRB register of TPM devices 2023-08-10 09:23:33 +02:00
tpm_intf.h bhyve: add emulation for CRB register of TPM devices 2023-08-10 09:23:33 +02:00
tpm_ppi_qemu.c bhyve: add Qemu PPI emulation for TPM devices 2023-08-14 10:17:36 +02:00
tpm_ppi.h bhyve: add Qemu PPI emulation for TPM devices 2023-08-14 10:17:36 +02:00
uart_emul.c bhyve: default UART to 115200 2023-08-17 14:53:23 -04:00
uart_emul.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
usb_emul.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
usb_emul.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
usb_mouse.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
virtio.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
virtio.h bhyve: Move legacy PCI interrupt handling under amd64/ 2023-10-04 12:53:17 -04:00
vmexit.h bhyve: Split vmexit handling into a separate file 2023-10-04 12:53:16 -04:00
vmgenc.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
vmgenc.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00