qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH,RFC]: PCI Host Proxy v0.1


From: Gianni Tedesco
Subject: [Qemu-devel] [PATCH,RFC]: PCI Host Proxy v0.1
Date: Mon, 31 May 2004 18:16:21 +0100

Hi,

Attached is the first draft of a patch to add PCI Host <-> Guest proxy
mechanism. This allows PCI devices on the host machine to be presented
to the guest operating system for usage. This is similar to the bochs
'pcidev' functionality. This code is not ready for inclusion yet, rather
it is just to show where I'm at and perhaps provoke some discussion.

The code works only with a Linux host operating system (though should
compile everywhere). We use the /proc/bus/pci interface to gain access
to the PCI resources in an architecture-portable way.

This code is mainly intended for people who wish to reverse engineer
device drivers on proprietary operating systems. This is due to some
fairly serious technical shortfalls, most notably our lack of ability to
trap and emulate PCI DMA transfers.

How to use:
 1. Apply patch to qemu, rebuild and reinstall.
 2. Find the bus:dev.fn numbers of the device you wish to map in to
    qemu using lspci. Run qemu with the "-pci -pciproxy bus:dev.fn"
    command line switches eg: "-pci -pciproxy 00:0a.0".

Here is a screenshot to prove it works ;)
 http://www.scaramanga.co.uk/stuff/qemu-pciproxy-0.1.png (47KB)

Current limitations:
 o Memory resources are not mapped in yet.
 o ROM resources are not mapped in yet.
 o IRQs are not passed along yet.
 o Will probably never support PCI DMA without guest OS patching.

Future Ideas:
 o Fast logging of information between guest OS -> hardware
 o Log reading / conversion tool, so reverse engineers can share info
 o Support PCI-DMA by patching guest OS's
 o USB proxy along the same lines
 o AGP support (map GART with Linux agpgart)

Have fun :)

Attachment: qemu-pciproxy-0.1.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]