From: Parav Pandit <parav@nvidia.com>
To: <mst@redhat.com>, <virtio-dev@lists.oasis-open.org>, <cohuck@redhat.com>
Cc: <virtio-comment@lists.oasis-open.org>, <shahafs@nvidia.com>,
Parav Pandit <parav@nvidia.com>
Subject: [virtio-dev] [PATCH 00/11] Introduce transitional mmr pci device
Date: Fri, 31 Mar 2023 01:58:23 +0300 [thread overview]
Message-ID: <20230330225834.506969-1-parav@nvidia.com> (raw)
Overview:
---------
The Transitional MMR device is a variant of the transitional PCI device.
It has its own small Device ID range. It does not have I/O
region BAR; instead it exposes legacy configuration and device
specific registers at an offset in the memory region BAR.
Such transitional MMR devices will be used at the scale of
thousands of devices using PCI SR-IOV and/or future scalable
virtualization technology to provide backward
compatibility (for legacy devices) and also future
compatibility with new features.
Usecase:
--------
1. A hypervisor/system needs to provide transitional
virtio devices to the guest VM at scale of thousands,
typically, one to eight devices per VM.
2. A hypervisor/system needs to provide such devices using a
vendor agnostic driver in the hypervisor system.
3. A hypervisor system prefers to have single stack regardless of
virtio device type (net/blk) and be future compatible with a
single vfio stack using SR-IOV or other scalable device
virtualization technology to map PCI devices to the guest VM.
(as transitional or otherwise)
Motivation/Background:
----------------------
The existing transitional PCI device is missing support for
PCI SR-IOV based devices. Currently it does not work beyond
PCI PF, or as software emulated device in reality. It currently
has below cited system level limitations:
[a] PCIe spec citation:
VFs do not support I/O Space and thus VF BARs shall not
indicate I/O Space.
[b] cpu arch citiation:
Intel 64 and IA-32 Architectures Software Developer’s Manual:
The processor’s I/O address space is separate and distinct from
the physical-memory address space. The I/O address space consists
of 64K individually addressable 8-bit I/O ports, numbered 0 through FFFFH.
[c] PCIe spec citation:
If a bridge implements an I/O address range,...I/O address range
will be aligned to a 4 KB boundary.
[d] I/O region accesses at PCI system level is slow as they are non-posted
operations in PCIe fabric.
The usecase requirements and limitations above can be solved by
extending the transitional device, mapping legacy and device
specific configuration registers in a memory PCI BAR instead
of using non composable I/O region.
Please review.
Patch summary:
--------------
patch 1 to 5 prepares the spec
patch 6 to 11 defines transitional mmr device
patch-1 uses lower case alphabets to name device id
patch-2 move transitional device id in legay section along with
revision id
patch-3 splits legacy feature bits description from device id
patch-4 rename and moves virtio config registers next to 1.x
registers section
patch-5 Adds missing helper verb in terminology definitions
patch-6 introduces transitional mmr device
patch-7 introduces transitional mmr device pci device ids
patch-8 introduces virtio extended pci capability
patch-9 describes new pci capability to locate legacy mmr
registers
patch-10 extended usage of driver notification capability for
the transitional mmr device
patch-11 adds conformance section of the transitional mmr device
This design and details further described below.
Design:
-------
Below picture captures the main small difference between current
transitional PCI SR-IOV VF and transitional MMR SR-IOV VF.
+------------------+ +--------------------+ +--------------------+
|virtio 1.x | |Transitional | |Transitional |
|SRIOV VF | |SRIOV VF | |MMR SRIOV VF |
| | | | | |
++---------------+ | ++---------------+ | ++---------------+ |
||dev_id = | | ||dev_id = | | ||dev_id = | |
||{0x1040-0x106C}| | ||{0x1000-0x103f}| | ||{0x10f9-0x10ff}| |
|+---------------+ | |+---------------+ | |+---------------+ |
| | | | | |
|+------------+ | |+------------+ | |+-----------------+ |
||Memory BAR | | ||Memory BAR | | ||Memory BAR | |
|+------------+ | |+------------+ | || | |
| | | | || +--------------+| |
| | |+-----------------+ | || |legacy virtio || |
| | ||IOBAR impossible | | || |+ dev cfg || |
| | |+-----------------+ | || |registers || |
| | | | || +--------------+| |
| | | | |+-----------------+ |
+------------------+ +--------------------+ +--------------------+
Here transitional MMR SR-IOV VF has legacy configuration and
legacy device specific registers located at an offset in the memory
region BAR.
A memory region can be dedicated at BAR0 or it can be in an
existing BAR, allowing flexibility when implementing support
in a hardware device.
Transitional MMR SR-IOV VFs use a distinct device ID range to that
of existing virtio SR-IOV VFs to allow flexibility in driver
binding.
A more zoom-in version of transitional MMR SR-IOV device shows
that the location of the legacy registers are discovered by the
driver using a new capability.
+------------------------------+
|Transitional |
|MMR SRIOV VF |
| |
++---------------+ |
||dev_id = | |
||{0x10f9-0x10ff}| |
|+---------------+ |
| |
++--------------------+ |
|| PCIe ext cap = 0xB | |
|| cfg_type = 10 | |
|| offset = 0x1000 | |
|| bar = N {0..5}| |
|+--|-----------------+ |
| | |
| | |
| | +-------------------+ |
| | | Memory BAR = A | |
| | | | |
| +------>+--------------+ | |
| | |legacy virtio | | |
| | |+ dev cfg | | |
| | |registers | | |
| | +--------------+ | |
| +-----------------+ | |
+------------------------------+
Software usage:
---------------
Transitional MMR device can be used by multiple ways.
1. The most common way to use and map to the guest VM is by
using vfio driver framework in Linux kernel.
+----------------------+
|pci_dev_id = 0x100X |
+---------------|pci_rev_id = 0x0 |-----+
|vfio device |BAR0 = I/O region | |
| |Other attributes | |
| +----------------------+ |
| |
+ +--------------+ +-----------------+ |
| |I/O to memory | | Other vfio | |
| |rd/wr mapper | | functionalities | |
| +--------------+ +-----------------+ |
| |
+-------------------+------------------------+
|
+------------+-----------------+
| Transitional |
| MMR SRIOV VF |
+------------------------------+
2. Virtio pci driver to bind to the listed device id and
use it as native device in the host.
3. Use it in a light weight hypervisor to run bare-metal OS.
Parav Pandit (11):
transport-pci: Use lowecase alphabets
transport-pci: Move transitional device id to legacy section
transport-pci: Split notes of PCI Device Layout
transport-pci: Rename and move legacy PCI Device layout section
introduction: Add missing helping verb
introduction: Introduce transitional MMR interface
transport-pci: Introduce transitional MMR device id
transport-pci: Introduce virtio extended capability
transport-pci: Describe PCI MMR dev config registers
transport-pci: Use driver notification PCI capability
conformance: Add transitional MMR interface conformance
conformance.tex | 11 +-
introduction.tex | 34 +++-
tmmr-conformance.tex | 27 +++
transport-pci.tex | 405 ++++++++++++++++++++++++++++++-------------
4 files changed, 354 insertions(+), 123 deletions(-)
create mode 100644 tmmr-conformance.tex
--
2.26.2
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
next reply other threads:[~2023-03-30 22:59 UTC|newest]
Thread overview: 200+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-30 22:58 Parav Pandit [this message]
2023-03-30 22:58 ` [virtio-dev] [PATCH 01/11] transport-pci: Use lowecase alphabets Parav Pandit
2023-03-30 22:58 ` [virtio-dev] [PATCH 02/11] transport-pci: Move transitional device id to legacy section Parav Pandit
2023-03-31 6:43 ` [virtio-dev] " Michael S. Tsirkin
2023-03-31 21:24 ` [virtio-dev] " Parav Pandit
2023-04-02 7:54 ` [virtio-dev] " Michael S. Tsirkin
2023-04-03 14:42 ` [virtio-dev] " Parav Pandit
2023-04-03 14:50 ` [virtio-dev] " Michael S. Tsirkin
2023-04-03 14:58 ` [virtio-dev] " Parav Pandit
2023-04-03 15:14 ` [virtio-dev] " Michael S. Tsirkin
2023-03-30 22:58 ` [virtio-dev] [PATCH 03/11] transport-pci: Split notes of PCI Device Layout Parav Pandit
2023-03-30 22:58 ` [virtio-dev] [PATCH 04/11] transport-pci: Rename and move legacy PCI Device layout section Parav Pandit
2023-03-30 22:58 ` [virtio-dev] [PATCH 05/11] introduction: Add missing helping verb Parav Pandit
2023-03-30 22:58 ` [virtio-dev] [PATCH 06/11] introduction: Introduce transitional MMR interface Parav Pandit
2023-04-07 9:17 ` [virtio-dev] " Michael S. Tsirkin
2023-03-30 22:58 ` [virtio-dev] [PATCH 07/11] transport-pci: Introduce transitional MMR device id Parav Pandit
2023-04-04 7:28 ` [virtio-dev] " Michael S. Tsirkin
2023-04-04 16:08 ` Parav Pandit
2023-04-07 12:03 ` [virtio-dev] Re: [virtio-comment] " Michael S. Tsirkin
2023-04-07 15:18 ` [virtio-dev] " Parav Pandit
2023-04-07 15:51 ` [virtio-dev] " Michael S. Tsirkin
2023-04-09 3:15 ` [virtio-dev] " Parav Pandit
2023-04-10 10:18 ` [virtio-dev] " Michael S. Tsirkin
2023-04-10 14:34 ` Parav Pandit
2023-04-10 19:58 ` Michael S. Tsirkin
2023-04-10 20:16 ` Parav Pandit
2023-04-07 8:37 ` [virtio-dev] " Michael S. Tsirkin
2023-03-30 22:58 ` [virtio-dev] [PATCH 08/11] transport-pci: Introduce virtio extended capability Parav Pandit
2023-04-04 7:35 ` [virtio-dev] " Michael S. Tsirkin
2023-04-04 7:54 ` Cornelia Huck
2023-04-04 12:43 ` Michael S. Tsirkin
2023-04-04 13:19 ` Cornelia Huck
2023-04-04 14:37 ` Michael S. Tsirkin
2023-04-10 16:21 ` Parav Pandit
2023-04-10 19:49 ` Michael S. Tsirkin
2023-04-10 19:57 ` [virtio-dev] " Parav Pandit
2023-04-10 20:02 ` [virtio-dev] " Michael S. Tsirkin
2023-04-11 8:39 ` Cornelia Huck
2023-04-04 21:18 ` [virtio-dev] " Parav Pandit
2023-04-05 5:10 ` [virtio-dev] " Michael S. Tsirkin
2023-04-05 13:16 ` [virtio-dev] " Parav Pandit
2023-04-07 8:15 ` [virtio-dev] " Michael S. Tsirkin
2023-04-10 1:36 ` [virtio-dev] " Jason Wang
2023-04-10 6:24 ` Michael S. Tsirkin
2023-04-10 7:16 ` Jason Wang
2023-04-10 10:04 ` Michael S. Tsirkin
2023-04-11 2:19 ` Jason Wang
2023-04-11 7:00 ` Michael S. Tsirkin
2023-04-11 9:07 ` Jason Wang
2023-04-11 10:43 ` Michael S. Tsirkin
2023-04-11 13:59 ` Parav Pandit
2023-04-11 14:11 ` Michael S. Tsirkin
2023-04-11 13:47 ` Parav Pandit
2023-04-11 14:02 ` Michael S. Tsirkin
2023-04-11 14:07 ` [virtio-dev] RE: [virtio-comment] " Parav Pandit
2023-04-11 14:10 ` [virtio-dev] " Michael S. Tsirkin
2023-04-11 14:30 ` [virtio-dev] " Parav Pandit
2023-04-10 17:54 ` Parav Pandit
2023-04-10 17:58 ` [virtio-dev] RE: [virtio-comment] " Parav Pandit
2023-04-11 3:28 ` Jason Wang
2023-04-11 19:01 ` Parav Pandit
2023-04-11 21:25 ` Michael S. Tsirkin
2023-04-12 0:40 ` Parav Pandit
2023-04-12 2:56 ` Michael S. Tsirkin
2023-04-12 4:07 ` Jason Wang
2023-04-12 4:20 ` Michael S. Tsirkin
2023-04-12 4:53 ` [virtio-dev] Re: [virtio-comment] " Jason Wang
2023-04-12 5:25 ` Michael S. Tsirkin
2023-04-12 5:37 ` Jason Wang
2023-04-13 17:03 ` Michael S. Tsirkin
2023-04-12 4:04 ` Jason Wang
2023-04-12 4:13 ` Parav Pandit
2023-04-12 4:20 ` Michael S. Tsirkin
2023-04-12 4:55 ` Jason Wang
2023-05-19 6:10 ` [virtio-dev] " Michael S. Tsirkin
2023-05-19 21:02 ` [virtio-dev] " Parav Pandit
2023-05-21 5:57 ` [virtio-dev] " Michael S. Tsirkin
2023-05-21 13:24 ` [virtio-dev] " Parav Pandit
2023-05-21 14:34 ` [virtio-dev] " Michael S. Tsirkin
2023-03-30 22:58 ` [virtio-dev] [PATCH 09/11] transport-pci: Describe PCI MMR dev config registers Parav Pandit
2023-04-07 8:55 ` [virtio-dev] " Michael S. Tsirkin
2023-04-10 1:33 ` [virtio-dev] Re: [virtio-comment] " Jason Wang
2023-04-10 6:14 ` Michael S. Tsirkin
2023-04-10 6:20 ` Jason Wang
2023-04-10 6:39 ` Michael S. Tsirkin
2023-04-10 7:20 ` Jason Wang
2023-04-10 10:06 ` Michael S. Tsirkin
2023-04-11 2:13 ` Jason Wang
2023-04-11 7:04 ` Michael S. Tsirkin
2023-04-11 9:01 ` Jason Wang
[not found] ` <CALBs2cXURMEzCGnULicXbsBfwnKE5cZOz=M-_hhFCXZ=Lqb9Nw@mail.gmail.com>
2023-04-11 10:39 ` Michael S. Tsirkin
2023-04-11 11:03 ` Yan Vugenfirer
2023-04-11 10:42 ` Michael S. Tsirkin
2023-04-12 3:58 ` Jason Wang
2023-04-12 4:15 ` Michael S. Tsirkin
2023-04-12 4:51 ` Jason Wang
2023-04-12 5:01 ` [virtio-dev] " Parav Pandit
2023-04-12 5:14 ` [virtio-dev] " Jason Wang
2023-04-12 5:30 ` [virtio-dev] " Parav Pandit
2023-04-12 5:38 ` [virtio-dev] " Jason Wang
2023-04-12 5:55 ` [virtio-dev] " Parav Pandit
2023-04-12 6:15 ` [virtio-dev] " Jason Wang
2023-04-12 14:23 ` [virtio-dev] " Parav Pandit
2023-04-13 1:48 ` [virtio-dev] " Jason Wang
2023-04-13 3:31 ` Parav Pandit
2023-04-13 5:14 ` Jason Wang
2023-04-13 17:19 ` Michael S. Tsirkin
2023-04-13 19:39 ` [virtio-dev] " Parav Pandit
2023-04-14 3:09 ` [virtio-dev] " Jason Wang
2023-04-14 3:18 ` [virtio-dev] " Parav Pandit
2023-04-14 3:37 ` [virtio-dev] " Jason Wang
2023-04-14 3:51 ` [virtio-dev] " Parav Pandit
2023-04-14 7:05 ` [virtio-dev] " Michael S. Tsirkin
2023-04-17 3:22 ` Jason Wang
2023-04-17 17:23 ` [virtio-dev] " Parav Pandit
2023-04-17 20:26 ` [virtio-dev] " Michael S. Tsirkin
2023-04-17 20:28 ` [virtio-dev] " Parav Pandit
2023-04-18 0:36 ` [virtio-dev] " Jason Wang
2023-04-18 1:30 ` [virtio-dev] " Parav Pandit
2023-04-18 11:58 ` [virtio-dev] " Michael S. Tsirkin
2023-04-18 12:09 ` [virtio-dev] " Parav Pandit
2023-04-18 12:30 ` [virtio-dev] " Michael S. Tsirkin
2023-04-18 12:36 ` [virtio-dev] " Parav Pandit
2023-04-18 1:01 ` [virtio-dev] " Jason Wang
2023-04-18 1:48 ` [virtio-dev] " Parav Pandit
2023-04-13 17:24 ` [virtio-dev] " Parav Pandit
2023-04-13 21:02 ` Michael S. Tsirkin
2023-04-13 21:08 ` [virtio-dev] " Parav Pandit
2023-04-14 2:36 ` [virtio-dev] " Jason Wang
2023-04-14 2:43 ` [virtio-dev] " Parav Pandit
2023-04-14 6:57 ` [virtio-dev] " Michael S. Tsirkin
2023-04-16 13:41 ` [virtio-dev] " Parav Pandit
2023-04-16 20:44 ` [virtio-dev] " Michael S. Tsirkin
2023-04-17 16:59 ` [virtio-dev] " Parav Pandit
2023-04-18 1:09 ` [virtio-dev] " Jason Wang
2023-04-18 1:37 ` [virtio-dev] " Parav Pandit
2023-04-14 6:58 ` [virtio-dev] " Michael S. Tsirkin
2023-04-14 3:08 ` Jason Wang
2023-04-14 3:13 ` [virtio-dev] " Parav Pandit
2023-04-14 3:18 ` [virtio-dev] " Jason Wang
2023-04-14 3:22 ` [virtio-dev] " Parav Pandit
2023-04-14 3:29 ` [virtio-dev] " Jason Wang
2023-04-11 13:57 ` [virtio-dev] " Parav Pandit
2023-04-12 4:33 ` [virtio-dev] " Michael S. Tsirkin
2023-03-30 22:58 ` [virtio-dev] [PATCH 10/11] transport-pci: Use driver notification PCI capability Parav Pandit
2023-04-12 4:31 ` [virtio-dev] " Michael S. Tsirkin
2023-04-12 4:37 ` [virtio-dev] " Parav Pandit
2023-04-12 4:43 ` [virtio-dev] " Michael S. Tsirkin
2023-04-12 4:48 ` [virtio-dev] " Parav Pandit
2023-04-12 5:02 ` [virtio-dev] " Michael S. Tsirkin
2023-04-12 5:06 ` [virtio-dev] RE: [virtio-comment] " Parav Pandit
2023-04-12 5:17 ` [virtio-dev] " Michael S. Tsirkin
2023-04-12 5:24 ` [virtio-dev] " Parav Pandit
2023-04-12 5:27 ` [virtio-dev] " Michael S. Tsirkin
2023-03-30 22:58 ` [virtio-dev] [PATCH 11/11] conformance: Add transitional MMR interface conformance Parav Pandit
2023-03-31 7:03 ` [virtio-dev] Re: [PATCH 00/11] Introduce transitional mmr pci device Michael S. Tsirkin
2023-03-31 21:43 ` Parav Pandit
2023-04-03 14:53 ` Michael S. Tsirkin
2023-04-03 14:57 ` [virtio-dev] " Parav Pandit
2023-04-03 15:06 ` [virtio-dev] " Michael S. Tsirkin
2023-04-03 15:16 ` [virtio-dev] " Parav Pandit
2023-04-03 15:23 ` [virtio-dev] " Michael S. Tsirkin
2023-04-03 15:34 ` Michael S. Tsirkin
2023-04-03 15:47 ` [virtio-dev] " Parav Pandit
2023-04-03 17:28 ` [virtio-dev] " Michael S. Tsirkin
2023-04-03 17:35 ` Parav Pandit
2023-04-03 17:39 ` Michael S. Tsirkin
2023-04-03 15:36 ` [virtio-dev] RE: [virtio-comment] " Parav Pandit
2023-04-03 17:16 ` [virtio-dev] " Michael S. Tsirkin
2023-04-03 17:29 ` Parav Pandit
2023-04-03 18:02 ` Michael S. Tsirkin
2023-04-03 20:25 ` [virtio-dev] " Parav Pandit
2023-04-03 21:04 ` [virtio-dev] " Michael S. Tsirkin
2023-04-03 22:00 ` Parav Pandit
2023-04-07 9:35 ` Michael S. Tsirkin
2023-04-10 1:52 ` Jason Wang
2023-04-03 14:45 ` [virtio-dev] Re: [virtio-comment] " Stefan Hajnoczi
2023-04-03 14:53 ` Parav Pandit
2023-04-03 17:48 ` Michael S. Tsirkin
2023-04-03 19:11 ` Stefan Hajnoczi
2023-04-03 20:03 ` Michael S. Tsirkin
2023-04-03 19:48 ` [virtio-dev] " Parav Pandit
2023-04-03 20:02 ` [virtio-dev] " Michael S. Tsirkin
2023-04-03 20:42 ` [virtio-dev] " Parav Pandit
2023-04-03 21:14 ` [virtio-dev] " Michael S. Tsirkin
2023-04-03 22:08 ` Parav Pandit
2023-04-03 19:10 ` Stefan Hajnoczi
2023-04-03 20:27 ` [virtio-dev] " Parav Pandit
2023-04-04 14:30 ` [virtio-dev] " Stefan Hajnoczi
2023-04-12 4:48 ` [virtio-dev] " Michael S. Tsirkin
2023-04-12 4:52 ` [virtio-dev] " Parav Pandit
2023-04-12 5:12 ` [virtio-dev] " Michael S. Tsirkin
2023-04-12 5:15 ` [virtio-dev] RE: [virtio-comment] " Parav Pandit
2023-04-12 5:23 ` [virtio-dev] " Michael S. Tsirkin
2023-04-12 5:39 ` [virtio-dev] " Parav Pandit
2023-04-12 6:02 ` Parav Pandit
2023-04-12 5:10 ` [virtio-dev] " Halil Pasic
2023-04-25 2:42 ` [virtio-dev] " Parav Pandit
2023-05-02 7:17 ` [virtio-dev] Re: [virtio-comment] " David Edmondson
2023-05-02 13:54 ` [virtio-dev] " Parav Pandit
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=20230330225834.506969-1-parav@nvidia.com \
--to=parav@nvidia.com \
--cc=cohuck@redhat.com \
--cc=mst@redhat.com \
--cc=shahafs@nvidia.com \
--cc=virtio-comment@lists.oasis-open.org \
--cc=virtio-dev@lists.oasis-open.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 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).