From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53494 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Om8Us-0007jr-8t for qemu-devel@nongnu.org; Thu, 19 Aug 2010 13:01:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Om8Uq-0006BF-S2 for qemu-devel@nongnu.org; Thu, 19 Aug 2010 13:01:46 -0400 Received: from smtp.mailix.net ([66.11.225.183]:16183) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Om8Uq-0006B4-Kp for qemu-devel@nongnu.org; Thu, 19 Aug 2010 13:01:44 -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: <20100819170140.10dc216a@shadowfax.no-ip.com> Date: Thu, 19 Aug 2010 12:01:40 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-----------15dbfed9f90ce565f8a620eddfb9fedd" 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. -------------15dbfed9f90ce565f8a620eddfb9fedd Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Isaku, thank you very much for your very detailed response. I have a = few questions, see below. Thanks again, Adnan 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.I'm looking at Qemu 0.12.3 and there are 2 files, pci=5Fhost.c and pci= e=5Fhost.c. Can you explain what these do=3F Also, I see virtio=5Fpci.c is the only device that uses msi-x in qemu. C= an you explain what device this is trying to emulate=3F Also, will the support for PCIe be merged with the mail Qemu at some poi= nt=3F =20 The repo includes pcie port switch emulator which utilize pcie and MSI(not MSI-X). I guess I could use this as a template for my qemu device mode correct= =3F 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. One last question, does the current implementation allow for 64bit BAR= addresses=3F Thanks, --=20 yamahata =20 -------------15dbfed9f90ce565f8a620eddfb9fedd Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hi Isaku, thank you very much for your = very detailed response. I have a few questions, see below.

Thanks= again,

Adnan

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/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.=
I'm looking at Qemu 0.12.3 and there are 2 files, pci=5Fhos= t.c and pcie=5Fhost.c. Can you explain what these do=3F
Also, I see v= irtio=5Fpci.c is the only device that uses msi-x in qemu. Can you explai= n what device this is trying to emulate=3F
Also, will the support for= PCIe be merged with the mail Qemu at some point=3F

The repo includes pcie port switch emulator which utilize pcie and
MSI(not MSI-X).
I guess I could use this as a template for my qemu device m= ode correct=3F

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.
One last question, does the current implementation allow fo= r 64bit BAR addresses=3F

Thanks,
--
yamahata
-------------15dbfed9f90ce565f8a620eddfb9fedd--