From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60343 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Om9v1-0006Cz-9i for qemu-devel@nongnu.org; Thu, 19 Aug 2010 14:32:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Om9ux-00035E-8O for qemu-devel@nongnu.org; Thu, 19 Aug 2010 14:32:51 -0400 Received: from smtp.mailix.net ([66.11.225.183]:21688) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Om9uw-00034T-Um for qemu-devel@nongnu.org; Thu, 19 Aug 2010 14:32:47 -0400 From: "Adnan Khaleel" Subject: =?iso-8859-1?Q?Re=3A_=5BQemu-devel=5D_Template_for_developing_a_Qe?= =?iso-8859-1?Q?mu_device_with_PCIe=09and_MSI-X?= In-Reply-To: 20100819031904.GG11421@valinux.co.jp Message-ID: <20100819183242.e5078819@shadowfax.no-ip.com> Date: Thu, 19 Aug 2010 13:32:42 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-----------7e7565907b5807c8fc6000519141eef2" Reply-To: adnan@khaleel.us List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: qemu-devel@nongnu.org This is a multi-part message in MIME format. -------------7e7565907b5807c8fc6000519141eef2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Isaku, I'm having some difficulties building the sources, I get the following m= essage *akhaleel@yar95 qemu-q35 $ ./configure --help : bad interpreter: No such file or directory And I get a similar error while compiling seabios as well. What shell are you using or am I missing something=3F I'm compiling from= a typical bash shell and using gcc v4.4.0. In vgabios, there is a requirement for bcc. Is that borland C compiler= =3F Thanks Adnan =5F=5F=5F=5F=5F =20 From: Isaku Yamahata [mailto:yamahata@valinux.co.jp] To: Adnan Khaleel [mailto:adnan@khaleel.us] Cc: qemu-devel@nongnu.org Sent: Wed, 18 Aug 2010 22:19:04 -0500 Subject: Re: [Qemu-devel] Template for developing a Qemu device with PCI= e and MSI-X On Wed, Aug 18, 2010 at 02:10:10PM -0500, Adnan Khaleel wrote: > Hello Qemu developers, > > I'm interested in developing a device model that plugs into Qemu tha= t is based > on a PCIe interface and uses MSI-X. My goal is to ultimately attach = a GPU > simulator to this PCIe interface and use the entire platfom (Qemu + = GPU > simulator) for studying cpu, gpu interactions. >=20 > I'm not terribly familiar with the Qemu device model and I'm looking= for some > assistance, perhaps a starting template for pcie and msi-x that woul= d offer the > basic functionality that I could then build upon. >=20 > I have looked at the various devices that already modelled that are = included > with Qemu (v0.12.5 at least) and I've noticed several a few pci devi= ces, eg; > ne2k and cirrus-pci etc, however only one device truly seems to util= ize both > the technologies that I'm interested in and that is the virtio-pci.c >=20 > I'm not sure what virtio-pci does so I'm not sure if that is a suita= ble > starting point for me. >=20 > Any help, suggestions etc would be extremely helpful and much apprec= iated. =20 Qemu doesn't support pcie at the moment. Only partial patches have been merged, still more patches have to be merged for pcie to fully work. The following repo is available. =20 git clone http://people.valinux.co.jp/~yamahata/qemu/q35/qemu git clone http://people.valinux.co.jp/~yamahata/qemu/q35/seabios git clone http://people.valinux.co.jp/~yamahata/qemu/q35/vgabios =20 Note: patched seabios and vgabios are needed, you have to pass ACPI DS= DT for q35. example: qemu-system-x86=5F64 -M pc=5Fq35 -acpitable load=5Fheader,data=3Droms/= seabios/src/q35-acpi-dsdt.aml =20 This repo is for those who want to try/develop pcie support, not for upstream merge. So they include patches unsuitable for upstrea= m. The repo includes pcie port switch emulator which utilize pcie and MSI(not MSI-X). =20 The difference between PCI device and PCIe device is configuration space size. By setting PCIDeviceInfo::is=5Fexpress =3D 1, you'll get 4K configurat= ion space. Helper functions for pcie are found in qemu/hw/pcie.c For msi-x, see qemu/hw/msix.c. =20 Thanks, --=20 yamahata =20 -------------7e7565907b5807c8fc6000519141eef2 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Isaku,

I'm having some difficult= ies building the sources, I get the following message

*akhaleel@y= ar95 qemu-q35 $ ./configure --help
: bad interpreter: No such file or= directory

And I get a similar error while compiling seabios as w= ell.

What shell are you using or am I missing something=3F I'm co= mpiling from a typical bash shell and using gcc v4.4.0.

In vgabio= s, there is a requirement for bcc. Is that borland C compiler=3F

= Thanks

Adnan
http://people.valinux.co.jp/~yamahata/qemu/q35/q= emu
git clone http://people.valinux.co.jp/~yamahata/qemu/q3= 5/seabios
git clone http://people.valinux.co.jp/~yamahata/qemu/q3= 5/vgabios

Note: patched seabios and vgabios are needed, you have to pass ACPI DSDT=
for q35.
example:
qemu-system-x86=5F64 -M pc=5Fq35 -acpitable load=5Fheader,data=3Droms/se= abios/src/q35-acpi-dsdt.aml

This repo is for those who want to try/develop pcie support,
not for upstream merge. So they include patches unsuitable for upstream.=
The repo includes pcie port switch emulator which utilize pcie and
MSI(not MSI-X).

The difference between PCI device and PCIe device is configuration
space size.
By setting PCIDeviceInfo::is=5Fexpress =3D 1, you'll get 4K configuratio= n
space. Helper functions for pcie are found in qemu/hw/pcie.c
For msi-x, see qemu/hw/msix.c.

Thanks,
--
yamahata
-------------7e7565907b5807c8fc6000519141eef2--