All of lore.kernel.org
 help / color / mirror / Atom feed
From: Isaku Yamahata <yamahata@valinux.co.jp>
To: Adnan Khaleel <adnan@khaleel.us>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Template for developing a Qemu device with PCIe?and MSI-X
Date: Fri, 20 Aug 2010 14:15:05 +0900	[thread overview]
Message-ID: <20100820051505.GC31720@valinux.co.jp> (raw)
In-Reply-To: <20100819170140.10dc216a@shadowfax.no-ip.com>

On Thu, Aug 19, 2010 at 12:01:40PM -0500, Adnan Khaleel wrote:
> 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/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.
> 
> I'm looking at Qemu 0.12.3 and there are 2 files, pci_host.c and pcie_host.c.
> Can you explain what these do?

They are for configuration space.
pci_host.c abstracts the emulation of indirect access to configuration space.
On PC, ioport 0xcf8 and 0xcfc.
pcie_host abtracts the emulation of access to MMCONFIG space. There is no
user at the moment, though.

> Also, I see virtio_pci.c is the only device that uses msi-x in qemu. Can you
> explain what device this is trying to emulate?

virtio is a paravirtual IO framework for kvm. There is no corresponding
real hardware.


> Also, will the support for PCIe be merged with the mail Qemu at some point?

I've been trying it. Your help will be appreciated. 


>     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?

Half yes. You need to be aware that port switch is pci-to-pci bridge which
is slightly different from normal pci/pcie device.
There is no emulator of pcie normal device at the moment.


>     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.
> 
> One last question, does the current implementation allow for 64bit BAR
> addresses?

Yes. 64bit BAR emulation was alread merged. seabios is also ready for it.
-- 
yamahata

  reply	other threads:[~2010-08-20  5:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-19 17:01 [Qemu-devel] Template for developing a Qemu device with PCIe and MSI-X Adnan Khaleel
2010-08-20  5:15 ` Isaku Yamahata [this message]
     [not found] <20100909190713.d8dc99ce@shadowfax.no-ip.com>
2010-09-10  2:00 ` [Qemu-devel] Template for developing a Qemu device with?PCIe?and MSI-X Isaku Yamahata
  -- strict thread matches above, loose matches on Subject: below --
2010-09-02 22:56 [Qemu-devel] Template for developing a Qemu device with PCIe and MSI-X Adnan Khaleel
2010-09-02 17:42 Adnan Khaleel
2010-09-03  2:20 ` [Qemu-devel] Template for developing a Qemu device with PCIe?and MSI-X Isaku Yamahata
2010-09-01 19:07 [Qemu-devel] Template for developing a Qemu device with PCIe and MSI-X Adnan Khaleel
2010-09-02  2:38 ` Isaku Yamahata
2010-08-26 18:17 [Qemu-devel] Template for developing a Qemu device with PCIe?and MSI-X Adnan Khaleel
2010-08-27  7:57 ` [Qemu-devel] Template for developing a Qemu device with?PCIe?and MSI-X Isaku Yamahata
2010-08-25 22:39 [Qemu-devel] Template for developing a Qemu device with PCIe and MSI-X Adnan Khaleel
2010-08-26  9:43 ` [Qemu-devel] Template for developing a Qemu device with PCIe?and MSI-X Isaku Yamahata
2010-08-27 15:48 ` [Qemu-devel] Template for developing a Qemu device with PCIe and MSI-X Cam Macdonell
2010-08-20 22:22 [Qemu-devel] Template for developing a Qemu device with PCIe?and MSI-X Adnan Khaleel
2010-08-20 20:13 Adnan Khaleel
2010-08-19 18:32 [Qemu-devel] Template for developing a Qemu device with PCIe and MSI-X Adnan Khaleel
2010-08-20  5:22 ` [Qemu-devel] Template for developing a Qemu device with PCIe?and MSI-X Isaku Yamahata
2010-08-18 19:10 [Qemu-devel] Template for developing a Qemu device with PCIe and MSI-X Adnan Khaleel
2010-08-19  3:19 ` Isaku Yamahata

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100820051505.GC31720@valinux.co.jp \
    --to=yamahata@valinux.co.jp \
    --cc=adnan@khaleel.us \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.