[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [PATCH v3 2/3] transport-pci: Introduce legacy registers access commands
On Fri, Jun 02, 2023 at 11:36:03PM +0300, Parav Pandit wrote: > +\subsubsection{Legacy Device Registers Read Command}\label{sec:Virtio Transport Options / Virtio Over PCI Bus / Legacy Interfaces: SR-IOV VFs Registers Access / Legacy Common Configuration Registers Read Command} > + > +The Legacy Device Registers Read Command follows \field{struct virtio_admin_cmd}. > +This command reads legacy device specific registers of a member VF device. > +The driver sets command \field{opcode} to VIRTIO_ADMIN_CMD_LD_REG_READ. > + > +The command VIRTIO_ADMIN_CMD_LD_REG_READ uses following listed structure for > +\field{command_specific_data}: > + > +\begin{lstlisting} > +struct virtio_admin_cmd_ld_reg_rd_data { > + u8 offset; /* Starting byte offset of the register to read */ > +}; > +\end{lstlisting} > + > +When command completes successfully, \field{command_specific_result} > +uses following listed structure: > + > +\begin{lstlisting} > +struct virtio_admin_cmd_ld_reg_rd_result { > + u8 registers[]; > +}; > +\end{lstlisting} > + > +\subsubsection{Legacy Queue Notify Offset Query Command}\label{sec:Virtio Transport Options / Virtio Over PCI Bus / Legacy Interfaces: SR-IOV VFs Registers Access / Legacy Queue Notify Offset Query Command} > + > +This command returns the notify offset of the member VF for virtqueue > +driver notifications. This command follows \field{struct virtio_admin_cmd}. > +The driver sets command \field{opcode} to VIRTIO_ADMIN_CMD_LQ_NOTIFY_QUERY. > +There is no command specific data for this command. > + > +When command completes successfully, \field{command_specific_result} > +uses following listed structure: > + > +\begin{lstlisting} > +struct virtio_admin_cmd_lq_notify_query_result { > + u8 bar; /* PCI BAR number of the member VF */ > + u8 reserved[7]; > + le64 offset; /* Byte offset within the BAR */ > +}; > +\end{lstlisting} > + > +The driver that may use the driver notifications region of the VF device > +returned in this result likely attain higher performance or the drier may use > +the VIRTIO_ADMIN_CMD_LREG_WRITE command. Obtain I guess ... but how? There's no explanation. > + > +\begin{note} > +The device and driver must encode and decode legacy device specific registers > +using little endian format. Per PCI VF device level big endian format support > +is left for the future. > +\end{note} > + > +\begin{note} > +The PCI VF device should not use PCI BAR 0 when it prefers to support > +legacy interface registers access using its group owner PF. This enables > +hypervisor software to operate with least complexities to compose a legacy > +interface I/O space BAR and passthrough other PCI BARs and PCI device > +capabilities to the guest virtual machine without any translation. > +\end{note} Is this related to this last command somehow? what does it mean for PCI VF device to use a BAR? not use a BAR? Prefer what to what? > -- > 2.26.2
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]