qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Knut Omang <knut.omang@oracle.com>
To: qemu-devel@nongnu.org
Cc: Eduardo Habkost <ehabkost@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Knut Omang <knut.omang@oracle.com>,
	"Richard W.M. Jones" <rjones@redhat.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	"Gonglei (Arei)" <arei.gonglei@huawei.com>,
	Jan Kiszka <jan.kiszka@web.de>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Dotan Barak <dotanba@gmail.com>,
	Richard Henderson <rth@twiddle.net>
Subject: [Qemu-devel] [PATCH v5 0/4] pcie: Add support for Single Root I/O Virtualization
Date: Wed, 14 Oct 2015 17:51:14 +0200	[thread overview]
Message-ID: <1444837878-11602-1-git-send-email-knut.omang@oracle.com> (raw)

This patch set implements generic support for SR/IOV as an extension to the
core PCIe functionality, similar to the way other capabilities such as AER
is implemented.

There is no implementation of any device that provides
SR/IOV support included, but I have implemented a test
example which can be found together with this patch set here:

  git://github.com/knuto/qemu.git sriov_patches_v5

Testing with the example device was documented here:

  http://lists.nongnu.org/archive/html/qemu-devel/2014-08/msg05110.html

Changes since v4:
  - Mostly based on feeback in Marcel Apfelbaum's review:
  - The patch with changes to pci_regs.h got eliminated by rebase
  - Added some documentation as an additional patch
  - Some trivial fixes moved to separate patch
  - Modified code to use error and trace functions instead of printfs

Changes since v3:
  - Reworked 'pci: Update pci_regs header' to merge kernel version improvements
    with the current qemu version instead of copying from the kernel version.

Changes since v2:
  - Rebased onto 090d0bfd
  - Un-qdev'ified - avoids issues when resetting NUM_VFS
  - Fixed handling of vf_offset/vf_stride

Changes since v1:
  - Rebased on top of latest master, eliminating prereqs.
  - Implement proper support for VF_STRIDE, VF_OFFSET and SUP_PGSIZE
    Time better spent fixing it than explaining what the previous
    limitations were.
    - Added new first patch to fix pci bug related to this
  - Split out patch to pci_default_config_write to a separate patch 2
    to highlight bug fix.
  - Refactored out logic into new source files
    hw/pci/pcie_sriov.c include/hw/pci/pcie_sriov.h
    similar to pcie_aer.c/h.
  - Rename functions and introduce structs to better separate
    pf and vf functionality.
  - Replaced is_vf member with pci_is_vf() function abstraction
  - Fix numerous syntax, whitespace and comment issues
    according to Michael's review.
  - Fix memory leaks.
  - Removed igb example device - a rebased version available
    on github instead.

Knut Omang (4):
  pci: Make use of the devfn property when registering new devices
  pcie: Add support for Single Root I/O Virtualization (SR/IOV)
  pcie: Add some SR/IOV API documentation in docs/pcie_sriov.txt
  pcie: A few minor fixes (type+code simplify)

 docs/pcie_sriov.txt         | 115 +++++++++++++++++++
 hw/pci/Makefile.objs        |   2 +-
 hw/pci/pci.c                | 104 +++++++++++++-----
 hw/pci/pcie.c               |   9 +-
 hw/pci/pcie_sriov.c         | 263 ++++++++++++++++++++++++++++++++++++++++++++
 include/hw/pci/pci.h        |  11 +-
 include/hw/pci/pcie.h       |   6 +
 include/hw/pci/pcie_sriov.h |  58 ++++++++++
 include/qemu/typedefs.h     |   2 +
 trace-events                |   5 +
 10 files changed, 539 insertions(+), 36 deletions(-)
 create mode 100644 docs/pcie_sriov.txt
 create mode 100644 hw/pci/pcie_sriov.c
 create mode 100644 include/hw/pci/pcie_sriov.h

--
2.4.3

             reply	other threads:[~2015-10-14 15:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14 15:51 Knut Omang [this message]
2015-10-14 15:51 ` [Qemu-devel] [PATCH v5 1/4] pci: Make use of the devfn property when registering new devices Knut Omang
2015-10-14 15:51 ` [Qemu-devel] [PATCH v5 2/4] pcie: Add support for Single Root I/O Virtualization (SR/IOV) Knut Omang
2015-10-18 11:02   ` Marcel Apfelbaum
2015-10-18 12:26     ` Michael S. Tsirkin
2015-10-18 15:00     ` Knut Omang
2015-10-18 15:57     ` Knut Omang
2015-10-19  9:00     ` Paolo Bonzini
2015-10-14 15:51 ` [Qemu-devel] [PATCH v5 3/4] pcie: Add some SR/IOV API documentation in docs/pcie_sriov.txt Knut Omang
2015-10-16  8:36   ` Michael S. Tsirkin
2015-10-16  9:56     ` Knut Omang
2015-10-16 10:54       ` Michael S. Tsirkin
2015-10-16 11:25         ` Knut Omang
2015-10-16 11:34           ` Michael S. Tsirkin
2015-10-16 11:39             ` Paolo Bonzini
2015-10-16 11:27         ` Marcel Apfelbaum
2015-10-16 11:32         ` Richard W.M. Jones
2015-10-16 11:39           ` Michael S. Tsirkin
2015-10-18 11:03   ` Marcel Apfelbaum
2015-10-14 15:51 ` [Qemu-devel] [PATCH v5 4/4] pcie: A few minor fixes (type+code simplify) Knut Omang
2015-10-18 11:03   ` Marcel Apfelbaum
2015-10-18 11:02 ` [Qemu-devel] [PATCH v5 0/4] pcie: Add support for Single Root I/O Virtualization Marcel Apfelbaum
2015-10-18 14:39   ` Knut Omang

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=1444837878-11602-1-git-send-email-knut.omang@oracle.com \
    --to=knut.omang@oracle.com \
    --cc=alex.williamson@redhat.com \
    --cc=arei.gonglei@huawei.com \
    --cc=dotanba@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.com \
    --cc=rth@twiddle.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).