From: Cornelia Huck <cohuck@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Parav Pandit <parav@nvidia.com>,
"virtio-dev@lists.oasis-open.org"
<virtio-dev@lists.oasis-open.org>,
"virtio-comment@lists.oasis-open.org"
<virtio-comment@lists.oasis-open.org>,
Shahaf Shuler <shahafs@nvidia.com>
Subject: [virtio-comment] Re: [PATCH v3 1/2] virtio-net: Describe dev cfg fields read only
Date: Wed, 22 Feb 2023 14:26:46 +0100 [thread overview]
Message-ID: <87ttzdal0p.fsf@redhat.com> (raw)
In-Reply-To: <20230222075157-mutt-send-email-mst@kernel.org>
On Wed, Feb 22 2023, "Michael S. Tsirkin" <mst@redhat.com> wrote:
> On Wed, Feb 22, 2023 at 01:07:07PM +0100, Cornelia Huck wrote:
>> On Wed, Feb 22 2023, "Michael S. Tsirkin" <mst@redhat.com> wrote:
>>
>> > On Wed, Feb 22, 2023 at 10:01:24AM +0100, Cornelia Huck wrote:
>> >> On Tue, Feb 21 2023, "Michael S. Tsirkin" <mst@redhat.com> wrote:
>> >>
>> >> > On Tue, Feb 21, 2023 at 05:59:52PM +0000, Parav Pandit wrote:
>> >> >>
>> >> >> > From: Michael S. Tsirkin <mst@redhat.com>
>> >> >> > Sent: Tuesday, February 21, 2023 12:52 PM
>> >> >> >
>> >> >> > On Tue, Feb 21, 2023 at 05:50:09PM +0000, Parav Pandit wrote:
>> >> >> > > Hence, it should be mentioned as read-only fields, so when the driver writes
>> >> >> > something to read-only fields, it can be considered as undefined behavior on
>> >> >> > such fields.
>> >> >> > >
>> >> >> >
>> >> >> > In the description not in the normative statements. normative sections just tell
>> >> >> > driver what it must and must not do, in the standard RFC terms.
>> >> >> >
>> >> >> Got it.
>> >> >> I will shift them as read-only in the description section.
>> >> >> And normative in the device and driver section.
>> >> >> Device section:
>> >> >> Any writes to config space fields is ignored by the device, because these are read-only fields for the driver.
>> >> >
>> >> > writes is plural so "are ignored"
>> >> >
>> >> > but more importantly use rfc terms in normative sections.
>> >>
>> >> I don't think you need to talk about "read-only" in the normative
>> >> sections (that belongs to the descriptive sections.) I'd use
>> >>
>> >> "The device MUST ignore any writes to config space fields by the
>> >> driver."
>> >
>> > Hmm. Is this something we previously required for read only fields?
>>
>> So, better make it SHOULD?
>>
>> (The only alternative to ignoring I see is breaking the device, and I
>> think ignoring is preferable.)
>
> We can just skip adding a new requirement completely - we'll never get
> there with a compliant driver. This is what we do e.g. for MMIO.
> Why not?
That would be fine with me as well.
> This has an advantage as this allows backing config with regular RAM.
> Also I feel that since it always said "read only for driver" then
> this implies a restriction on driver not the device.
Indeed. The normative statement below should be enough to make that
"read-only for the driver" thing obvious.
>
>> >
>> >
>> >> >
>> >> >>
>> >> >> Driver section:
>> >> >> Driver must not write to read-only fields.
>> >>
>> >> "The driver MUST NOT write to any config space field."
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/
next prev parent reply other threads:[~2023-02-22 13:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 15:45 [virtio-comment] [PATCH v3 0/2] virtio-net: Improve dev config layout Parav Pandit
2023-02-17 15:45 ` [PATCH v3 1/2] virtio-net: Describe dev cfg fields read only Parav Pandit
2023-02-20 14:46 ` [virtio-dev] " David Edmondson
2023-02-21 15:37 ` [virtio-dev] " Cornelia Huck
2023-02-21 17:42 ` Michael S. Tsirkin
2023-02-21 17:50 ` Parav Pandit
2023-02-21 17:52 ` Michael S. Tsirkin
2023-02-21 17:59 ` Parav Pandit
2023-02-21 18:08 ` Michael S. Tsirkin
2023-02-22 9:01 ` [virtio-dev] " Cornelia Huck
2023-02-22 11:50 ` Michael S. Tsirkin
2023-02-22 12:07 ` [virtio-comment] " Cornelia Huck
2023-02-22 12:55 ` Michael S. Tsirkin
2023-02-22 13:26 ` Cornelia Huck [this message]
2023-02-23 5:50 ` Parav Pandit
2023-02-17 15:45 ` [PATCH v3 2/2] virtio-net: Define cfg fields before description Parav Pandit
2023-02-20 14:42 ` [virtio-comment] " David Edmondson
2023-02-21 13:30 ` [PATCH v3 0/2] virtio-net: Improve dev config layout Parav Pandit
[not found] ` <875ybej6hb.fsf@redhat.com>
2023-03-07 17:25 ` [virtio-dev] " Parav Pandit
2023-03-08 10:07 ` [virtio-dev] Re: [virtio-comment] " Cornelia Huck
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=87ttzdal0p.fsf@redhat.com \
--to=cohuck@redhat.com \
--cc=mst@redhat.com \
--cc=parav@nvidia.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