public inbox for virtio-dev@lists.linux.dev
 help / color / mirror / Atom feed
From: Parav Pandit <parav@nvidia.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: virtio-dev@lists.oasis-open.org, cohuck@redhat.com,
	david.edmondson@oracle.com, sburla@marvell.com,
	jasowang@redhat.com, virtio-comment@lists.oasis-open.org,
	shahafs@nvidia.com, Yishai Hadas <yishaih@nvidia.com>,
	Maor Gottlieb <maorg@nvidia.com>
Subject: [virtio-dev] Re: [PATCH v1 1/2] transport-pci: Introduce legacy registers access commands
Date: Wed, 3 May 2023 13:23:55 -0400	[thread overview]
Message-ID: <c7cf0054-cfba-57d4-6a3f-bf774751994f@nvidia.com> (raw)
In-Reply-To: <20230503124848-mutt-send-email-mst@kernel.org>



On 5/3/2023 12:49 PM, Michael S. Tsirkin wrote:
> On Wed, May 03, 2023 at 10:49:14AM -0400, Parav Pandit wrote:
>>
>>
>> On 5/3/2023 1:50 AM, Michael S. Tsirkin wrote:
>>> On Wed, May 03, 2023 at 06:26:58AM +0300, Parav Pandit wrote:
>>
>>>> +Legacy registers write admin command follows \field{struct virtio_admin_cmd}.
>>>> +This command writes legacy registers of a member VF device. Driver should write
>>>> +appropriate register \field{size} depending on the width of the legacy
>>>> +common registers or device specific registers.
>>>> +Driver sets command \field{opcode} to VIRTIO_ADMIN_CMD_LREG_WRITE.
>>>> +Driver sets \field{group_type} to 1 for VFs.
>>>> +Driver sets \field{group_member_id} to a valid VF number.
>>>> +
>>>> +The \field{command_specific_data} has following listed structure format:
>>>> +
>>>> +\begin{lstlisting}
>>>> +struct virtio_admin_cmd_lreg_wr_data {
>>>> +	u8 offset; /* Starting byte offset of the register(s) to write */
>>>> +	u8 size; /* Number of bytes to write into the register. */
>>>> +	u8 register[];
>>>
>>> And maybe add
>>> 	u8 reserved[]; /* structure padding to multiple of 8 bytes */
>>>
>>>> +};
>> Thinking, what do we miss without the padding here?
> 
> it's not 100% clear where the padding is.
> 
It is same as rest of the other virtio structures as described in 
"Structure Specifications" section.

"Many device and driver in-memory structure layouts are documented using 
the C struct syntax. All structures
are assumed to be without additional padding."

---------------------------------------------------------------------
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-05-03 17:24 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-03  3:26 [virtio-dev] [PATCH v1 0/2] transport-pci: Introduce legacy registers access using AQ Parav Pandit
2023-05-03  3:26 ` [virtio-dev] [PATCH v1 1/2] transport-pci: Introduce legacy registers access commands Parav Pandit
2023-05-03  5:42   ` [virtio-dev] " Michael S. Tsirkin
2023-05-03 14:47     ` Parav Pandit
2023-05-03 16:48       ` Michael S. Tsirkin
2023-05-03 17:21         ` Parav Pandit
2023-05-04  6:30           ` Michael S. Tsirkin
2023-05-03  5:50   ` Michael S. Tsirkin
2023-05-03 14:49     ` Parav Pandit
2023-05-03 16:49       ` Michael S. Tsirkin
2023-05-03 17:23         ` Parav Pandit [this message]
2023-05-04  6:30           ` Michael S. Tsirkin
2023-05-03 19:21   ` Michael S. Tsirkin
2023-05-03 19:38     ` Parav Pandit
2023-05-03 20:08       ` Michael S. Tsirkin
2023-05-03 20:13         ` Parav Pandit
2023-05-05  3:26   ` Jason Wang
2023-05-05 12:48     ` [virtio-dev] " Parav Pandit
2023-05-06  2:24       ` [virtio-dev] " Jason Wang
2023-05-06  2:25         ` Jason Wang
2023-05-03  3:26 ` [virtio-dev] [PATCH v1 2/2] transport-pci: Add legacy register access conformance section Parav Pandit
2023-05-03  5:48   ` [virtio-dev] " Michael S. Tsirkin
2023-05-03 14:53     ` [virtio-dev] Re: [virtio-comment] " Parav Pandit
2023-05-03 19:18       ` Michael S. Tsirkin
2023-05-03 19:56         ` [virtio-dev] " Parav Pandit
2023-05-03 10:16 ` [virtio-dev] Re: [PATCH v1 0/2] transport-pci: Introduce legacy registers access using AQ Michael S. Tsirkin
2023-05-03 14:57   ` 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=c7cf0054-cfba-57d4-6a3f-bf774751994f@nvidia.com \
    --to=parav@nvidia.com \
    --cc=cohuck@redhat.com \
    --cc=david.edmondson@oracle.com \
    --cc=jasowang@redhat.com \
    --cc=maorg@nvidia.com \
    --cc=mst@redhat.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