On Mon, 2013-04-08 at 14:34 +0200, Andre Richter wrote: > Hi all, > > I'm quite new to KVM/QEMU internals. > On recent x86 setups (Sandy/Ivy Bridge with vt-x and vt-d), if I > attach a PCI device via PCI-Passthrough to a VM, > I can directly do MMIO with the device's registers or whatsoever hides > behind it's BAR addresses. > > I wonder if there is a way for the Host/VMM to monitor/trap guest > access to such areas. > I think this is not what PCI passthrough is intended for, because it > wants to get the host out of the way for I/O with device. > But what if a guest goes nuts and starts to flood the interconnect > with usless transactions to the PCI device? > > I would be very thankful for some hints / pointers :) This is exactly how we debug devices that don't work with PCI passthrough. If you use vfio-pci to do PCI assignment (recommended) I just added code to make it easy to turn this on. Use the latest qemu.git and edit hw/vfio_pci.c. Uncomment /* #define DEBUG_VFIO */ and change "#define VFIO_ALLOW_MMAP 1" to 0 and rebuild. All accesses to the device will be printed to stderr. Thanks, Alex -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html