All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Adnan Khaleel" <adnan@khaleel.us>
To: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Template for developing a Qemu device with PCIe	and MSI-X
Date: Wed, 25 Aug 2010 17:39:50 -0500	[thread overview]
Message-ID: <20100825223950.7e664cb4@shadowfax.no-ip.com> (raw)
In-Reply-To: 20100819031904.GG11421@valinux.co.jp


[-- Attachment #1.1: Type: text/plain, Size: 3775 bytes --]

Hi Isaku,

I've made some progress in coding the device template but its no where near complete.

I've created some files and am attaching it to this note. Based on what I could gather from the pcie source files I've made a stab at creating a simple model. I've also attached a file for a simple pci device that works under regular Qemu. I would like to duplicate its functionality in your pcie environment for starters.

Could you please take a look at the files I've created and tell me if I've understood your pcie model correctly. Any help will be truly appreciated.

Adnan

The five files I've modified from your git repository are as follows

hw/pci_ids.h                    // Added vendor id defines
hw/pc_q35.c                    // Device instantiation
  hw/pcie_msix_template.h  // Device header file
hw/pcie_msix_template.c  // Device file
Makefile.objs                   // Added pcie_msix_template.o to list of objects being built

Everything should compile without any warnings or errors.

The last file:
sc_link_pci.c
Is the original PCI device that I'm trying to convert into being PCIe and MSI-X and is included merely for reference to help you understand what I'd like to achieve in your environment.


  _____  

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
    

[-- Attachment #1.2: Type: text/html, Size: 4997 bytes --]

[-- Attachment #2: pcie_msix_template.zip --]
[-- Type: application/zip, Size: 15634 bytes --]

             reply	other threads:[~2010-08-25 22:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-25 22:39 Adnan Khaleel [this message]
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
     [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-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-19 17:01 [Qemu-devel] Template for developing a Qemu device with PCIe and MSI-X Adnan Khaleel
2010-08-20  5:15 ` [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=20100825223950.7e664cb4@shadowfax.no-ip.com \
    --to=adnan@khaleel.us \
    --cc=qemu-devel@nongnu.org \
    --cc=yamahata@valinux.co.jp \
    /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.