All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Parav Pandit <parav@nvidia.com>
Cc: Cornelia Huck <cohuck@redhat.com>,
	"virtio-comment@lists.oasis-open.org"
	<virtio-comment@lists.oasis-open.org>,
	"david.edmondson@oracle.com" <david.edmondson@oracle.com>,
	"virtio-dev@lists.oasis-open.org"
	<virtio-dev@lists.oasis-open.org>,
	"sburla@marvell.com" <sburla@marvell.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	Yishai Hadas <yishaih@nvidia.com>,
	Maor Gottlieb <maorg@nvidia.com>,
	Shahaf Shuler <shahafs@nvidia.com>
Subject: [virtio-comment] Re: [PATCH v10 4/4] transport-pci: Introduce group legacy group member config region access
Date: Thu, 6 Jul 2023 13:33:56 -0400	[thread overview]
Message-ID: <20230706132638-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <PH0PR12MB54817D2E9B0D7C5FE9EA2B0EDC2CA@PH0PR12MB5481.namprd12.prod.outlook.com>

On Thu, Jul 06, 2023 at 04:58:51PM +0000, Parav Pandit wrote:
> 
> 
> > From: Michael S. Tsirkin <mst@redhat.com>
> > Sent: Thursday, July 6, 2023 12:42 PM
> > 
> > We will need to detail how notifications work though. The reason is that the
> > legacy notifications are received by owner driver (which is not legacy!) and
> > forwarded to device.
> > We need to explain exactly how this is done for people who don't read minds
> > and did not follow 3 months of mailing list debates, and explain how this has the
> > same effect as triggering driver notification through the legacy interface.
> >
> I am not going to write driver implementation in the spec here.
> But I agree some high-level text is needed.
> With your suggestions
> 1. to merge pci and generic in one section,
> 2. add description to notification,
> 3. past rewrites provided in v9,
> 
> The draft of v11, looks like below. Please see how much more verbose to make it, if at all.
> 
> \paragraph{Legacy Driver Notification}\label{par:Basic Facilities of a Virtio Device / Device groups / Group administration commands / Legacy Interface / Legacy Driver Notifications}
> 
> If the group owner device or the group member device support driver
> notifications via a memory-mapped operation or I/O operation, these
> notifications are sent to the device via accessing such a notification region
> using a memory or I/O operation instead of sending the notifications through
> the administration command.

This paragraph adds very little information - just some vague hints at how things work.

> The driver of the owner device can send a driver notification to the member
> device by executing VIRTIO_ADMIN_CMD_LEGACY_COMMON_CFG_WRITE with the
> \field{offset} matching \field{Queue Notify} and the \field{data} containing
> the virtqueue index to be notified.
> 
> However, as many administration commands are used for slow path configuration,
> a separate fast path mechanism for such notifications is desired. For the
> SR-IOV group type, the optional command VIRTIO_ADMIN_CMD_LEGACY_NOTIFY_INFO
> addresses this need by returning to the driver one or more addresses which to
> be used to send such driver notifications.
> 
> In one example, the driver in the hypervisor which intercepts I/O BAR accesses
> for the \field{Queue Notify} can access the notification area directly as memory
> or I/O access (depending on what the device reported) instead of slow
> administration command.
> 
> For the command VIRTIO_ADMIN_CMD_LEGACY_NOTIFY_INFO the driver sets
> \field{opcode} to 0x6.
> The driver sets \field{group_member_id} which refers to the member device to be
> accessed. This command does not use \field{command_specific_data}.
> 
> This command is currently only defined for the SR-IOV group type. When the
> device supports VIRTIO_ADMIN_CMD_LEGACY_NOTIFY_INFO command, the group owner
> device hardwires VF BAR0 to zero in the SR-IOV Extended capability and the
> group member device does not use PCI BAR0 in all the Virtio PCI capabilities
> listed in section \ref{sec:Virtio Transport Options / Virtio Over PCI Bus / Virtio Structure PCI Capabilities}.

After reading this I still have no clue at how these notifications work.
maybe it's in some other patch. Let's see v11.

Just making a wild guess:

it is true that
	to supply a driver notification to the device, it is possible
for the driver to write the vq index of the vq to be notified, in little
endian format, using a single 16 byte write at the address provided ?

and I am guessing that
	the write is an IO or a memory write, depending on the
	type of the BAR referred to?

then why don't we just say this?


-- 
MST


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/


WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Parav Pandit <parav@nvidia.com>
Cc: Cornelia Huck <cohuck@redhat.com>,
	"virtio-comment@lists.oasis-open.org"
	<virtio-comment@lists.oasis-open.org>,
	"david.edmondson@oracle.com" <david.edmondson@oracle.com>,
	"virtio-dev@lists.oasis-open.org"
	<virtio-dev@lists.oasis-open.org>,
	"sburla@marvell.com" <sburla@marvell.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	Yishai Hadas <yishaih@nvidia.com>,
	Maor Gottlieb <maorg@nvidia.com>,
	Shahaf Shuler <shahafs@nvidia.com>
Subject: [virtio-dev] Re: [PATCH v10 4/4] transport-pci: Introduce group legacy group member config region access
Date: Thu, 6 Jul 2023 13:33:56 -0400	[thread overview]
Message-ID: <20230706132638-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <PH0PR12MB54817D2E9B0D7C5FE9EA2B0EDC2CA@PH0PR12MB5481.namprd12.prod.outlook.com>

On Thu, Jul 06, 2023 at 04:58:51PM +0000, Parav Pandit wrote:
> 
> 
> > From: Michael S. Tsirkin <mst@redhat.com>
> > Sent: Thursday, July 6, 2023 12:42 PM
> > 
> > We will need to detail how notifications work though. The reason is that the
> > legacy notifications are received by owner driver (which is not legacy!) and
> > forwarded to device.
> > We need to explain exactly how this is done for people who don't read minds
> > and did not follow 3 months of mailing list debates, and explain how this has the
> > same effect as triggering driver notification through the legacy interface.
> >
> I am not going to write driver implementation in the spec here.
> But I agree some high-level text is needed.
> With your suggestions
> 1. to merge pci and generic in one section,
> 2. add description to notification,
> 3. past rewrites provided in v9,
> 
> The draft of v11, looks like below. Please see how much more verbose to make it, if at all.
> 
> \paragraph{Legacy Driver Notification}\label{par:Basic Facilities of a Virtio Device / Device groups / Group administration commands / Legacy Interface / Legacy Driver Notifications}
> 
> If the group owner device or the group member device support driver
> notifications via a memory-mapped operation or I/O operation, these
> notifications are sent to the device via accessing such a notification region
> using a memory or I/O operation instead of sending the notifications through
> the administration command.

This paragraph adds very little information - just some vague hints at how things work.

> The driver of the owner device can send a driver notification to the member
> device by executing VIRTIO_ADMIN_CMD_LEGACY_COMMON_CFG_WRITE with the
> \field{offset} matching \field{Queue Notify} and the \field{data} containing
> the virtqueue index to be notified.
> 
> However, as many administration commands are used for slow path configuration,
> a separate fast path mechanism for such notifications is desired. For the
> SR-IOV group type, the optional command VIRTIO_ADMIN_CMD_LEGACY_NOTIFY_INFO
> addresses this need by returning to the driver one or more addresses which to
> be used to send such driver notifications.
> 
> In one example, the driver in the hypervisor which intercepts I/O BAR accesses
> for the \field{Queue Notify} can access the notification area directly as memory
> or I/O access (depending on what the device reported) instead of slow
> administration command.
> 
> For the command VIRTIO_ADMIN_CMD_LEGACY_NOTIFY_INFO the driver sets
> \field{opcode} to 0x6.
> The driver sets \field{group_member_id} which refers to the member device to be
> accessed. This command does not use \field{command_specific_data}.
> 
> This command is currently only defined for the SR-IOV group type. When the
> device supports VIRTIO_ADMIN_CMD_LEGACY_NOTIFY_INFO command, the group owner
> device hardwires VF BAR0 to zero in the SR-IOV Extended capability and the
> group member device does not use PCI BAR0 in all the Virtio PCI capabilities
> listed in section \ref{sec:Virtio Transport Options / Virtio Over PCI Bus / Virtio Structure PCI Capabilities}.

After reading this I still have no clue at how these notifications work.
maybe it's in some other patch. Let's see v11.

Just making a wild guess:

it is true that
	to supply a driver notification to the device, it is possible
for the driver to write the vq index of the vq to be notified, in little
endian format, using a single 16 byte write at the address provided ?

and I am guessing that
	the write is an IO or a memory write, depending on the
	type of the BAR referred to?

then why don't we just say this?


-- 
MST


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


  reply	other threads:[~2023-07-06 17:35 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06  4:17 [virtio-comment] [PATCH v10 0/4] admin: Access legacy registers using admin commands Parav Pandit
2023-07-06  4:17 ` [virtio-dev] " Parav Pandit
2023-07-06  4:17 ` [virtio-comment] [PATCH v10 1/4] admin: Split opcode table rows with a line Parav Pandit
2023-07-06  4:17   ` [virtio-dev] " Parav Pandit
2023-07-06  4:17 ` [virtio-comment] [PATCH v10 2/4] admin: Fix section numbering Parav Pandit
2023-07-06  4:17   ` [virtio-dev] " Parav Pandit
2023-07-06 13:39   ` [virtio-comment] " Cornelia Huck
2023-07-06 13:39     ` [virtio-dev] " Cornelia Huck
2023-07-06  4:17 ` [virtio-comment] [PATCH v10 3/4] admin: Add group member legacy register access commands Parav Pandit
2023-07-06  4:17   ` [virtio-dev] " Parav Pandit
2023-07-06 16:12   ` [virtio-comment] " Cornelia Huck
2023-07-06 16:12     ` [virtio-dev] " Cornelia Huck
2023-07-06 16:16     ` [virtio-comment] " Parav Pandit
2023-07-06 16:16       ` [virtio-dev] " Parav Pandit
2023-07-06  4:17 ` [virtio-comment] [PATCH v10 4/4] transport-pci: Introduce group legacy group member config region access Parav Pandit
2023-07-06  4:17   ` [virtio-dev] " Parav Pandit
2023-07-06 16:28   ` [virtio-comment] " Cornelia Huck
2023-07-06 16:28     ` [virtio-dev] " Cornelia Huck
2023-07-06 16:33     ` [virtio-comment] " Parav Pandit
2023-07-06 16:33       ` [virtio-dev] " Parav Pandit
2023-07-06 16:42       ` [virtio-comment] " Michael S. Tsirkin
2023-07-06 16:42         ` [virtio-dev] " Michael S. Tsirkin
2023-07-06 16:58         ` [virtio-comment] " Parav Pandit
2023-07-06 16:58           ` [virtio-dev] " Parav Pandit
2023-07-06 17:33           ` Michael S. Tsirkin [this message]
2023-07-06 17:33             ` [virtio-dev] " Michael S. Tsirkin
2023-07-06 17:47             ` [virtio-comment] " Parav Pandit
2023-07-06 17:47               ` [virtio-dev] " Parav Pandit
2023-07-06 18:06               ` [virtio-comment] " Michael S. Tsirkin
2023-07-06 18:06                 ` [virtio-dev] " Michael S. Tsirkin
2023-07-06 18:16                 ` [virtio-comment] " Parav Pandit
2023-07-06 18:16                   ` [virtio-dev] " Parav Pandit
2023-07-06 18:48                   ` [virtio-comment] " Michael S. Tsirkin
2023-07-06 18:48                     ` [virtio-dev] " Michael S. Tsirkin
2023-07-06 18:53                     ` [virtio-comment] " Parav Pandit
2023-07-06 18:53                       ` [virtio-dev] " Parav Pandit
2023-07-06 18:56                       ` [virtio-comment] " Michael S. Tsirkin
2023-07-06 18:56                         ` [virtio-dev] " Michael S. Tsirkin
2023-07-06 19:00                         ` [virtio-comment] " Parav Pandit
2023-07-06 19:00                           ` [virtio-dev] " Parav Pandit
2023-07-06 19:42                           ` [virtio-comment] " Michael S. Tsirkin
2023-07-06 19:42                             ` [virtio-dev] " Michael S. Tsirkin
2023-07-06 20:21                             ` [virtio-comment] " Parav Pandit
2023-07-06 20:21                               ` [virtio-dev] " Parav Pandit
2023-07-06 20:28                               ` [virtio-comment] " Michael S. Tsirkin
2023-07-06 20:28                                 ` [virtio-dev] " Michael S. Tsirkin
2023-07-06 20:35                                 ` [virtio-comment] " Parav Pandit
2023-07-06 20:35                                   ` [virtio-dev] " Parav Pandit
2023-07-06 20:41                                   ` [virtio-comment] " Michael S. Tsirkin
2023-07-06 20:41                                     ` [virtio-dev] " Michael S. Tsirkin
2023-07-06 20:43                                     ` [virtio-comment] " Parav Pandit
2023-07-06 20:43                                       ` [virtio-dev] " Parav Pandit
2023-07-07  8:12                                       ` [virtio-comment] " Cornelia Huck
2023-07-07  8:12                                         ` [virtio-dev] " Cornelia Huck
2023-07-07  8:32                                         ` Michael S. Tsirkin
2023-07-07  8:32                                           ` [virtio-dev] " Michael S. Tsirkin
2023-07-06 17:38           ` [virtio-comment] " Michael S. Tsirkin
2023-07-06 17:38             ` [virtio-dev] " Michael S. Tsirkin
2023-07-06 16:47       ` [virtio-comment] " Cornelia Huck
2023-07-06 16:47         ` [virtio-dev] " Cornelia Huck
2023-07-06 16:52         ` [virtio-comment] " Parav Pandit
2023-07-06 16:52           ` [virtio-dev] " Parav Pandit
2023-07-06 16:39     ` [virtio-comment] " Michael S. Tsirkin
2023-07-06 16:39       ` [virtio-dev] " Michael S. Tsirkin
2023-07-06 16:45       ` [virtio-comment] " Parav Pandit
2023-07-06 16:45         ` [virtio-dev] " Parav Pandit
2023-07-06 16:50         ` [virtio-comment] " Michael S. Tsirkin
2023-07-06 16:50           ` [virtio-dev] " Michael S. Tsirkin
2023-07-06 16:54           ` [virtio-comment] " Parav Pandit
2023-07-06 16:54             ` [virtio-dev] " Parav Pandit
2023-07-06 19:00   ` [virtio-comment] " Michael S. Tsirkin
2023-07-06 19:00     ` [virtio-dev] " Michael S. Tsirkin
2023-07-06 19:07     ` [virtio-comment] " Parav Pandit
2023-07-06 19:07       ` [virtio-dev] " Parav Pandit
2023-07-06 19:59       ` Michael S. Tsirkin
2023-07-06 19:59         ` [virtio-dev] " Michael S. Tsirkin
2023-07-06 20:28         ` Parav Pandit
2023-07-06 20:28           ` [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=20230706132638-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=david.edmondson@oracle.com \
    --cc=jasowang@redhat.com \
    --cc=maorg@nvidia.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 \
    --cc=yishaih@nvidia.com \
    /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.