freebsd-dev/usr.sbin/bhyve
Corvin Köhne f565b4d630
bhyve: add helper struct for qemus acpi table loader
The hypervisor is aware of all system properties. For the guest bios
it's hard and complex to detect all system properties. For that reason,
it would be better if the hypervisor creates acpi tables instead of the
guest. Therefore, the hypervisor has to send the acpi tables to the
guest. At the moment, bhyve just copies the acpi tables into the guest
memory. This approach has some restrictions. You have to keep sure that
the guest doesn't overwrite them accidentally. Additionally, the size of
acpi tables is limited.

Providing a plain copy of all acpi tables by fwcfg isn't possible. Acpi
tables have to point to each other. So, if the guest copies the acpi
tables into memory by it's own, it has to patch the tables. Due to
different layouts for different acpi tables, there's no generic way to
do that.  For that reason, qemu created a table loader interface. It
contains commands for the guest for loading specific blobs into guest
memory and patching those blobs.

This commit adds a qemu_loader class which handles the creation of qemu
loader commands. At the moment, the WRITE_POINTER command isn't
implement. It won't be required by bhyve's acpi table generation yet.

Reviewed by:		markj
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D38438
2023-04-25 08:29:25 +02:00
..
kbdlayout bhyve/kdblayout: add some missing keys to german layout 2022-11-15 07:48:27 +01:00
acpi_device.c bhyve: save softc of ACPI devices 2023-04-13 08:00:09 +02:00
acpi_device.h bhyve: save softc of ACPI devices 2023-04-13 08:00:09 +02:00
acpi.c bhyve: check for errors when writing device specific DSDT entries 2023-04-12 08:33:29 +02:00
acpi.h bhyve: maintain a list of acpi devices 2023-02-14 08:28:31 +01:00
ahci.h
atkbdc.c bhyve: Remove the unused vcpu argument from all of the I/O port handlers. 2022-12-09 10:35:44 -08:00
atkbdc.h Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
audio.c bhyve: Address compiler warnings in audio.c 2022-09-29 12:36:44 -04:00
audio.h bhyve: Address compiler warnings in audio.c 2022-09-29 12:36:44 -04:00
basl.c bhyve: use dynamic ACPI table offsets 2022-11-21 09:28:01 +01:00
basl.h bhyve: build SPCR ACPI table 2022-12-06 12:58:27 +01:00
bhyve_config.5 bhyve: fix spelling mistake of pcireg option 2023-03-29 11:33:06 +02:00
bhyve.8 bhyve: add cmdline option to enable qemu's fwcfg 2023-03-17 09:35:36 +01:00
bhyvegc.c
bhyvegc.h
bhyverun.c bhyve: Remove vmctx member from struct vm_snapshot_meta. 2023-03-24 11:49:06 -07:00
bhyverun.h libvmmapi: Add a struct vcpu and use it in most APIs. 2023-03-24 11:49:06 -07:00
block_if.c bhyve: don't flush readonly device at blockif_pause 2023-03-06 14:04:07 +01:00
block_if.h bhyve: Snapshot impovements for 'blockif' backend 2022-06-23 11:46:06 -07:00
bootrom.c libvmmapi: Add a struct vcpu and use it in most APIs. 2023-03-24 11:49:06 -07:00
bootrom.h bhyve: add varfile option to nvlist of lpc device 2022-03-02 22:50:24 -09:00
config.c bhyve: Fix a typo in a comment 2022-11-14 09:01:00 -05:00
config.h bhyve(4): Remove a double word in a source code comment 2022-09-04 13:57:00 +02:00
console.c Append Keyboard Layout specified option for using VNC. 2021-04-21 12:40:44 +02:00
console.h Append Keyboard Layout specified option for using VNC. 2021-04-21 12:40:44 +02:00
debug.h bhyve: add wrapper for debug printf statements 2020-01-08 22:55:22 +00:00
fwctl.c bhyve: Remove the unused vcpu argument from all of the I/O port handlers. 2022-12-09 10:35:44 -08:00
fwctl.h
gdb.c libvmmapi: Add a struct vcpu and use it in most APIs. 2023-03-24 11:49:06 -07:00
gdb.h libvmmapi: Add a struct vcpu and use it in most APIs. 2023-03-24 11:49:06 -07:00
hda_codec.c bhyve: Make hda_ops function tables const 2022-10-23 11:11:33 -04:00
hda_reg.h bhyve: clean up trailing whitespaces 2021-12-27 19:58:10 +02:00
hdac_reg.h
inout.c libvmmapi: Add a struct vcpu and use it in most APIs. 2023-03-24 11:49:06 -07:00
inout.h libvmmapi: Add a struct vcpu and use it in most APIs. 2023-03-24 11:49:06 -07:00
ioapic.c
ioapic.h
iov.c bhyve: Avoid arithmetic on void pointers 2022-10-23 11:11:33 -04:00
iov.h bhyve: enable virtio-net mergeable rx buffers for tap(4) 2020-02-20 21:07:23 +00:00
ipc.h bhyve: Remove trailing semicolon 2023-03-14 20:39:34 -06:00
kernemu_dev.c libvmmapi: Add a struct vcpu and use it in most APIs. 2023-03-24 11:49:06 -07:00
kernemu_dev.h vmm(4), bhyve(8): Expose kernel-emulated special devices to userspace 2020-05-15 15:54:22 +00:00
Makefile bhyve: add helper struct for qemus acpi table loader 2023-04-25 08:29:25 +02:00
Makefile.depend Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
Makefile.depend.options Add Makefile.depend.options 2019-12-11 17:37:37 +00:00
mem.c libvmmapi: Add a struct vcpu and use it in most APIs. 2023-03-24 11:49:06 -07:00
mem.h libvmmapi: Add a struct vcpu and use it in most APIs. 2023-03-24 11:49:06 -07:00
mevent_test.c bhyve: clean up trailing whitespaces 2021-12-27 19:58:10 +02:00
mevent.c bhyve: Annotate unused function parameters 2022-10-08 11:33:21 -04:00
mevent.h bhyve: clean up trailing whitespaces 2021-12-27 19:58:10 +02:00
mptbl.c bhyve: Annotate unused function parameters 2022-10-08 11:33:21 -04:00
mptbl.h
net_backends.c bhyve: Define an accessor for net backend private data 2022-11-11 10:01:40 -05:00
net_backends.h Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
net_utils.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
net_utils.h Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
pci_ahci.c bhyve: Remove vmctx member from struct vm_snapshot_meta. 2023-03-24 11:49:06 -07:00
pci_e82545.c bhyve: Remove vmctx member from struct vm_snapshot_meta. 2023-03-24 11:49:06 -07:00
pci_emul.c bhyve: add helper to read PCI IDs from bhyve config 2023-03-27 10:10:24 +02:00
pci_emul.h bhyve: add helper to read PCI IDs from bhyve config 2023-03-27 10:10:24 +02:00
pci_fbuf.c bhyve: Remove useless return at the end of void function 2023-03-01 12:04:41 -05:00
pci_hda.c bhyve: Fix a buffer overread in the PCI hda device model. 2023-01-20 09:58:38 -08:00
pci_hda.h bhyve: Remove trailing semicolon 2023-03-14 20:39:34 -06:00
pci_hostbridge.c bhyve: make use of helper to read PCI IDs from bhyve config 2023-03-27 10:10:24 +02:00
pci_irq.c bhyve: Address some signed/unsigned comparison warnings 2022-10-25 11:16:57 -04:00
pci_irq.h
pci_lpc.c bhyve: do not exit if LPC finds no host selector 2023-04-11 08:39:21 +02:00
pci_lpc.h bhyve: add cmdline option to enable qemu's fwcfg 2023-03-17 09:35:36 +01:00
pci_nvme.c ext2fs: extract crc16 into sys/crc16.h 2023-04-24 12:41:52 +03:00
pci_passthru.c bhyve: add hook for PCI header of passthru devices 2023-04-12 09:22:24 +02:00
pci_passthru.h bhyve: add hook for PCI header of passthru devices 2023-04-12 09:22:24 +02:00
pci_uart.c bhyve: Remove vmctx argument from PCI device model methods. 2023-01-19 10:30:18 -08:00
pci_virtio_9p.c bhyve: Remove vmctx argument from PCI device model methods. 2023-01-19 10:30:18 -08:00
pci_virtio_block.c bhyve: Remove vmctx argument from PCI device model methods. 2023-01-19 10:30:18 -08:00
pci_virtio_console.c bhyve: Remove vmctx argument from PCI device model methods. 2023-01-19 10:30:18 -08:00
pci_virtio_input.c bhyve: Remove useless return at the end of void function 2023-03-01 12:04:41 -05:00
pci_virtio_net.c bhyve: Remove vmctx argument from PCI device model methods. 2023-01-19 10:30:18 -08:00
pci_virtio_rnd.c bhyve: Remove vmctx argument from PCI device model methods. 2023-01-19 10:30:18 -08:00
pci_virtio_scsi.c bhyve: Remove vmctx argument from PCI device model methods. 2023-01-19 10:30:18 -08:00
pci_xhci.c bhyve: Remove vmctx member from struct vm_snapshot_meta. 2023-03-24 11:49:06 -07:00
pci_xhci.h bhyve: Drop volatile qualifiers from xhci hw struct fields 2022-11-11 10:01:52 -05:00
pctestdev.c libvmmapi: Add a struct vcpu and use it in most APIs. 2023-03-24 11:49:06 -07:00
pctestdev.h Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
pm.c bhyve: Remove the unused vcpu argument from all of the I/O port handlers. 2022-12-09 10:35:44 -08:00
post.c bhyve: Remove the unused vcpu argument from all of the I/O port handlers. 2022-12-09 10:35:44 -08:00
ps2kbd.c bhyve: Fix some warnings in the ps2 emulation code 2022-10-23 11:11:33 -04:00
ps2kbd.h Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
ps2mouse.c bhyve: Fix some warnings in the ps2 emulation code 2022-10-23 11:11:33 -04:00
ps2mouse.h bhyve: clean up trailing whitespaces 2021-12-27 19:58:10 +02:00
qemu_fwcfg.c bhyve: save softc of ACPI devices 2023-04-13 08:00:09 +02:00
qemu_fwcfg.h bhyve: Accept a variable-length string name for qemu_fwcfg_add_file. 2023-03-22 12:34:34 -07: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 bhyve: Make sure that the VNC version is initialized 2022-10-27 10:48:55 -04:00
rfb.h bhyve: Sprinkle const qualifiers where appropriate 2022-08-16 14:21:44 -04:00
rtc.c bhyve: Annotate unused function parameters 2022-10-08 11:33:21 -04:00
rtc.h Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
smbiostbl.c bhyve: Address an unused parameter warning in the smbios code 2022-11-18 14:11:48 -05:00
smbiostbl.h
snapshot.c bhyve: Remove vmctx member from struct vm_snapshot_meta. 2023-03-24 11:49:06 -07:00
snapshot.h bhyve: Remove vmctx member from struct vm_snapshot_meta. 2023-03-24 11:49:06 -07:00
sockstream.c
sockstream.h
spinup_ap.c libvmmapi: Add a struct vcpu and use it in most APIs. 2023-03-24 11:49:06 -07:00
spinup_ap.h libvmmapi: Add a struct vcpu and use it in most APIs. 2023-03-24 11:49:06 -07:00
task_switch.c libvmmapi: Add a struct vcpu and use it in most APIs. 2023-03-24 11:49:06 -07:00
uart_emul.c bhyve: Address some signed/unsigned comparison warnings 2022-10-25 11:16:57 -04:00
uart_emul.h Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
usb_emul.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
usb_emul.h bhyve: Remove trailing semicolon 2023-03-14 20:39:34 -06:00
usb_mouse.c bhyve: USB device model structures can be qualified with "static" 2022-10-23 11:11:33 -04:00
vga.c libvmmapi: Add a struct vcpu and use it in most APIs. 2023-03-24 11:49:06 -07:00
vga.h bhyve: Put the prototype for vga_render() in a header 2022-10-23 11:11:33 -04:00
virtio.c bhyve: Remove vmctx member from struct vm_snapshot_meta. 2023-03-24 11:49:06 -07:00
virtio.h bhyve: Remove vmctx argument from PCI device model methods. 2023-01-19 10:30:18 -08:00
vmgenc.c bhyve(8): Correct copyright boilerplate for r359950 2020-04-15 05:55:14 +00:00
vmgenc.h bhyve(8): Correct copyright boilerplate for r359950 2020-04-15 05:55:14 +00:00
xmsr.c libvmmapi: Add a struct vcpu and use it in most APIs. 2023-03-24 11:49:06 -07:00
xmsr.h libvmmapi: Add a struct vcpu and use it in most APIs. 2023-03-24 11:49:06 -07:00