← Prev in month ← Prev in thread
Next in thread → Next in month →

[PATCH 2/3] balloon: switch from C struct to table

From
Michael S. Tsirkin <>
Date
2014-02-11T07:29:10+00:00
ID
Thread
[PATCH 2/3] balloon: switch from C struct to table
Since old balloon uses little endian in legacy mode violating
the rule that leXX means guest endian in legacy mode,
let's not use leXX for that.

Switch from C struct to a table and document endian-ness
explicitly.

Signed-off-by: Michael S. Tsirkin <>
---
 content.tex | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/content.tex b/content.tex
index c00a1a9..61d3c2b 100644
--- a/content.tex
+++ b/content.tex
@@ -3572,15 +3572,19 @@ guest memory statistics to the host.
 \end{description}
 
 \subsection{Device configuration layout}\label{sec:Device Types / Memory Balloon Device / Device configuration layout}
-  Both fields of this configuration
-  are always available.
+  Both fields of this configuration use little-endian byte
+  ordering and are always available.
+
+\begin{tabularx}{\textwidth}{ |X||X|X| }
+\hline
+ Bits & 32 & 32 \\
+\hline
+ Read / Write & R & R \\
+\hline
+ Purpose & num_pages & actual \\
+\hline
+\end{tabularx}
 
-\begin{lstlisting}
-struct virtio_balloon_config {
-        le32 num_pages;
-        le32 actual;
-};
-\end{lstlisting}
 
 \subsubsection{Legacy Interface: Device configuration layout}\label{sec:Device Types / Memory Balloon Device / Device configuration layout / Legacy Interface: Device configuration layout}
 Note that these fields are always little endian, despite convention
-- 
MST
← Prev in month ← Prev in thread
Next in thread → Next in month →