Received: from [140.186.70.92] (port=44929 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OmXyA-0003xf-Jl for qemu-devel@nongnu.org; Fri, 20 Aug 2010 16:13:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OmXy8-0003Av-Kr for qemu-devel@nongnu.org; Fri, 20 Aug 2010 16:13:42 -0400 Received: from smtp.mailix.net ([66.11.225.183]:46251) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OmXy8-0003Ak-8g for qemu-devel@nongnu.org; Fri, 20 Aug 2010 16:13:40 -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=09PCIe=3Fand_MSI-X?= In-Reply-To: 20100820052203.GD31720@valinux.co.jp Message-ID: <20100820201336.01013876@shadowfax.no-ip.com> Date: Fri, 20 Aug 2010 15:13:36 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-----------56fcb61b88d4201a83393bf9be0de453" 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. -------------56fcb61b88d4201a83393bf9be0de453 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I'm not sure what the problem was but I had checked out the code on a wi= ndows machine and then copied it over to a linux box. That was causing p= roblems somehow. I've managed to compile qemu and seabios but vgabios is taking forever t= o compile. The problem seems to be bcc. I've tried a simple helloworld p= rogram and even that seems to be taking forever to compile. Not sure if = there is something wrong with my bcc install. AK =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: Fri, 20 Aug 2010 00:22:03 -0500 Subject: Re: [Qemu-devel] Template for developing a Qemu device with PCI= e=3Fand MSI-X On Thu, Aug 19, 2010 at 01:32:42PM -0500, Adnan Khaleel wrote: > Isaku, >=20 > I'm having some difficulties building the sources, I get the followi= ng message >=20 > *akhaleel@yar95 qemu-q35 $ ./configure --help > : bad interpreter: No such file or directory >=20 > 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. =20 I'm not sure. configure script isn't modified. Can you compile normal qemu=3F The first line of the script is #!/bin/sh. I suppose you have /bin/sh. =20 =20 > In vgabios, there is a requirement for bcc. Is that borland C compil= er=3F =20 No. Most Linux destro has bcc package. Just you need to install it lik= e yum install bcc or something. =20 Thanks, =20 =20 >=20 > Thanks >=20 > Adnan >=20 > =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81= =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81= =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81= =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81= =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81 > 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 >=20 > 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 Qe= mu that is > based > > on a PCIe interface and uses MSI-X. My goal is to ultimately a= ttach a GPU > > simulator to this PCIe interface and use the entire platfom (Q= emu + GPU > > simulator) for studying cpu, gpu interactions. > > > > I'm not terribly familiar with the Qemu device model and I'm l= ooking for > some > > assistance, perhaps a starting template for pcie and msi-x tha= t would > offer the > > basic functionality that I could then build upon. > > > > I have looked at the various devices that already modelled tha= t are > included > > with Qemu (v0.12.5 at least) and I've noticed several a few pc= i devices, > eg; > > ne2k and cirrus-pci etc, however only one device truly seems t= o 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. >=20 > Qemu doesn't support pcie at the moment. > Only partial patches have been merged, still more patches have t= o > be merged for pcie to fully work. The following repo is availabl= e. >=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 A= CPI DSDT > 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 u= pstream. > The repo includes pcie port switch emulator which utilize pcie a= nd > MSI(not MSI-X). >=20 > The difference between PCI device and PCIe device is configurati= on > space size. > By setting PCIDeviceInfo::is=5Fexpress =3D 1, you'll get 4K conf= iguration > space. Helper functions for pcie are found in qemu/hw/pcie.c > For msi-x, see qemu/hw/msix.c. >=20 > Thanks, > -- > yamahata >=20 =20 --=20 yamahata =20 -------------56fcb61b88d4201a83393bf9be0de453 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
I'm not sure what the problem was but I= had checked out the code on a windows machine and then copied it over t= o a linux box. That was causing problems somehow.

I've managed to= compile qemu and seabios but vgabios is taking forever to compile. The = problem seems to be bcc. I've tried a simple helloworld program and even= that seems to be taking forever to compile. Not sure if there is someth= ing wrong with my bcc install.

AK

From: Isaku Yamahata [mailto:yamahata@= valinux.co.jp]
To: Adnan Khaleel [mailto:adnan@khaleel.us]
= Cc: qemu-devel@nongnu.org
Sent: Fri, 20 Aug 2010 00:22:= 03 -0500
Subject: Re: [Qemu-devel] Template for developing a Q= emu device with=09PCIe=3Fand MSI-X

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 follow= ing 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=3F 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=3F
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 compi= ler=3F

No. Most Linux destro has bcc package. Just you need to install it like<= br> yum install bcc or something.

Thanks,


>
> Thanks
>
> Adnan
>
> =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81= =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81= =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81= =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81= =E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81=E2=94=81
> From: Isaku Yamahata [mailto:yamahata@valinux.co.jp]
> To: Adnan Khaleel [mailto:a= dnan@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:<= br> > > Hello Qemu developers,
> >
> > I'm interested in developing a device model that plugs int= o Qemu that is
> based
> > on a PCIe interface and uses MSI-X. My goal is to ultimate= ly attach a GPU
> > simulator to this PCIe interface and use the entire platfo= m (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 fe= w pci devices,
> eg;
> > ne2k and cirrus-pci etc, however only one device truly see= ms to utilize
> both
> > the technologies that I'm interested in and that is the vi= rtio-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 m= uch
> 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 availab= le.
>
> git clone http://people.valinux.co.jp/~yamahata/q= emu/q35/qemu
> git clone http://people.valinux.co.jp/~yamahat= a/qemu/q35/seabios
> git clone http://people.valinux.co.jp/~yamahat= a/qemu/q35/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/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 configurat= ion
> space size.
> By setting PCIDeviceInfo::is=5Fexpress =3D 1, you'll get 4K con= figuration
> space. Helper functions for pcie are found in qemu/hw/pcie.c > For msi-x, see qemu/hw/msix.c.
>
> Thanks,
> --
> yamahata
>

--
yamahata
-------------56fcb61b88d4201a83393bf9be0de453--