transport-pci: Introduce legacy registers access using AQ
v3 cover transport-pci: Introduce legacy registers access using AQ
This short series introduces legacy registers access commands for the owner group member PCI PF to access the legacy registers of the member VFs.
If in future any SIOV devices to support legacy registers, they can be easily supported using same commands by using the group member identifiers of the future SIOV devices.
More details as overview, motivation, use case are further described below.
Patch summary:
--------------
patch-1 split rows of admin opcode tables by a line patch-2 adds administrative virtuqueue commands patch-3 adds its conformance section
This short series is on top of latest work [1] from Michael. It uses the newly introduced administrative virtqueue facility with 3 new commands which uses the existing virtio_admin_cmd.
[1] https://lists.oasis-open.org/archives/virtio-comment/202305/msg00112.html
Usecase:
--------
1. A hypervisor/system needs to provide transitional virtio devices to the guest VM at scale of thousands, typically, one to eight devices per VM.
2. A hypervisor/system needs to provide such devices using a vendor agnostic driver in the hypervisor system.
3. A hypervisor system prefers to have single stack regardless of virtio device type (net/blk) and be future compatible with a single vfio stack using SR-IOV or other scalable device virtualization technology to map PCI devices to the guest VM. (as transitional or otherwise)
Motivation/Background:
----------------------
The existing virtio transitional PCI device is missing support for PCI SR-IOV based devices. Currently it does not work beyond PCI PF, or as software emulated device in reality. Currently it has below cited system level limitations:
[a] PCIe spec citation:
VFs do not support I/O Space and thus VF BARs shall not indicate I/O Space.
[b] cpu arch citiation:
Intel 64 and IA-32 Architectures Software Developer’s Manual:
The processor’s I/O address space is separate and distinct from the physical-memory address space. The I/O address space consists of 64K individually addressable 8-bit I/O ports, numbered 0 through FFFFH.
[c] PCIe spec citation:
If a bridge implements an I/O address range,...I/O address range will be aligned to a 4 KB boundary.
Overview:
---------
Above usecase requirements can be solved by PCI PF group owner accessing its group member PCI VFs legacy registers using an admin virtqueue of the group owner PCI PF.
Two new admin virtqueue commands are added which read/write PCI VF registers.
The third command suggested by Jason queries the VF device's driver notification region.
Software usage example:
-----------------------
One way to use and map to the guest VM is by using vfio driver framework in Linux kernel.
+----------------------+
|pci_dev_id = 0x100X |
+---------------|pci_rev_id = 0x0 |-----+
|vfio device |BAR0 = I/O region | |
| |Other attributes | |
| +----------------------+ |
| |
+ +--------------+ +-----------------+ |
| |I/O BAR to AQ | | Other vfio | |
| |rd/wr mapper | | functionalities | |
| +--------------+ +-----------------+ |
| |
+------+-------------------------+-----------+
| |
| Driver notification
| |
| |
+----+------------+ +----+------------+
| +-----+ | | PCI VF device A |
| | AQ |-------------+---->+-------------+ |
| +-----+ | | | | legacy regs | |
| PCI PF device | | | +-------------+ |
+-----------------+ | +-----------------+
|
| +----+------------+
| | PCI VF device N |
+---->+-------------+ |
| | legacy regs | |
| +-------------+ |
+-----------------+2. Virtio pci driver to bind to the listed device id and use it as native device in the host.
3. Use it in a light weight hypervisor to run bare-metal OS.
Please review.
Alternatives considered:
========================
1. Exposing BAR0 as MMIO BAR that follows legacy registers template Pros:
a. Kind of works with legacy drivers as some of them have API
which is agnostic to MMIO vs IOBAR.
b. Does not require hypervisor intervantion
Cons:
a. Device reset is extremely hard to implement in device at scale as
driver does not wait for reset completion
b. Device register width related problems persist that hypervisor if
wishes, cannot fix it.
2. Accessing VF registers by tunneling it through new legacy PCI capability Pros:
a. Self contained, but cannot work with future PCI SIOV devices Cons:
a. Equally slow as AQ access
b. Still requires new capability for notification access
conclusion for picking AQ approach:
==================================
1. Overall AQ based access is simpler to implement with combination of best from software and device so that legacy registers do not get baked in the device hardware
2. AQ allows hypervisor software to intercept legacy registers and make corrections if needed
3. Provides trade-off between performance, device complexity vs spec, while still maintaining passthrough mode for the VFs with minimal hypervisor intercepts only for legacy registers access
4. AQ mechanism is designed for accessing other member devices registers as noted in AQ submission, it utilizes the existing infrastructure over other alternatives.
---
changelog:v2->v3:
- added new patch to split raws of admin vq opcode table
- adddressed Jason and Michael's comment to split single register access command to common config and device specific commands.
- dropped the suggetion to introduce enable/disable command as
admin command cap bit already covers it.
- added other alternative design considered and discussed in detail in v0, v1 and v2
v1->v2:
- addressed comments from Michael
- added theory of operation
- grammar corrections
- removed group fields description from individual commands as it is already present in generic section
- added endianness normative for legacy device registers region
- renamed the file to drop vf and add legacy prefix
- added overview in commit log
- renamed subsection to reflect command
v0->v1:
- addressed comments, suggesetions and ideas from Michael Tsirkin and Jason Wang
- far more simpler design than MMR access
- removed complexities of MMR device ids
- removed complexities of MMR registers and extended capabilities
- dropped adding new extended capabilities because if if they are added, a pci device still needs to have existing capabilities
in the legacy configuration space and hypervisor driver do not need to access them
Parav Pandit (3):
admin: Split opcode table rows with a line
transport-pci: Introduce legacy registers access commands
transport-pci: Add legacy register access conformance section
admin.tex | 14 ++- conformance.tex | 2 + transport-pci-legacy-regs.tex | 189 ++++++++++++++++++++++++++++++++++ transport-pci.tex | 2 + 4 files changed, 206 insertions(+), 1 deletion(-) create mode 100644 transport-pci-legacy-regs.tex
Signature · 18 lines
2.26.2 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
PATCH v3 1/3 admin: Split opcode table rows with a line
Currently all opcode appears to be in a single row. Separate them with a line similar to other tables.
---
changelog:v2->v3:
- new patch
--- admin.tex | 2 ++ 1 file changed, 2 insertions(+)
admin.tex +2 -0
@@ -114,7 +114,9 @@ \subsection{Group administration commands}\label{sec:Basic Facilities of a Virti opcode & Name & Command Description \\ \hline \hline 0x0000 & VIRTIO_ADMIN_CMD_LIST_QUERY & Provides to driver list of commands supported for this group type \\ +\hline 0x0001 & VIRTIO_ADMIN_CMD_LIST_USE & Provides to device list of commands used for this group type \\ +\hline 0x0002 - 0x7FFF & - & Commands using \field{struct virtio_admin_cmd} \\ \hline 0x8000 - 0xFFFF & - & Reserved for future commands (possibly using a different structure) \\
Signature · 18 lines
2.26.2 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
PATCH v3 2/3 transport-pci: Introduce legacy registers access commands
In reply to Parav PanditThis patch introduces legacy registers access commands for the owner group member PCI PF to access the legacy registers of the member VFs.
If in future any SIOV devices to support legacy registers, they can be easily supported using same commands by using the group member identifiers of the future SIOV devices.
More details as overview, motivation, use case are further described below.
Usecase:
--------
1. A hypervisor/system needs to provide transitional virtio devices to the guest VM at scale of thousands, typically, one to eight devices per VM.
2. A hypervisor/system needs to provide such devices using a vendor agnostic driver in the hypervisor system.
3. A hypervisor system prefers to have single stack regardless of virtio device type (net/blk) and be future compatible with a single vfio stack using SR-IOV or other scalable device virtualization technology to map PCI devices to the guest VM. (as transitional or otherwise)
Motivation/Background:
----------------------
The existing virtio transitional PCI device is missing support for PCI SR-IOV based devices. Currently it does not work beyond PCI PF, or as software emulated device in reality. Currently it has below cited system level limitations:
[a] PCIe spec citation:
VFs do not support I/O Space and thus VF BARs shall not indicate I/O Space.
[b] cpu arch citiation:
Intel 64 and IA-32 Architectures Software Developer’s Manual:
The processor’s I/O address space is separate and distinct from the physical-memory address space. The I/O address space consists of 64K individually addressable 8-bit I/O ports, numbered 0 through FFFFH.
[c] PCIe spec citation:
If a bridge implements an I/O address range,...I/O address range will be aligned to a 4 KB boundary.
Overview:
---------
Above usecase requirements can be solved by PCI PF group owner accessing its group member PCI VFs legacy registers using an admin virtqueue of the group owner PCI PF.
Two new admin virtqueue commands are added which read/write PCI VF registers.
The third command suggested by Jason queries the VF device's driver notification region.
Software usage example:
-----------------------
One way to use and map to the guest VM is by using vfio driver framework in Linux kernel.
+----------------------+
|pci_dev_id = 0x100X |
+---------------|pci_rev_id = 0x0 |-----+
|vfio device |BAR0 = I/O region | |
| |Other attributes | |
| +----------------------+ |
| |
+ +--------------+ +-----------------+ |
| |I/O BAR to AQ | | Other vfio | |
| |rd/wr mapper | | functionalities | |
| +--------------+ +-----------------+ |
| |
+------+-------------------------+-----------+
| |
| |
| Driver notifications
| |
+----+------------+ +----+------------+
| +-----+ | | PCI VF device A |
| | AQ |-------------+---->+-------------+ |
| +-----+ | | | | legacy regs | |
| PCI PF device | | | +-------------+ |
+-----------------+ | +-----------------+
|
| +----+------------+
| | PCI VF device N |
+---->+-------------+ |
| | legacy regs | |
| +-------------+ |
+-----------------+2. Virtio pci driver to bind to the listed device id and use it as native device in the host.
3. Use it in a light weight hypervisor to run bare-metal OS.
Please review.
---
changelog:v2->v3:
- adddressed Jason and Michael's comment to split single register access command to common config and device specific commands.
- dropped the suggetion to introduce enable/disable command as admin command cap bit already covers it.v1->v2:
- addressed comments from Michael
- added theory of operation
- grammar corrections
- removed group fields description from individual commands as it is already present in generic section
- added endianness normative for legacy device registers region
- renamed the file to drop vf and add legacy prefix
- added overview in commit log
- renamed subsection to reflect command
--- admin.tex | 12 ++- transport-pci-legacy-regs.tex | 153 ++++++++++++++++++++++++++++++++++ transport-pci.tex | 2 + 3 files changed, 166 insertions(+), 1 deletion(-) create mode 100644 transport-pci-legacy-regs.tex
admin.tex +11 -1
@@ -117,7 +117,17 @@ \subsection{Group administration commands}\label{sec:Basic Facilities of a Virti \hline 0x0001 & VIRTIO_ADMIN_CMD_LIST_USE & Provides to device list of commands used for this group type \\ \hline -0x0002 - 0x7FFF & - & Commands using \field{struct virtio_admin_cmd} \\ +0x0002 & VIRTIO_ADMIN_CMD_LCC_REG_WRITE & Write legacy common configuration registers of a member device \\ +\hline +0x0003 & VIRTIO_ADMIN_CMD_LCC_REG_READ & Read legacy common configuration registers of a member device \\ +\hline +0x0004 & VIRTIO_ADMIN_CMD_LD_REG_WRITE & Write legacy device registers of a member device \\ +\hline +0x0005 & VIRTIO_ADMIN_CMD_LD_REG_READ & Read legacy device registers of a member device \\ +\hline +0x0006 & VIRTIO_ADMIN_CMD_LQ_NOTIFY_QUERY & Read the queue notification offset for legacy interface \\ +\hline +0x0007 - 0x7FFF & - & Commands using \field{struct virtio_admin_cmd} \\ \hline 0x8000 - 0xFFFF & - & Reserved for future commands (possibly using a different structure) \\ \hline
transport-pci-legacy-regs.tex new file +153 -0
153 lines not on this page · raw message
transport-pci.tex +2 -0
@@ -1212,3 +1212,5 @@ \subsubsection{Driver Handling Interrupts}\label{sec:Virtio Transport Options / re-examine the configuration space to see what changed. \end{itemize} \end{itemize} + +\input{transport-pci-legacy-regs.tex}
Signature · 18 lines
2.26.2 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
[virtio-comment] Re: [PATCH v3 2/3] transport-pci: Introduce legacy registers access commands
Quoted 35 lines · Parav Pandit
+\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}
transport-pci-legacy-regs.tex new file +34
-0+ +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}
transport-pci-legacy-regs.tex line 139
Quoted 10 lines
transport-pci-legacy-regs.tex new file +10
-0+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.
Quoted 4 lines
transport-pci-legacy-regs.tex new file +4
-0+ +\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
transport-pci-legacy-regs.tex line 153
Quoted 10 lines
transport-pci-legacy-regs.tex new file +10
-0+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?
Quoted 2 lines
Signature · 1 line
2.26.2
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
[virtio-comment] RE: [PATCH v3 2/3] transport-pci: Introduce legacy registers access commands
Quoted 10 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 4, 2023 9:22 AMReview
Quoted 3 lines
(quoted diff) +3
-0+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.
Do you suggest to rewrite, above as below?
The driver that MAY use the driver notifications region of the VF likely obtain higher performance. The driver may use VIRTIO_ADMIN_CMD_LCC_REG_WRITE command for doorbell notifications.
Quoted 11 lines
Review
Quoted 6 lines
+\begin{note}
(quoted diff) +5
-0+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 anytranslation.
Quoted 1 line
+\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?
This is no different than v2, not sure why to discuss this in v3. But ok.
No. It is not related to last command.
What does a PCI Device use BAR for?
As described in the spec, it uses the BAR in struct virtio_pci_cap for exposing various things.
So it means that PCI VF should use other than PCI BAR 0 for various Virtio Structure PCI Capabilities that it exposes.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH v3 2/3] transport-pci: Introduce legacy registers access commands
Quoted 10 lines · Parav Pandit
Quoted 10 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 4, 2023 9:22 AMReview
Quoted 3 lines
(quoted diff) +3
-0+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.
Quoted 4 lines
Do you suggest to rewrite, above as below?
The driver that MAY use the driver notifications region of the VF likely obtain higher performance. The driver may use
VIRTIO_ADMIN_CMD_LCC_REG_WRITEcommand for doorbell notifications.
No this does not address the issue that there is no description of how this command is used just a hint at what it returns. So this gets us some offset into some bar now what? I am guessing writing vqn at this offset into bar has the same effect as issuing VIRTIO_ADMIN_CMD_LCC_REG_WRITE with offset 16 and data including the vqn?
BTW all these may/must/should need to go into conformance section.
Generally the way we structure the spec is an explanation of the theory of operation (mostly missing here)
Quoted 7 lines
Quoted 7 lines
Review
Quoted 6 lines
+\begin{note}
(quoted diff) +5
-0+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 anytranslation.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
+\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?
This is no different than v2, not sure why to discuss this in v3.
v2 had other issues so I missed this one.
Quoted 4 lines
But ok.
No. It is not related to last command.
What does a PCI Device use BAR for?
To reserve address space and know which addresses to claim.
Generally if I heard "not use BAR0" I would assume that the meaning is that VF BAR0 in SRIOV expended capability should be 0. However, that affects all VFs and not just this VF so I don't really know what can it mean.
Quoted 1 line
As described in the spec, it uses the BAR in struct
virtio_pci_capfor exposing various things.
Now I'm confused.
So do you mean the \field{bar} in virtio_pci_cap or PCI BAR?
Quoted 1 line
So it means that PCI VF should use other than PCI BAR 0 for various Virtio Structure PCI Capabilities that it exposes.
I suspect you then want to say "should not expose to driver any structures inside it's BAR0"?
And does this include this new command you are adding or not? It mentions bar too. What about e.g. MSIX tables? Could there be other capabilities referring to a BAR? How does hypervisor know whether VF followed this rule (it's a should, not a hard rule after all)?
Signature · 18 lines
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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
[virtio-comment] RE: [PATCH v3 2/3] transport-pci: Introduce legacy registers access commands
Quoted 21 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 4, 2023 10:14 AMQuoted 10 lines · Parav Pandit
Quoted 10 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 4, 2023 9:22 AMReview
Quoted 3 lines
(quoted diff) +3
-0+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.
Quoted 3 lines
Do you suggest to rewrite, above as below?
The driver that MAY use the driver notifications region of the VF likely obtain
higher performance.
Quoted 1 line
The driver may use
VIRTIO_ADMIN_CMD_LCC_REG_WRITEcommand fordoorbell notifications.
Quoted 9 lines
No this does not address the issue that there is no description of how this command is used just a hint at what it returns.
So this gets us some offset into
some bar now what?
I am guessing writing vqn at this offset into bar has the same effect as issuingVIRTIO_ADMIN_CMD_LCC_REG_WRITEwith offset 16 and data including the vqn?
I can add the one line description that describes above. I take note for v4.
Quoted 3 lines
BTW all these may/must/should need to go into conformance section.
Conformance section for the AQ itself is missing. And I am aware to fix it post your v13 series.
Quoted 3 lines
Generally the way we structure the spec is an explanation of the theory of operation (mostly missing here)
It is not any different from v2.
Theory of operation is not going to describe the whole driver design.
It is not likely the scope like any other section.
Section "Legacy Interfaces: SR-IOV VFs Registers Access" has theory of operation described and also in commit log.
This is like recent AQ patches and notification coalescing and more.
So if can pin point what exactly you want to see in theory of operation, it will be helpful.
Because for one person, 10 lines of theory is enough like how we have most of the spec, another wants 100 lines with pseudo code in appendix.
Quoted 4 lines
v2 had other issues so I missed this one.
Quoted 2 lines
But ok.
Quoted 9 lines
Quoted 2 lines
No. It is not related to last command.
What does a PCI Device use BAR for?To reserve address space and know which addresses to claim.
Generally if I heard "not use BAR0" I would assume that the meaning is that VF BAR0 in SRIOV expended capability should be 0. However, that affects all VFs and not just this VF so I don't really know what can it mean.
A PCI PF and VF device which wants to support legacy emulation should not expose BAR 0 in the struct virtio_pci_cap struct. Instead it should use other BARs.
Quoted 6 lines
Quoted 1 line
As described in the spec, it uses the BAR in struct
virtio_pci_capfor exposingvarious things.
Now I'm confused.
So do you mean the \field{bar} invirtio_pci_capor PCI BAR?
Yes.
Quoted 5 lines
Quoted 1 line
So it means that PCI VF should use other than PCI BAR 0 for various Virtio
Structure PCI Capabilities that it exposes.
I suspect you then want to say "should not expose to driver any structures inside it's BAR0"?
Instead of bisecting at structure level, it is indicated on usage so that it doesn't need to bisect on "what about MSI-X".
Quoted 7 lines
And does this include this new command you are adding or not? It mentions bar too. What about e.g. MSIX tables? Could there be other capabilities referring to a BAR?
How does hypervisor know whether VF followed this rule (it's a should, not a hard rule after all)?
It is not a MUST.
Hypervisor software using this VF very easily know this when VF is attached to the hypervisor driver by reading the capability.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH v3 2/3] transport-pci: Introduce legacy registers access commands
Quoted 30 lines · Parav Pandit
Quoted 21 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 4, 2023 10:14 AMQuoted 10 lines · Parav Pandit
Quoted 10 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 4, 2023 9:22 AMReview
Quoted 3 lines
(quoted diff) +3
-0+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.
Quoted 3 lines
Do you suggest to rewrite, above as below?
The driver that MAY use the driver notifications region of the VF likely obtain
higher performance.
Quoted 1 line
The driver may use
VIRTIO_ADMIN_CMD_LCC_REG_WRITEcommand fordoorbell notifications.
Quoted 9 lines
No this does not address the issue that there is no description of how this command is used just a hint at what it returns.
So this gets us some offset into
some bar now what?
I am guessing writing vqn at this offset into bar has the same effect as issuingVIRTIO_ADMIN_CMD_LCC_REG_WRITEwith offset 16 and data including the vqn?
Quoted 6 lines
I can add the one line description that describes above. I take note for v4.
Quoted 3 lines
BTW all these may/must/should need to go into conformance section.
Conformance section for the AQ itself is missing. And I am aware to fix it post your v13 series.
Hmm missing where? It was supposed to be added here:
commit bf1d6b0d24ae899d08c7cf24ed480cf5881c49ef
Author: Michael S. Tsirkin <[email protected]> Date: Sun Nov 20 19:43:45 2022 -0500
admin: conformance clauses
what did I miss?
Quoted 8 lines
Quoted 3 lines
Generally the way we structure the spec is an explanation of the theory of operation (mostly missing here)
It is not any different from v2.
Theory of operation is not going to describe the whole driver design.
It is not likely the scope like any other section.
Section "Legacy Interfaces: SR-IOV VFs Registers Access" has theory of operation described and also in commit log.
Quoted 4 lines
This is like recent AQ patches and notification coalescing and more.
So if can pin point what exactly you want to see in theory of operation, it will be helpful.
Because for one person, 10 lines of theory is enough like how we have most of the spec, another wants 100 lines with pseudo code in appendix.
yes but I think this assumes a bit much. you start by saying there's no IO BAR. Okay, it's not even mandatory to give motivation, but can't hurt. The next step is you describe a bunch of commands. Presumably the reader will draw the conclusion that they replace an io bar? But it's implicit, and that is not good.
So, I imagine we have a driver that translates legacy accesses to AQ commands, yes? And it also somehow uses the extra command to get an address and then translates notifications to writes at that address? This kind of thing is what I called a theory of operation.
A couple of paragraphs.
Quoted 22 lines
Quoted 4 lines
v2 had other issues so I missed this one.
Quoted 2 lines
But ok.
Quoted 9 lines
Quoted 2 lines
No. It is not related to last command.
What does a PCI Device use BAR for?To reserve address space and know which addresses to claim.
Generally if I heard "not use BAR0" I would assume that the meaning is that VF BAR0 in SRIOV expended capability should be 0. However, that affects all VFs and not just this VF so I don't really know what can it mean.
A PCI PF and VF device which wants to support legacy emulation should not expose BAR 0 in the struct
virtio_pci_capstruct. Instead it should use other BARs.Quoted 6 lines
Quoted 1 line
As described in the spec, it uses the BAR in struct
virtio_pci_capfor exposingvarious things.
Now I'm confused.
So do you mean the \field{bar} invirtio_pci_capor PCI BAR?
Quoted 7 lines
Yes.
Quoted 5 lines
Quoted 1 line
So it means that PCI VF should use other than PCI BAR 0 for various Virtio
Structure PCI Capabilities that it exposes.
I suspect you then want to say "should not expose to driver any structures inside it's BAR0"?
Instead of bisecting at structure level, it is indicated on usage so that it doesn't need to bisect on "what about MSI-X".
But what is the answer?
Quoted 4 lines
Quoted 3 lines
And does this include this new command you are adding or not? It mentions bar too. What about e.g. MSIX tables? Could there be other capabilities referring to a BAR?
?
Quoted 5 lines
Quoted 3 lines
How does hypervisor know whether VF followed this rule (it's a should, not a hard rule after all)?
It is not a MUST.
Hypervisor software using this VF very easily know this when VF is attached to the hypervisor driver by reading the capability.
which capability? E.g. there's a vendor specific capability we don't even know what's in there. If you really want to save code in the hypervisor this "should" is pretty useless.
Signature · 18 lines
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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
[virtio-comment] RE: [PATCH v3 2/3] transport-pci: Introduce legacy registers access commands
Quoted 5 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 4, 2023 10:42 AM
Quoted 7 lines
Quoted 3 lines
Quoted 2 lines
BTW all these may/must/should need to go into conformance section.
Conformance section for the AQ itself is missing. And I am aware to fix it post
your v13 series.
Hmm missing where? It was supposed to be added here:
Conformance chapter doesn't have any links to aq requirements.
Quoted 25 lines
commit
bf1d6b0d24ae899d08c7cf24ed480cf5881c49efAuthor: Michael S. Tsirkin <[email protected]> Date: Sun Nov 20 19:43:45 2022 -0500admin: conformance clauses
what did I miss?
Quoted 7 lines
Quoted 3 lines
Generally the way we structure the spec is an explanation of the theory of operation (mostly missing here)
It is not any different from v2.
Theory of operation is not going to describe the whole driver design. It is not likely the scope like any other section.
Section "Legacy Interfaces: SR-IOV VFs Registers Access" has theory ofoperation described and also in commit log.
Quoted 4 lines
This is like recent AQ patches and notification coalescing and more.
So if can pin point what exactly you want to see in theory of operation, it will
be helpful.
Quoted 1 line
Because for one person, 10 lines of theory is enough like how we have most
of the spec, another wants 100 lines with pseudo code in appendix.
Quoted 8 lines
yes but I think this assumes a bit much. you start by saying there's no IO BAR. Okay, it's not even mandatory to give motivation, but can't hurt. The next step is you describe a bunch of commands. Presumably the reader will draw the conclusion that they replace an io bar?
But it's implicit, and that is not good.So, I imagine we have a driver that translates legacy accesses to AQ commands, yes?
Yes.
Quoted 7 lines
And it also somehow uses the extra command to get an address and then translates notifications to writes at that address? This kind of thing is what I called a theory of operation.
A couple of paragraphs.
Yes, but I don't see such details for the AQ, notification coalescing. These commands are not special.
Commands described "what" they do. "When and how" is not described in the spec. It is left to the driver to compose such things.
How Net device should use "queue reset" is not explained in theory of operation. What is described is mechanics of queue reset steps...
Those details were put in the commit log, and not in the spec.
If you want to add theory of operation like nvme spec, we need to have dedicated section. I don't see a reason, why this should be the first patch set to do so in v4.
I am more than happy to add, but it can be done in generic way as follow up.
Quoted 30 lines
Quoted 9 lines
Quoted 9 lines
v2 had other issues so I missed this one.
Quoted 4 lines
But ok.
No. It is not related to last command.
What does a PCI Device use BAR for?Quoted 8 lines
Quoted 7 lines
To reserve address space and know which addresses to claim.
Generally if I heard "not use BAR0" I would assume that the meaning is that VF
BAR0 in SRIOV expended capability should be 0. However, that affects all VFs and not just this VF so I don't really know what can it mean.A PCI PF and VF device which wants to support legacy emulation should not
expose BAR 0 in the struct
virtio_pci_capstruct.Quoted 12 lines
Instead it should use other BARs.
Quoted 7 lines
Quoted 2 lines
As described in the spec, it uses the BAR in struct
virtio_pci_capfor exposingvarious things.
Now I'm confused.
So do you mean the \field{bar} invirtio_pci_capor PCI BAR?Yes.
Quoted 2 lines
Quoted 2 lines
So it means that PCI VF should use other than PCI BAR 0 for various Virtio
Quoted 9 lines
Quoted 5 lines
Quoted 4 lines
Structure PCI Capabilities that it exposes.
I suspect you then want to say "should not expose to driver any structures inside it's BAR0"?
Instead of bisecting at structure level, it is indicated on usage so that it doesn't
need to bisect on "what about MSI-X".
But what is the answer?
BAR 0 should not be used at all by the VF device for anything including MSI-X.
Quoted 7 lines
Quoted 4 lines
Quoted 3 lines
And does this include this new command you are adding or not? It mentions bar too. What about e.g. MSIX tables? Could there be other capabilities referring to a BAR?
?
New command also should not report BAR 0.
Quoted 11 lines
Quoted 5 lines
Quoted 3 lines
How does hypervisor know whether VF followed this rule (it's a should, not a hard rule after all)?
It is not a MUST.
Hypervisor software using this VF very easily know this when VF is attached tothe hypervisor driver by reading the capability.
which capability? E.g. there's a vendor specific capability we don't even know what's in there. If you really want to save code in the hypervisor this "should" is pretty useless.
All the pci vendor capabilities for which all the code already exists. It is not related to code saving.
Even those cap check is not needed.
Hypervisor driver needs to only check that BAR-0 is empty of not from the PCI layer.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH v3 2/3] transport-pci: Introduce legacy registers access commands
Quoted 5 lines · Parav Pandit
Quoted 4 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 4, 2023 10:42 AM
Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
Quoted 2 lines
BTW all these may/must/should need to go into conformance section.
Conformance section for the AQ itself is missing. And I am aware to fix it post
your v13 series.
Hmm missing where? It was supposed to be added here:
Conformance chapter doesn't have any links to aq requirements.
Good point, but the section itself is not missing, just a couple of links in the conformance chapter. Sounds like a trivial omission we can correct as an editorial fix.
Quoted 36 lines
Quoted 26 lines
commit
bf1d6b0d24ae899d08c7cf24ed480cf5881c49efAuthor: Michael S. Tsirkin <[email protected]> Date: Sun Nov 20 19:43:45 2022 -0500admin: conformance clauses
what did I miss?
Quoted 7 lines
Quoted 3 lines
Generally the way we structure the spec is an explanation of the theory of operation (mostly missing here)
It is not any different from v2.
Theory of operation is not going to describe the whole driver design. It is not likely the scope like any other section.
Section "Legacy Interfaces: SR-IOV VFs Registers Access" has theory ofoperation described and also in commit log.
Quoted 4 lines
This is like recent AQ patches and notification coalescing and more.
So if can pin point what exactly you want to see in theory of operation, it will
be helpful.
Quoted 1 line
Because for one person, 10 lines of theory is enough like how we have most
of the spec, another wants 100 lines with pseudo code in appendix.
Quoted 8 lines
yes but I think this assumes a bit much. you start by saying there's no IO BAR. Okay, it's not even mandatory to give motivation, but can't hurt. The next step is you describe a bunch of commands. Presumably the reader will draw the conclusion that they replace an io bar?
But it's implicit, and that is not good.So, I imagine we have a driver that translates legacy accesses to AQ commands, yes?
Yes.
Quoted 8 lines
Quoted 7 lines
And it also somehow uses the extra command to get an address and then translates notifications to writes at that address? This kind of thing is what I called a theory of operation.
A couple of paragraphs.
Yes, but I don't see such details for the AQ, notification coalescing.
I certainly tried for AQ.
For notification coalescing there's a whole paragraph:
\subparagraph{Operation}\label{sec:Device Types / Network Device / Device Operation / Control Virtqueue / Notifications Coalescing / Operation}
Quoted 2 lines
These commands are not special.
Commands described "what" they do. "When and how" is not described in the spec.
If the "what" is "return offset for notifications" but there's no description on what these notifications are then the "what" is at best incomplete.
Quoted 8 lines
It is left to the driver to compose such things.
How Net device should use "queue reset" is not explained in theory of operation. What is described is mechanics of queue reset steps...Those details were put in the commit log, and not in the spec.
If you want to add theory of operation like nvme spec, we need to have dedicated section. I don't see a reason, why this should be the first patch set to do so in v4. I am more than happy to add, but it can be done in generic way as follow up.
I don't think so personally.
As bigger issues get fixed, we start polishing up smaller ones. It is reasonable to ask that people try to decide on a high level design up front to avoid sending you back to the drawing board - though that's unavoidable sometimes, a straw can break camel's back, but that's not the case here.
Nitpicking when the design itself is undergoing big changes is unproductive for everyone - reviewers and contributors. Now you are getting asked to clarify things is a good sign that the design is converging. The less time we keep arguing about protocol the faster this will happen.
And I commented on previous versions too that the notification part is not near ready, and suggested splitting it up to a follow up patch. This is still the case, and I still think you should get the 4 config access commands merged first then focus on notifications.
Quoted 40 lines
Quoted 30 lines
Quoted 9 lines
Quoted 9 lines
v2 had other issues so I missed this one.
Quoted 4 lines
But ok.
No. It is not related to last command.
What does a PCI Device use BAR for?Quoted 8 lines
Quoted 7 lines
To reserve address space and know which addresses to claim.
Generally if I heard "not use BAR0" I would assume that the meaning is that VF
BAR0 in SRIOV expended capability should be 0. However, that affects all VFs and not just this VF so I don't really know what can it mean.A PCI PF and VF device which wants to support legacy emulation should not
expose BAR 0 in the struct
virtio_pci_capstruct.Quoted 12 lines
Instead it should use other BARs.
Quoted 7 lines
Quoted 2 lines
As described in the spec, it uses the BAR in struct
virtio_pci_capfor exposingvarious things.
Now I'm confused.
So do you mean the \field{bar} invirtio_pci_capor PCI BAR?Yes.
Quoted 2 lines
Quoted 2 lines
So it means that PCI VF should use other than PCI BAR 0 for various Virtio
Quoted 9 lines
Quoted 5 lines
Quoted 4 lines
Structure PCI Capabilities that it exposes.
I suspect you then want to say "should not expose to driver any structures inside it's BAR0"?
Instead of bisecting at structure level, it is indicated on usage so that it doesn't
need to bisect on "what about MSI-X".
But what is the answer?
BAR 0 should not be used at all by the VF device for anything including MSI-X.
Quoted 12 lines
Quoted 7 lines
Quoted 4 lines
Quoted 3 lines
And does this include this new command you are adding or not? It mentions bar too. What about e.g. MSIX tables? Could there be other capabilities referring to a BAR?
?
New command also should not report BAR 0.
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
How does hypervisor know whether VF followed this rule (it's a should, not a hard rule after all)?
It is not a MUST.
Check up on the difference between SHOULD and MUST in the RFC. If things break without this then you make it MUST. SHOULD is a recommendation.
Quoted 9 lines
Quoted 7 lines
Quoted 1 line
Hypervisor software using this VF very easily know this when VF is attached to
the hypervisor driver by reading the capability.
which capability? E.g. there's a vendor specific capability we don't even know what's in there. If you really want to save code in the hypervisor this "should" is pretty useless.
All the pci vendor capabilities for which all the code already exists. It is not related to code saving.
Isn't code saving the reason you want to prevent VFs from using BAR0?
Quoted 2 lines
Even those cap check is not needed.
Hypervisor driver needs to only check that BAR-0 is empty of not from the PCI layer.
How do you check this? BAR0 size 0? Then say so. That affects all VFs and some of them might not have legacy access.
Signature · 6 lines
MST --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
[virtio-comment] RE: [PATCH v3 2/3] transport-pci: Introduce legacy registers access commands
Quoted 11 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 4, 2023 6:10 PMQuoted 1 line
Conformance chapter doesn't have any links to aq requirements.
Good point, but the section itself is not missing, just a couple of links in the conformance chapter. Sounds like a trivial omission we can correct as an editorial fix.
Yes, to be done.
Quoted 11 lines
Quoted 8 lines
Quoted 7 lines
And it also somehow uses the extra command to get an address and then translates notifications to writes at that address? This kind of thing is what I called a theory of operation.
A couple of paragraphs.
Yes, but I don't see such details for the AQ, notification coalescing.
I certainly tried for AQ.
There are many details about "access other device" design details located in the commit log, which is not present in the AQ section.
Quoted 4 lines
For notification coalescing there's a whole paragraph:
\subparagraph{Operation}\label{sec:Device Types / Network Device / Device Operation / Control Virtqueue / Notifications Coalescing / Operation}
The paragraph explains "what" part of the operation, not the design of how/when things should be done by the driver. I am not against adding the theory of operation, but I clearly see being nitpicked.
Quoted 8 lines
Quoted 3 lines
These commands are not special.
Commands described "what" they do. "When and how" is not described inthe spec.
If the "what" is "return offset for notifications" but there's no description on what these notifications are then the "what" is at best incomplete.
The command description says:
"This command returns the notify offset of the member VF for virtqueue driver notifications"
What more to tell than this, as "driver notifications" is clearly described in the section 2.9 for it. May be I can make it little more verbose.
Quoted 17 lines
Quoted 2 lines
It is left to the driver to compose such things.
How Net device should use "queue reset" is not explained in theory ofoperation.
Quoted 4 lines
What is described is mechanics of queue reset steps...
Those details were put in the commit log, and not in the spec. If you want to add theory of operation like nvme spec, we need to have
dedicated section.
Quoted 2 lines
I don't see a reason, why this should be the first patch set to do so in v4. I am more than happy to add, but it can be done in generic way as follow up.
I don't think so personally.
As bigger issues get fixed, we start polishing up smaller ones.
It is reasonable to ask that people try to decide on a high level design up front to avoid sending you back to the drawing board - though that's unavoidable sometimes, a straw can break camel's back, but that's not the case here.
Quoted 6 lines
Nitpicking when the design itself is undergoing big changes is unproductive for everyone - reviewers and contributors.
Now you are getting asked to clarify things is a good sign that the design is converging. The less time we keep arguing about protocol the faster this will happen.
Most or all questions about notify were literally answered in v2. I missed to add them to the alternatives considered section in the commit log. I will add it.
Quoted 5 lines
And I commented on previous versions too that the notification part is not near ready, and suggested splitting it up to a follow up patch.
This is still the case, and I still think you should get the 4 config access commands merged first then focus on notifications.
After you asked about this in v1, I further clarified in v2.
I would like to cover the notification part as well. It is really the small piece as it is not baking any special or new concept.
Quoted 11 lines
Quoted 11 lines
Quoted 2 lines
But what is the answer?
BAR 0 should not be used at all by the VF device for anything including MSI-X.
Quoted 7 lines
Quoted 4 lines
Quoted 3 lines
And does this include this new command you are adding or not? It mentions bar too. What about e.g. MSIX tables? Could there be other capabilities referring to a BAR?
?
New command also should not report BAR 0.
Quoted 9 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
How does hypervisor know whether VF followed this rule (it's a should, not a hard rule after all)?
It is not a MUST.
Check up on the difference between SHOULD and MUST in the RFC. If things break without this then you make it MUST. SHOULD is a recommendation.
One may be still able to work by having it as "SHOULD", it may be just too much of code without much use. Hence, I kept it as SHOULD.
Quoted 2 lines
Isn't code saving the reason you want to prevent VFs from using BAR0?
Code and driver complexity both.
Quoted 6 lines
Quoted 2 lines
Even those cap check is not needed.
Hypervisor driver needs to only check that BAR-0 is empty of not from the PCIlayer.
How do you check this? BAR0 size 0? Then say so. That affects all VFs and some of them might not have legacy access.
I don't think we need to enforce this by writing what PCI spec already defines.
For example, we don't write how MSI-X PBA addresses to be programmed when programing a vector and how to memory map PCI BAR region. It is left to the driver to figure out how to detect BAR0 supported or not for a device.
Multiple solutions exists left to the driver to decide.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH v3 2/3] transport-pci: Introduce legacy registers access commands
In reply to Parav PanditQuoted 136 lines · Parav Pandit
This patch introduces legacy registers access commands for the owner group member PCI PF to access the legacy registers of the member VFs.
If in future any SIOV devices to support legacy registers, they can be easily supported using same commands by using the group member identifiers of the future SIOV devices.
More details as overview, motivation, use case are further described below.
Usecase:
--------
1. A hypervisor/system needs to provide transitional virtio devices to the guest VM at scale of thousands, typically, one to eight devices per VM.2. A hypervisor/system needs to provide such devices using a vendor agnostic driver in the hypervisor system.
3. A hypervisor system prefers to have single stack regardless of virtio device type (net/blk) and be future compatible with a single vfio stack using SR-IOV or other scalable device virtualization technology to map PCI devices to the guest VM. (as transitional or otherwise)
Motivation/Background:
----------------------
The existing virtio transitional PCI device is missing support for PCI SR-IOV based devices. Currently it does not work beyond PCI PF, or as software emulated device in reality. Currently it has below cited system level limitations:[a] PCIe spec citation:
VFs do not support I/O Space and thus VF BARs shall not indicate I/O Space.[b] cpu arch citiation:
Intel 64 and IA-32 Architectures Software Developer’s Manual:
The processor’s I/O address space is separate and distinct from the physical-memory address space. The I/O address space consists of 64K individually addressable 8-bit I/O ports, numbered 0 through FFFFH.[c] PCIe spec citation:
If a bridge implements an I/O address range,...I/O address range will be aligned to a 4 KB boundary.Overview:
---------
Above usecase requirements can be solved by PCI PF group owner accessing its group member PCI VFs legacy registers using an admin virtqueue of the group owner PCI PF.Two new admin virtqueue commands are added which read/write PCI VF registers.
The third command suggested by Jason queries the VF device's driver notification region.
Software usage example:
-----------------------
One way to use and map to the guest VM is by using vfio driver framework in Linux kernel.+----------------------+ |pci_dev_id = 0x100X | +---------------|pci_rev_id = 0x0 |-----+ |vfio device |BAR0 = I/O region | | | |Other attributes | | | +----------------------+ | | | + +--------------+ +-----------------+ | | |I/O BAR to AQ | | Other vfio | | | |rd/wr mapper | | functionalities | | | +--------------+ +-----------------+ | | | +------+-------------------------+-----------+ | | | | | Driver notifications | | +----+------------+ +----+------------+ | +-----+ | | PCI VF device A | | | AQ |-------------+---->+-------------+ | | +-----+ | | | | legacy regs | | | PCI PF device | | | +-------------+ | +-----------------+ | +-----------------+ | | +----+------------+ | | PCI VF device N | +---->+-------------+ | | | legacy regs | | | +-------------+ | +-----------------+2. Virtio pci driver to bind to the listed device id and use it as native device in the host.
3. Use it in a light weight hypervisor to run bare-metal OS.
Please review.
Signed-off-by Parav Pandit <[email protected]>---
changelog:v2->v3:
- adddressed Jason and Michael's comment to split single register access command to common config and device specific commands.
- dropped the suggetion to introduce enable/disable command as admin command cap bit already covers it.v1->v2:
- addressed comments from Michael
- added theory of operation
- grammar corrections
- removed group fields description from individual commands as it is already present in generic section
- added endianness normative for legacy device registers region
- renamed the file to drop vf and add legacy prefix- added overview in commit log
- renamed subsection to reflect command--- admin.tex | 12 ++- transport-pci-legacy-regs.tex | 153 ++++++++++++++++++++++++++++++++++ transport-pci.tex | 2 + 3 files changed, 166 insertions(+), 1 deletion(-) create mode 100644 transport-pci-legacy-regs.texadmin.tex +0
-1@@ -117,7 +117,17 @@ \subsection{Group administration commands}\label{sec:Basic Facilities of a Virti \hline 0x0001 & VIRTIO_ADMIN_CMD_LIST_USE & Provides to device list of commands used for this group type \\ \hline -0x0002 - 0x7FFF & - & Commands using \field{struct virtio_admin_cmd} \\
admin.tex \subsection{Group administration commands}\label{sec:Basic Facilities of a Virti · line 129
Quoted 10 lines
admin.tex +10
-0+0x0002 & VIRTIO_ADMIN_CMD_LCC_REG_WRITE & Write legacy common configuration registers of a member device \\ +\hline +0x0003 & VIRTIO_ADMIN_CMD_LCC_REG_READ & Read legacy common configuration registers of a member device \\ +\hline +0x0004 & VIRTIO_ADMIN_CMD_LD_REG_WRITE & Write legacy device registers of a member device \\ +\hline +0x0005 & VIRTIO_ADMIN_CMD_LD_REG_READ & Read legacy device registers of a member device \\ +\hline +0x0006 & VIRTIO_ADMIN_CMD_LQ_NOTIFY_QUERY & Read the queue notification offset for legacy interface \\ +\hline
Could you avoid such drastic abbreviation in command names? Standard things like CMD,CFG are ok, but
LCC/LD will not ring any bells for anyone, except maybe confusingly make one think of "C Compiler" and "Link eDitor".
Let's just LEGACY_COMMON_CFG/LEGACY_DEVICE_CFG?
Quoted 175 lines
admin.tex +1
-0+0x0007 - 0x7FFF & - & Commands using \field{struct virtio_admin_cmd} \\ \hline 0x8000 - 0xFFFF & - & Reserved for future commands (possibly using a different structure) \\ \hlinetransport-pci-legacy-regs.tex new file +153
-0@@ -0,0 +1,153 @@ +\subsection{Legacy Interfaces: SR-IOV VFs Registers Access}\label{sec:Virtio Transport Options / Virtio Over PCI Bus / Legacy Interfaces: SR-IOV VFs Registers Access} + +As described in PCIe base specification \hyperref[intro:PCIe]{[PCIe]} PCI VFs +do not support the I/O space BAR. A PCI VF hardware device that can support +legacy interfaces cannot be passthrough to the guest virtual machine +due to this limitation. To have a transitional virtio device in the guest +virtual machine, a PCI PF device as a group owner may support accessing its +group member PCI VF device's legacy registers using an administrative +virtqueue. This enables minimal intervention in the hypervisor only for +the purpose of legacy registers access. + +A hypervisor software accesses the legacy configuration and device specific +registers requested by the guest virtual machine using an administrative +virtqueue. Even though virtqueue driver notifications can be communicated +through administrative virtqueue, if the PCI PF and VF devices support such +notifications using a memory-mapped operation, such driver notifications +are sent using a device defined notification region. + +The group owner PCI PF device can optionally enable the driver to access +its member PCI VFs devices legacy common configuration and device configuration +registers using an administration virtqueue. Such a PCI PF device supports +the following commands: + +\begin{enumerate} +\item Legacy Common Configuration Registers Write Command +\item Legacy common Configuration Registers Read Command +\item Legacy Device Specific registers Write Command +\item Legacy Device Specific registers Read Command +\item Legacy Queue Notify Offset Query Command +\end{enumerate} + +\subsubsection{Legacy Common Configuration Registers Write Command}\label{sec:Virtio Transport Options / Virtio Over PCI Bus / Legacy Interfaces: SR-IOV VFs Registers Access / Legacy Common Configuration Registers Write Command} + +The Legacy Common Configuration Registers Write Command follows +\field{struct virtio_admin_cmd}. +This command writes legacy common configuration registers of a member VF device. +The driver sets command \field{opcode} to VIRTIO_ADMIN_CMD_LCC_REG_WRITE. + +The command VIRTIO_ADMIN_CMD_LCC_REG_WRITE uses following structure for +\field{command_specific_data}: + +\begin{lstlisting} +struct virtio_admin_cmd_lcc_reg_wr_data { + u8 offset; /* Starting byte offset of the common configuration register(s) to write */ + u8 register[]; +}; +\end{lstlisting} + +This command does not have any command specific result. + +\subsubsection{Legacy Common Configuration 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 Common Configuration Registers Read Command follows \field{struct virtio_admin_cmd}. +This command reads legacy common configuration registers of a member VF device. +The driver sets command \field{opcode} to VIRTIO_ADMIN_CMD_LCC_REG_READ. + +The command VIRTIO_ADMIN_CMD_LCC_REG_READ uses following listed structure for +\field{command_specific_data}: + +\begin{lstlisting} +struct virtio_admin_cmd_lcc_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_lcc_reg_rd_result { + u8 registers[]; +}; +\end{lstlisting} + + +\subsubsection{Legacy Device Registers Write Command}\label{sec:Virtio Transport +Options / Virtio Over PCI Bus / Legacy Interfaces: SR-IOV VFs Registers Access / Legacy Device Registers Write Command} + +The Legacy Device Registers Write Command follows \field{struct virtio_admin_cmd}. +This command writes legacy device registers of a member VF device. +The driver sets command \field{opcode} to VIRTIO_ADMIN_CMD_LD_REG_WRITE. + +The command VIRTIO_ADMIN_CMD_LD_REG_WRITE uses following structure for +\field{command_specific_data}: + +\begin{lstlisting} +struct virtio_admin_cmd_ld_reg_wr_data { + u8 offset; /* Starting byte offset of the device register(s) to write */ + u8 register[]; +}; +\end{lstlisting} + +This command does not have any command specific result. + +\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. + +\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}transport-pci.tex +2
-0@@ -1212,3 +1212,5 @@ \subsubsection{Driver Handling Interrupts}\label{sec:Virtio Transport Options / re-examine the configuration space to see what changed. \end{itemize} \end{itemize} + +\input{transport-pci-legacy-regs.tex}Signature · 1 line
2.26.2
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] RE: [PATCH v3 2/3] transport-pci: Introduce legacy registers access commands
Quoted 16 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, June 8, 2023 2:34 PMQuoted 1 line
+0x0003 &
VIRTIO_ADMIN_CMD_LCC_REG_READ& Read legacy commonconfiguration registers of a member device \\
Quoted 2 lines
+\hline
+0x0004 &VIRTIO_ADMIN_CMD_LD_REG_WRITE& Write legacy deviceregisters of a member device \\
Quoted 2 lines
+\hline
+0x0005 &VIRTIO_ADMIN_CMD_LD_REG_READ& Read legacy deviceregisters of a member device \\
Quoted 3 lines
+\hline
+0x0006 &VIRTIO_ADMIN_CMD_LQ_NOTIFY_QUERY& Read the queue +notification offset for legacy interface \\ \hline
Quoted 6 lines
Could you avoid such drastic abbreviation in command names? Standard things like CMD,CFG are ok, but LCC/LD will not ring any bells for anyone, except maybe confusingly make one think of "C Compiler" and "Link eDitor".
Let's just LEGACY_COMMON_CFG/LEGACY_DEVICE_CFG?
It looked too long before abbreviating it.
Will change.
VIRTIO_ADMIN_CMD_LEGACY_COMMON_REG_READVIRTIO_ADMIN_CMD_LEGACY_DEV_REG_READ
[virtio-comment] Re: [PATCH v3 2/3] transport-pci: Introduce legacy registers access commands
Quoted 22 lines · Parav Pandit
Quoted 16 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, June 8, 2023 2:34 PMQuoted 1 line
+0x0003 &
VIRTIO_ADMIN_CMD_LCC_REG_READ& Read legacy commonconfiguration registers of a member device \\
Quoted 2 lines
+\hline
+0x0004 &VIRTIO_ADMIN_CMD_LD_REG_WRITE& Write legacy deviceregisters of a member device \\
Quoted 2 lines
+\hline
+0x0005 &VIRTIO_ADMIN_CMD_LD_REG_READ& Read legacy deviceregisters of a member device \\
Quoted 3 lines
+\hline
+0x0006 &VIRTIO_ADMIN_CMD_LQ_NOTIFY_QUERY& Read the queue +notification offset for legacy interface \\ \hlineQuoted 6 lines
Could you avoid such drastic abbreviation in command names? Standard things like CMD,CFG are ok, but LCC/LD will not ring any bells for anyone, except maybe confusingly make one think of "C Compiler" and "Link eDitor".
Let's just LEGACY_COMMON_CFG/LEGACY_DEVICE_CFG?
Quoted 5 lines
It looked too long before abbreviating it.
Will change.
VIRTIO_ADMIN_CMD_LEGACY_COMMON_REG_READVIRTIO_ADMIN_CMD_LEGACY_DEV_REG_READ
I think you can drop _REG_ that does not really add any value and does not match anything in the spec. _CFG_ would make sense spec calls this common configuration and device configuration.
Signature · 6 lines
MST --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
[virtio-comment] RE: [PATCH v3 2/3] transport-pci: Introduce legacy registers access commands
Quoted 31 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, June 8, 2023 3:01 PMQuoted 5 lines · Parav Pandit
Quoted 5 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, June 8, 2023 2:34 PMQuoted 1 line
+0x0003 &
VIRTIO_ADMIN_CMD_LCC_REG_READ& Read legacycommon
Quoted 20 lines
Quoted 11 lines
configuration registers of a member device \\
Quoted 2 lines
+\hline
+0x0004 &VIRTIO_ADMIN_CMD_LD_REG_WRITE& Write legacy deviceregisters of a member device \\
Quoted 2 lines
+\hline
+0x0005 &VIRTIO_ADMIN_CMD_LD_REG_READ& Read legacy deviceregisters of a member device \\
Quoted 3 lines
+\hline
+0x0006 &VIRTIO_ADMIN_CMD_LQ_NOTIFY_QUERY& Read the queue +notification offset for legacy interface \\ \hlineQuoted 6 lines
Could you avoid such drastic abbreviation in command names? Standard things like CMD,CFG are ok, but LCC/LD will not ring any bells for anyone, except maybe confusingly make one think of "C Compiler" and "Link eDitor".
Let's just LEGACY_COMMON_CFG/LEGACY_DEVICE_CFG?It looked too long before abbreviating it.
Will change.
Quoted 6 lines
Quoted 2 lines
VIRTIO_ADMIN_CMD_LEGACY_COMMON_REG_READVIRTIO_ADMIN_CMD_LEGACY_DEV_REG_READI think you can drop _REG_ that does not really add any value and does not match anything in the spec. _CFG_ would make sense spec calls this common configuration and device configuration.
Ok.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
PATCH v3 3/3 transport-pci: Add legacy register access conformance section
In reply to Parav PanditAdd device and driver conformanace section for legacy registers access commands interface.
---
changelog:v2->v3:
- added normative lines for two additional commands
--- conformance.tex | 2 ++ transport-pci-legacy-regs.tex | 38 ++++++++++++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-)
conformance.tex +2 -0
@@ -109,6 +109,7 @@ \section{Conformance Targets}\label{sec:Conformance / Conformance Targets} \item \ref{drivernormative:Virtio Transport Options / Virtio Over PCI Bus / PCI Device Layout / PCI configuration access capability} \item \ref{drivernormative:Virtio Transport Options / Virtio Over PCI Bus / PCI-specific Initialization And Device Operation / Device Initialization / MSI-X Vector Configuration} \item \ref{drivernormative:Virtio Transport Options / Virtio Over PCI Bus / PCI-specific Initialization And Device Operation / Notification of Device Configuration Changes} +\item \ref{drivernormative:Virtio Transport Options / Virtio Over PCI Bus / Legacy Interfaces: SR-IOV VFs Registers Access} \end{itemize} \conformance{\subsection}{MMIO Driver Conformance}\label{sec:Conformance / Driver Conformance / MMIO Driver Conformance}
@@ -194,6 +195,7 @@ \section{Conformance Targets}\label{sec:Conformance / Conformance Targets} \item \ref{devicenormative:Virtio Transport Options / Virtio Over PCI Bus / PCI-specific Initialization And Device Operation / Device Initialization / MSI-X Vector Configuration} \item \ref{devicenormative:Virtio Transport Options / Virtio Over PCI Bus / PCI-specific Initialization And Device Operation / Used Buffer Notifications} \item \ref{devicenormative:Virtio Transport Options / Virtio Over PCI Bus / PCI-specific Initialization And Device Operation / Notification of Device Configuration Changes} +\item \ref{devicenormative:Virtio Transport Options / Virtio Over PCI Bus / Legacy Interfaces: SR-IOV VFs Registers Access} \end{itemize} \conformance{\subsection}{MMIO Device Conformance}\label{sec:Conformance / Device Conformance / MMIO Device Conformance}
transport-pci-legacy-regs.tex +37 -1
@@ -136,7 +136,7 @@ \subsubsection{Legacy Queue Notify Offset Query Command}\label{sec:Virtio Transp 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. +the VIRTIO_ADMIN_CMD_LCC_REG_WRITE command. \begin{note} The device and driver must encode and decode legacy device specific registers
@@ -151,3 +151,39 @@ \subsubsection{Legacy Queue Notify Offset Query Command}\label{sec:Virtio Transp interface I/O space BAR and passthrough other PCI BARs and PCI device capabilities to the guest virtual machine without any translation. \end{note} + +\devicenormative{\paragraph}{SR-IOV VFs Legacy Registers Access}{Virtio Transport Options / Virtio Over PCI Bus / Legacy Interfaces: SR-IOV VFs Registers Access} + +If the PCI PF device supports legacy registers access for its group members, +the device MUST set all corresponding bits for commands VIRTIO_ADMIN_CMD_LCC_REG_WRITE, +VIRTIO_ADMIN_CMD_LCC_REG_READ, VIRTIO_ADMIN_CMD_LD_REG_WRITE, +VIRTIO_ADMIN_CMD_LD_REG_READ and VIRTIO_ADMIN_CMD_LQ_NOTIFY_QUERY in +command result of VIRTIO_ADMIN_CMD_LIST_QUERY in +\field{device_admin_cmd_opcodes}. + +The device MUST encode and decode legacy device specific registers using +little-endian format. + +The device MUST fail VIRTIO_ADMIN_CMD_LCC_REG_WRITE, VIRTIO_ADMIN_CMD_LCC_REG_READ +commands for the invalid offset which is outside the legacy common configuration +register's address range. + +The device MUST fail VIRTIO_ADMIN_CMD_LD_REG_WRITE, VIRTIO_ADMIN_CMD_LD_REG_READ +commands for the invalid offset which is outside the legacy device specific +register's address range. + +The PCI VF device SHOULD NOT use PCI BAR 0 when it prefers to support +legacy interface registers access. + +\drivernormative{\paragraph}{SR-IOV VFs Legacy Registers Access}{Virtio Transport Options / Virtio Over PCI Bus / Legacy Interfaces: SR-IOV VFs Registers Access} + +The driver MUST encode and decode legacy device specific registers using +little-endian format. + +The driver SHOULD send commands VIRTIO_ADMIN_CMD_LCC_REG_WRITE and +VIRTIO_ADMIN_CMD_LCC_REG_READ with a valid offset which is in the legacy +common configuration registers address range. + +The driver SHOULD send commands VIRTIO_ADMIN_CMD_LD_REG_WRITE and +VIRTIO_ADMIN_CMD_LD_REG_READ with a valid offset which is in the legacy +device specific registers address range.
Signature · 6 lines
2.26.2 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Quoted 2 lines · Parav Pandit
This short series introduces legacy registers access commands for the owner group member PCI PF to access the legacy registers of the member VFs.
Note that some work will be needed here to fix up grammar and spelling mistakes.
Quoted 3 lines
If in future any SIOV devices to support legacy registers, they can be easily supported using same commands by using the group member identifiers of the future SIOV devices.
Yes, with the exception of VIRTIO_ADMIN_CMD_LQ_NOTIFY_QUERY - currently refers to VF BAR, subfunctions do not have it.
Can we find a way to have it in the PF BAR instead? E.g. the notification can include VF# + VQ#?
At least as an option?
If not can you add some info explaining why not?
Quoted 180 lines
More details as overview, motivation, use case are further described below.
Patch summary:
--------------
patch-1 split rows of admin opcode tables by a line patch-2 adds administrative virtuqueue commands patch-3 adds its conformance sectionThis short series is on top of latest work [1] from Michael. It uses the newly introduced administrative virtqueue facility with 3 new commands which uses the existing
virtio_admin_cmd.[1] https://lists.oasis-open.org/archives/virtio-comment/202305/msg00112.html
Usecase:
--------
1. A hypervisor/system needs to provide transitional virtio devices to the guest VM at scale of thousands, typically, one to eight devices per VM.2. A hypervisor/system needs to provide such devices using a vendor agnostic driver in the hypervisor system.
3. A hypervisor system prefers to have single stack regardless of virtio device type (net/blk) and be future compatible with a single vfio stack using SR-IOV or other scalable device virtualization technology to map PCI devices to the guest VM. (as transitional or otherwise)
Motivation/Background:
----------------------
The existing virtio transitional PCI device is missing support for PCI SR-IOV based devices. Currently it does not work beyond PCI PF, or as software emulated device in reality. Currently it has below cited system level limitations:[a] PCIe spec citation:
VFs do not support I/O Space and thus VF BARs shall not indicate I/O Space.[b] cpu arch citiation:
Intel 64 and IA-32 Architectures Software Developer’s Manual:
The processor’s I/O address space is separate and distinct from the physical-memory address space. The I/O address space consists of 64K individually addressable 8-bit I/O ports, numbered 0 through FFFFH.[c] PCIe spec citation:
If a bridge implements an I/O address range,...I/O address range will be aligned to a 4 KB boundary.Overview:
---------
Above usecase requirements can be solved by PCI PF group owner accessing its group member PCI VFs legacy registers using an admin virtqueue of the group owner PCI PF.Two new admin virtqueue commands are added which read/write PCI VF registers.
The third command suggested by Jason queries the VF device's driver notification region.
Software usage example:
-----------------------
One way to use and map to the guest VM is by using vfio driver framework in Linux kernel.+----------------------+ |pci_dev_id = 0x100X | +---------------|pci_rev_id = 0x0 |-----+ |vfio device |BAR0 = I/O region | | | |Other attributes | | | +----------------------+ | | | + +--------------+ +-----------------+ | | |I/O BAR to AQ | | Other vfio | | | |rd/wr mapper | | functionalities | | | +--------------+ +-----------------+ | | | +------+-------------------------+-----------+ | | | Driver notification | | | | +----+------------+ +----+------------+ | +-----+ | | PCI VF device A | | | AQ |-------------+---->+-------------+ | | +-----+ | | | | legacy regs | | | PCI PF device | | | +-------------+ | +-----------------+ | +-----------------+ | | +----+------------+ | | PCI VF device N | +---->+-------------+ | | | legacy regs | | | +-------------+ | +-----------------+2. Virtio pci driver to bind to the listed device id and use it as native device in the host.
3. Use it in a light weight hypervisor to run bare-metal OS.
Please review.
Alternatives considered:
========================
1. Exposing BAR0 as MMIO BAR that follows legacy registers template Pros:
a. Kind of works with legacy drivers as some of them have API
which is agnostic to MMIO vs IOBAR.
b. Does not require hypervisor intervantion
Cons:
a. Device reset is extremely hard to implement in device at scale as
driver does not wait for reset completion
b. Device register width related problems persist that hypervisor if
wishes, cannot fix it.2. Accessing VF registers by tunneling it through new legacy PCI capability Pros:
a. Self contained, but cannot work with future PCI SIOV devices Cons:
a. Equally slow as AQ access
b. Still requires new capability for notification accessconclusion for picking AQ approach:
==================================
1. Overall AQ based access is simpler to implement with combination of best from software and device so that legacy registers do not get baked in the device hardware
2. AQ allows hypervisor software to intercept legacy registers and make corrections if needed
3. Provides trade-off between performance, device complexity vs spec, while still maintaining passthrough mode for the VFs with minimal hypervisor intercepts only for legacy registers access
4. AQ mechanism is designed for accessing other member devices registers as noted in AQ submission, it utilizes the existing infrastructure over other alternatives.Signed-off-by Parav Pandit <[email protected]>---
changelog:v2->v3:
- added new patch to split raws of admin vq opcode table
- adddressed Jason and Michael's comment to split single register access command to common config and device specific commands.
- dropped the suggetion to introduce enable/disable command as
admin command cap bit already covers it.
- added other alternative design considered and discussed in detail in v0, v1 and v2
v1->v2:
- addressed comments from Michael
- added theory of operation
- grammar corrections
- removed group fields description from individual commands as it is already present in generic section
- added endianness normative for legacy device registers region
- renamed the file to drop vf and add legacy prefix
- added overview in commit log
- renamed subsection to reflect command
v0->v1:
- addressed comments, suggesetions and ideas from Michael Tsirkin and Jason Wang
- far more simpler design than MMR access
- removed complexities of MMR device ids
- removed complexities of MMR registers and extended capabilities
- dropped adding new extended capabilities because if if they are added, a pci device still needs to have existing capabilities
in the legacy configuration space and hypervisor driver do not need to access themParav Pandit (3):
admin: Split opcode table rows with a line
transport-pci: Introduce legacy registers access commands
transport-pci: Add legacy register access conformance section
Quoted 9 lines
admin.tex | 14 ++- conformance.tex | 2 + transport-pci-legacy-regs.tex | 189 ++++++++++++++++++++++++++++++++++ transport-pci.tex | 2 + 4 files changed, 206 insertions(+), 1 deletion(-) create mode 100644 transport-pci-legacy-regs.texSignature · 1 line
2.26.2
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 5 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 4, 2023 9:34 AM
Quoted 7 lines
Quoted 2 lines · Parav Pandit
This short series introduces legacy registers access commands for the owner group member PCI PF to access the legacy registers of the member VFs.
Note that some work will be needed here to fix up grammar and spelling mistakes.
I already verified using codespell but I guess it missed few. If you have specific already identified, let me know. If not I will run a different checker.
Quoted 7 lines
Quoted 3 lines
If in future any SIOV devices to support legacy registers, they can be easily supported using same commands by using the group member identifiers of the future SIOV devices.
Yes, with the exception of
VIRTIO_ADMIN_CMD_LQ_NOTIFY_QUERY- currently refers to VF BAR, subfunctions do not have it.
A subfunction will also have its own BAR carved out from the PF BAR. A subfunction definition will be as contains as possible.
Quoted 1 line
Can we find a way to have it in the PF BAR instead?
At subfution level also it will be a BAR number, which will map to the PF BAR.
Quoted 2 lines
E.g. the notification can include VF# + VQ#?
At least as an option?
No. we discussed this before to have each device on its own BAR. Hence no VF# in the doorbell.
Quoted 1 line
If not can you add some info explaining why not?
Yes, Good point.
I will add the commit log explanation that every VF has its own BAR hence it does not use PF BAR.
Quoted 6 lines · Parav Pandit
Quoted 6 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 4, 2023 9:34 AMOn Fri, Jun 02, 2023 at 11:36:01PM +0300, Parav Pandit wrote:
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
This short series introduces legacy registers access commands for the owner group member PCI PF to access the legacy registers of the member VFs.
Note that some work will be needed here to fix up grammar and spelling mistakes.
I already verified using codespell but I guess it missed few. If you have specific already identified, let me know.
I remember seeing something about a drier somewhere :)
Quoted 1 line
If not I will run a different checker.
Yea, pls check grammar too.
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
If in future any SIOV devices to support legacy registers, they can be easily supported using same commands by using the group member identifiers of the future SIOV devices.
Quoted 8 lines
Quoted 3 lines
Yes, with the exception of
VIRTIO_ADMIN_CMD_LQ_NOTIFY_QUERY- currently refers to VF BAR, subfunctions do not have it.A subfunction will also have its own BAR carved out from the PF BAR. A subfunction definition will be as contains as possible.
Quoted 1 line
Can we find a way to have it in the PF BAR instead?
At subfution level also it will be a BAR number, which will map to the PF BAR.
exactly. why not support this for PF too?
Quoted 3 lines
Quoted 2 lines
E.g. the notification can include VF# + VQ#?
At least as an option?No. we discussed this before to have each device on its own BAR. Hence no VF# in the doorbell.
you said that you want it but without much in the way of explanation. I'm still not convinced it's a workable interface. Will it help if I get some feedback from windows driver team on the design?
Quoted 3 lines
Quoted 1 line
If not can you add some info explaining why not?
Yes, Good point.
I will add the commit log explanation that every VF has its own BAR hence it does not use PF BAR.
Signature · 18 lines
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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
Quoted 15 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 4, 2023 9:56 AMQuoted 8 lines · Parav Pandit
Quoted 8 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 4, 2023 9:34 AMQuoted 2 lines · Parav Pandit
This short series introduces legacy registers access commands for the owner group member PCI PF to access the legacy registers of the
member VFs.
Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Note that some work will be needed here to fix up grammar and spelling mistakes.
I already verified using codespell but I guess it missed few. If you have specific already identified, let me know.
I remember seeing something about a drier somewhere :)
Yes. I will fix it.
Quoted 4 lines
Quoted 1 line
If not I will run a different checker.
Yea, pls check grammar too.
Ok.
Quoted 15 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
If in future any SIOV devices to support legacy registers, they can be easily supported using same commands by using the group member identifiers of the future SIOV devices.
Quoted 8 lines
Quoted 3 lines
Yes, with the exception of
VIRTIO_ADMIN_CMD_LQ_NOTIFY_QUERY- currently refers to VF BAR, subfunctions do not have it.A subfunction will also have its own BAR carved out from the PF BAR. A subfunction definition will be as contains as possible.
Quoted 1 line
Can we find a way to have it in the PF BAR instead?
At subfution level also it will be a BAR number, which will map to the PF BAR.
exactly. why not support this for PF too?
Quoted 7 lines
Quoted 3 lines
Quoted 2 lines
E.g. the notification can include VF# + VQ#?
At least as an option?No. we discussed this before to have each device on its own BAR. Hence no
VF# in the doorbell.
you said that you want it but without much in the way of explanation. I'm still not convinced it's a workable interface.
You said "AQ is just fine" in v2, this is contradictory to what you write above. We cannot progress with dual comments like this.
Quoted 3 lines
Will it help if I get some feedback from
windows driver team on the design?
May be. I am not sure, given that these drivers are not inbox, they are not in purview of the OS vendor. And OS vendor improves the OS APIs in the future for new use cases.
Even the SR-IOV model in Windows is not elaborate as Linux AFAIK. So I am not sure how much value add we will have.
But sure, better to have their view.
Will you please add them to the discussion here or I should check?
Did anyone use vdpa acceleration on Windows?
Do you have data points that someone wants VF acceleration on Windows hypervisor?
If you bring the use case, I would like to see there commitment to develop the code also and it will be great to have virtio there.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 23 lines · Parav Pandit
Quoted 15 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 4, 2023 9:56 AMQuoted 8 lines · Parav Pandit
Quoted 8 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 4, 2023 9:34 AMQuoted 2 lines · Parav Pandit
This short series introduces legacy registers access commands for the owner group member PCI PF to access the legacy registers of the
member VFs.
Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Note that some work will be needed here to fix up grammar and spelling mistakes.
I already verified using codespell but I guess it missed few. If you have specific already identified, let me know.
I remember seeing something about a drier somewhere :)
Quoted 27 lines
Yes. I will fix it.
Quoted 4 lines
Quoted 1 line
If not I will run a different checker.
Yea, pls check grammar too.
Ok.
Quoted 19 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
If in future any SIOV devices to support legacy registers, they can be easily supported using same commands by using the group member identifiers of the future SIOV devices.
Quoted 8 lines
Quoted 3 lines
Yes, with the exception of
VIRTIO_ADMIN_CMD_LQ_NOTIFY_QUERY- currently refers to VF BAR, subfunctions do not have it.A subfunction will also have its own BAR carved out from the PF BAR. A subfunction definition will be as contains as possible.
Quoted 1 line
Can we find a way to have it in the PF BAR instead?
At subfution level also it will be a BAR number, which will map to the PF BAR.
exactly. why not support this for PF too?
Quoted 3 lines
Quoted 2 lines
E.g. the notification can include VF# + VQ#?
At least as an option?No. we discussed this before to have each device on its own BAR. Hence no
VF# in the doorbell.
doorbell == available notification? yes in fact it's not strictly needed since PF can use a different address for each VF.
Quoted 5 lines
Quoted 3 lines
you said that you want it but without much in the way of explanation. I'm still not convinced it's a workable interface.
You said "AQ is just fine" in v2, this is contradictory to what you write above. We cannot progress with dual comments like this.
I am talking about the idea of exposing legacy VQ notifications in the PF BAR. To me it looks nicely symmetrical, all legacy emulation goes through PF, and I think it simplifies a bunch of driver code moving some complexity into hardware which is what you seem to be intent on?
Quoted 4 lines
Quoted 3 lines
Will it help if I get some feedback from
windows driver team on the design?May be. I am not sure, given that these drivers are not inbox, they are not in purview of the OS vendor.
Exactly a reason we might not see new APIs?
Quoted 6 lines
And OS vendor improves the OS APIs in the future for new use cases.
Even the SR-IOV model in Windows is not elaborate as Linux AFAIK. So I am not sure how much value add we will have.
But sure, better to have their view.
Will you please add them to the discussion here or I should check?
I don't think they are subscribed to the list, so I can't. Will talk to them.
Quoted 3 lines
Did anyone use vdpa acceleration on Windows?
Do you have data points that someone wants VF acceleration on Windows hypervisor?
If you bring the use case, I would like to see there commitment to develop the code also and it will be great to have virtio there.
We are talking about an interface that will be used tens of years from now. If the interface is awkward to use on some platforms let's make it easier not hide behind excuses of no demand to fix it as of last Friday. Device vendors can choose not to support some platforms, that is their decision. As a compromise, consider device exposing this both in a PF and in a VF and let's allow driver to use what's most convenient?
Signature · 18 lines
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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
Quoted 5 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 4, 2023 10:23 AM
Quoted 9 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
E.g. the notification can include VF# + VQ#?
At least as an option?No. we discussed this before to have each device on its own BAR. Hence no
VF# in the doorbell.
doorbell == available notification? yes in fact it's not strictly needed since PF can use a different address for each VF.
Sorry for doorbell terminology.
Yes, available buffer notification.
Quoted 6 lines
I am talking about the idea of exposing legacy VQ notifications in the PF BAR. To me it looks nicely symmetrical, all legacy emulation goes through PF, and I think it simplifies a bunch of driver code moving some complexity into hardware which is what you seem to be intent on?
Symmetrical only looks fine in emails.
In real device, it doesn't. We also discussed this before. I will capture this in alternatives section of v4.
Each VF has its own available buffer notification in hardware like 1.x.
We do not want to duplicate (and add) such functionality on the PF BAR hardware when it already exists on the VF.
Quoted 8 lines
Quoted 4 lines
Quoted 3 lines
Will it help if I get some feedback from windows driver team on the design?
May be. I am not sure, given that these drivers are not inbox, they are not in
purview of the OS vendor.
Exactly a reason we might not see new APIs?
I don't know.
Quoted 10 lines
Quoted 6 lines
And OS vendor improves the OS APIs in the future for new use cases.
Even the SR-IOV model in Windows is not elaborate as Linux AFAIK. So I am not sure how much value add we will have.
But sure, better to have their view.
Will you please add them to the discussion here or I should check?I don't think they are subscribed to the list, so I can't. Will talk to them.
Ok.
Quoted 9 lines
Quoted 2 lines
Did anyone use vdpa acceleration on Windows?
Do you have data points that someone wants VF acceleration on Windowshypervisor?
Quoted 1 line
If you bring the use case, I would like to see there commitment to develop the
code also and it will be great to have virtio there.
We are talking about an interface that will be used tens of years from now. If the interface is awkward to use on some platforms let's make it easier not hide behind excuses of no demand to fix it as of last Friday.
It is not hiding.
The fact that virtio drivers are not inbox. I don't see an actual user by the OS vendor for the decade passed.
And, I do not anticipate use of legacy for tens of years from now.
It is not even a conclusion that it is awkward to use.
You are concluding that one OS may never want to evolve their kernel APIs.
I don't see it that way.
We have seen with two hypervisors evolving their kernel APIs and both have large deployments.
I am not pessimistic that 3rd OS vendor will not evolve.
Quoted 4 lines
Device vendors can choose not to support some platforms, that is their decision. As a compromise, consider device exposing this both in a PF and in a VF and let's allow driver to use what's most convenient?
I also said yes, for this and you said "lets do one way".
So, when a 2nd OS vendor cannot use IPR scheme that they have, and they MUST have everything through ONLY VF, to support them, a HW vendor will build PCI device with VF legacy access registers stay in the VF. And spec update will be done.
We really don't see this happening. So better to build a practical spec.
And if this was important, I am still puzzled why you say "Just AQ is fine" in v2 and why you wait for next 2 weeks for v3 to show up to raise the concern now contradicting your ACK.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Quoted 23 lines · Parav Pandit
Quoted 5 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 4, 2023 10:23 AMQuoted 9 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
E.g. the notification can include VF# + VQ#?
At least as an option?No. we discussed this before to have each device on its own BAR. Hence no
VF# in the doorbell.
doorbell == available notification? yes in fact it's not strictly needed since PF can use a different address for each VF.
Sorry for doorbell terminology.
Yes, available buffer notification.Quoted 6 lines
I am talking about the idea of exposing legacy VQ notifications in the PF BAR. To me it looks nicely symmetrical, all legacy emulation goes through PF, and I think it simplifies a bunch of driver code moving some complexity into hardware which is what you seem to be intent on?
Quoted 6 lines
Symmetrical only looks fine in emails.
In real device, it doesn't. We also discussed this before. I will capture this in alternatives section of v4.Each VF has its own available buffer notification in hardware like 1.x.
We do not want to duplicate (and add) such functionality on the PF BAR hardware when it already exists on the VF.
yes but here we are talking about legacy notifications, not 1.x
Quoted 9 lines
Quoted 8 lines
Quoted 4 lines
Quoted 3 lines
Will it help if I get some feedback from windows driver team on the design?
May be. I am not sure, given that these drivers are not inbox, they are not in
purview of the OS vendor.
Exactly a reason we might not see new APIs?
I don't know.
Exactly.
Quoted 15 lines
Quoted 10 lines
Quoted 6 lines
And OS vendor improves the OS APIs in the future for new use cases.
Even the SR-IOV model in Windows is not elaborate as Linux AFAIK. So I am not sure how much value add we will have.
But sure, better to have their view.
Will you please add them to the discussion here or I should check?I don't think they are subscribed to the list, so I can't. Will talk to them.
Ok.
Quoted 3 lines
Quoted 2 lines
Did anyone use vdpa acceleration on Windows?
Do you have data points that someone wants VF acceleration on Windowshypervisor?
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
If you bring the use case, I would like to see there commitment to develop the
code also and it will be great to have virtio there.
We are talking about an interface that will be used tens of years from now. If the interface is awkward to use on some platforms let's make it easier not hide behind excuses of no demand to fix it as of last Friday.
It is not hiding.
The fact that virtio drivers are not inbox. I don't see an actual user by the OS vendor for the decade passed.
But why does it matter? There are a bunch of users of virtio, I know that.
Quoted 4 lines
And, I do not anticipate use of legacy for tens of years from now.
It is not even a conclusion that it is awkward to use.
You are concluding that one OS may never want to evolve their kernel APIs.
They might. That takes many years too.
Quoted 9 lines
I don't see it that way.
We have seen with two hypervisors evolving their kernel APIs and both have large deployments.I am not pessimistic that 3rd OS vendor will not evolve.
Quoted 4 lines
Device vendors can choose not to support some platforms, that is their decision. As a compromise, consider device exposing this both in a PF and in a VF and let's allow driver to use what's most convenient?
Quoted 8 lines
I also said yes, for this and you said "lets do one way".
So, when a 2nd OS vendor cannot use IPR scheme that they have, and they MUST have everything through ONLY VF, to support them, a HW vendor will build PCI device with VF legacy access registers stay in the VF. And spec update will be done.
We really don't see this happening. So better to build a practical spec.
And if this was important, I am still puzzled why you say "Just AQ is fine" in v2 and why you wait for next 2 weeks for v3 to show up to raise the concern now contradicting your ACK.
Because this is just AQ. All I am asking is that the BAR refers to PF, same AQ command.
Signature · 18 lines
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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
Quoted 11 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 4, 2023 10:54 AMQuoted 2 lines
Each VF has its own available buffer notification in hardware like 1.x. We do not want to duplicate (and add) such functionality on the PF BAR
hardware when it already exists on the VF.
yes but here we are talking about legacy notifications, not 1.x
Legacy can utilize the 1.x hw plumbing without building new hypothetical PF hardware.
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
We are talking about an interface that will be used tens of years from now. If the interface is awkward to use on some platforms let's make it easier not hide behind excuses of no demand to fix it as of last
Friday.
Quoted 2 lines
It is not hiding.
The fact that virtio drivers are not inbox. I don't see an actual user by the OSvendor for the decade passed.
Quoted 9 lines
But why does it matter? There are a bunch of users of virtio, I know that.
Quoted 4 lines
And, I do not anticipate use of legacy for tens of years from now.
It is not even a conclusion that it is awkward to use.
You are concluding that one OS may never want to evolve their kernel APIs.They might. That takes many years too.
By that time legacy may not be even a use case for them.
If an OS vendor evolves slowly compare to other two OS, such OS may have to change their process, not the virtio-spec.
Quoted 5 lines
Quoted 1 line
So, when a 2nd OS vendor cannot use IPR scheme that they have, and they
MUST have everything through ONLY VF, to support them, a HW vendor will build PCI device with VF legacy access registers stay in the VF.
Quoted 2 lines
And spec update will be done.
Quoted 8 lines
Quoted 3 lines
We really don't see this happening. So better to build a practical spec.
And if this was important, I am still puzzled why you say "Just AQ is fine" in v2
and why you wait for next 2 weeks for v3 to show up to raise the concern now contradicting your ACK.
Because this is just AQ. All I am asking is that the BAR refers to PF, same AQ command.
VF has BAR for driver notifications. This BAR is used for 1.x and legacy.
There is no need to ask vendors to build new HW to put driver notifications on the PF BAR for VFs, when it already exists on the VF.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 5 lines · Parav Pandit
Quoted 4 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 4, 2023 10:54 AM
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
Each VF has its own available buffer notification in hardware like 1.x. We do not want to duplicate (and add) such functionality on the PF BAR
hardware when it already exists on the VF.
yes but here we are talking about legacy notifications, not 1.x
Legacy can utilize the 1.x hw plumbing without building new hypothetical PF hardware.
Maybe.
Whether 1.x BAR can be reused for legacy would depend on a bunch of factors. E.g. with 1.x using VIRTIO_F_NOTIF_CONFIG_DATA - probably not.
Quoted 12 lines
Quoted 12 lines
Quoted 3 lines
Quoted 3 lines
We are talking about an interface that will be used tens of years from now. If the interface is awkward to use on some platforms let's make it easier not hide behind excuses of no demand to fix it as of last
Friday.
Quoted 2 lines
It is not hiding.
The fact that virtio drivers are not inbox. I don't see an actual user by the OSvendor for the decade passed.
But why does it matter? There are a bunch of users of virtio, I know that.
Quoted 2 lines
And, I do not anticipate use of legacy for tens of years from now.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
It is not even a conclusion that it is awkward to use.
You are concluding that one OS may never want to evolve their kernel APIs.They might. That takes many years too.
By that time legacy may not be even a use case for them.
If an OS vendor evolves slowly compare to other two OS, such OS may have to change their process, not the virtio-spec.
Let's just say, we are not in the position where we dictate these things to OS vendors yet. One of motivations of the spec is making writing drivers easier so let's add an option for that pls.
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
So, when a 2nd OS vendor cannot use IPR scheme that they have, and they
MUST have everything through ONLY VF, to support them, a HW vendor will build PCI device with VF legacy access registers stay in the VF.
Quoted 4 lines
And spec update will be done.
We really don't see this happening. So better to build a practical spec.
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
And if this was important, I am still puzzled why you say "Just AQ is fine" in v2
and why you wait for next 2 weeks for v3 to show up to raise the concern now contradicting your ACK.
Because this is just AQ. All I am asking is that the BAR refers to PF, same AQ command.
VF has BAR for driver notifications. This BAR is used for 1.x and legacy.
But it's the same piece of silicon - be it in PF or in VF. I really don't see why it matters.
Quoted 1 line
There is no need to ask vendors to build new HW to put driver notifications on the PF BAR for VFs, when it already exists on the VF.
I'm talking about giving vendors an option not asking them.
Signature · 18 lines
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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
Quoted 5 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 4, 2023 5:49 PM
Quoted 7 lines
Quoted 1 line
Legacy can utilize the 1.x hw plumbing without building new hypothetical PF
hardware.
Maybe.
Whether 1.x BAR can be reused for legacy would depend on a bunch of factors. E.g. with 1.x usingVIRTIO_F_NOTIF_CONFIG_DATA- probably not.
Not really because legacy doesn't have that feature. Legacy notifications are subset of 1.x feature. This was also discussed.
Quoted 4 lines
Let's just say, we are not in the position where we dictate these things to OS vendors yet. One of motivations of the spec is making writing drivers easier so let's add an option for that pls.
There is no need to add multiple options at this point when the hw vendors are not going to implement. When we find another vendor to implement, we can always add the new method.
Marvell and Nvidia both are forwarding with AQ at present proposal.
Quoted 5 lines
Quoted 1 line
VF has BAR for driver notifications. This BAR is used for 1.x and legacy.
But it's the same piece of silicon - be it in PF or in VF. I really don't see why it matters.
In same piece of silicon one needs to open yet another PCI steering entry to tell that treat this for VF. This double size programming is useless.
Yet again we are discussing same point as before.
Quoted 4 lines
Quoted 1 line
There is no need to ask vendors to build new HW to put driver notifications
on the PF BAR for VFs, when it already exists on the VF. I'm talking about giving vendors an option not asking them.
Ok. Understood.
When a vendor prefers to implement such cross hw forwarding it can be done.
There isn't a desire to burn and program extra hw for functionality that already exists on the VF. Hence, VF's doorbell on PF can be parked for the future option when one actually wants to implement it.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 8 lines · Parav Pandit
Quoted 8 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 4, 2023 5:49 PMQuoted 1 line
Legacy can utilize the 1.x hw plumbing without building new hypothetical PF
hardware.
Quoted 7 lines
Quoted 4 lines
Maybe.
Whether 1.x BAR can be reused for legacy would depend on a bunch of factors. E.g. with 1.x usingVIRTIO_F_NOTIF_CONFIG_DATA- probably not.Not really because legacy doesn't have that feature. Legacy notifications are subset of 1.x feature. This was also discussed.
So for legacy such hardware will likely not want to use the same BAR.
Quoted 18 lines
Quoted 4 lines
Let's just say, we are not in the position where we dictate these things to OS vendors yet. One of motivations of the spec is making writing drivers easier so let's add an option for that pls.
There is no need to add multiple options at this point when the hw vendors are not going to implement. When we find another vendor to implement, we can always add the new method.
Marvell and Nvidia both are forwarding with AQ at present proposal.Quoted 5 lines
Quoted 1 line
VF has BAR for driver notifications. This BAR is used for 1.x and legacy.
But it's the same piece of silicon - be it in PF or in VF. I really don't see why it matters.
In same piece of silicon one needs to open yet another PCI steering entry to tell that treat this for VF. This double size programming is useless.
Yet again we are discussing same point as before.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
There is no need to ask vendors to build new HW to put driver notifications
on the PF BAR for VFs, when it already exists on the VF. I'm talking about giving vendors an option not asking them.
Ok. Understood.
When a vendor prefers to implement such cross hw forwarding it can be done.
There isn't a desire to burn and program extra hw for functionality that already exists on the VF. Hence, VF's doorbell on PF can be parked for the future option when one actually wants to implement it.
I reached out to windows team to know how big a problem this is. Let's see.
I have another idea meanwhile: VF already has notification capability. The only issue is offset has to be queried through modern BAR. How about we agree that for legacy, we just agree that offset 0 is used? Does not sound like a big sacrifice of memory to me, and we completely avoid the new command and the need to tie PF and VF.
Signature · 6 lines
MST --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Quoted 3 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Monday, June 5, 2023 1:52 AM
[..]
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
E.g. with 1.x using
VIRTIO_F_NOTIF_CONFIG_DATA- probably not.Not really because legacy doesn't have that feature. Legacy notifications are subset of 1.x feature. This was also discussed.
So for legacy such hardware will likely not want to use the same BAR.
I don't follow this comment in conjunction with your below comment about offset 0. If we consider offset 0, legacy will use the same notification area as 1.x, right? So I am confused on "hardware don't want to use the same "BAR".
Quoted 27 lines
Quoted 6 lines
Quoted 5 lines
Let's just say, we are not in the position where we dictate these things to OS vendors yet. One of motivations of the spec is making writing drivers easier so let's add an option for that pls.
There is no need to add multiple options at this point when the hw vendors
are not going to implement.
Quoted 1 line
When we find another vendor to implement, we can always add the new
method.
Quoted 8 lines
Marvell and Nvidia both are forwarding with AQ at present proposal.
Quoted 5 lines
Quoted 1 line
VF has BAR for driver notifications. This BAR is used for 1.x and legacy.
But it's the same piece of silicon - be it in PF or in VF. I really don't see why it matters.
In same piece of silicon one needs to open yet another PCI steering entry to
tell that treat this for VF.
Quoted 9 lines
This double size programming is useless.
Yet again we are discussing same point as before.
Quoted 5 lines
Quoted 2 lines
There is no need to ask vendors to build new HW to put driver notifications
on the PF BAR for VFs, when it already exists on the VF. I'm talking about giving vendors an option not asking them.
Quoted 10 lines
Quoted 3 lines
Ok. Understood.
When a vendor prefers to implement such cross hw forwarding it can be done. There isn't a desire to burn and program extra hw for functionality thatalready exists on the VF.
Quoted 1 line
Hence, VF's doorbell on PF can be parked for the future option when one
actually wants to implement it.
I reached out to windows team to know how big a problem this is. Let's see.
Ok. Linux didn't had multi-function driver support and infra was added.
So even if the facility may not be there, or if the current IPR facility they may not want to use,
In future OS vendor itself can provide the new APIs. I certainly don't see being blocked on this.
But good to get feedback on there current state of OS.
Quoted 5 lines
I have another idea meanwhile: VF already has notification capability. The only issue is offset has to be queried through modern BAR. How about we agree that for legacy, we just agree that offset 0 is used? Does not sound like a big sacrifice of memory to me, and we completely avoid the new command and the need to tie PF and VF.
It will not work for the SIOV which shouldn't replicate this capability (and some other cap) so many times, are you ok with it?
Can you explain the motivation of : why querying notification offset via the group member PF is a problem, if there is." I don't see a problem with AQ that covers VF,SF/SIOV for legacy.
Proposed AQ command is cheap and covers both VF, SF/SIOV.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 11 lines · Parav Pandit
Quoted 3 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Monday, June 5, 2023 1:52 AM[..]
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
E.g. with 1.x using
VIRTIO_F_NOTIF_CONFIG_DATA- probably not.Not really because legacy doesn't have that feature. Legacy notifications are subset of 1.x feature. This was also discussed.
Quoted 5 lines
Quoted 2 lines
So for legacy such hardware will likely not want to use the same BAR.
I don't follow this comment in conjunction with your below comment about offset 0. If we consider offset 0, legacy will use the same notification area as 1.x, right? So I am confused on "hardware don't want to use the same "BAR".
Never mind,
Quoted 45 lines
Quoted 27 lines
Quoted 6 lines
Quoted 5 lines
Let's just say, we are not in the position where we dictate these things to OS vendors yet. One of motivations of the spec is making writing drivers easier so let's add an option for that pls.
There is no need to add multiple options at this point when the hw vendors
are not going to implement.
Quoted 1 line
When we find another vendor to implement, we can always add the new
method.
Quoted 8 lines
Marvell and Nvidia both are forwarding with AQ at present proposal.
Quoted 5 lines
Quoted 1 line
VF has BAR for driver notifications. This BAR is used for 1.x and legacy.
But it's the same piece of silicon - be it in PF or in VF. I really don't see why it matters.
In same piece of silicon one needs to open yet another PCI steering entry to
tell that treat this for VF.
Quoted 9 lines
This double size programming is useless.
Yet again we are discussing same point as before.
Quoted 5 lines
Quoted 2 lines
There is no need to ask vendors to build new HW to put driver notifications
on the PF BAR for VFs, when it already exists on the VF. I'm talking about giving vendors an option not asking them.
Quoted 10 lines
Quoted 3 lines
Ok. Understood.
When a vendor prefers to implement such cross hw forwarding it can be done. There isn't a desire to burn and program extra hw for functionality thatalready exists on the VF.
Quoted 1 line
Hence, VF's doorbell on PF can be parked for the future option when one
actually wants to implement it.
I reached out to windows team to know how big a problem this is. Let's see.
Ok. Linux didn't had multi-function driver support and infra was added.
So even if the facility may not be there, or if the current IPR facility they may not want to use,In future OS vendor itself can provide the new APIs. I certainly don't see being blocked on this.
But good to get feedback on there current state of OS.
Quoted 7 lines
Quoted 5 lines
I have another idea meanwhile: VF already has notification capability. The only issue is offset has to be queried through modern BAR. How about we agree that for legacy, we just agree that offset 0 is used? Does not sound like a big sacrifice of memory to me, and we completely avoid the new command and the need to tie PF and VF.
It will not work for the SIOV which shouldn't replicate this capability (and some other cap) so many times, are you ok with it?
Yes - SIOV has both command and BAR in the PF.
Quoted 1 line
Can you explain the motivation of : why querying notification offset via the group member PF is a problem, if there is."
I tried already, I can repeat if you like:
So, I am thinking of a model of using a tiny stub driver for the member. Control path driver is bigger as it operates AQ command, that would be the owner driver. E.g. for PCI this driver needs to map BAR offsets. Then it handles all data path for this member: driver and device notifications. It is clean and easy on all systems assuming you know offsets at device probe. But getting it in software from another driver (owner driver) is AFAIK tricky on some systems.
Generally solutions can be found, they can be more or less robust, and if systems designers have to overcome obstacles in implementing virtio they will just go to a competing interface as opposed to jump through hoops and work on extending either the OS or the virtio spec.
Yes I know your sales department tells you there's no demand for this feature on anything that is not linux/x86 and maybe arm, and maybe this means there won't ever be either, but let's just not raise this again can we? E.g. there was some interest from microsoft at some point, I think there was a reorg and that project died but hey you never know. Anyway, you asked I am trying to answer.
The cleanest way is just doing things consistently through one device. In this case for data path it has to be the VF, so let's just make this part simple and self contained.
Quoted 3 lines
I don't see a problem with AQ that covers VF,SF/SIOV for legacy.
Proposed AQ command is cheap and covers both VF, SF/SIOV.
Well for SIOV BAR has to be the owner BAR. This was exactly the reason I asked for this. If it's not to be I think this is my second preference:
no new command at all, and SIOV will come up with its own.
Signature · 6 lines
MST --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Quoted 10 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Monday, June 5, 2023 9:50 AMQuoted 1 line
Can you explain the motivation of : why querying notification offset via the
group member PF is a problem, if there is."
I tried already, I can repeat if you like:
So, I am thinking of a model of using a tiny stub driver for the member.
This is what is proposed here.
Quoted 2 lines
Control path driver is bigger as it operates AQ command, that would be the owner driver. E.g. for PCI this driver needs to map BAR offsets.
The bar belongs to the PCI VF and hence BAR mapping will be done by the VF tiny stub driver, aka vfio vf driver in this proposal. And control path driver provides the AQ facility to issue the commands for register read/write.
Quoted 5 lines
Then it handles all data path for this member: driver and device notifications. It is clean and easy on all systems assuming you know offsets at device probe. But getting it in software from another driver (owner driver) is AFAIK tricky on some systems.
We can assume that systems will eventually improve as multiple OS are improving one way or another.
Quoted 6 lines
Generally solutions can be found, they can be more or less robust, and if systems designers have to overcome obstacles in implementing virtio they will just go to a competing interface as opposed to jump through hoops and work on extending either the OS or the virtio spec.
Quoted 7 lines
Yes I know your sales department tells you there's no demand for this feature on anything that is not linux/x86 and maybe arm, and maybe this means there won't ever be either, but let's just not raise this again can we? E.g. there was some interest from microsoft at some point, I think there was a reorg and that project died but hey you never know.
Anyway, you asked I am trying to answer.
It is not the sales department. MS has zero virtio tc presence to show the interest.
MS has zero inbox driver to my knowledge without current feature.
Hence, the absence shows lack of interest and hence building something for them with pessimism that they will not extend is not right IMHO.
Quoted 1 line
The cleanest way is just doing things consistently through one device.
I would surely do that for all future devices which will be self-contained.
The cost of doing that for legacy is not worth the efforts.
And since we agree that read/write 4 commands are OK on the AQ, the 5th command is no exception to it.
We are not at the point of questioning the existence of 4 commands itself on AQ.
Quoted 3 lines
In this case for data path it has to be the VF, so let's just make this part simple and self contained.
So data path is on the VF to do driver notifications by the tiny stub vfio vf driver. It queries the PF driver when it wants to use AQ facility.
Quoted 8 lines
Quoted 4 lines
I don't see a problem with AQ that covers VF,SF/SIOV for legacy.
Proposed AQ command is cheap and covers both VF, SF/SIOV.
Well for SIOV BAR has to be the owner BAR. This was exactly the reason I asked for this. If it's not to be I think this is my second preference:
no new command at all, and SIOV will come up with its own.
So a AQ notify query command services both VF and PF. It always returns the BAR number for the own.
A PF would have delegated the window in the PF BAR to the SF/SIOV. And hence, this command is just fine like rest of the 4 commands.
(Linux already has SF accessing the PF dedicated BAR for more than 2 years for non virtio device).
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 41 lines · Parav Pandit
Quoted 10 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Monday, June 5, 2023 9:50 AMQuoted 1 line
Can you explain the motivation of : why querying notification offset via the
group member PF is a problem, if there is."
I tried already, I can repeat if you like:
So, I am thinking of a model of using a tiny stub driver for the member.
This is what is proposed here.
Quoted 2 lines
Control path driver is bigger as it operates AQ command, that would be the owner driver. E.g. for PCI this driver needs to map BAR offsets.
The bar belongs to the PCI VF and hence BAR mapping will be done by the VF tiny stub driver, aka vfio vf driver in this proposal. And control path driver provides the AQ facility to issue the commands for register read/write.
Quoted 5 lines
Then it handles all data path for this member: driver and device notifications. It is clean and easy on all systems assuming you know offsets at device probe. But getting it in software from another driver (owner driver) is AFAIK tricky on some systems.
We can assume that systems will eventually improve as multiple OS are improving one way or another.
Quoted 6 lines
Generally solutions can be found, they can be more or less robust, and if systems designers have to overcome obstacles in implementing virtio they will just go to a competing interface as opposed to jump through hoops and work on extending either the OS or the virtio spec.
Quoted 7 lines
Yes I know your sales department tells you there's no demand for this feature on anything that is not linux/x86 and maybe arm, and maybe this means there won't ever be either, but let's just not raise this again can we? E.g. there was some interest from microsoft at some point, I think there was a reorg and that project died but hey you never know.
Anyway, you asked I am trying to answer.It is not the sales department. MS has zero virtio tc presence to show the interest.
MS has zero inbox driver to my knowledge without current feature.
Hence, the absence shows lack of interest and hence building something for them with pessimism that they will not extend is not right IMHO.
Quoted 6 lines
Quoted 1 line
The cleanest way is just doing things consistently through one device.
I would surely do that for all future devices which will be self-contained.
The cost of doing that for legacy is not worth the efforts.
And since we agree that read/write 4 commands are OK on the AQ, the 5th command is no exception to it.We are not at the point of questioning the existence of 4 commands itself on AQ.
Yes I think these 4 are fine.
Quoted 5 lines
Quoted 3 lines
In this case for data path it has to be the VF, so let's just make this part simple and self contained.
So data path is on the VF to do driver notifications by the tiny stub vfio vf driver. It queries the PF driver when it wants to use AQ facility.
No. The VMM talks to either PF for config space or VF for data path.
Quoted 11 lines
Quoted 8 lines
Quoted 4 lines
I don't see a problem with AQ that covers VF,SF/SIOV for legacy.
Proposed AQ command is cheap and covers both VF, SF/SIOV.
Well for SIOV BAR has to be the owner BAR. This was exactly the reason I asked for this. If it's not to be I think this is my second preference:
no new command at all, and SIOV will come up with its own.So a AQ notify query command services both VF and PF. It always returns the BAR number for the own.
For the owner? owner of SRIOV group is PF, not VF.
Quoted 2 lines
A PF would have delegated the window in the PF BAR to the SF/SIOV. And hence, this command is just fine like rest of the 4 commands.
It would be fine if it could return PF BAR, but in your proposal it can't.
Quoted 1 line
(Linux already has SF accessing the PF dedicated BAR for more than 2 years for non virtio device).
What's the point of this discussion even? You ask some questions apparently to clarify what issue I'm trying to address. I try to clarify. You then turn around and say we agree, there's no issue, all of this does not matter, case closed. Whom do you expect to convince with this line of reasoning?
Signature · 6 lines
MST --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Quoted 9 lines
From: [email protected] <[email protected]> On Behalf Of Michael S. Tsirkin
Sent: Monday, June 5, 2023 5:57 PMQuoted 3 lines
I would surely do that for all future devices which will be self-contained. The cost of doing that for legacy is not worth the efforts.
And since we agree that read/write 4 commands are OK on the AQ, the 5th
Quoted 7 lines
command is no exception to it.
Quoted 2 lines
We are not at the point of questioning the existence of 4 commands itself on
AQ.
Yes I think these 4 are fine.
Ok. so we at least converge on it. :)
Quoted 2 lines
No. The VMM talks to either PF for config space or VF for data path.
Ok. than offset 0 for notification.
Quoted 10 lines
Quoted 2 lines
So a AQ notify query command services both VF and PF. It always returns the BAR number for the own.
For the owner? owner of SRIOV group is PF, not VF.
Quoted 2 lines
A PF would have delegated the window in the PF BAR to the SF/SIOV. And hence, this command is just fine like rest of the 4 commands.
It would be fine if it could return PF BAR, but in your proposal it can't.
Quoted 8 lines
Quoted 1 line
(Linux already has SF accessing the PF dedicated BAR for more than 2 years for
non virtio device).
What's the point of this discussion even? You ask some questions apparently to clarify what issue I'm trying to address. I try to clarify. You then turn around and say we agree, there's no issue, all of this does not matter, case closed. Whom do you expect to convince with this line of reasoning?
I really don't understand what you want to say.
What I explained above is for SF (not VF), you asked things for VF...
You suggested that tiny stub vfio driver to perform discovery of notification must be done only through the VF without explaining "why such rationale" when there is anyway VF-PF driver interaction for the AQ.
But anyway, we need to progress; since the notify offset of 0 is acceptable for legacy VF notifications as you suggest,
I will drop the 5th notify query command for now.
And add description to use the existing notify capability of VF with notify offset of 0 for legacy q notifications.
Rolling v4 now.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 1 line · Parav Pandit
Rolling v4 now.
Great thanks! I think the result will be in a good shape from the ABI point of view. Good job!
I think so far Jason was the only one with significant comments on the series so let's see what he says.
From my personal POV what will be left to do to get this feature ready for merging would be
- tightening the language:
- thinking of and addressing all kind of corner cases.
Since by now from our email discussions I have I think a decent understanding of how the feature is supposed to work I understand how these things work but I think there are still things that would be a bit unclear for an unprepared reader.
Just to give a random example, there's no explicit
time where the member kind of switches to the legacy/back to modern mode. I am guessing setting DRIVER bit through legacy interface does this. We'll want to list that.
I'll try to help find these issues and maybe even suggest wording.
I've delayed commenting on these until the high level design is agreed on, didn't want to make you waste time on polishing as the patches undergo significant changes, and I suggest you do the same in v4: let's make sure there's a wide agreement on the ABI then focus on the spec language.
Signature · 18 lines
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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
Quoted 10 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Tuesday, June 6, 2023 7:56 AMQuoted 1 line · Parav Pandit
Rolling v4 now.
Great thanks! I think the result will be in a good shape from the ABI point of view. Good job!
Thanks.
Quoted 6 lines
I think so far Jason was the only one with significant comments on the series so let's see what he says.
From my personal POV what will be left to do to get this feature ready for merging would be
Quoted 8 lines
- tightening the language:
- thinking of and addressing all kind of corner cases.Since by now from our email discussions I have I think a decent understanding of how the feature is supposed to work I understand how these things work but I think there are still things that would be a bit unclear for an unprepared reader.
Many aspects are covered in the cover letter.
Quoted 4 lines
Just to give a random example, there's no explicit time where the member kind of switches to the legacy/back to modern mode. I am guessing setting DRIVER bit through legacy interface does this. We'll want to list that.
Switch between the two is the same as today how a transitional device accesses both the register space. Hypervisor level vfio tiny stub driver is not involved in such switchover as today.
Quoted 2 lines
I'll try to help find these issues and maybe even suggest wording.
Sure. That will be great.
Quoted 4 lines
I've delayed commenting on these until the high level design is agreed on, didn't want to make you waste time on polishing as the patches undergo significant changes, and I suggest you do the same in v4: let's make sure there's a wide agreement on the ABI then focus on the spec language.
I agree, now that we agree on the design and ABI, lets polish above aspects you told in v4. I posted v4.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Quoted 9 lines · Michael S. Tsirkin
Quoted 1 line · Parav Pandit
Rolling v4 now.
Great thanks! I think the result will be in a good shape from the ABI point of view. Good job!
I think so far Jason was the only one with significant comments on the series so let's see what he says.
I can't say I like this. I prefer to do meditation on top of a modern device with some lightweight features like _F_LEAGCY_HEADER. I don't see any advantages of a new legacy ABI over _F_LEGACY_HEADER. I don't want to repeat but I don't get any response here
Quoted 6 lines
From my personal POV what will be left to do to get this feature ready for merging would be
- tightening the language:
- thinking of and addressing all kind of corner cases.
We need first to check whether it's possible (not too late) to find all the corner cases.
Thanks
Quoted 22 lines
Since by now from our email discussions I have I think a decent understanding of how the feature is supposed to work I understand how these things work but I think there are still things that would be a bit unclear for an unprepared reader.
Just to give a random example, there's no explicit
time where the member kind of switches to the legacy/back to modern mode. I am guessing setting DRIVER bit through legacy interface does this. We'll want to list that.I'll try to help find these issues and maybe even suggest wording.
I've delayed commenting on these until the high level design is agreed on, didn't want to make you waste time on polishing as the patches undergo significant changes, and I suggest you do the same in v4: let's make sure there's a wide agreement on the ABI then focus on the spec language.
Quoted 3 lines
--
MST
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Quoted 10 lines
From: Jason Wang <[email protected]>
Sent: Tuesday, June 6, 2023 10:27 PMI can't say I like this. I prefer to do meditation on top of a modern device with some lightweight features like
_F_LEAGCY_HEADER. I don't see any advantages of a new legacy ABI over_F_LEGACY_HEADER. I don't want to repeat but I don't get any response here
It is net only and not generic. Not a big blocker. It doesnt stop at _F_LEAGCY_HEADER.
Quoted 1 line
Anything that prevents you from adding things like
VIRTIO_NET_F_LEGACY_HEADER?
It requires hypervisor to mediate 1.x config region and intercept feature negotiation including q config and more.
Additionally, 1.x device says the mac address is read only, while legacy is RW. And that requires yet another feature bit negotiation.
The main design goal is to not mediate 1.x specific region and not modify 1.x region definitions. Which is why we step forward with the AQ.
Quoted 3 lines
https://lore.kernel.org/virtio-
dev/[email protected] mail.com/#t
Quoted 11 lines · Parav Pandit
Quoted 11 lines
From: Jason Wang <[email protected]>
Sent: Tuesday, June 6, 2023 10:27 PMI can't say I like this. I prefer to do meditation on top of a modern device with some lightweight features like
_F_LEAGCY_HEADER. I don't see any advantages of a new legacy ABI over_F_LEGACY_HEADER. I don't want to repeat but I don't get any response here
Quoted 5 lines
It is net only and not generic. Not a big blocker. It doesnt stop at
_F_LEAGCY_HEADER.Quoted 1 line
Anything that prevents you from adding things like
VIRTIO_NET_F_LEGACY_HEADER?It requires hypervisor to mediate 1.x config region and intercept feature negotiation including q config and more.
For config region, do you mean device configuration space or common config space?
I don't see why we need to do mediation on neiter of the above. Hypervisor just need to prepare
1) legacy BAR with legacy config and device configuration space and
2) modern BAR with modern capabilities (common cfg and device cfg)
For 2) it could be mapped directly to the modern capabilities. For 1) hypervisor needs to mediate
Quoted 3 lines
Additionally, 1.x device says the mac address is read only, while legacy is RW. And that requires yet another feature bit negotiation.
Hypervisor can trap the legacy device configuration space write and convert it to cvq commands.
Thanks
Quoted 7 lines
The main design goal is to not mediate 1.x specific region and not modify 1.x region definitions. Which is why we step forward with the AQ.
Quoted 3 lines
https://lore.kernel.org/virtio-
dev/[email protected] mail.com/#t
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Quoted 31 lines · Jason Wang
Quoted 11 lines · Parav Pandit
Quoted 11 lines
From: Jason Wang <[email protected]>
Sent: Tuesday, June 6, 2023 10:27 PMI can't say I like this. I prefer to do meditation on top of a modern device with some lightweight features like
_F_LEAGCY_HEADER. I don't see any advantages of a new legacy ABI over_F_LEGACY_HEADER. I don't want to repeat but I don't get any response hereQuoted 5 lines
It is net only and not generic. Not a big blocker. It doesnt stop at
_F_LEAGCY_HEADER.Quoted 1 line
Anything that prevents you from adding things like
VIRTIO_NET_F_LEGACY_HEADER?It requires hypervisor to mediate 1.x config region and intercept feature negotiation including q config and more.
For config region, do you mean device configuration space or common config space?
I don't see why we need to do mediation on neiter of the above. Hypervisor just need to prepare
1) legacy BAR with legacy config and device configuration space and
2) modern BAR with modern capabilities (common cfg and device cfg)For 2) it could be mapped directly to the modern capabilities. For 1) hypervisor needs to mediate
Quoted 1 line
Quoted 7 lines
Quoted 2 lines
Additionally, 1.x device says the mac address is read only, while legacy is RW. And that requires yet another feature bit negotiation.
Hypervisor can trap the legacy device configuration space write and convert it to cvq commands.
Thanks
Hypervisor really can't access cvq if guest is doing it too - that requires emulating cvq in software. And *that* is going to be broken for workloads such as confidential computing.
Quoted 7 lines
Quoted 7 lines
The main design goal is to not mediate 1.x specific region and not modify 1.x region definitions. Which is why we step forward with the AQ.
Quoted 3 lines
https://lore.kernel.org/virtio-
dev/[email protected] mail.com/#t
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Quoted 6 lines
From: Jason Wang <[email protected]>
Sent: Wednesday, June 7, 2023 2:54 AMHypervisor can trap the legacy device configuration space write and convert it to cvq commands.
Michael already answered that cvq is not trapped; this is the main design goal we talked several times that it is passthrough device.
So no point discussing this again.
If you have any comments on v4, please let me know.
Both the design points are addressed in v4.
1. To split to two commands for device and config area
2. Use pci cap to learn about notification region
Since this ABI reflects what we agree on,
I would want to raise for vote in coming days to be part of 1.3 in few days as we have more than 3 weeks to sort out non-ABI language part.
Quoted 10 lines · Parav Pandit
Quoted 6 lines
From: Jason Wang <[email protected]>
Sent: Wednesday, June 7, 2023 2:54 AMHypervisor can trap the legacy device configuration space write and convert it to cvq commands.
Michael already answered that cvq is not trapped; this is the main design goal we talked several times that it is passthrough device.
So no point discussing this again.
Quoted 8 lines
If you have any comments on v4, please let me know.
Both the design points are addressed in v4.
1. To split to two commands for device and config area
2. Use pci cap to learn about notification regionSince this ABI reflects what we agree on,
I would want to raise for vote in coming days to be part of 1.3 in few days as we have more than 3 weeks to sort out non-ABI language part.
I think there's a bunch of work to tighten wording in v4, don't believe it is ready for vote yet. Unfortunately I need to get ready for travel and then travel for the kvm forum, during this time I will try but I can't promise when I will be able to go over it in detail and send comments. Back June 20.
Signature · 18 lines
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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
Quoted 8 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, June 8, 2023 10:44 AMQuoted 2 lines
Since this ABI reflects what we agree on, I would want to raise for vote in coming days to be part of 1.3 in few days as we have more than 3
weeks to sort out non-ABI language part.
I think there's a bunch of work to tighten wording in v4, don't believe it is ready for vote yet.
3rd patch has the conformance section.
Rest of the legacy interface semantics are just same as today.
We are not fixing the legacy interface itself, so not sure what to tighten specifically.
Quoted 3 lines
Unfortunately I need to get ready for travel and then travel for the kvm forum, during this time I will try but I can't promise when I will be able to go over it in detail and send comments. Back June 20.
Ok. that will be really helpful. I will revise v5 as soon as you and others have comments.
Total line of spec line are < 200 lines including the 1st clean patch.
And changelog anyway precisely captures what changed so should not be too many reviews to me.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 11 lines · Parav Pandit
Quoted 8 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, June 8, 2023 10:44 AMQuoted 2 lines
Since this ABI reflects what we agree on, I would want to raise for vote in coming days to be part of 1.3 in few days as we have more than 3
weeks to sort out non-ABI language part.
I think there's a bunch of work to tighten wording in v4, don't believe it is ready for vote yet.
3rd patch has the conformance section.
Rest of the legacy interface semantics are just same as today.
We are not fixing the legacy interface itself, so not sure what to tighten specifically.
I'll do a proper review after the forum. Generally lots of small things. Went looking just to give you a couple of examples:
too many mentions of VFs and PFs.
text should talk about owner and member. Minimise mention of VFs to make it easier to extend to different group types.
another example:
+The PCI VF device SHOULD NOT expose PCI BAR 0 when it prefers to support
VFs don't expose BARs at all. PF exposes VF BARs in SRIOV capability.
Quoted 8 lines
Quoted 3 lines
Unfortunately I need to get ready for travel and then travel for the kvm forum, during this time I will try but I can't promise when I will be able to go over it in detail and send comments. Back June 20.
Ok. that will be really helpful. I will revise v5 as soon as you and others have comments.
Total line of spec line are < 200 lines including the 1st clean patch.
And changelog anyway precisely captures what changed so should not be too many reviews to me.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 19 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, June 8, 2023 11:04 AMQuoted 5 lines · Parav Pandit
Quoted 5 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, June 8, 2023 10:44 AMQuoted 3 lines
Since this ABI reflects what we agree on, I would want to raise for vote in coming days to be part of 1.3 in few days as we have more than 3
Quoted 7 lines
Quoted 4 lines
weeks to sort out non-ABI language part.
I think there's a bunch of work to tighten wording in v4, don't believe it is ready for vote yet.
3rd patch has the conformance section.
Rest of the legacy interface semantics are just same as today. We are not fixing the legacy interface itself, so not sure what to tightenspecifically.
Quoted 8 lines
I'll do a proper review after the forum. Generally lots of small things. Went looking just to give you a couple of
examples:
too many mentions of VFs and PFs.
text should talk about owner and member. Minimise mention of VFs to make it easier to extend to
different group types.
True but most additions are in PCI transport chapter. But will change to member and owner.
Quoted 6 lines
another example:
+The PCI VF device SHOULD NOT expose PCI BAR 0 when it prefers to
supportVFs don't expose BARs at all. PF exposes VF BARs in SRIOV capability.
Yes, it is exposed by PF, the wording of "PCI VF device exposing" is not right. I will reword it.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 30 lines · Parav Pandit
Quoted 19 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, June 8, 2023 11:04 AMQuoted 5 lines · Parav Pandit
Quoted 5 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, June 8, 2023 10:44 AMQuoted 3 lines
Since this ABI reflects what we agree on, I would want to raise for vote in coming days to be part of 1.3 in few days as we have more than 3
Quoted 7 lines
Quoted 4 lines
weeks to sort out non-ABI language part.
I think there's a bunch of work to tighten wording in v4, don't believe it is ready for vote yet.
3rd patch has the conformance section.
Rest of the legacy interface semantics are just same as today. We are not fixing the legacy interface itself, so not sure what to tightenspecifically.
Quoted 8 lines
I'll do a proper review after the forum. Generally lots of small things. Went looking just to give you a couple of
examples:
too many mentions of VFs and PFs.
text should talk about owner and member. Minimise mention of VFs to make it easier to extend to
different group types.True but most additions are in PCI transport chapter. But will change to member and owner.
Quoted 8 lines
Quoted 6 lines
another example:
+The PCI VF device SHOULD NOT expose PCI BAR 0 when it prefers to
supportVFs don't expose BARs at all. PF exposes VF BARs in SRIOV capability.
Yes, it is exposed by PF, the wording of "PCI VF device exposing" is not right. I will reword it.
Note that this will then apply to all VFs of this PF, even those without legacy support. Still not sure why it's SHOULD not a MUST. So that driver actually checks, but it's ok to fail if the rule is not followed maybe? In that case add a driver normative statement too.
Signature · 6 lines
MST --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Quoted 40 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, June 8, 2023 2:03 PMQuoted 35 lines · Parav Pandit
Quoted 20 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, June 8, 2023 11:04 AMQuoted 5 lines · Parav Pandit
Quoted 5 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, June 8, 2023 10:44 AMQuoted 3 lines
Since this ABI reflects what we agree on, I would want to raise for vote in coming days to be part of 1.3 in few days as we have more than 3
Quoted 8 lines
Quoted 4 lines
weeks to sort out non-ABI language part.
I think there's a bunch of work to tighten wording in v4, don't believe it is ready for vote yet.
3rd patch has the conformance section.
Rest of the legacy interface semantics are just same as today. We are not fixing the legacy interface itself, so not sure what to tightenspecifically.
Quoted 8 lines
I'll do a proper review after the forum. Generally lots of small things. Went looking just to give you a couple of examples:
too many mentions of VFs and PFs.
text should talk about owner and member. Minimise mention of VFs to make it easier to extend to different group types.True but most additions are in PCI transport chapter. But will change to member and owner.
Quoted 4 lines
another example:
+The PCI VF device SHOULD NOT expose PCI BAR 0 when it prefers to
support
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
VFs don't expose BARs at all. PF exposes VF BARs in SRIOV capability.
Yes, it is exposed by PF, the wording of "PCI VF device exposing" is not right. I will reword it.
Note that this will then apply to all VFs of this PF, even those without legacy support. Still not sure why it's SHOULD not a MUST.
It applies to all the VFs, but it doesn't apply without legacy.
For example, if one wants to build a PCI VF device that doesn't want to support legacy, it can still be on BAR2 or BAR 4. This is fine.
Quoted 2 lines
So that driver actually checks, but it's ok to fail if the rule is not followed maybe? In that case add a driver normative statement too.
Yes.
I will add.
Change log and commit log already capture this, but in case you missed it,
v4 extended the struct virtio_pci_notify_cap with a boolean and removed the AQ notify query command as you suggested.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 27 lines · Parav Pandit
Quoted 19 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, June 8, 2023 11:04 AMQuoted 5 lines · Parav Pandit
Quoted 5 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, June 8, 2023 10:44 AMQuoted 3 lines
Since this ABI reflects what we agree on, I would want to raise for vote in coming days to be part of 1.3 in few days as we have more than 3
Quoted 7 lines
Quoted 4 lines
weeks to sort out non-ABI language part.
I think there's a bunch of work to tighten wording in v4, don't believe it is ready for vote yet.
3rd patch has the conformance section.
Rest of the legacy interface semantics are just same as today. We are not fixing the legacy interface itself, so not sure what to tightenspecifically.
Quoted 8 lines
I'll do a proper review after the forum. Generally lots of small things. Went looking just to give you a couple of
examples:
too many mentions of VFs and PFs.
text should talk about owner and member. Minimise mention of VFs to make it easier to extend to
different group types.
Quoted 2 lines
True but most additions are in PCI transport chapter. But will change to member and owner.
Another thing that bothers me is that it references admin commands that are defined later in the spec. I don't like it that we are making the reader jump back and forth ...
Maybe it's better to put this in the admin command chapter.
Quoted 8 lines
Quoted 6 lines
another example:
+The PCI VF device SHOULD NOT expose PCI BAR 0 when it prefers to
supportVFs don't expose BARs at all. PF exposes VF BARs in SRIOV capability.
Yes, it is exposed by PF, the wording of "PCI VF device exposing" is not right. I will reword it.
So here's an example wording, I don't insist on it exactly but the point is to show how we should use spec terminology whereever possible:
If an owner of an SRIOV group supports all of VIRTIO_ADMIN_CMD_LCC_REG_WRITE, VIRTIO_ADMIN_CMD_LCC_REG_READ .... then it SHOULD NOT
expose VF BAR0 (of non 0 size) as part of its SRIOV capability; this is to facilitate emulating IO BAR0 for the legacy interface in software.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 12 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, June 8, 2023 2:31 PMQuoted 8 lines
Quoted 8 lines
I'll do a proper review after the forum. Generally lots of small things. Went looking just to give you a couple of examples:
too many mentions of VFs and PFs.
text should talk about owner and member. Minimise mention of VFs to make it easier to extend to different group types.
Quoted 8 lines
Quoted 2 lines
True but most additions are in PCI transport chapter. But will change to member and owner.
Another thing that bothers me is that it references admin commands that are defined later in the spec. I don't like it that we are making the reader jump back and forth ...
Maybe it's better to put this in the admin command chapter.
I considered that before.
In its current form, there is very less back-n-forth jump. This is because admin chapter mostly enumerates the opcode.
And PCI legacy chapter talks about rest of the theory and command details.
When/if we have more transports for this, probably a generic place will be suitable.
Moving now to admin will surely have more back-n-forth as it needs to talk about PCI part and that PCI part will reside in PCI section.
Quoted 13 lines
Quoted 8 lines
Quoted 6 lines
another example:
+The PCI VF device SHOULD NOT expose PCI BAR 0 when it prefers to
supportVFs don't expose BARs at all. PF exposes VF BARs in SRIOV capability.
Yes, it is exposed by PF, the wording of "PCI VF device exposing" is not right. I will reword it.
So here's an example wording, I don't insist on it exactly but the point is to show how we should use spec terminology whereever
possible:
Quoted 6 lines
If an owner of an SRIOV group supports all of
VIRTIO_ADMIN_CMD_LCC_REG_WRITE,VIRTIO_ADMIN_CMD_LCC_REG_READ.... then it SHOULD NOT expose VF BAR0 (of non 0 size) as part of its SRIOV capability; this is to facilitate emulating IO BAR0 for the legacy interface in software.
Yes good one. Will use.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 24 lines · Parav Pandit
Quoted 12 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, June 8, 2023 2:31 PMQuoted 8 lines
Quoted 8 lines
I'll do a proper review after the forum. Generally lots of small things. Went looking just to give you a couple of examples:
too many mentions of VFs and PFs.
text should talk about owner and member. Minimise mention of VFs to make it easier to extend to different group types.Quoted 8 lines
Quoted 2 lines
True but most additions are in PCI transport chapter. But will change to member and owner.
Another thing that bothers me is that it references admin commands that are defined later in the spec. I don't like it that we are making the reader jump back and forth ...
Maybe it's better to put this in the admin command chapter.I considered that before.
In its current form, there is very less back-n-forth jump. This is because admin chapter mostly enumerates the opcode.
Quoted 5 lines
And PCI legacy chapter talks about rest of the theory and command details.
When/if we have more transports for this, probably a generic place will be suitable.
Moving now to admin will surely have more back-n-forth as it needs to talk about PCI part and that PCI part will reside in PCI section.
well the point is that it's *back" not *forth*.
IOW add the command description in admin chapter,
make it point to legacy description in pci chapter which reader has already read.
Quoted 13 lines
Quoted 13 lines
Quoted 8 lines
Quoted 6 lines
another example:
+The PCI VF device SHOULD NOT expose PCI BAR 0 when it prefers to
supportVFs don't expose BARs at all. PF exposes VF BARs in SRIOV capability.
Yes, it is exposed by PF, the wording of "PCI VF device exposing" is not right. I will reword it.
So here's an example wording, I don't insist on it exactly but the point is to show how we should use spec terminology whereever
possible:
Quoted 7 lines
Quoted 6 lines
If an owner of an SRIOV group supports all of
VIRTIO_ADMIN_CMD_LCC_REG_WRITE,VIRTIO_ADMIN_CMD_LCC_REG_READ.... then it SHOULD NOT expose VF BAR0 (of non 0 size) as part of its SRIOV capability; this is to facilitate emulating IO BAR0 for the legacy interface in software.Yes good one. Will use.
right and my point is try to word all of it like this.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Quoted 11 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, June 8, 2023 3:04 PMQuoted 1 line
Moving now to admin will surely have more back-n-forth as it needs to talk
about PCI part and that PCI part will reside in PCI section.
well the point is that it's *back" not *forth*.
IOW add the command description in admin chapter, make it point to legacy description in pci chapter which reader has already read.
There is no back-n forth today. Reader interested only reads the pci chapter. Only to know the opcode value in a common table it reads the admin chapter.
Putting command descriptions in the "basic facilities" without referring to transport will create back-n-forth, where reader needs to go to PCI chapter to understand the motivation. Come and to basic facilities and implement it.
When there are too many things common across all transports and very little changing across transport, placement in common place results in better reading. I find the opposite here.
Quoted 16 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
another example:
+The PCI VF device SHOULD NOT expose PCI BAR 0 when it prefers
to supportVFs don't expose BARs at all. PF exposes VF BARs in SRIOV capability.
Yes, it is exposed by PF, the wording of "PCI VF device exposing" is not
right.
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
I will reword it.
So here's an example wording, I don't insist on it exactly but the point is to show how we should use spec terminology whereever possible:
If an owner of an SRIOV group supports all of
VIRTIO_ADMIN_CMD_LCC_REG_WRITE,
Quoted 8 lines
VIRTIO_ADMIN_CMD_LCC_REG_READ....Quoted 5 lines
Quoted 4 lines
then it SHOULD NOT expose VF BAR0 (of non 0 size) as part of its SRIOV capability; this is to facilitate emulating IO BAR0 for the legacy interface in software.
Yes good one. Will use.
right and my point is try to word all of it like this.
Yes, as owner and group.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 8 lines · Parav Pandit
Quoted 7 lines
From: Jason Wang <[email protected]>
Sent: Wednesday, June 7, 2023 2:54 AMHypervisor can trap the legacy device configuration space write and convert it to cvq commands.
Michael already answered that cvq is not trapped; this is the main design goal we talked several times that it is passthrough device.
Is this really a blocker? Wouldn't a new feature(_F_LEFACY_MAC) or cap resolve this?
Quoted 10 lines
So no point discussing this again.
If you have any comments on v4, please let me know.
Both the design points are addressed in v4.
1. To split to two commands for device and config area
2. Use pci cap to learn about notification regionSince this ABI reflects what we agree on,
I think not since you fail to explain why this approach is better than simply adding new features like _F_LEGACY_HEADER and _F_LEGACY_MAC.
Thanks
Quoted 1 line
I would want to raise for vote in coming days to be part of 1.3 in few days as we have more than 3 weeks to sort out non-ABI language part.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Quoted 6 lines
From: Jason Wang <[email protected]>
Sent: Thursday, June 8, 2023 10:07 PMI think not since you fail to explain why this approach is better than simply adding new features like
_F_LEGACY_HEADERand_F_LEGACY_MAC.
Please refer back to the requirements of cover letter and multiple past discussions. And Michael also explained...
It is passthrough device, none of the 1.x objects are accessible or mediated by the hypervisor.
Cannot repeat more.
Quoted 5 lines · Parav Pandit
Quoted 4 lines
From: Jason Wang <[email protected]>
Sent: Thursday, June 8, 2023 10:07 PM
Quoted 7 lines
Quoted 2 lines
I think not since you fail to explain why this approach is better than simply adding new features like
_F_LEGACY_HEADERand_F_LEGACY_MAC.Please refer back to the requirements of cover letter and multiple past discussions. And Michael also explained...
It is passthrough device, none of the 1.x objects are accessible or mediated by the hypervisor.
Let me quote my reply once again:
"
Hypervisor just need to prepare
1) legacy BAR with legacy config and device configuration space
2) modern BAR with modern capabilities (common cfg and device cfg)
For 2) it could be mapped directly to guest without any mediation For
1) hypervisor needs to mediate
"
There's zero mediation for 1.x objects at all. No?
For accessing 1.x objects by hypervisor, what's wrong with that especially considering it is used for legacy mediation only but not modern? (Btw, how do you define 1.x objects, isn't any facility via adminq an 1.x object?)
In order to converge the discussion, maybe you can explain which one of your 3 use cases and why can't work with _F_LEGACY_HEADER + _F_LEGACY_MAC.
Thanks
Quoted 2 lines
Cannot repeat more.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Quoted 7 lines
From: Jason Wang <[email protected]>
Sent: Thursday, June 8, 2023 10:43 PMQuoted 1 line
It is passthrough device, none of the 1.x objects are accessible or mediated by
the hypervisor.
Quoted 8 lines
Let me quote my reply once again:
"
Hypervisor just need to prepare1) legacy BAR with legacy config and device configuration space
2) modern BAR with modern capabilities (common cfg and device cfg)
This is what is done in v5.
Quoted 9 lines
For 2) it could be mapped directly to guest without any mediation For
1) hypervisor needs to mediate
"There's zero mediation for 1.x objects at all. No?
For accessing 1.x objects by hypervisor, what's wrong with that especially considering it is used for legacy mediation only but not modern?
I didn’t follow the question.
Quoted 3 lines
(Btw, how do
you define 1.x objects, isn't any facility via adminq an 1.x object?)
1.x objects of the passthrough VF device.
Quoted 2 lines
In order to converge the discussion, maybe you can explain which one of your 3 use cases and why can't work with
_F_LEGACY_HEADER+_F_LEGACY_MAC.
Hypervisor does not involve in feature negotiation and device life cycle phase so it cannot negotiate it.
Quoted 10 lines · Parav Pandit
Quoted 10 lines
From: Jason Wang <[email protected]>
Sent: Thursday, June 8, 2023 10:43 PMQuoted 1 line
It is passthrough device, none of the 1.x objects are accessible or mediated by
the hypervisor.
Let me quote my reply once again:
Quoted 7 lines
Quoted 6 lines
"
Hypervisor just need to prepare1) legacy BAR with legacy config and device configuration space
2) modern BAR with modern capabilities (common cfg and device cfg)This is what is done in v5.
I meant this could be done with _F_LEGACY_HEADER/MAC as well.
Quoted 12 lines
Quoted 10 lines
For 2) it could be mapped directly to guest without any mediation For
1) hypervisor needs to mediate
"There's zero mediation for 1.x objects at all. No?
For accessing 1.x objects by hypervisor, what's wrong with that especially considering it is used for legacy mediation only but not modern?
I didn’t follow the question.
Quoted 8 lines
Quoted 3 lines
(Btw, how do
you define 1.x objects, isn't any facility via adminq an 1.x object?)1.x objects of the passthrough VF device.
Quoted 2 lines
In order to converge the discussion, maybe you can explain which one of your 3 use cases and why can't work with
_F_LEGACY_HEADER+_F_LEGACY_MAC.Hypervisor does not involve in feature negotiation and device life cycle phase so it cannot negotiate it.
With _F_LEGACY_HEADER + _F_LEGACY_MAC, hypervisor doesn't need to be involved in the feature negotiation for modern devices as well.
Anything I missed?
Thanks
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 5 lines
From: [email protected] <[email protected] open.org> On Behalf Of Jason Wang
Sent: Thursday, June 8, 2023 10:57 PM
Quoted 9 lines
Quoted 2 lines
Quoted 2 lines
In order to converge the discussion, maybe you can explain which one of your 3 use cases and why can't work with
_F_LEGACY_HEADER+
_F_LEGACY_MAC.Quoted 1 line
Hypervisor does not involve in feature negotiation and device life cycle phase
so it cannot negotiate it.
With
_F_LEGACY_HEADER+_F_LEGACY_MAC, hypervisor doesn't need to be involved in the feature negotiation for modern devices as well.
Guest does not have this feature negotiation driver. Hypervisor is not involved.
So, who negotiates?
Quoted 10 lines · Parav Pandit
Quoted 10 lines
From: [email protected] <[email protected] open.org> On Behalf Of Jason Wang
Sent: Thursday, June 8, 2023 10:57 PMQuoted 2 lines
Quoted 2 lines
In order to converge the discussion, maybe you can explain which one of your 3 use cases and why can't work with
_F_LEGACY_HEADER+
_F_LEGACY_MAC.Quoted 1 line
Hypervisor does not involve in feature negotiation and device life cycle phase
Quoted 8 lines
Quoted 5 lines
so it cannot negotiate it.
With
_F_LEGACY_HEADER+_F_LEGACY_MAC, hypervisor doesn't need to be involved in the feature negotiation for modern devices as well.Guest does not have this feature negotiation driver. Hypervisor is not involved.
So, who negotiates?
When legacy drivers are doing feature negotiation, the hypervisor must trap and negotiate those two features.
When modern drivers are doing the feature negotiation, the hypervisor is not involved at all. So modern drivers can choose to negotiate (e.g try to mediate legacy for L2) or not.
Thanks
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 6 lines
From: Jason Wang <[email protected]>
Sent: Thursday, June 8, 2023 11:03 PMWhen legacy drivers are doing feature negotiation, the hypervisor must trap and negotiate those two features.
Device reset to be trapped as well towards 1.x.
And this messes the 1.x flow with FEATURES_OK.
More citations from the spec:
"Legacy driver implementations often used the device before setting the DRIVER_OK bit, and sometimes even before writing the feature bits to the device."
It may even set before setting the feature bits.
It is ugly to use the 1.x state machine.
I would like to keep the stateful interactions of 1.x device outside of 0.9.5.
Quoted 3 lines
When modern drivers are doing the feature negotiation, the hypervisor is not involved at all. So modern drivers can choose to negotiate (e.g try to mediate legacy for L2) or not.
Quoted 8 lines · Parav Pandit
Quoted 7 lines
From: Jason Wang <[email protected]>
Sent: Thursday, June 8, 2023 11:03 PMWhen legacy drivers are doing feature negotiation, the hypervisor must trap and negotiate those two features.
Device reset to be trapped as well towards 1.x.
It needs to be trapped even with admin virtqueue.
Quoted 2 lines
And this messes the 1.x flow with
FEATURES_OK.
How can it mess? The new status was hidden from the legacy driver. This kind of trick has been used by Qemu for a while.
Quoted 6 lines
More citations from the spec:
"Legacy driver implementations often used the device before setting the
DRIVER_OKbit, and sometimes even before writing the feature bits to the device."It may even set before setting the feature bits.
How does adminq differ/help in this case? Note that the legacy interface is fully mediated/emulated, the control patch is fully trapped so it can choose to do anything it can.
What's more important, the above example is exactly what we should do with modern devices since it's too late to precisely define the behaviour of the legacy device. Admin virtqueue is not the cure for this since the legacy device's behaviour is defined by the existing hypervisor codes, not the spec.
So again, we have:
1) well defined (if it's not we can fix the spec) device behaviour (modern device plus well defined legacy features like mac/header)
2) device with legacy behaviours that can't be defined or documented (approach used in this series)
1) is far more simple for both hypervisor and hardware and 2) may end up with subtle undocumented behaviour differences among vendors.
Quoted 1 line
It is ugly to use the 1.x state machine.
This is the methodology used by mediation which is very common in virtualization.
Quoted 1 line
I would like to keep the stateful interactions of 1.x device outside of 0.9.5.
I don't think this is a real problem, but let's see the drawbacks of this proposal:
1) non-trivial changes of full new transport alike ABI
2) can't work for nesting
3) require vendor to implement legacy behaviour which can't be documented precisely
4) require admin virtqueue to work
We won't have the above issues if we use modern + legacy header/mac.
Thanks
Quoted 5 lines
Quoted 4 lines
When modern drivers are doing the feature negotiation, the hypervisor is not involved at all. So modern drivers can choose to negotiate (e.g try to mediate legacy for L2) or not.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Quoted 11 lines · Jason Wang
Quoted 1 line
I would like to keep the stateful interactions of 1.x device outside of 0.9.5.
I don't think this is a real problem, but let's see the drawbacks of this proposal:
1) non-trivial changes of full new transport alike ABI
2) can't work for nesting
3) require vendor to implement legacy behaviour which can't be documented precisely
4) require admin virtqueue to work
Quoted 3 lines
We won't have the above issues if we use modern + legacy header/mac.
Thanks
All this is true. But it's by design. It makes the legacy thing as isolated as possible. Because let's be frank we won't be able to drop legacy support in like 10 years. But hardware vendors will do that quickly if they can't sell hardware.
Signature · 6 lines
MST --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Quoted 15 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Friday, June 9, 2023 3:22 AMQuoted 11 lines · Jason Wang
Quoted 1 line
I would like to keep the stateful interactions of 1.x device outside of 0.9.5.
I don't think this is a real problem, but let's see the drawbacks of this proposal:
1) non-trivial changes of full new transport alike ABI
2) can't work for nesting
3) require vendor to implement legacy behaviour which can't be documented precisely
4) require admin virtqueue to work
Quoted 8 lines
Quoted 3 lines
We won't have the above issues if we use modern + legacy header/mac.
Thanks
All this is true. But it's by design. It makes the legacy thing as isolated as possible. Because let's be frank we won't be able to drop legacy support in like 10 years. But hardware vendors will do that quickly if they can't sell hardware.
I don't think above 4 points are true for below reasoning.
Hypervisor flow without involving guest; first sanity round to figure out things can work:
1. reset the device
2. set ACK and DRIVER bit
3. read features and make sure _MAC, _HDR are supported.
4. if not abort.
5. reset the device 2nd time so that guest can have right view of things.
On guest access of legacy area:
6. reset the device
7. set ACK and DRIVER bit on guest request
8. read features and make sure _MAC, _HDR are offered
8.1 Hope for the best that on two completely unrelated device reset on #1 and #6, the device offers exact same feature bits. And mention this in the spec 1.x for rest of the future.
We shouldn't be adding such a limitation to the spec.
We have seen this with mlx5 device where 5 years ago one thought this cannot happen. And now with modern use case now features changes across two resets for mlx5 device. Baking such limitation in current spec for past 1.x is sub-optimal.
ok, so to avoid baking such reset flow nasty things in spec, lets avoid flow of #1 to #5 in hypervisor. So, provision the device to support these new feature bits via AQ.
So AQ is required for feature provisioning anyway.
So, your point #4 is required in both methods and so it scores same as this proposal. Hence feature bit is not of an advantage.
With _MAC now we need writable mac on 1.x config space.
for 1.x writable mac has two requirements.
1. It must be atomic (not for 0.9.5, but must for 1.x like CVQ)
2. should be synchronous to know success/failure to know when it is effective
Both are present on the CVQ, so yet add another duplicate 1.x scheme that fulfill above requirements.
ok. So may be let's do AQ command for just mac setting.
This scores down now for two reasons.
a. Duplicate of existing 1.x feature
b. requires AQ.
So, from RW mac we moved from 1.x cfg space to AQ. This mediation for 1.x is not good. And now it's not trivial either as it is not just simple *p_mac = X. Hence, #1 of non-trivial starts to looks less appealing.
Your point #3 about vendor to implement legacy behavior.
If vendor needs to support legacy, vendor anyway needs to implement _HDR anyway in data path. and above MAC change, and feature provisioning.
For legacy there is no extra/special documentation.
All the behavior listed in Legacy interfaces section for configuration register present applies here.
So, I don't see mac support is trivial by any means compared to proposed scheme for 1.x. Hence, comparing trivialness of two solutions seems same for your point #1 once you do mac plumbing.
Regarding #2 on nesting. I won't claim I understand this as your level of knowledge.
If you are sauing only the VF is in VM as virtio PCI device to supporting nested guest, that doesn't have AQ, hence it doesn't work due above issues.
Then yes, but than it is back to square one, where you need sequence #1 to #8 to be done + non-forward-looking spec changes on reset flow.
In that alternative, one can say, hey skip steps #1 to #5, and on step #8 doesn't have required feature bit, mark the device FAILED. But this is common case and its late in the init flow to discover it.
And now MAC cannot be set atomically either in nesting with just feature bit without ugly and non-trivial spec updates. And when one needs nesting with legacy, probably PV is better.
As Michael said,
Overall isolating legacy to AQ for config, intx and by reusing 1.x's notification is good trade off where 1.x device level interface is kept as detached from the legacy as possible.
This is why the notification address query also was desired via AQ as proposed in v3, but it is small trade off if you think it should be discovered via PCI cap like v5.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 40 lines · Parav Pandit
Quoted 15 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Friday, June 9, 2023 3:22 AMQuoted 11 lines · Jason Wang
Quoted 1 line
I would like to keep the stateful interactions of 1.x device outside of 0.9.5.
I don't think this is a real problem, but let's see the drawbacks of this proposal:
1) non-trivial changes of full new transport alike ABI
2) can't work for nesting
3) require vendor to implement legacy behaviour which can't be documented precisely
4) require admin virtqueue to workQuoted 8 lines
Quoted 3 lines
We won't have the above issues if we use modern + legacy header/mac.
Thanks
All this is true. But it's by design. It makes the legacy thing as isolated as possible. Because let's be frank we won't be able to drop legacy support in like 10 years. But hardware vendors will do that quickly if they can't sell hardware.
I don't think above 4 points are true for below reasoning.
Hypervisor flow without involving guest; first sanity round to figure out things can work:
1. reset the device
2. set ACK and DRIVER bit
3. read features and make sure_MAC,_HDRare supported.
4. if not abort.
5. reset the device 2nd time so that guest can have right view of things.On guest access of legacy area:
6. reset the device
7. set ACK and DRIVER bit on guest request
8. read features and make sure_MAC,_HDRare offered
8.1 Hope for the best that on two completely unrelated device reset on #1 and #6, the device offers exact same feature bits. And mention this in the spec 1.x for rest of the future.
Quoted 3 lines
We shouldn't be adding such a limitation to the spec.
We have seen this with mlx5 device where 5 years ago one thought this cannot happen. And now with modern use case now features changes across two resets for mlx5 device.
Interesting this actually violates a spec recommendation:
If a device has successfully negotiated a set of features at least once (by accepting the FEATURES_OK \field{device status} bit during device initialization), then it SHOULD NOT fail re-negotiation of the same set of features after a device or system reset. Failure to do so would interfere with resuming from suspend and error recovery.
Quoted 30 lines
Baking such limitation in current spec for past 1.x is sub-optimal.
ok, so to avoid baking such reset flow nasty things in spec, lets avoid flow of #1 to #5 in hypervisor. So, provision the device to support these new feature bits via AQ.
So AQ is required for feature provisioning anyway.So, your point #4 is required in both methods and so it scores same as this proposal. Hence feature bit is not of an advantage.
With
_MACnow we need writable mac on 1.x config space.
for 1.x writable mac has two requirements.
1. It must be atomic (not for 0.9.5, but must for 1.x like CVQ)
2. should be synchronous to know success/failure to know when it is effectiveBoth are present on the CVQ, so yet add another duplicate 1.x scheme that fulfill above requirements.
ok. So may be let's do AQ command for just mac setting.
This scores down now for two reasons.
a. Duplicate of existing 1.x feature
b. requires AQ.So, from RW mac we moved from 1.x cfg space to AQ. This mediation for 1.x is not good. And now it's not trivial either as it is not just simple
*p_mac= X. Hence, #1 of non-trivial starts to looks less appealing.Your point #3 about vendor to implement legacy behavior.
If vendor needs to support legacy, vendor anyway needs to implement_HDRanyway in data path. and above MAC change, and feature provisioning.
Quoted 8 lines
For legacy there is no extra/special documentation.
All the behavior listed in Legacy interfaces section for configuration register present applies here.So, I don't see mac support is trivial by any means compared to proposed scheme for 1.x. Hence, comparing trivialness of two solutions seems same for your point #1 once you do mac plumbing.
Regarding #2 on nesting. I won't claim I understand this as your level of knowledge.
If you are sauing only the VF is in VM as virtio PCI device to supporting nested guest, that doesn't have AQ, hence it doesn't work due above issues.
Nothing is tied to admin queue here btw - it's using admin commands. And by the way, there's a simple way to make this work with nesting down the road if we want to: add support for sending admin commands using MMIO. Jason, if you want to solve nesting I think that's the best way. Will address other use-cases too, not just legacy.
Quoted 5 lines
Then yes, but than it is back to square one, where you need sequence #1 to #8 to be done + non-forward-looking spec changes on reset flow.
In that alternative, one can say, hey skip steps #1 to #5, and on step #8 doesn't have required feature bit, mark the device FAILED. But this is common case and its late in the init flow to discover it.
Quoted 7 lines
And now MAC cannot be set atomically either in nesting with just feature bit without ugly and non-trivial spec updates. And when one needs nesting with legacy, probably PV is better.
As Michael said,
Overall isolating legacy to AQ for config, intx and by reusing 1.x's notification is good trade off where 1.x device level interface is kept as detached from the legacy as possible.This is why the notification address query also was desired via AQ as proposed in v3, but it is small trade off if you think it should be discovered via PCI cap like v5.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Quoted 5 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Saturday, June 10, 2023 8:27 PM
Quoted 9 lines
Interesting this actually violates a spec recommendation:
If a device has successfully negotiated a set of features at least once (by accepting the
FEATURES_OK\field{device status} bit during device initialization), then it SHOULD NOT fail re-negotiation of the same set of features after a device or system reset. Failure to do so would interfere with resuming from suspend and error recovery.
This is how we have seen mlx5 device and it has evolved now to break free such limitation.
Quoted 1 line
Nothing is tied to admin queue here btw - it's using admin commands.
Sure. It is admin command, presently using AQ. May be some other transport tomorrow.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 7 lines · Parav Pandit
Quoted 7 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Saturday, June 10, 2023 8:27 PMInteresting this actually violates a spec recommendation:
Quoted 8 lines
Quoted 7 lines
If a device has successfully negotiated a set of features at least once (by accepting the
FEATURES_OK\field{device status} bit during device initialization), then it SHOULD NOT fail re-negotiation of the same set of features after a device or system reset. Failure to do so would interfere with resuming from suspend and error recovery.This is how we have seen mlx5 device and it has evolved now to break free such limitation.
It's not conformant to that statement then :( It's a SHOULD which means if you know exactly what you are doing, there could be exceptions. In this case it's a SHOULD because it was added after 1.0 and we did not find a way to negotiate this requirement since it's the feature negotiation itself.
Signature · 6 lines
MST --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Quoted 10 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 11, 2023 3:15 AMIt's not conformant to that statement then :( It's a SHOULD which means if you know exactly what you are doing, there could be exceptions.
In this case it's a SHOULD because it was added after 1.0 and we did not find a way to negotiate this requirement since it's the feature negotiation itself.
True. May be in future such device can update the revision id.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 6 lines · Parav Pandit
Quoted 4 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 11, 2023 3:15 AM
Quoted 6 lines
Quoted 4 lines
It's not conformant to that statement then :( It's a SHOULD which means if you know exactly what you are doing, there could be exceptions.
In this case it's a SHOULD because it was added after 1.0 and we did not find a way to negotiate this requirement since it's the feature negotiation itself.True. May be in future such device can update the revision id.
You can already change it but that doesn't imply anything at all, in 1.0 revisions are vendor specific.
Signature · 18 lines
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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
Quoted 8 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 11, 2023 4:09 PMQuoted 4 lines
Quoted 4 lines
It's not conformant to that statement then :( It's a SHOULD which means if you know exactly what you are doing, there could be exceptions. In this case it's a SHOULD because it was added after 1.0 and we did not find a way to negotiate this requirement since it's the feature negotiation
Quoted 6 lines
itself.
Quoted 2 lines
True. May be in future such device can update the revision id.
You can already change it but that doesn't imply anything at all, in 1.0 revisions are vendor specific.
I was suggesting that when such a fundamental change is done which cannot be communicated via features bit or before the reset, a new revision and attaching more advance/different behavior.
This way driver knows what difference to expect for new revision.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 10 lines · Parav Pandit
Quoted 10 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, June 11, 2023 4:09 PMQuoted 4 lines
Quoted 4 lines
It's not conformant to that statement then :( It's a SHOULD which means if you know exactly what you are doing, there could be exceptions. In this case it's a SHOULD because it was added after 1.0 and we did not find a way to negotiate this requirement since it's the feature negotiation
itself.
Quoted 1 line
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
True. May be in future such device can update the revision id.
You can already change it but that doesn't imply anything at all, in 1.0 revisions are vendor specific.
I was suggesting that when such a fundamental change is done which cannot be communicated via features bit or before the reset, a new revision and attaching more advance/different behavior.
This way driver knows what difference to expect for new revision.
But you don't know which revision do existing devices use:
Drivers MUST match any PCI Revision ID value.
we can come up with a mechanism, several ideas come to mind. Before we bother, the actual need has to be understood.
Signature · 18 lines
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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
Quoted 92 lines · Michael S. Tsirkin
Quoted 40 lines · Parav Pandit
Quoted 15 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Friday, June 9, 2023 3:22 AMQuoted 11 lines · Jason Wang
Quoted 1 line
I would like to keep the stateful interactions of 1.x device outside of 0.9.5.
I don't think this is a real problem, but let's see the drawbacks of this proposal:
1) non-trivial changes of full new transport alike ABI
2) can't work for nesting
3) require vendor to implement legacy behaviour which can't be documented precisely
4) require admin virtqueue to workQuoted 8 lines
Quoted 3 lines
We won't have the above issues if we use modern + legacy header/mac.
Thanks
All this is true. But it's by design. It makes the legacy thing as isolated as possible. Because let's be frank we won't be able to drop legacy support in like 10 years. But hardware vendors will do that quickly if they can't sell hardware.
I don't think above 4 points are true for below reasoning.
Hypervisor flow without involving guest; first sanity round to figure out things can work:
1. reset the device
2. set ACK and DRIVER bit
3. read features and make sure_MAC,_HDRare supported.
4. if not abort.
5. reset the device 2nd time so that guest can have right view of things.On guest access of legacy area:
6. reset the device
7. set ACK and DRIVER bit on guest request
8. read features and make sure_MAC,_HDRare offered
8.1 Hope for the best that on two completely unrelated device reset on #1 and #6, the device offers exact same feature bits. And mention this in the spec 1.x for rest of the future.Quoted 3 lines
We shouldn't be adding such a limitation to the spec.
We have seen this with mlx5 device where 5 years ago one thought this cannot happen. And now with modern use case now features changes across two resets for mlx5 device.Interesting this actually violates a spec recommendation:
If a device has successfully negotiated a set of features at least once (by accepting the
FEATURES_OK\field{device status} bit during device initialization), then it SHOULD NOT fail re-negotiation of the same set of features after a device or system reset. Failure to do so would interfere with resuming from suspend and error recovery.Quoted 36 lines
Baking such limitation in current spec for past 1.x is sub-optimal.
ok, so to avoid baking such reset flow nasty things in spec, lets avoid flow of #1 to #5 in hypervisor. So, provision the device to support these new feature bits via AQ.
So AQ is required for feature provisioning anyway.So, your point #4 is required in both methods and so it scores same as this proposal. Hence feature bit is not of an advantage.
With
_MACnow we need writable mac on 1.x config space.
for 1.x writable mac has two requirements.
1. It must be atomic (not for 0.9.5, but must for 1.x like CVQ)
2. should be synchronous to know success/failure to know when it is effectiveBoth are present on the CVQ, so yet add another duplicate 1.x scheme that fulfill above requirements.
ok. So may be let's do AQ command for just mac setting.
This scores down now for two reasons.
a. Duplicate of existing 1.x feature
b. requires AQ.So, from RW mac we moved from 1.x cfg space to AQ. This mediation for 1.x is not good. And now it's not trivial either as it is not just simple
*p_mac= X. Hence, #1 of non-trivial starts to looks less appealing.Your point #3 about vendor to implement legacy behavior.
If vendor needs to support legacy, vendor anyway needs to implement_HDRanyway in data path. and above MAC change, and feature provisioning.For legacy there is no extra/special documentation.
All the behavior listed in Legacy interfaces section for configuration register present applies here.So, I don't see mac support is trivial by any means compared to proposed scheme for 1.x. Hence, comparing trivialness of two solutions seems same for your point #1 once you do mac plumbing.
Quoted 8 lines
Quoted 2 lines
Regarding #2 on nesting. I won't claim I understand this as your level of knowledge.
If you are sauing only the VF is in VM as virtio PCI device to supporting nested guest, that doesn't have AQ, hence it doesn't work due above issues.Nothing is tied to admin queue here btw - it's using admin commands. And by the way, there's a simple way to make this work with nesting down the road if we want to: add support for sending admin commands using MMIO. Jason, if you want to solve nesting I think that's the best way. Will address other use-cases too, not just legacy.
Probably, but then just for the legacy support it would be much easier to allow legacy MMIO BAR in this case other than inventing new capability for carrying admin commands.
And I found more issues:
1) The owner device itself is not a member of the group. We need to relax this otherwise MMIO still requires a PF for example.
2) The admin command is variable length, which is kind of hard to be implemented via a MMIO interface, we need tweak the spec to define a maximum length or invent a way to probe the maximum length
Thanks
Quoted 7 lines
Quoted 7 lines
Then yes, but than it is back to square one, where you need sequence #1 to #8 to be done + non-forward-looking spec changes on reset flow.
In that alternative, one can say, hey skip steps #1 to #5, and on step #8 doesn't have required feature bit, mark the device FAILED. But this is common case and its late in the init flow to discover it.
Quoted 8 lines
Quoted 7 lines
And now MAC cannot be set atomically either in nesting with just feature bit without ugly and non-trivial spec updates. And when one needs nesting with legacy, probably PV is better.
As Michael said,
Overall isolating legacy to AQ for config, intx and by reusing 1.x's notification is good trade off where 1.x device level interface is kept as detached from the legacy as possible.This is why the notification address query also was desired via AQ as proposed in v3, but it is small trade off if you think it should be discovered via PCI cap like v5.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Quoted 21 lines · Parav Pandit
Quoted 21 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Friday, June 9, 2023 3:22 AMQuoted 14 lines · Jason Wang
Quoted 1 line
I would like to keep the stateful interactions of 1.x device outside of 0.9.5.
I don't think this is a real problem, but let's see the drawbacks of this proposal:
1) non-trivial changes of full new transport alike ABI
2) can't work for nesting
3) require vendor to implement legacy behaviour which can't be documented precisely
4) require admin virtqueue to workWe won't have the above issues if we use modern + legacy header/mac.
Thanks
Quoted 7 lines
Quoted 3 lines
All this is true. But it's by design. It makes the legacy thing as isolated as possible. Because let's be frank we won't be able to drop legacy support in like 10 years. But hardware vendors will do that quickly if they can't sell hardware.
I don't think above 4 points are true for below reasoning.
Hypervisor flow without involving guest; first sanity round to figure out things can work:
Why is this sanity round a must?
Quoted 3 lines
1. reset the device
2. set ACK and DRIVER bit
3. read features and make sure_MAC,_HDRare supported.
Similar step is required even for AQ since the hypervisor needs to know if legacy commands are supported there.
Quoted 8 lines
4. if not abort.
5. reset the device 2nd time so that guest can have right view of things.On guest access of legacy area:
6. reset the device
7. set ACK and DRIVER bit on guest request
8. read features and make sure_MAC,_HDRare offered
8.1 Hope for the best that on two completely unrelated device reset on #1 and #6, the device offers exact same feature bits.
Explained and discussed in another thread, this is a hard requirement otherwise a lot of things would break.
Quoted 11 lines
And mention this in the spec 1.x for rest of the future.
We shouldn't be adding such a limitation to the spec.
We have seen this with mlx5 device where 5 years ago one thought this cannot happen. And now with modern use case now features changes across two resets for mlx5 device. Baking such limitation in current spec for past 1.x is sub-optimal.ok, so to avoid baking such reset flow nasty things in spec, lets avoid flow of #1 to #5 in hypervisor. So, provision the device to support these new feature bits via AQ.
So AQ is required for feature provisioning anyway.
Quoted 6 lines
So, your point #4 is required in both methods and so it scores same as this proposal. Hence feature bit is not of an advantage.
With
_MACnow we need writable mac on 1.x config space. for 1.x writable mac has two requirements.
1. It must be atomic (not for 0.9.5, but must for 1.x like CVQ)
For LEGACY_MAC, we don't need to be atomic. We manage to survive for several years.
Quoted 1 line
2. should be synchronous to know success/failure to know when it is effective
It's as simple as allowing mac in the device configuration space writable.
Quoted 2 lines
Both are present on the CVQ, so yet add another duplicate 1.x scheme that fulfill above requirements.
I'm not sure how to define duplication, the legacy device configuration space access via admin virtqueue is kind of a duplication in this sense as well.
Quoted 8 lines
ok. So may be let's do AQ command for just mac setting.
This scores down now for two reasons.
a. Duplicate of existing 1.x feature
b. requires AQ.So, from RW mac we moved from 1.x cfg space to AQ. This mediation for 1.x is not good.
Modern drivers just won't negotiate LEGACY_MAC, so there's no mediation at all.
Quoted 6 lines
And now it's not trivial either as it is not just simple
*p_mac= X. Hence, #1 of non-trivial starts to looks less appealing.Your point #3 about vendor to implement legacy behavior.
If vendor needs to support legacy, vendor anyway needs to implement_HDRanyway in data path. and above MAC change, and feature provisioning.
I think there are some misunderstandings here:
For legacy behaviour, I mainly meant the behaviour in the corner cases that can't be documented (easily) by the spec since it is defined by the code (e.g Linux drivers and Qemu). LEGACY_MAC/HDR doesn't belong to those since the behaviour is well understood and defined in the spec.
It's very hard to audit each corner case and it would easily result in endless errata of the hardware. Modern devices have clearly defined behaviour and it's easier to implement. It's never too late to fix spec if we found a bug.
Quoted 3 lines
For legacy there is no extra/special documentation.
All the behavior listed in Legacy interfaces section for configuration register present applies here.
That's not true, the legacy section is the best effort since it's too late to define (codes came before the spec).
Quoted 6 lines
So, I don't see mac support is trivial by any means compared to proposed scheme for 1.x. Hence, comparing trivialness of two solutions seems same for your point #1 once you do mac plumbing.
Regarding #2 on nesting. I won't claim I understand this as your level of knowledge.
If you are sauing only the VF is in VM as virtio PCI device to supporting nested guest, that doesn't have AQ, hence it doesn't work due above issues.
This is the most common setup, no?
The major issues are the transport function is not self contained in a device (function). This will cause a lot of trouble when trying to implement nesting. E.g you need to assign or emulate SR-IOV from L1 to L(N-1) in order to let L(N) to work.
Thanks
Quoted 21 lines
Then yes, but than it is back to square one, where you need sequence #1 to #8 to be done + non-forward-looking spec changes on reset flow.
In that alternative, one can say, hey skip steps #1 to #5, and on step #8 doesn't have required feature bit, mark the device FAILED. But this is common case and its late in the init flow to discover it.
And now MAC cannot be set atomically either in nesting with just feature bit without ugly and non-trivial spec updates. And when one needs nesting with legacy, probably PV is better.
As Michael said,
Overall isolating legacy to AQ for config, intx and by reusing 1.x's notification is good trade off where 1.x device level interface is kept as detached from the legacy as possible.This is why the notification address query also was desired via AQ as proposed in v3, but it is small trade off if you think it should be discovered via PCI cap like v5.
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.
Quoted 9 lines
Subscribe: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 10 lines
From: Jason Wang <[email protected]>
Sent: Sunday, June 25, 2023 11:32 PMQuoted 1 line
Hypervisor flow without involving guest; first sanity round to figure out things
can work:
Why is this sanity round a must?
Because there is no point of failing it later when actual rw occurs.
Quoted 7 lines
Quoted 3 lines
1. reset the device
2. set ACK and DRIVER bit
3. read features and make sure_MAC,_HDRare supported.Similar step is required even for AQ since the hypervisor needs to know if legacy commands are supported there.
No. similar steps are not required on AQ because AQ support discovery is done once per owner device. Not for each member device.
Quoted 8 lines
Quoted 8 lines
4. if not abort.
5. reset the device 2nd time so that guest can have right view of things.On guest access of legacy area:
6. reset the device
7. set ACK and DRIVER bit on guest request 8. read features and make sure_MAC,_HDRare offered
8.1 Hope for the best that on two completely unrelated device reset on #1
Quoted 5 lines
and #6, the device offers exact same feature bits.
Explained and discussed in another thread, this is a hard requirement otherwise a lot of things would break.
That limitation is for the past or current.
As we move forward there is no need to continue with such limitation.
There may be more work needed to overcome that limitation, but we don’t want to build on top of that limitation.
Quoted 16 lines
Quoted 4 lines
And mention this in the spec 1.x for rest of the future.
We shouldn't be adding such a limitation to the spec.
We have seen this with mlx5 device where 5 years ago one thought thiscannot happen.
Quoted 1 line
And now with modern use case now features changes across two resets for
mlx5 device.
Quoted 3 lines
Baking such limitation in current spec for past 1.x is sub-optimal.
ok, so to avoid baking such reset flow nasty things in spec, lets avoid flow of
#1 to #5 in hypervisor.
Quoted 4 lines
So, provision the device to support these new feature bits via AQ. So AQ is required for feature provisioning anyway.
So, your point #4 is required in both methods and so it scores same as this
proposal.
Quoted 9 lines
Quoted 5 lines
Hence feature bit is not of an advantage.
With
_MACnow we need writable mac on 1.x config space. for 1.x writable mac has two requirements.
1. It must be atomic (not for 0.9.5, but must for 1.x like CVQ)For
LEGACY_MAC, we don't need to be atomic. We manage to survive for several years.
It was cited as issue in past discussed when you and Michael both asked to consider tvq. What changed now?
The issue is that device hw needs implement special RW registers now for the mac for legacy. This is the unwanted burden not needed, where AQ is better.
Quoted 5 lines
Quoted 2 lines
2. should be synchronous to know success/failure to know when it is effective
It's as simple as allowing mac in the device configuration space writable.
Not simple for hw at scale. AQ is superior that communicates rarely used information.
Quoted 7 lines
Quoted 2 lines
Both are present on the CVQ, so yet add another duplicate 1.x scheme that
fulfill above requirements.
I'm not sure how to define duplication, the legacy device configuration space access via admin virtqueue is kind of a duplication in this sense as well.
It only exists on AQ for legacy purpose.
The feature bit defined is not for legacy, hence its duplicated.
Quoted 7 lines
Quoted 7 lines
ok. So may be let's do AQ command for just mac setting.
This scores down now for two reasons.
a. Duplicate of existing 1.x feature
b. requires AQ.
Quoted 5 lines
Quoted 1 line
So, from RW mac we moved from 1.x cfg space to AQ. This mediation for 1.x is
not good.
Modern drivers just won't negotiate
LEGACY_MAC, so there's no mediation at all.
As feature, there is no need to prefix it with LEGACY because it’s a new feature.
Quoted 11 lines
Quoted 6 lines
And now it's not trivial either as it is not just simple
*p_mac= X. Hence, #1 of non-trivial starts to looks less appealing.Your point #3 about vendor to implement legacy behavior.
If vendor needs to support legacy, vendor anyway needs to implement_HDRanyway in data path.
Quoted 1 line
and above MAC change, and feature provisioning.
I think there are some misunderstandings here:
Quoted 9 lines
For legacy behaviour, I mainly meant the behaviour in the corner cases that can't be documented (easily) by the spec since it is defined by the code (e.g Linux drivers and Qemu). LEGACY_MAC/HDR doesn't belong to those since the behaviour is well understood and defined in the spec.
It's very hard to audit each corner case and it would easily result in endless errata of the hardware. Modern devices have clearly defined behaviour and it's easier to implement. It's never too late to fix spec if we found a bug.
I don’t see how that is avoided when one side has undefined corner case that is translated to well defined behavior. It only means that piece will be in endless errata in sw.
It still scores same or less.
Quoted 8 lines
Quoted 3 lines
For legacy there is no extra/special documentation.
All the behavior listed in Legacy interfaces section for configuration registerpresent applies here.
That's not true, the legacy section is the best effort since it's too late to define (codes came before the spec).
One can added the missing documentation...
Quoted 4 lines
Quoted 2 lines
So, I don't see mac support is trivial by any means compared to proposed
scheme for 1.x.
Quoted 1 line
Hence, comparing trivialness of two solutions seems same for your point #1
Quoted 9 lines
once you do mac plumbing.
Quoted 2 lines
Regarding #2 on nesting. I won't claim I understand this as your level of
knowledge.
Quoted 1 line
If you are sauing only the VF is in VM as virtio PCI device to supporting nested
guest, that doesn't have AQ, hence it doesn't work due above issues.
This is the most common setup, no?
Depends on who see it.
We don’t see common setup for legacy or otherwise.
Quoted 5 lines
The major issues are the transport function is not self contained in a device (function). This will cause a lot of trouble when trying to implement nesting. E.g you need to assign or emulate SR-IOV from L1 to
L(N-1) in order to let L(N) to work.
Those who do nesting usually do assign the PF as well.
Quoted 6 lines · Parav Pandit
Quoted 5 lines
From: Jason Wang <[email protected]>
Sent: Sunday, June 25, 2023 11:32 PM
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
Hypervisor flow without involving guest; first sanity round to figure out things
can work:
Why is this sanity round a must?
Because there is no point of failing it later when actual rw occurs.
Even with admin virtqueue, the hypervisor should be ready for any admin command failures somehow.
And with modern devices, the reset is not a must, the hypervisor can just read device_features to check if _MAC/_HDR is there. And what's more important, the hypervisor can know if the feature negotiation succeeds or not. With legacy, there's no such way.
Quoted 9 lines
Quoted 8 lines
Quoted 4 lines
1. reset the device
2. set ACK and DRIVER bit
3. read features and make sure_MAC,_HDRare supported.Similar step is required even for AQ since the hypervisor needs to know if legacy commands are supported there.
No. similar steps are not required on AQ because AQ support discovery is done once per owner device. Not for each member device.
This seems a topic beyond legacy. If both modern and transitional devices are supported, a per device probing or provisioning is still required. And if provisioning is supported, there's no need to probe MAC/HDR.
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
4. if not abort.
5. reset the device 2nd time so that guest can have right view of things.On guest access of legacy area:
6. reset the device
7. set ACK and DRIVER bit on guest request 8. read features and make sure_MAC,_HDRare offered
8.1 Hope for the best that on two completely unrelated device reset on #1
Quoted 6 lines
Quoted 5 lines
and #6, the device offers exact same feature bits.
Explained and discussed in another thread, this is a hard requirement otherwise a lot of things would break.
That limitation is for the past or current.
You need at least a new feature bit.
Quoted 2 lines
As we move forward there is no need to continue with such limitation.
There may be more work needed to overcome that limitation, but we don’t want to build on top of that limitation.
Let's open a dedicated thread for this if necessary.
Quoted 23 lines
Quoted 23 lines
Quoted 5 lines
And mention this in the spec 1.x for rest of the future.
We shouldn't be adding such a limitation to the spec.
We have seen this with mlx5 device where 5 years ago one thought thiscannot happen.
Quoted 1 line
And now with modern use case now features changes across two resets for
mlx5 device.
Quoted 3 lines
Baking such limitation in current spec for past 1.x is sub-optimal.
ok, so to avoid baking such reset flow nasty things in spec, lets avoid flow of
#1 to #5 in hypervisor.
Quoted 4 lines
So, provision the device to support these new feature bits via AQ. So AQ is required for feature provisioning anyway.
So, your point #4 is required in both methods and so it scores same as this
proposal.
Quoted 5 lines
Hence feature bit is not of an advantage.
With
_MACnow we need writable mac on 1.x config space. for 1.x writable mac has two requirements.
1. It must be atomic (not for 0.9.5, but must for 1.x like CVQ)
Quoted 5 lines
Quoted 3 lines
For
LEGACY_MAC, we don't need to be atomic. We manage to survive for several years.It was cited as issue in past discussed when you and Michael both asked to consider tvq. What changed now?
Nothing changed, what I meant is: with admin virtqueue it could be atomic or not.
Quoted 3 lines
The issue is that device hw needs implement special RW registers now for the mac for legacy. This is the unwanted burden not needed, where AQ is better.
How can you solve the atomic issue in this case? The issue is the driver where legacy guests write to device configuration space byte by byte. Modern guests will use cvq.
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines
2. should be synchronous to know success/failure to know when it is effective
It's as simple as allowing mac in the device configuration space writable.
Not simple for hw at scale.
I don't understand, it uses modern device configuration space. How does it matter with the scale of admin virtqueue?
Quoted 11 lines
AQ is superior that communicates rarely used information.
Quoted 7 lines
Quoted 2 lines
Both are present on the CVQ, so yet add another duplicate 1.x scheme that
fulfill above requirements.
I'm not sure how to define duplication, the legacy device configuration space access via admin virtqueue is kind of a duplication in this sense as well.
It only exists on AQ for legacy purpose.
The feature bit defined is not for legacy, hence its duplicated.
It's for legacy mediation and what's more, it allows mac to be configured without cvq.
Quoted 31 lines
Quoted 8 lines
Quoted 8 lines
ok. So may be let's do AQ command for just mac setting.
This scores down now for two reasons.
a. Duplicate of existing 1.x feature
b. requires AQ.Quoted 5 lines
Quoted 1 line
So, from RW mac we moved from 1.x cfg space to AQ. This mediation for 1.x is
not good.
Modern drivers just won't negotiate
LEGACY_MAC, so there's no mediation at all.As feature, there is no need to prefix it with LEGACY because it’s a new feature.
Quoted 16 lines
Quoted 6 lines
And now it's not trivial either as it is not just simple
*p_mac= X. Hence, #1 of non-trivial starts to looks less appealing.Your point #3 about vendor to implement legacy behavior.
If vendor needs to support legacy, vendor anyway needs to implement_HDRanyway in data path.
Quoted 1 line
and above MAC change, and feature provisioning.
I think there are some misunderstandings here:
For legacy behaviour, I mainly meant the behaviour in the corner cases that can't be documented (easily) by the spec since it is defined by the code (e.g Linux drivers and Qemu). LEGACY_MAC/HDR doesn't belong to those since the behaviour is well understood and defined in the spec.
Quoted 5 lines
Quoted 4 lines
It's very hard to audit each corner case and it would easily result in endless errata of the hardware. Modern devices have clearly defined behaviour and it's easier to implement. It's never too late to fix spec if we found a bug.
I don’t see how that is avoided when one side has undefined corner case that is translated to well defined behavior.
Let me give you an example. The legacy device behaviour is basically what Qemu codes did, by reusing the existing Qemu virtio device model codes, most of the issues can be avoided.
Quoted 1 line
It only means that piece will be in endless errata in sw.
Errata in software is much more simpler/cheaper than hardware, isn't it?
Quoted 11 lines
It still scores same or less.
Quoted 8 lines
Quoted 3 lines
For legacy there is no extra/special documentation.
All the behavior listed in Legacy interfaces section for configuration registerpresent applies here.
That's not true, the legacy section is the best effort since it's too late to define (codes came before the spec).
One can added the missing documentation...
It will be too late for the legacy, and it would be too hard since it basically tries to describe the exact code behaviour. And there could be a lot of very hard questions that need to be answered. E.g what happens if a driver tries to use both modern and legacy interfaces?
Quoted 18 lines
Quoted 6 lines
Quoted 4 lines
So, I don't see mac support is trivial by any means compared to proposed
scheme for 1.x.
Quoted 1 line
Hence, comparing trivialness of two solutions seems same for your point #1
Quoted 9 lines
once you do mac plumbing.
Quoted 2 lines
Regarding #2 on nesting. I won't claim I understand this as your level of
knowledge.
Quoted 1 line
If you are sauing only the VF is in VM as virtio PCI device to supporting nested
guest, that doesn't have AQ, hence it doesn't work due above issues.
This is the most common setup, no?
Depends on who see it.
We don’t see common setup for legacy or otherwise.
Quoted 6 lines
Quoted 5 lines
The major issues are the transport function is not self contained in a device (function). This will cause a lot of trouble when trying to implement nesting. E.g you need to assign or emulate SR-IOV from L1 to
L(N-1) in order to let L(N) to work.Those who do nesting usually do assign the PF as well.
This is not what I was told and it's not flexible.
Thanks
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 11 lines
From: Jason Wang <[email protected]>
Sent: Monday, June 26, 2023 10:38 PMQuoted 2 lines
Quoted 1 line
Because there is no point of failing it later when actual rw occurs.
Even with admin virtqueue, the hypervisor should be ready for any admin command failures somehow.
Yes, device failures can happen regardless.
Quoted 4 lines
And with modern devices, the reset is not a must, the hypervisor can just read
device_featuresto check if _MAC/_HDR is there.
I read the spec differently as,
The driver MUST follow this sequence to initialize a device:
1. Reset the device.
Quoted 3 lines
And what's more important,
the hypervisor can know if the feature negotiation succeeds or not. With legacy, there's no such way.
Again, we are not fixing the legacy here.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
1. reset the device
2. set ACK and DRIVER bit
3. read features and make sure_MAC,_HDRare supported.Similar step is required even for AQ since the hypervisor needs to know if legacy commands are supported there.
Quoted 7 lines
Quoted 1 line
No. similar steps are not required on AQ because AQ support discovery is
done once per owner device. Not for each member device.
This seems a topic beyond legacy. If both modern and transitional devices are supported, a per device probing or provisioning is still required. And if provisioning is supported, there's no need to probe MAC/HDR.
That is possible to rely on the AQ.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
4. if not abort.
5. reset the device 2nd time so that guest can have right view of things.On guest access of legacy area:
6. reset the device
7. set ACK and DRIVER bit on guest request 8. read features and make sure_MAC,_HDRare offered
8.1 Hope for the best that on two completely unrelated device reset on #1
Quoted 9 lines
Quoted 6 lines
Quoted 5 lines
and #6, the device offers exact same feature bits.
Explained and discussed in another thread, this is a hard requirement otherwise a lot of things would break.
That limitation is for the past or current.
You need at least a new feature bit.
Not needed, current mechanism is just fine as there is member device driver to owner communication.
Quoted 6 lines
Quoted 2 lines
As we move forward there is no need to continue with such limitation. There may be more work needed to overcome that limitation, but we don’t
want to build on top of that limitation.
Let's open a dedicated thread for this if necessary.
Ok. We don’t want to have that assumption and build interface.
Quoted 30 lines
Quoted 30 lines
Quoted 30 lines
Quoted 6 lines
And mention this in the spec 1.x for rest of the future.
We shouldn't be adding such a limitation to the spec. We have seen this with mlx5 device where 5 years ago one thought this
cannot happen.
Quoted 2 lines
And now with modern use case now features changes across two resets for
mlx5 device.
Quoted 4 lines
Baking such limitation in current spec for past 1.x is sub-optimal.
ok, so to avoid baking such reset flow nasty things in spec, lets avoid flow of
#1 to #5 in hypervisor.
Quoted 5 lines
So, provision the device to support these new feature bits via AQ. So AQ is required for feature provisioning anyway.
So, your point #4 is required in both methods and so it scores same as this
proposal.
Quoted 5 lines
Hence feature bit is not of an advantage.
With
_MACnow we need writable mac on 1.x config space. for 1.x writable mac has two requirements.
1. It must be atomic (not for 0.9.5, but must for 1.x like CVQ)For
LEGACY_MAC, we don't need to be atomic. We manage to survive for several years.
Quoted 7 lines
Quoted 1 line
It was cited as issue in past discussed when you and Michael both asked to
consider tvq.
Quoted 1 line
What changed now?
Nothing changed, what I meant is: with admin virtqueue it could be atomic or not.
I don’t know why you keep circling back on it.
Why do you ask below "how atomicity is achieved if it is not important?"
Quoted 7 lines
Quoted 2 lines
The issue is that device hw needs implement special RW registers now for the
mac for legacy.
Quoted 1 line
This is the unwanted burden not needed, where AQ is better.
How can you solve the atomic issue in this case? The issue is the driver where legacy guests write to device configuration space byte by byte.
You contradict yourself, above you say that we managed, here you say its issue.
It does write byte by byte, a hypervisor can collect 6 bytes and write all together in one go.
It seems that now the past issue of atomicity was raised and solved with AQ, you start to oppose that it...
Quoted 2 lines
Modern guests will use cvq.
Sure.
Quoted 11 lines
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines
2. should be synchronous to know success/failure to know when it is effective
It's as simple as allowing mac in the device configuration space writable.
Not simple for hw at scale.
I don't understand, it uses modern device configuration space. How does it matter with the scale of admin virtqueue?
The new feature bit demands mac address in config space to be read write. Modern device doesnt have it as RW. This burden is unnecessary to carry forward.
An AQ eliminates such heavy device side implementation.
Quoted 9 lines
Quoted 9 lines
AQ is superior that communicates rarely used information.
Quoted 7 lines
Quoted 3 lines
Both are present on the CVQ, so yet add another duplicate 1.x scheme that
fulfill above requirements.
I'm not sure how to define duplication, the legacy device configuration space access via admin virtqueue is kind of a duplication in
Quoted 8 lines
this sense as well.
Quoted 3 lines
Quoted 1 line
It only exists on AQ for legacy purpose.
The feature bit defined is not for legacy, hence its duplicated.It's for legacy mediation and what's more, it allows mac to be configured without cvq.
This fundamental thing is not a gain, but a negative aspect to complicate the device PCI.
It even contradicts for current spec definition " Device configuration space is generally used for rarely-changing or initialization-time parameters".
Quoted 7 lines
Quoted 1 line
I don’t see how that is avoided when one side has undefined corner case that
is translated to well defined behavior.
Let me give you an example. The legacy device behaviour is basically what Qemu codes did, by reusing the existing Qemu virtio device model codes, most of the issues can be avoided.
You are welcome to document them in legacy interface section.
Quoted 4 lines
Quoted 1 line
It only means that piece will be in endless errata in sw.
Errata in software is much more simpler/cheaper than hardware, isn't it?
AQ has ability to implement things in less hw centric way. And sw when necessary can always decide which AQ commands to use. So it is more flexible.
Quoted 11 lines
Quoted 11 lines
It still scores same or less.
Quoted 9 lines
Quoted 4 lines
For legacy there is no extra/special documentation. All the behavior listed in Legacy interfaces section for configuration register
present applies here.
That's not true, the legacy section is the best effort since it's too late to define (codes came before the spec).
Quoted 7 lines
Quoted 1 line
One can added the missing documentation...
It will be too late for the legacy, and it would be too hard since it basically tries to describe the exact code behaviour. And there could be a lot of very hard questions that need to be answered. E.g what happens if a driver tries to use both modern and legacy interfaces?
It is no different than what is defined already in transitional device. No point repeating same questions again, please.
Quoted 28 lines
Quoted 28 lines
Quoted 10 lines
Quoted 5 lines
So, I don't see mac support is trivial by any means compared to proposed
scheme for 1.x.
Quoted 2 lines
Hence, comparing trivialness of two solutions seems same for your point #1
once you do mac plumbing.
Quoted 1 line
Quoted 9 lines
Quoted 2 lines
Regarding #2 on nesting. I won't claim I understand this as your level of
knowledge.
Quoted 2 lines
If you are sauing only the VF is in VM as virtio PCI device to supporting nested
guest, that doesn't have AQ, hence it doesn't work due above issues.
This is the most common setup, no?
Depends on who see it.
We don’t see common setup for legacy or otherwise.Quoted 6 lines
The major issues are the transport function is not self contained in a device (function). This will cause a lot of trouble when trying to implement nesting. E.g you need to assign or emulate SR-IOV from L1 to
L(N-1) in order to let L(N) to work.
Quoted 3 lines
Quoted 1 line
Those who do nesting usually do assign the PF as well.
This is not what I was told and it's not flexible.
One food type does not solve hunger for whole world.
So one can come up with more elaborate solution as time progresses, we are hoping that legacy doesnt reach to that point.
Quoted 14 lines · Parav Pandit
Quoted 12 lines
From: Jason Wang <[email protected]>
Sent: Monday, June 26, 2023 10:38 PMQuoted 2 lines
Quoted 1 line
Because there is no point of failing it later when actual rw occurs.
Even with admin virtqueue, the hypervisor should be ready for any admin command failures somehow.
Yes, device failures can happen regardless.
Quoted 7 lines
Quoted 4 lines
And with modern devices, the reset is not a must, the hypervisor can just read
device_featuresto check if _MAC/_HDR is there.I read the spec differently as,
The driver MUST follow this sequence to initialize a device:
1. Reset the device.
It's not the initialization, it's a probing of supported features.
Quoted 5 lines
Quoted 4 lines
And what's more important,
the hypervisor can know if the feature negotiation succeeds or not. With legacy, there's no such way.Again, we are not fixing the legacy here.
I mean, it's not worse than failing silently in the legacy case so we don't need to care.
Quoted 92 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 5 lines
1. reset the device
2. set ACK and DRIVER bit
3. read features and make sure_MAC,_HDRare supported.Similar step is required even for AQ since the hypervisor needs to know if legacy commands are supported there.
Quoted 7 lines
Quoted 1 line
No. similar steps are not required on AQ because AQ support discovery is
done once per owner device. Not for each member device.
This seems a topic beyond legacy. If both modern and transitional devices are supported, a per device probing or provisioning is still required. And if provisioning is supported, there's no need to probe MAC/HDR.
That is possible to rely on the AQ.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
4. if not abort.
5. reset the device 2nd time so that guest can have right view of things.On guest access of legacy area:
6. reset the device
7. set ACK and DRIVER bit on guest request 8. read features and make sure_MAC,_HDRare offered
8.1 Hope for the best that on two completely unrelated device reset on #1Quoted 9 lines
Quoted 6 lines
Quoted 5 lines
and #6, the device offers exact same feature bits.
Explained and discussed in another thread, this is a hard requirement otherwise a lot of things would break.
That limitation is for the past or current.
You need at least a new feature bit.
Not needed, current mechanism is just fine as there is member device driver to owner communication.
Quoted 6 lines
Quoted 2 lines
As we move forward there is no need to continue with such limitation. There may be more work needed to overcome that limitation, but we don’t
want to build on top of that limitation.
Let's open a dedicated thread for this if necessary.
Ok. We don’t want to have that assumption and build interface.
Quoted 30 lines
Quoted 30 lines
Quoted 30 lines
Quoted 6 lines
And mention this in the spec 1.x for rest of the future.
We shouldn't be adding such a limitation to the spec. We have seen this with mlx5 device where 5 years ago one thought this
cannot happen.
Quoted 2 lines
And now with modern use case now features changes across two resets for
mlx5 device.
Quoted 4 lines
Baking such limitation in current spec for past 1.x is sub-optimal.
ok, so to avoid baking such reset flow nasty things in spec, lets avoid flow of
#1 to #5 in hypervisor.
Quoted 5 lines
So, provision the device to support these new feature bits via AQ. So AQ is required for feature provisioning anyway.
So, your point #4 is required in both methods and so it scores same as this
proposal.
Quoted 5 lines
Hence feature bit is not of an advantage.
With
_MACnow we need writable mac on 1.x config space. for 1.x writable mac has two requirements.
1. It must be atomic (not for 0.9.5, but must for 1.x like CVQ)For
LEGACY_MAC, we don't need to be atomic. We manage to survive for several years.Quoted 7 lines
Quoted 1 line
It was cited as issue in past discussed when you and Michael both asked to
consider tvq.
Quoted 1 line
What changed now?
Nothing changed, what I meant is: with admin virtqueue it could be atomic or not.
I don’t know why you keep circling back on it.
Why do you ask below "how atomicity is achieved if it is not important?"
Quoted 5 lines
Quoted 2 lines
The issue is that device hw needs implement special RW registers now for the
mac for legacy.
Quoted 1 line
This is the unwanted burden not needed, where AQ is better.
Quoted 7 lines
Quoted 2 lines
How can you solve the atomic issue in this case? The issue is the driver where legacy guests write to device configuration space byte by byte.
You contradict yourself, above you say that we managed, here you say its issue.
It does write byte by byte, a hypervisor can collect 6 bytes and write all together in one go.
It seems that now the past issue of atomicity was raised and solved with AQ, you start to oppose that it...
Let me clarify:
Let's first look at the ABI solely:
+struct virtio_admin_cmd_ld_reg_wr_data {
+ u8 offset; /* Starting byte offset of the device register(s) to write */
+ u8 register[];
+};
For accessing mac, it could be atomic or not.
Hypervisor can try to collect 6 bytes for atomicy but again it's best effort and may (for Linux) or may not work for all kinds of guests.
Quoted 11 lines
Quoted 3 lines
Modern guests will use cvq.
Sure.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
2. should be synchronous to know success/failure to know when it is effective
It's as simple as allowing mac in the device configuration space writable.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Not simple for hw at scale.
I don't understand, it uses modern device configuration space. How does it matter with the scale of admin virtqueue?
The new feature bit demands mac address in config space to be read write. Modern device doesnt have it as RW. This burden is unnecessary to carry forward.
How much burden if we just make 6 byte RW per device?
Quoted 13 lines
An AQ eliminates such heavy device side implementation.
Quoted 11 lines
Quoted 9 lines
AQ is superior that communicates rarely used information.
Quoted 7 lines
Quoted 3 lines
Both are present on the CVQ, so yet add another duplicate 1.x scheme that
fulfill above requirements.
I'm not sure how to define duplication, the legacy device configuration space access via admin virtqueue is kind of a duplication in
this sense as well.
Quoted 1 line
Quoted 1 line
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
It only exists on AQ for legacy purpose.
The feature bit defined is not for legacy, hence its duplicated.It's for legacy mediation and what's more, it allows mac to be configured without cvq.
This fundamental thing is not a gain, but a negative aspect to complicate the device PCI.
Is this minor stuff more complicated than the entire admin virtqueue stuff?
The point is methodology, mediation on top of modern devices is simpler, and a lot of other methods could be used if LEGACY_MAC doesn't suffice.
Quoted 1 line
It even contradicts for current spec definition " Device configuration space is generally used for rarely-changing or initialization-time parameters".
I don't see how, mac is rarely changed, and for blocks we have writeable stuffs like wce as well.
Quoted 9 lines
Quoted 8 lines
Quoted 2 lines
I don’t see how that is avoided when one side has undefined corner case that
is translated to well defined behavior.
Let me give you an example. The legacy device behaviour is basically what Qemu codes did, by reusing the existing Qemu virtio device model codes, most of the issues can be avoided.
You are welcome to document them in legacy interface section.
Well, you can't describe the behaviour of several kilo lines of code precisely.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
It only means that piece will be in endless errata in sw.
Errata in software is much more simpler/cheaper than hardware, isn't it?
AQ has ability to implement things in less hw centric way. And sw when necessary can always decide which AQ commands to use. So it is more flexible.
A lot of examples have been demonstrated, software erratas is much more flexible. It's really common to workaround hardware errata in kernel or BIOS.
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
It still scores same or less.
Quoted 9 lines
Quoted 4 lines
For legacy there is no extra/special documentation. All the behavior listed in Legacy interfaces section for configuration register
present applies here.
That's not true, the legacy section is the best effort since it's too late to define (codes came before the spec).
Quoted 8 lines
Quoted 7 lines
Quoted 1 line
One can added the missing documentation...
It will be too late for the legacy, and it would be too hard since it basically tries to describe the exact code behaviour. And there could be a lot of very hard questions that need to be answered. E.g what happens if a driver tries to use both modern and legacy interfaces?
It is no different than what is defined already in transitional device.
Can you show me where the spec answers this question?
Thanks
Quoted 31 lines
No point repeating same questions again, please.
Quoted 28 lines
Quoted 28 lines
Quoted 10 lines
Quoted 5 lines
So, I don't see mac support is trivial by any means compared to proposed
scheme for 1.x.
Quoted 2 lines
Hence, comparing trivialness of two solutions seems same for your point #1
once you do mac plumbing.
Quoted 1 line
Quoted 9 lines
Quoted 2 lines
Regarding #2 on nesting. I won't claim I understand this as your level of
knowledge.
Quoted 2 lines
If you are sauing only the VF is in VM as virtio PCI device to supporting nested
guest, that doesn't have AQ, hence it doesn't work due above issues.
This is the most common setup, no?
Depends on who see it.
We don’t see common setup for legacy or otherwise.Quoted 6 lines
The major issues are the transport function is not self contained in a device (function). This will cause a lot of trouble when trying to implement nesting. E.g you need to assign or emulate SR-IOV from L1 to
L(N-1) in order to let L(N) to work.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Those who do nesting usually do assign the PF as well.
This is not what I was told and it's not flexible.
One food type does not solve hunger for whole world.
So one can come up with more elaborate solution as time progresses, we are hoping that legacy doesnt reach to that point.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 13 lines · Michael S. Tsirkin
Quoted 11 lines · Jason Wang
Quoted 1 line
I would like to keep the stateful interactions of 1.x device outside of 0.9.5.
I don't think this is a real problem, but let's see the drawbacks of this proposal:
1) non-trivial changes of full new transport alike ABI
2) can't work for nesting
3) require vendor to implement legacy behaviour which can't be documented precisely
4) require admin virtqueue to work
Quoted 7 lines
Quoted 3 lines
We won't have the above issues if we use modern + legacy header/mac.
Thanks
All this is true. But it's by design. It makes the legacy thing as isolated as possible.
Only the device ABI but not the implementation I think.
Quoted 2 lines
Because let's be frank we won't be
able to drop legacy support in like 10 years.
Another question is, current modern PCI layout could become "legacy" in the future. So should then the hardware stick the two legacy interfaces?
Quoted 2 lines
But hardware
vendors will do that quickly if they can't sell hardware.
It looks to me that producing a modern only device will be more quick and easy?
Thanks
Quoted 4 lines
--
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 10 lines
From: Jason Wang <[email protected]>
Sent: Sunday, June 25, 2023 11:50 PMQuoted 2 lines
But hardware
vendors will do that quickly if they can't sell hardware.It looks to me that producing a modern only device will be more quick and easy?
AQ based legacy is quick and easy as opposed to other methods captured in alternative section of the latest v6.
Working on v7 to continue over AQ.
Quoted 6 lines · Jason Wang
Quoted 2 lines
But hardware
vendors will do that quickly if they can't sell hardware.It looks to me that producing a modern only device will be more quick and easy?
Thanks
Exactly, that's the point.
Signature · 18 lines
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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
Quoted 6 lines · Jason Wang
Quoted 5 lines · Parav Pandit
Quoted 4 lines
From: Jason Wang <[email protected]>
Sent: Wednesday, June 7, 2023 2:54 AM
Quoted 6 lines
Quoted 3 lines
Quoted 2 lines
Hypervisor can trap the legacy device configuration space write and convert it to cvq commands.
Michael already answered that cvq is not trapped; this is the main design goal we talked several times that it is passthrough device.
Is this really a blocker? Wouldn't a new
feature(_F_LEFACY_MAC)or cap resolve this?
Of course we can create a set of feature bits emulating legacy.
Quoted 9 lines
Quoted 9 lines
So no point discussing this again.
If you have any comments on v4, please let me know.
Both the design points are addressed in v4.
1. To split to two commands for device and config area
2. Use pci cap to learn about notification region
Quoted 6 lines
Quoted 1 line
Since this ABI reflects what we agree on,
I think not since you fail to explain why this approach is better than simply adding new features like
_F_LEGACY_HEADERand_F_LEGACY_MAC.Thanks
I can explain, I think it's better for these reasons:
- limit the scope. We started out with _F_LEGACY_HEADER but now there's _F_LEGACY_MAC too. What about other device types? Could be nasty surprises there too. This way we just say "make legacy guests work" and this is the problem of the hardware vendor not ours.
- limit the impact. We don't get to maintain the set of hacks needed for legacy in the hypervisor - when some weird legacy support requirement surfaces, it will be up to the vendor to fix. HW vendors are also more agressive in deprecating old hardware - they will just stop shipping new hardware when there are no new customers and we can stop adding new hacks.
- test out admin command interface. This use-case is smaller
than full transport vq but similar enough that
we will learn valuable lessons from it.
For example, it already helped us find and correct
a design mistake where admin commands had 8 byte aligned length. As another example, I am working on ability to report events to admin command infrastructure which is currently missing.
With that in place we will be able to add INT#x emulation for very old guests.
In short, this interface as you correctly point out is not the normal way we build interfaces since it is not modular and less flexible than individual feature bits. However, for the legacy interface this might be a good thing.
Quoted 1 line
Quoted 1 line
I would want to raise for vote in coming days to be part of 1.3 in few days as we have more than 3 weeks to sort out non-ABI language part.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Quoted 31 lines · Michael S. Tsirkin
Quoted 6 lines · Jason Wang
Quoted 5 lines · Parav Pandit
Quoted 4 lines
From: Jason Wang <[email protected]>
Sent: Wednesday, June 7, 2023 2:54 AMQuoted 6 lines
Quoted 3 lines
Quoted 2 lines
Hypervisor can trap the legacy device configuration space write and convert it to cvq commands.
Michael already answered that cvq is not trapped; this is the main design goal we talked several times that it is passthrough device.
Is this really a blocker? Wouldn't a new
feature(_F_LEFACY_MAC)or cap resolve this?Of course we can create a set of feature bits emulating legacy.
Quoted 14 lines
Quoted 10 lines
So no point discussing this again.
If you have any comments on v4, please let me know.
Both the design points are addressed in v4.
1. To split to two commands for device and config area
2. Use pci cap to learn about notification regionSince this ABI reflects what we agree on,
I think not since you fail to explain why this approach is better than simply adding new features like
_F_LEGACY_HEADERand_F_LEGACY_MAC.
Quoted 7 lines
Quoted 1 line
Thanks
I can explain, I think it's better for these reasons:
- limit the scope. We started out with
_F_LEGACY_HEADERbut now there's_F_LEGACY_MACtoo. What about other device types?
Fortunately, we only have a few types of legacy devices.
Quoted 1 line
Could be nasty surprises there too.
Yes, but this needs to be addressed no matter what kind of device ABI is chosen.
Quoted 2 lines
This way we just say "make legacy guests work" and this is the problem of the hardware vendor not ours.
Probably, but we need to try our best to simplify the vendor's life.
Quoted 3 lines
- limit the impact. We don't get to maintain the set of hacks needed for legacy in the hypervisor
This is only true if the vendor fully understands the behaviour of the legacy and implements it correctly which would be very hard. We would end up with quirks in the hypervisor soon or later.
Quoted 6 lines
- when some weird legacy
support requirement surfaces, it will be up to the vendor to fix. HW vendors are also more agressive in deprecating old hardware - they will just stop shipping new hardware when there are no new customers and we can stop adding new hacks.
But the hacks would be there forever if there's users.
Quoted 4 lines
- test out admin command interface. This use-case is smaller than full transport vq but similar enough that we will learn valuable lessons from it.
Another issue is that the interface is designed to be PCI specific (at least from its name) which may result in a strange mediation for MMIO legacy guests.
Quoted 4 lines
For example, it already helped us find and correct
a design mistake where admin commands had 8 byte aligned length. As another example, I am working on ability to report events to admin command infrastructure which is currently missing.
If we want a MMIO interface for admin commands, it requires more extensions for such kind of notification.
Quoted 9 lines
With that in place we will be able to add INT#x emulation for very old guests.
In short, this interface as you correctly point out is not the normal way we build interfaces since it is not modular and less flexible than individual feature bits. However, for the legacy interface this might be a good thing.
Ok, I think I would not object to this proposal, but we should not exclude the possibility of having things like LEGACY_HEADER in the future.
Thanks
Quoted 4 lines
Quoted 3 lines
Quoted 3 lines
I would want to raise for vote in coming days to be part of 1.3 in few days as we have more than 3 weeks to sort out non-ABI language part.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 12 lines
From: [email protected] <[email protected] open.org> On Behalf Of Jason Wang
Sent: Monday, June 26, 2023 12:00 AMQuoted 2 lines
This way we just say "make legacy guests work" and this is the problem of the hardware vendor not ours.
Probably, but we need to try our best to simplify the vendor's life.
Quoted 1 line
Quoted 7 lines
Quoted 2 lines
- limit the impact. We don't get to maintain the set of hacks needed for legacy in the hypervisor
This is only true if the vendor fully understands the behaviour of the legacy and implements it correctly which would be very hard. We would end up with quirks in the hypervisor soon or later.
You can help vendor understand the legacy so that hypervisor don’t have the quirks. :)
Quoted 10 lines
Quoted 6 lines
- when some weird legacy
support requirement surfaces, it will be up to the vendor to fix. HW vendors are also more agressive in deprecating old hardware - they will just stop shipping new hardware when there are no new customers and we can stop adding new hacks.But the hacks would be there forever if there's users.
Quoted 1 line
Quoted 7 lines
Quoted 3 lines
- test out admin command interface. This use-case is smaller than full transport vq but similar enough that we will learn valuable lessons from it.
Another issue is that the interface is designed to be PCI specific (at least from its name) which may result in a strange mediation for MMIO legacy guests.
It is no different than AQ being only for the PCI today.
So far no user of MMIO legacy, may be in future it can be extended if required.
We don’t want legacy to be that grand either.
I am moving most things to generic section (instead of PCI) based on Michael's inputs.
Quoted 14 lines
Quoted 3 lines
For example, it already helped us find and correct
a design mistake where admin commands had 8 byte aligned length. As another example, I am working on ability to report events to admincommand
Quoted 1 line
infrastructure which is currently missing.
If we want a MMIO interface for admin commands, it requires more extensions for such kind of notification.
Quoted 5 lines
With that in place we will be able to add INT#x emulation for very old guests.
Quoted 7 lines
Quoted 4 lines
In short, this interface as you correctly point out is not the normal way we build interfaces since it is not modular and less flexible than individual feature bits. However, for the legacy interface this might be a good thing.
Ok, I think I would not object to this proposal, but we should not exclude the possibility of having things like
LEGACY_HEADERin the future.
Thanks.
Quoted 13 lines · Parav Pandit
Quoted 13 lines
From: [email protected] <[email protected] open.org> On Behalf Of Jason Wang
Sent: Monday, June 26, 2023 12:00 AMQuoted 2 lines
This way we just say "make legacy guests work" and this is the problem of the hardware vendor not ours.
Probably, but we need to try our best to simplify the vendor's life.
Quoted 1 line
Quoted 8 lines
Quoted 7 lines
Quoted 2 lines
- limit the impact. We don't get to maintain the set of hacks needed for legacy in the hypervisor
This is only true if the vendor fully understands the behaviour of the legacy and implements it correctly which would be very hard. We would end up with quirks in the hypervisor soon or later.
You can help vendor understand the legacy so that hypervisor don’t have the quirks. :)
I will try, but when trying to develop hardening for virtio drivers, I feel it could be not an easy task when dealing with legacy devices (with unexpected behaviours).
If we go with modern devices, our life will be much easier and that's why I prefer to go with that way.
Thanks
Quoted 45 lines
Quoted 11 lines
Quoted 7 lines
- when some weird legacy
support requirement surfaces, it will be up to the vendor to fix. HW vendors are also more agressive in deprecating old hardware - they will just stop shipping new hardware when there are no new customers and we can stop adding new hacks.But the hacks would be there forever if there's users.
Quoted 1 line
Quoted 7 lines
Quoted 3 lines
- test out admin command interface. This use-case is smaller than full transport vq but similar enough that we will learn valuable lessons from it.
Another issue is that the interface is designed to be PCI specific (at least from its name) which may result in a strange mediation for MMIO legacy guests.
It is no different than AQ being only for the PCI today.
So far no user of MMIO legacy, may be in future it can be extended if required.We don’t want legacy to be that grand either.
I am moving most things to generic section (instead of PCI) based on Michael's inputs.
Quoted 19 lines
Quoted 3 lines
For example, it already helped us find and correct
a design mistake where admin commands had 8 byte aligned length. As another example, I am working on ability to report events to admincommand
Quoted 1 line
infrastructure which is currently missing.
If we want a MMIO interface for admin commands, it requires more extensions for such kind of notification.
Quoted 9 lines
With that in place we will be able to add INT#x emulation for very old guests.
In short, this interface as you correctly point out is not the normal way we build interfaces since it is not modular and less flexible than individual feature bits. However, for the legacy interface this might be a good thing.
Quoted 4 lines
Quoted 2 lines
Ok, I think I would not object to this proposal, but we should not exclude the possibility of having things like
LEGACY_HEADERin the future.Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Quoted 8 lines · Jason Wang
Quoted 6 lines
- when some weird legacy
support requirement surfaces, it will be up to the vendor to fix. HW vendors are also more agressive in deprecating old hardware - they will just stop shipping new hardware when there are no new customers and we can stop adding new hacks.But the hacks would be there forever if there's users.
If they are in hardware, they won't - only as long as hardware exists.
Quoted 8 lines
Quoted 4 lines
- test out admin command interface. This use-case is smaller than full transport vq but similar enough that we will learn valuable lessons from it.
Another issue is that the interface is designed to be PCI specific (at least from its name) which may result in a strange mediation for MMIO legacy guests.
I doubt there's a way to make guests utilizing legacy MMIO work with offloads - it's not widely used on x86 and other platforms have weaker ordering.
Quoted 7 lines
Quoted 4 lines
For example, it already helped us find and correct
a design mistake where admin commands had 8 byte aligned length. As another example, I am working on ability to report events to admin command infrastructure which is currently missing.If we want a MMIO interface for admin commands, it requires more extensions for such kind of notification.
Yes I don't know how that will work. Not sure what the implication is though.
Quoted 10 lines
Quoted 9 lines
With that in place we will be able to add INT#x emulation for very old guests.
In short, this interface as you correctly point out is not the normal way we build interfaces since it is not modular and less flexible than individual feature bits. However, for the legacy interface this might be a good thing.
Quoted 5 lines
Ok, I think I would not object to this proposal, but we should not exclude the possibility of having things like
LEGACY_HEADERin the future.Thanks
Yes I always disliked that change. Feel free to propose it, I'll support.
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
Quoted 3 lines
I would want to raise for vote in coming days to be part of 1.3 in few days as we have more than 3 weeks to sort out non-ABI language part.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Quoted 11 lines · Jason Wang
Quoted 9 lines · Michael S. Tsirkin
Quoted 1 line · Parav Pandit
Rolling v4 now.
Great thanks! I think the result will be in a good shape from the ABI point of view. Good job!
I think so far Jason was the only one with significant comments on the series so let's see what he says.
Quoted 6 lines
I can't say I like this. I prefer to do meditation on top of a modern device with some lightweight features like
_F_LEAGCY_HEADER. I don't see any advantages of a new legacy ABI over_F_LEGACY_HEADER. I don't want to repeat but I don't get any response here
After trying to write this I came away with a conviction that if hardware vendors are prepared to implement legacy in hardware we should let them do exactly that.
Quoted 11 lines
Quoted 6 lines
From my personal POV what will be left to do to get this feature ready for merging would be
- tightening the language:
- thinking of and addressing all kind of corner cases.We need first to check whether it's possible (not too late) to find all the corner cases.
Thanks
For sure, but of course we need to stop arguing about whether to have the feature in the 1st place.
Quoted 22 lines
Quoted 22 lines
Since by now from our email discussions I have I think a decent understanding of how the feature is supposed to work I understand how these things work but I think there are still things that would be a bit unclear for an unprepared reader.
Just to give a random example, there's no explicit
time where the member kind of switches to the legacy/back to modern mode. I am guessing setting DRIVER bit through legacy interface does this. We'll want to list that.I'll try to help find these issues and maybe even suggest wording.
I've delayed commenting on these until the high level design is agreed on, didn't want to make you waste time on polishing as the patches undergo significant changes, and I suggest you do the same in v4: let's make sure there's a wide agreement on the ABI then focus on the spec language.
Quoted 3 lines
Quoted 3 lines
--
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/