freebsd-dev/usr.sbin/bhyve
D Scott Phillips f8a6ec2d57 bhyve: support relocating fbuf and passthru data BARs
We want to allow the UEFI firmware to enumerate and assign
addresses to PCI devices so we can boot from NVMe[1]. Address
assignment of PCI BARs is properly handled by the PCI emulation
code in general, but a few specific cases need additional support.
fbuf and passthru map additional objects into the guest physical
address space and so need to handle address updates. Here we add a
callback to emulated PCI devices to inform them of a BAR
configuration change. fbuf and passthru then watch for these BAR
changes and relocate the frame buffer memory segment and passthru
device mmio area respectively.

We also add new VM_MUNMAP_MEMSEG and VM_UNMAP_PPTDEV_MMIO ioctls
to vmm(4) to facilitate the unmapping needed for addres updates.

[1]: https://github.com/freebsd/uefi-edk2/pull/9/

Originally by:	scottph
MFC After:	1 week
Sponsored by:	Intel Corporation
Reviewed by:	grehan
Approved by:	philip (mentor)
Differential Revision:	https://reviews.freebsd.org/D24066
2021-03-19 11:04:36 +08:00
..
acpi.c bhyve(8): Add VM Generation Counter ACPI device 2020-04-15 02:00:17 +00:00
acpi.h bhyve(8): Add VM Generation Counter ACPI device 2020-04-15 02:00:17 +00:00
ahci.h Fix style(9) space vs tab. 2018-06-14 01:34:53 +00:00
atkbdc.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
atkbdc.h Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
audio.c bhyve: add wrapper for debug printf statements 2020-01-08 22:55:22 +00:00
audio.h Add SPDX tags to bhyve(8) HD Audio device. 2019-06-25 06:24:56 +00:00
bhyve_config.5 Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
bhyve.8 Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
bhyvegc.c When this code was introduced at r300829 the author forgot to add 2018-06-13 04:00:21 +00:00
bhyvegc.h Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
bhyverun.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
bhyverun.h Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
block_if.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
block_if.h Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
bootrom.c bhyve(8): Add bootrom allocation abstraction 2020-04-15 01:58:51 +00:00
bootrom.h bhyve(8): Add bootrom allocation abstraction 2020-04-15 01:58:51 +00:00
config.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
config.h Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
console.c Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
console.h Fix style(9) space vs tab. 2018-06-14 01:34:53 +00:00
debug.h bhyve: add wrapper for debug printf statements 2020-01-08 22:55:22 +00:00
fwctl.c Always treat firmware request and response sizes as unsigned. 2018-12-04 18:28:25 +00:00
fwctl.h Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
gdb.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
gdb.h Support software breakpoints in the debug server on Intel CPUs. 2019-12-13 19:21:58 +00:00
hda_codec.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
hda_reg.h Add SPDX tags to bhyve(8) HD Audio device. 2019-06-25 06:24:56 +00:00
hdac_reg.h Add SPDX tags to bhyve(8) HD Audio device. 2019-06-25 06:24:56 +00:00
inout.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
inout.h Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
ioapic.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
ioapic.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
iov.c bhyve: enable virtio-net mergeable rx buffers for tap(4) 2020-02-20 21:07:23 +00:00
iov.h bhyve: enable virtio-net mergeable rx buffers for tap(4) 2020-02-20 21:07:23 +00:00
kernemu_dev.c vmm(4), bhyve(8): Expose kernel-emulated special devices to userspace 2020-05-15 15:54:22 +00:00
kernemu_dev.h vmm(4), bhyve(8): Expose kernel-emulated special devices to userspace 2020-05-15 15:54:22 +00:00
Makefile Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
Makefile.depend Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
Makefile.depend.options Add Makefile.depend.options 2019-12-11 17:37:37 +00:00
mem.c Add support for writing to guest memory in the debug server. 2019-05-24 00:34:13 +00:00
mem.h Add support for writing to guest memory in the debug server. 2019-05-24 00:34:13 +00:00
mevent_test.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
mevent.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
mevent.h bhyve: add backend rx backpressure to virtio-net 2019-11-03 19:02:32 +00:00
mptbl.c bhyve: add wrapper for debug printf statements 2020-01-08 22:55:22 +00:00
mptbl.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
net_backends.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07: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 Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
pci_e82545.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
pci_emul.c bhyve: support relocating fbuf and passthru data BARs 2021-03-19 11:04:36 +08:00
pci_emul.h bhyve: support relocating fbuf and passthru data BARs 2021-03-19 11:04:36 +08:00
pci_fbuf.c bhyve: support relocating fbuf and passthru data BARs 2021-03-19 11:04:36 +08:00
pci_hda.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
pci_hda.h Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
pci_hostbridge.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
pci_irq.c Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
pci_irq.h Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
pci_lpc.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
pci_lpc.h Add -s "help" and -l "help" to print a list of supported PCI and LPC devices. 2018-08-22 20:23:08 +00:00
pci_nvme.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
pci_passthru.c bhyve: support relocating fbuf and passthru data BARs 2021-03-19 11:04:36 +08:00
pci_uart.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
pci_virtio_9p.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
pci_virtio_block.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
pci_virtio_console.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
pci_virtio_net.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
pci_virtio_rnd.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
pci_virtio_scsi.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
pci_xhci.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
pci_xhci.h Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
pctestdev.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
pctestdev.h Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
pm.c Silence ACPI RTC error/warning in Linux guests. 2020-07-06 08:36:14 +00:00
post.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
ps2kbd.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
ps2kbd.h Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
ps2mouse.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
ps2mouse.h Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
rfb.c Fix issues with various VNC clients. 2020-12-18 00:38:48 +00:00
rfb.h Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
rtc.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
rtc.h Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
smbiostbl.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
smbiostbl.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
snapshot.c bhyve/snapshot: use SOCK_DGRAM instead of SOCK_STREAM 2021-03-07 15:23:29 -09:00
snapshot.h bhyve/snapshot: rename and bump size of MAX_SNAPSHOT_VMNAME 2021-02-27 12:07:35 -09:00
sockstream.c Fix style(9) space vs tab. 2018-06-14 01:34:53 +00:00
sockstream.h Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
spinup_ap.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
spinup_ap.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
task_switch.c bhyve: add wrapper for debug printf statements 2020-01-08 22:55:22 +00:00
uart_emul.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07: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 Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
usb_mouse.c Refactor configuration management in bhyve. 2021-03-18 16:30:26 -07:00
vga.c Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
vga.h Fix style(9) space vs tab. 2018-06-14 01:34:53 +00:00
virtio.c bhyve: virtio shares definitions between sys/dev/virtio 2021-03-16 19:29:39 +08:00
virtio.h bhyve: virtio shares definitions between sys/dev/virtio 2021-03-16 19:29:39 +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 bhyve, bhyvectl: Add Hygon Dhyana support. 2020-02-13 19:05:14 +00:00
xmsr.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00