summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormstsirkin <mstsirkin@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652>2015-10-21 14:20:27 +0000
committermstsirkin <mstsirkin@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652>2015-10-21 14:20:27 +0000
commitf8d44600b775ffdce8be566c9c5764022ef2c3dc (patch)
tree3a76e3bc1af27e852234fbe17ba3ba9d6f9ecd1a
parentff6b2bb653ae98cd0e71523d9c82f908bc95f035 (diff)
pci: clarify configuration access capability rules
The point of the configuration access capability is to enable access to other capabilities. The intent never was to allow writes to a random place within device BARs. Limiting drivers simplifies devices - and devices can always add another capability if drivers ever want to access some other range. This resolves VIRTIO-145. Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Accepted by electronic ballot: https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=2865 git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio/branches/v1.0@547 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652
-rw-r--r--content.tex7
1 files changed, 7 insertions, 0 deletions
diff --git a/content.tex b/content.tex
index e054919..941daa6 100644
--- a/content.tex
+++ b/content.tex
@@ -1132,6 +1132,7 @@ The virtio device configuration layout includes several structures:
\item Notifications
\item ISR Status
\item Device-specific configuration (optional)
+\item PCI configuration access
\end{itemize}
Each structure can be mapped by a Base Address register (BAR) belonging to
@@ -1578,6 +1579,12 @@ at BAR selected by \field{cap.bar} and store the first \field{cap.length} bytes
The driver MUST NOT write a \field{cap.offset} which is not
a multiple of \field{cap.length} (ie. all accesses MUST be aligned).
+The driver MUST NOT read or write \field{pci_cfg_data}
+unless \field{cap.bar}, \field{cap.length} and \field{cap.offset}
+address \field{cap.length} bytes within a BAR range
+specified by some other Virtio Structure PCI Capability
+of type other than \field{VIRTIO_PCI_CAP_PCI_CFG}.
+
\subsubsection{Legacy Interfaces: A Note on PCI Device Layout}\label{sec:Virtio Transport Options / Virtio Over PCI Bus / PCI Device Layout / Legacy Interfaces: A Note on PCI Device Layout}
Transitional devices MUST present part of configuration