Kernel KVM virtualization development
 help / color / mirror / Atom feed
* PCI device reverse engineering
@ 2014-02-28 18:39 ret val
  2014-02-28 18:48 ` Alex Williamson
  0 siblings, 1 reply; 2+ messages in thread
From: ret val @ 2014-02-28 18:39 UTC (permalink / raw)
  To: kvm

I would like to use KVM to reverse engineer/debug a PCI driver. With a
IOMMU and a pass-through device setup, would it be possible to
monitor/log all PCI bus traffic to a device? How can I go about
enabling and viewing this?

Thank you

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PCI device reverse engineering
  2014-02-28 18:39 PCI device reverse engineering ret val
@ 2014-02-28 18:48 ` Alex Williamson
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Williamson @ 2014-02-28 18:48 UTC (permalink / raw)
  To: ret val; +Cc: kvm

On Fri, 2014-02-28 at 13:39 -0500, ret val wrote:
> I would like to use KVM to reverse engineer/debug a PCI driver. With a
> IOMMU and a pass-through device setup, would it be possible to
> monitor/log all PCI bus traffic to a device? How can I go about
> enabling and viewing this?

You can't monitor bus traffic, you'd still need a PCI analyzer for that,
but you can track all driver and guest OS access to the device.  So you
can at least soft or reverse engineer the driver.  To do that, uncomment
the #define DEBUG_VFIO line near the top of hw/misc/vfio.c and change
all the VFIO_ALLOW_FOO defines from 1 to 0, especially the MMAP one.
Thanks,

Alex


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-28 18:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-28 18:39 PCI device reverse engineering ret val
2014-02-28 18:48 ` Alex Williamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox