freebsd-skq/sys/amd64/vmm
John Baldwin 6db55a0f3a Rework pass through changes in r305485 to be safer.
Specifically, devices that do not support PCI-e FLR and were not
gracefully shutdown by the guest OS could continue to issue DMA
requests after the VM was terminated.  The changes in r305485 meant
that those DMA requests were completed against the host's memory which
could result in random memory corruption.  Instead, leave ppt devices
that are not attached to a VM disabled in the IOMMU and only restore
the devices to the host domain if the ppt(4) driver is detached from a
device.

As an added safety belt, disable busmastering for a pass-through device
when before adding it to the host domain during ppt(4) detach.

PR:		222937
Tested by:	Harry Schmalzbauer <freebsd@omnilan.de>
Reviewed by:	grehan
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D12661
2017-10-27 14:57:14 +00:00
..
amd amd-vi: gcc build errors 2017-07-07 06:37:19 +00:00
intel Save KGSBASE in pcb before overriding it with the guest value. 2017-08-24 10:49:53 +00:00
io Rework pass through changes in r305485 to be safer. 2017-10-27 14:57:14 +00:00
vmm_dev.c vmm_dev: work around a bogus error with gcc 6.3.0 2017-01-20 13:21:27 +00:00
vmm_host.c - Rework the XSAVE/XRSTOR emulation to only expose XCR0 features to the 2014-05-27 19:04:38 +00:00
vmm_host.h revert r315959 because it causes build problems 2017-03-27 12:34:29 +00:00
vmm_instruction_emul.c vmm(4): Small spelling fixes. 2016-05-03 22:07:18 +00:00
vmm_ioport.c Don't require <sys/cpuset.h> to be always included before <machine/vmm.h>. 2015-04-30 22:23:22 +00:00
vmm_ioport.h Change the type of the first argument to the I/O emulation handlers to 2014-10-26 19:03:06 +00:00
vmm_ktr.h Add emulation of the "outsb" instruction. NetBSD guests use this to write to 2014-05-23 05:15:17 +00:00
vmm_lapic.c Relax the check on which vectors can be delivered through the APIC. According 2015-04-16 22:44:51 +00:00
vmm_lapic.h
vmm_mem.c Restructure memory allocation in bhyve to support "devmem". 2015-06-18 06:00:17 +00:00
vmm_mem.h Restructure memory allocation in bhyve to support "devmem". 2015-06-18 06:00:17 +00:00
vmm_stat.c vmm(4): Small spelling fixes. 2016-05-03 22:07:18 +00:00
vmm_stat.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
vmm_util.c
vmm_util.h
vmm.c revert r315959 because it causes build problems 2017-03-27 12:34:29 +00:00
x86.c Hide the AMD MONITORX/MWAITX capability. 2017-03-16 03:21:42 +00:00
x86.h Do a proper emulation of guest writes to MSR_EFER. 2015-05-06 05:40:20 +00:00