Commit a9fd134b authored by Ioana Ciornei's avatar Ioana Ciornei Committed by Jonathan Corbet

docs: kvm: properly format code blocks and lists

Add a '::' so that a code block is interpreted properly and also add a
blank line before the start of a list.

Fixes: fdc09ddd ("KVM: stats: Add documentation for binary statistics interface")
Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: default avatarJing Zhang <jingzhangos@google.com>
Link: https://lore.kernel.org/r/20210722100356.635078-4-ciorneiioana@gmail.comSigned-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 8b967164
...@@ -5201,6 +5201,7 @@ trailing ``'\0'``, is indicated by the ``name_size`` field in the header. ...@@ -5201,6 +5201,7 @@ trailing ``'\0'``, is indicated by the ``name_size`` field in the header.
The descriptors block is only needed to be read once for the lifetime of the The descriptors block is only needed to be read once for the lifetime of the
file descriptor contains a sequence of ``struct kvm_stats_desc``, each followed file descriptor contains a sequence of ``struct kvm_stats_desc``, each followed
by a string of size ``name_size``. by a string of size ``name_size``.
::
#define KVM_STATS_TYPE_SHIFT 0 #define KVM_STATS_TYPE_SHIFT 0
#define KVM_STATS_TYPE_MASK (0xF << KVM_STATS_TYPE_SHIFT) #define KVM_STATS_TYPE_MASK (0xF << KVM_STATS_TYPE_SHIFT)
...@@ -5234,6 +5235,7 @@ by this descriptor. Its endianness is CPU native. ...@@ -5234,6 +5235,7 @@ by this descriptor. Its endianness is CPU native.
The following flags are supported: The following flags are supported:
Bits 0-3 of ``flags`` encode the type: Bits 0-3 of ``flags`` encode the type:
* ``KVM_STATS_TYPE_CUMULATIVE`` * ``KVM_STATS_TYPE_CUMULATIVE``
The statistics data is cumulative. The value of data can only be increased. The statistics data is cumulative. The value of data can only be increased.
Most of the counters used in KVM are of this type. Most of the counters used in KVM are of this type.
...@@ -5252,6 +5254,7 @@ Bits 0-3 of ``flags`` encode the type: ...@@ -5252,6 +5254,7 @@ Bits 0-3 of ``flags`` encode the type:
The corresponding ``size`` field for this type is always 1. The corresponding ``size`` field for this type is always 1.
Bits 4-7 of ``flags`` encode the unit: Bits 4-7 of ``flags`` encode the unit:
* ``KVM_STATS_UNIT_NONE`` * ``KVM_STATS_UNIT_NONE``
There is no unit for the value of statistics data. This usually means that There is no unit for the value of statistics data. This usually means that
the value is a simple counter of an event. the value is a simple counter of an event.
...@@ -5266,6 +5269,7 @@ Bits 4-7 of ``flags`` encode the unit: ...@@ -5266,6 +5269,7 @@ Bits 4-7 of ``flags`` encode the unit:
Bits 8-11 of ``flags``, together with ``exponent``, encode the scale of the Bits 8-11 of ``flags``, together with ``exponent``, encode the scale of the
unit: unit:
* ``KVM_STATS_BASE_POW10`` * ``KVM_STATS_BASE_POW10``
The scale is based on power of 10. It is used for measurement of time and The scale is based on power of 10. It is used for measurement of time and
CPU clock cycles. For example, an exponent of -9 can be used with CPU clock cycles. For example, an exponent of -9 can be used with
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment