Received: from [140.186.70.92] (port=47643 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OmJuE-00037r-4h for qemu-devel@nongnu.org; Fri, 20 Aug 2010 01:12:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OmJuD-00083N-3Q for qemu-devel@nongnu.org; Fri, 20 Aug 2010 01:12:42 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:54449) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OmJuC-000838-KA for qemu-devel@nongnu.org; Fri, 20 Aug 2010 01:12:41 -0400 Date: Fri, 20 Aug 2010 14:22:03 +0900 From: Isaku Yamahata Subject: Re: [Qemu-devel] Template for developing a Qemu device with PCIe?and MSI-X Message-ID: <20100820052203.GD31720@valinux.co.jp> References: <20100819183242.e5078819@shadowfax.no-ip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp Content-Disposition: inline In-Reply-To: <20100819183242.e5078819@shadowfax.no-ip.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Adnan Khaleel Cc: qemu-devel@nongnu.org On Thu, Aug 19, 2010 at 01:32:42PM -0500, Adnan Khaleel wrote: > Isaku, > > I'm having some difficulties building the sources, I get the following message > > *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? I'm compiling from a > typical bash shell and using gcc v4.4.0. I'm not sure. configure script isn't modified. Can you compile normal qemu? The first line of the script is #!/bin/sh. I suppose you have /bin/sh. > In vgabios, there is a requirement for bcc. Is that borland C compiler? No. Most Linux destro has bcc package. Just you need to install it like yum install bcc or something. Thanks, > > Thanks > > Adnan > > ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ > 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 PCIe > 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 that 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. > > > > 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 would > offer the > > basic functionality that I could then build upon. > > > > 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 devices, > eg; > > ne2k and cirrus-pci etc, however only one device truly seems to utilize > both > > the technologies that I'm interested in and that is the virtio-pci.c > > > > I'm not sure what virtio-pci does so I'm not sure if that is a suitable > > starting point for me. > > > > Any help, suggestions etc would be extremely helpful and much > appreciated. > > 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. > > 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 > > Note: patched seabios and vgabios are needed, you have to pass ACPI DSDT > for q35. > example: > qemu-system-x86_64 -M pc_q35 -acpitable load_header,data=roms/seabios/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_express = 1, you'll get 4K configuration > space. Helper functions for pcie are found in qemu/hw/pcie.c > For msi-x, see qemu/hw/msix.c. > > Thanks, > -- > yamahata > -- yamahata