virtio-comment.lists.oasis-open.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Parav Pandit <parav@nvidia.com>
Cc: virtio-dev@lists.oasis-open.org, cohuck@redhat.com,
	virtio-comment@lists.oasis-open.org, shahafs@nvidia.com,
	Satananda Burla <sburla@marvell.com>
Subject: [virtio-comment] Re: [PATCH 06/11] introduction: Introduce transitional MMR interface
Date: Fri, 7 Apr 2023 05:17:20 -0400	[thread overview]
Message-ID: <20230407045541-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20230330225834.506969-7-parav@nvidia.com>

On Fri, Mar 31, 2023 at 01:58:29AM +0300, Parav Pandit wrote:
> Introduce terminology for the transitional MMR device and transitional
> MMR driver.
> 
> Add description of the transitional MMR device. It is a PCI
> device that implements legacy virtio common configuration registers
> followed by legacy device specific registers in a memory region at
> an offset.
> 
> This enables hypervisor such as vfio driver to emulate
> I/O region towards the guest at BAR0. By doing so VFIO driver can
> translate read/write accesses on I/O region from the guest
> to the device memory region.
> 
> High level comparison of 1.x, transitional & transitional MMR
> sriov vf device:
> 
> +------------------+ +--------------------+ +--------------------+
> |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     || |
> |                  | |                    | || +--------------+| |
> |                  | |                    | |+-----------------+ |
> +------------------+ +--------------------+ +--------------------+
> 
> Motivation and background:
> PCIe and system limitations:
> 1. PCIe VFs do not support IOBAR cited at [1].
> 
> Perhaps the PCIe spec could be extended, however it would be only
> useful for virtio transitional devices. Even if such an extension
> is present, there are other system limitations described below in (2)
> and (3).
> 
> 2. cpu io port space limit and fragmentation
> x86_64 is limited to only 64K worth of IO port space at [2],
> which is shared with many other onboard system peripherals which
> are behind PCIe bridge; such I/O region also needs to be aligned
> to 4KB at PCIe bridge level cited at [3]. This can lead to a I/O space
> fragmentation. Due to this fragmentation and alignment need,
> actual usable range is small.
> 
> 3. IO space access of PCI device is done through non-posted message
>  which requires higher completion time in the PCIe fabric for
> round trip travel.
> 
> [1] PCIe spec citation:
> VFs do not support I/O Space and thus VF BARs shall not indicate I/O Space.
> 
> [2] 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.
> 
> [3] PCIe spec citation:
> If a bridge implements an I/O address range,...I/O address range
> will be aligned to a 4 KB boundary.
> 
> Co-developed-by: Satananda Burla <sburla@marvell.com>
> Signed-off-by: Parav Pandit <parav@nvidia.com>
> ---
>  introduction.tex | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
> 
> diff --git a/introduction.tex b/introduction.tex
> index e8b34e3..9a0f96a 100644
> --- a/introduction.tex
> +++ b/introduction.tex
> @@ -161,6 +161,20 @@ \subsection{Legacy Interface: Terminology}\label{intro:Legacy
>    have a need for backwards compatibility!
>  \end{note}
>  
> +\begin{description}
> +\item[Transitional MMR Device]
> +       is a PCI device which exposes legacy virtio configuration
> +       registers followed by legacy device configuration registers as
> +       memory mapped registers (MMR) at an offset in a memory region
> +       BAR, has no I/O region BAR,

in fact, most of existing pci interface can be in either IO or memory bar,
I don't think we specify that it's in a memory bar in the spec.
For example IIRC qemu has a flag that uses IO for signalling
kicks for modern VQs, this is slightly faster on some architectures.


> having its own PCI Device ID range,
> +       and follows the rest of the functionalities


this setence isn't grammatical.
not sure what exactly you are trying to say here, can not
help you rewrite.

> of the transitional device.

a transitional device probably.

> +\end{description}
> +
> +\begin{description}
> +\item[Transitional MMR Driver]
> +       is a PCI device driver that supports the Transitional MMR device.
> +\end{description}
> +
>  Devices or drivers with no legacy compatibility are referred to as
>  non-transitional devices and drivers, respectively.
>  
> @@ -174,6 +188,22 @@ \subsection{Transition from earlier specification drafts}\label{sec:Transition f
>  sections tagged "Legacy Interface" in the section title.
>  These highlight the changes made since the earlier drafts.
>  
> +\subsection{Transitional MMR interface: specification drafts}\label{sec:Transitional MMR interface: specification drafts}
> +
> +The transitional MMR device and driver differs from the
> +transitional device and driver respectively in few areas. Such

a few

> +differences are contained in sections named
> +'Transitional MMR interface', like this one. When no differences
> +are mentioned explicitly, the transitional MMR device and driver
> +follow exactly the same functionalities as that of the
> +transitional device and driver respectively.

Ugh, we called these transitional because they were there for
the transition period :)

The thing that I feel you miss here is that
transitional driver using transitional device MUST NOT
use the legacy interface.

The new thing with this MMR is that it's a memory mapped
access to legacy registers.


Going back to my idea of just adding legacy MMR capability to existing
modern and transitional devices, as opposed to a completely new type of
device, we would basically have a modern driver access the new
capability, and forward accesses from a legacy driver to there.
So "memory mapped legacy interface" would be a better name I think.




> +
> +\begin{note}
> +Transitional MMR interface is only required to support backward
> +compatibility. It should not be implemented unless there is a need
> +for the backward compatibility.
> +\end{note}
> +
>  \section{Structure Specifications}\label{sec:Structure Specifications}
>  
>  Many device and driver in-memory structure layouts are documented using
> -- 
> 2.26.2


This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.

In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.

Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/


  reply	other threads:[~2023-04-07  9:17 UTC|newest]

Thread overview: 199+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30 22:58 [virtio-comment] [PATCH 00/11] Introduce transitional mmr pci device Parav Pandit
2023-03-30 22:58 ` [virtio-comment] [PATCH 01/11] transport-pci: Use lowecase alphabets Parav Pandit
2023-03-30 22:58 ` [virtio-comment] [PATCH 02/11] transport-pci: Move transitional device id to legacy section Parav Pandit
2023-03-31  6:43   ` [virtio-comment] " Michael S. Tsirkin
2023-03-31 21:24     ` [virtio-comment] " Parav Pandit
2023-04-02  7:54       ` [virtio-comment] " Michael S. Tsirkin
2023-04-03 14:42         ` [virtio-comment] " Parav Pandit
2023-04-03 14:50           ` [virtio-comment] " Michael S. Tsirkin
2023-04-03 14:58             ` [virtio-comment] " Parav Pandit
2023-04-03 15:14               ` [virtio-comment] " Michael S. Tsirkin
2023-03-30 22:58 ` [virtio-comment] [PATCH 03/11] transport-pci: Split notes of PCI Device Layout Parav Pandit
2023-03-30 22:58 ` [virtio-comment] [PATCH 04/11] transport-pci: Rename and move legacy PCI Device layout section Parav Pandit
2023-03-30 22:58 ` [virtio-comment] [PATCH 05/11] introduction: Add missing helping verb Parav Pandit
2023-03-30 22:58 ` [virtio-comment] [PATCH 06/11] introduction: Introduce transitional MMR interface Parav Pandit
2023-04-07  9:17   ` Michael S. Tsirkin [this message]
2023-03-30 22:58 ` [virtio-comment] [PATCH 07/11] transport-pci: Introduce transitional MMR device id Parav Pandit
2023-04-04  7:28   ` [virtio-comment] " Michael S. Tsirkin
2023-04-04 16:08     ` Parav Pandit
2023-04-07 12:03       ` Michael S. Tsirkin
2023-04-07 15:18         ` Parav Pandit
2023-04-07 15:51           ` Michael S. Tsirkin
2023-04-09  3:15             ` Parav Pandit
2023-04-10 10:18               ` 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   ` Michael S. Tsirkin
2023-03-30 22:58 ` [virtio-comment] [PATCH 08/11] transport-pci: Introduce virtio extended capability Parav Pandit
2023-04-04  7:35   ` [virtio-comment] " 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-comment] " Parav Pandit
2023-04-10 20:02                   ` [virtio-comment] " Michael S. Tsirkin
2023-04-11  8:39                     ` Cornelia Huck
2023-04-04 21:18     ` [virtio-comment] " Parav Pandit
2023-04-05  5:10       ` [virtio-comment] " Michael S. Tsirkin
2023-04-05 13:16         ` [virtio-comment] " Parav Pandit
2023-04-07  8:15           ` [virtio-comment] " Michael S. Tsirkin
2023-04-10  1:36   ` [virtio-comment] Re: [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                 ` [virtio-comment] " Parav Pandit
2023-04-11 14:11                 ` [virtio-comment] " Michael S. Tsirkin
2023-04-11 13:47               ` Parav Pandit
2023-04-11 14:02                 ` Michael S. Tsirkin
2023-04-11 14:07                   ` Parav Pandit
2023-04-11 14:10                     ` Michael S. Tsirkin
2023-04-11 14:30                       ` Parav Pandit
2023-04-10 17:54     ` Parav Pandit
2023-04-10 17:58       ` Parav Pandit
2023-04-11  3:28       ` Jason Wang
2023-04-11 19:01         ` [virtio-comment] " Parav Pandit
2023-04-11 21:25           ` [virtio-comment] " Michael S. Tsirkin
2023-04-12  0:40             ` [virtio-comment] " Parav Pandit
2023-04-12  2:56               ` [virtio-comment] " Michael S. Tsirkin
2023-04-12  4:07             ` Jason Wang
2023-04-12  4:20               ` Michael S. Tsirkin
2023-04-12  4:53                 ` 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             ` [virtio-comment] " Parav Pandit
2023-04-12  4:20             ` [virtio-comment] " Michael S. Tsirkin
2023-04-12  4:55               ` Jason Wang
2023-05-19  6:10   ` [virtio-comment] " Michael S. Tsirkin
2023-05-19 21:02     ` [virtio-comment] " Parav Pandit
2023-05-21  5:57       ` [virtio-comment] " Michael S. Tsirkin
2023-05-21 13:24         ` [virtio-comment] " Parav Pandit
2023-05-21 14:34           ` [virtio-comment] " Michael S. Tsirkin
2023-03-30 22:58 ` [virtio-comment] [PATCH 09/11] transport-pci: Describe PCI MMR dev config registers Parav Pandit
2023-04-07  8:55   ` [virtio-comment] " Michael S. Tsirkin
2023-04-10  1:33     ` 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 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                               ` Parav Pandit
2023-04-12  5:14                                 ` Jason Wang
2023-04-12  5:30                                   ` Parav Pandit
2023-04-12  5:38                                     ` Jason Wang
2023-04-12  5:55                                       ` Parav Pandit
2023-04-12  6:15                                         ` Jason Wang
2023-04-12 14:23                                           ` Parav Pandit
2023-04-13  1:48                                             ` 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                                                     ` Parav Pandit
2023-04-14  3:09                                                       ` Jason Wang
2023-04-14  3:18                                                         ` Parav Pandit
2023-04-14  3:37                                                           ` Jason Wang
2023-04-14  3:51                                                             ` Parav Pandit
2023-04-14  7:05                                                               ` Michael S. Tsirkin
2023-04-17  3:22                                                               ` Jason Wang
2023-04-17 17:23                                                                 ` Parav Pandit
2023-04-17 20:26                                                                   ` Michael S. Tsirkin
2023-04-17 20:28                                                                     ` Parav Pandit
2023-04-18  0:36                                                                       ` Jason Wang
2023-04-18  1:30                                                                         ` Parav Pandit
2023-04-18 11:58                                                                           ` Michael S. Tsirkin
2023-04-18 12:09                                                                             ` Parav Pandit
2023-04-18 12:30                                                                               ` Michael S. Tsirkin
2023-04-18 12:36                                                                                 ` Parav Pandit
2023-04-18  1:01                                                                   ` Jason Wang
2023-04-18  1:48                                                                     ` Parav Pandit
2023-04-13 17:24                                                   ` Parav Pandit
2023-04-13 21:02                                                     ` Michael S. Tsirkin
2023-04-13 21:08                                                       ` Parav Pandit
2023-04-14  2:36                                                         ` Jason Wang
2023-04-14  2:43                                                           ` Parav Pandit
2023-04-14  6:57                                                             ` Michael S. Tsirkin
2023-04-16 13:41                                                               ` Parav Pandit
2023-04-16 20:44                                                                 ` Michael S. Tsirkin
2023-04-17 16:59                                                                   ` Parav Pandit
2023-04-18  1:09                                                                     ` Jason Wang
2023-04-18  1:37                                                                       ` Parav Pandit
2023-04-14  6:58                                                           ` Michael S. Tsirkin
2023-04-14  3:08                                                     ` Jason Wang
2023-04-14  3:13                                                       ` Parav Pandit
2023-04-14  3:18                                                         ` Jason Wang
2023-04-14  3:22                                                           ` Parav Pandit
2023-04-14  3:29                                                             ` Jason Wang
2023-04-11 13:57                       ` Parav Pandit
2023-04-12  4:33   ` Michael S. Tsirkin
2023-03-30 22:58 ` [virtio-comment] [PATCH 10/11] transport-pci: Use driver notification PCI capability Parav Pandit
2023-04-12  4:31   ` [virtio-comment] " Michael S. Tsirkin
2023-04-12  4:37     ` [virtio-comment] " Parav Pandit
2023-04-12  4:43       ` [virtio-comment] " Michael S. Tsirkin
2023-04-12  4:48         ` [virtio-comment] " Parav Pandit
2023-04-12  5:02           ` [virtio-comment] " Michael S. Tsirkin
2023-04-12  5:06             ` Parav Pandit
2023-04-12  5:17               ` Michael S. Tsirkin
2023-04-12  5:24                 ` Parav Pandit
2023-04-12  5:27                   ` Michael S. Tsirkin
2023-03-30 22:58 ` [virtio-comment] [PATCH 11/11] conformance: Add transitional MMR interface conformance Parav Pandit
2023-03-31  7:03 ` [virtio-comment] 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-comment] " Parav Pandit
2023-04-03 15:06         ` [virtio-comment] " Michael S. Tsirkin
2023-04-03 15:16           ` [virtio-comment] " Parav Pandit
2023-04-03 15:23             ` [virtio-comment] " Michael S. Tsirkin
2023-04-03 15:34               ` Michael S. Tsirkin
2023-04-03 15:47                 ` [virtio-comment] " Parav Pandit
2023-04-03 17:28                   ` [virtio-comment] " Michael S. Tsirkin
2023-04-03 17:35                     ` Parav Pandit
2023-04-03 17:39                       ` Michael S. Tsirkin
2023-04-03 15:36               ` Parav Pandit
2023-04-03 17:16                 ` Michael S. Tsirkin
2023-04-03 17:29                   ` Parav Pandit
2023-04-03 18:02                     ` Michael S. Tsirkin
2023-04-03 20:25                       ` Parav Pandit
2023-04-03 21:04                         ` 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-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       ` Parav Pandit
2023-04-03 20:02         ` Michael S. Tsirkin
2023-04-03 20:42           ` Parav Pandit
2023-04-03 21:14             ` Michael S. Tsirkin
2023-04-03 22:08               ` Parav Pandit
2023-04-03 19:10     ` Stefan Hajnoczi
2023-04-03 20:27       ` Parav Pandit
2023-04-04 14:30         ` Stefan Hajnoczi
2023-04-12  4:48 ` [virtio-comment] " Michael S. Tsirkin
2023-04-12  4:52   ` [virtio-comment] " Parav Pandit
2023-04-12  5:12     ` [virtio-comment] " Michael S. Tsirkin
2023-04-12  5:15       ` Parav Pandit
2023-04-12  5:23         ` Michael S. Tsirkin
2023-04-12  5:39           ` Parav Pandit
2023-04-12  6:02       ` Parav Pandit
2023-04-12  5:10 ` [virtio-comment] Re: [virtio-dev] " Halil Pasic
2023-04-25  2:42 ` [virtio-comment] " Parav Pandit
2023-05-02  7:17   ` David Edmondson
2023-05-02 13:54     ` 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=20230407045541-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=parav@nvidia.com \
    --cc=sburla@marvell.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).