public inbox for virtio-dev@lists.linux.dev
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Parav Pandit <parav@nvidia.com>
Cc: "virtio-comment@lists.oasis-open.org"
	<virtio-comment@lists.oasis-open.org>,
	"cohuck@redhat.com" <cohuck@redhat.com>,
	"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: Re: [virtio-dev] [PATCH v13] admin: Add group member legacy register access commands
Date: Mon, 10 Jul 2023 11:17:06 -0400	[thread overview]
Message-ID: <20230710110511-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <PH0PR12MB54813BA69D6474462F413BD8DC30A@PH0PR12MB5481.namprd12.prod.outlook.com>

On Mon, Jul 10, 2023 at 01:05:34PM +0000, Parav Pandit wrote:
> 
> > From: Michael S. Tsirkin <mst@redhat.com>
> > Sent: Sunday, July 9, 2023 9:47 AM
> 
> 
> > > +If within \field{struct virtio_admin_cmd_legacy_notify_info_result}
> > > +returned by VIRTIO_ADMIN_CMD_LEGACY_NOTIFY_INFO, the \field{flags}
> > > +value for a specific \field{struct virtio_pci_legacy_notify_info}
> > > +entry is 0x0, the driver MUST ignore this entry and all the following
> > > +\field{entries}. 
> 
> Please see above, it appears to me that it covers what you asked for, no?
> What is missing?

Oh, my bad. I agree. following stresses this a bit more:


is 0x0, then the driver MUST ignore this entry as well as all
the following \field{entries} until the end of the structure.


> > The driver MUST additionally validate, for each
> > > +entry, that \begin{itemize} \item the \field{flags} is either 0x0,
> > > +0x1 or 0x2 \item the \field{bar} corresponds to a valid BAR of either
> > > +the owner or the member device, depending on the \field{flags} \item
> > > +the \field{offset} is 2-byte aligned and corresponds to an address
> > > +within the BAR specified by the \field{bar} on \field{flags}
> > > +\end{itemize}, any entry which does not meet these constraints MUST
> > > +be ignored by the driver.
> > 
> > Wait a second.
> > - end of list not documented - we want conformance statements
> > - for end of list I am guessing other fields do not matter
> > - entries after end of list also do not matter?
> 
> I reread the above driver conformance statement.
> It already indicates what you asked.

So the above two do not contradict. They kind of seem to since 1st
one says ignore second says validate, until you look closely
and see that the result of validation is to ignore.
I suggest we clarify it's other entries not each entry:

	MUST ignore this entry and all the following \field{entries}.

	Additionally, for all other entries, the driver MUST validate
	that \begin{itemize} \item the \field{flags} is either
	0x1 or 0x2  ....


-- 
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-10 15:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07 15:30 [virtio-dev] [PATCH v13] admin: Add group member legacy register access commands Parav Pandit
2023-07-09 13:46 ` Michael S. Tsirkin
2023-07-09 20:22   ` Parav Pandit
2023-07-10 13:05   ` Parav Pandit
2023-07-10 15:17     ` Michael S. Tsirkin [this message]
2023-07-10 15:30       ` Parav Pandit
2023-07-10  9:37 ` Cornelia Huck
2023-07-10 12:08   ` [virtio-dev] RE: [virtio-comment] " 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=20230710110511-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox