From 21f3413a639a8412dfe037b371e9aa0ea9d027d0 Mon Sep 17 00:00:00 2001 From: rusty Date: Mon, 12 May 2014 01:57:08 +0000 Subject: VIRTIO-103: PCI: require read-after-write on device_status reset. As passed at meeting 2014-05-06: https://lists.oasis-open.org/archives/virtio/201405/msg00016.html Signed-off-by: Rusty Russell git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio@364 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652 --- content.tex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/content.tex b/content.tex index 2a7a513..7b99650 100644 --- a/content.tex +++ b/content.tex @@ -1258,7 +1258,8 @@ and if that flag is set when the driver reads from the device-specific configuration, increment \field{config_generation} and clear the flag. \end{note} -The device MUST reset when 0 is written to \field{device_status}. +The device MUST reset when 0 is written to \field{device_status}, and +present a 0 in \field{device_status} once that is done. The device MUST present a 0 in \field{queue_enable} on reset. @@ -1274,6 +1275,9 @@ The driver MUST NOT write a value which is not a power of 2 to \field{queue_size The driver MUST configure the other virtqueue fields before enabling the virtqueue with \field{queue_enable}. +After writing 0 to \field{device_status}, the driver MUST wait for a read of +\field{device_status} to return 0 before reinitializing the device. + \subsubsection{Notification structure layout}\label{sec:Virtio Transport Options / Virtio Over PCI Bus / PCI Device Layout / Notification capability} The notification location is found using the VIRTIO_PCI_CAP_NOTIFY_CFG -- cgit v1.2.3