Skip to contentSkip to conversation

virtio: Describe @map and @vmap members in virtio_device struct

PATCH Superseded Bagas Sanjaya 2 participants 3 messages Dec 19, 2025 – Dec 27, 2025 virtio core

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 virtio: Describe @map and @vmap members in virtio_device struct

Sphinx reports kernel-doc warnings:

WARNING: ./include/linux/virtio.h:181 struct member 'map' not described in 'virtio_device'
WARNING: ./include/linux/virtio.h:181 struct member 'vmap' not described in 'virtio_device'

Describe these members.

Fixes bee8c7c24b7373 ("virtio: introduce map ops in virtio core")

---
This patch is split from kernel-doc fixup series [1].

Changes since v1 [2]:

- Apply review trailers (Michael, Jason)

[1]: https://lore.kernel.org/lkml/[email protected]/
[2]: https://lore.kernel.org/lkml/[email protected]/

 include/linux/virtio.h | 2 ++
 1 file changed, 2 insertions(+)
include/linux/virtio.h +2 -0
index 132a474e59140a..68ead8fda9c921 100644
@@ -150,11 +150,13 @@ struct virtio_admin_cmd {
  * @id: the device type identification (used to match it with a driver).
  * @config: the configuration ops for this device.
  * @vringh_config: configuration ops for host vrings.
+ * @map: configuration ops for device's mapping buffer
  * @vqs: the list of virtqueues for this device.
  * @features: the 64 lower features supported by both driver and device.
  * @features_array: the full features space supported by both driver and
  *		    device.
  * @priv: private pointer for the driver's use.
+ * @vmap: device virtual map
  * @debugfs_dir: debugfs directory entry.
  * @debugfs_filter_features: features to be filtered set by debugfs.
  */

base-commit: ea1013c1539270e372fc99854bc6e4d94eaeff66

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#1 lore raw
Quoted 11 lines · Bagas Sanjaya

Sphinx reports kernel-doc warnings:

WARNING: ./include/linux/virtio.h:181 struct member 'map' not described in 'virtio_device'
WARNING: ./include/linux/virtio.h:181 struct member 'vmap' not described in 'virtio_device'

Describe these members.

Fixes bee8c7c24b7373 ("virtio: introduce map ops in virtio core")

Well I was going to apply and now I have second thoughts. The patch does describe the members, it just does not describe them well.
for example,

Quoted 18 lines

---
This patch is split from kernel-doc fixup series [1].

Changes since v1 [2]:

- Apply review trailers (Michael, Jason)

[1]: https://lore.kernel.org/lkml/[email protected]/
[2]: https://lore.kernel.org/lkml/[email protected]/

 include/linux/virtio.h | 2 ++
 1 file changed, 2 insertions(+)
include/linux/virtio.h +0 -0
index 132a474e59140a..68ead8fda9c921 100644

include/linux/virtio.h struct virtio_admin_cmd { · line 153

Quoted 4 lines
include/linux/virtio.h +1 -0
@@ -150,11 +150,13 @@ struct virtio_admin_cmd {
  * @id: the device type identification (used to match it with a driver).
  * @config: the configuration ops for this device.
  * @vringh_config: configuration ops for host vrings.
+ * @map: configuration ops for device's mapping buffer

there's no "mapping buffer" that needs configuration.
the type tells it all:
* struct virtio_map_ops - operations for mapping buffer for a virtio device

include/linux/virtio.h struct virtio_admin_cmd { · line 159

Quoted 6 lines
include/linux/virtio.h +1 -0
  * @vqs: the list of virtqueues for this device.
  * @features: the 64 lower features supported by both driver and device.
  * @features_array: the full features space supported by both driver and
  *		    device.
  * @priv: private pointer for the driver's use.
+ * @vmap: device virtual map

this one is not a "virtual map" either.
more a "device or domain used for mapping memory"

Quoted 7 lines
include/linux/virtio.h +0 -0
  * @debugfs_dir: debugfs directory entry.
  * @debugfs_filter_features: features to be filtered set by debugfs.
  */

base-commit: ea1013c1539270e372fc99854bc6e4d94eaeff66

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#2 lore raw
Quoted 22 lines · Michael S. Tsirkin

include/linux/virtio.h struct virtio_admin_cmd { · line 153

Quoted 9 lines
include/linux/virtio.h +1 -0
index 132a474e59140a..68ead8fda9c921 100644
@@ -150,11 +150,13 @@ struct virtio_admin_cmd {
  * @id: the device type identification (used to match it with a driver).
  * @config: the configuration ops for this device.
  * @vringh_config: configuration ops for host vrings.
+ * @map: configuration ops for device's mapping buffer

there's no "mapping buffer" that needs configuration.
the type tells it all:
* struct virtio_map_ops - operations for mapping buffer for a virtio device

include/linux/virtio.h struct virtio_admin_cmd { · line 159

Quoted 6 lines
include/linux/virtio.h +1 -0
  * @vqs: the list of virtqueues for this device.
  * @features: the 64 lower features supported by both driver and device.
  * @features_array: the full features space supported by both driver and
  *		    device.
  * @priv: private pointer for the driver's use.
+ * @vmap: device virtual map
Quoted 2 lines

this one is not a "virtual map" either.
more a "device or domain used for mapping memory"

Thanks for the suggestions! I'll apply them in v3 (should be out in Monday).

Signature · 1 line
An old man doll... just what I always wanted! - Clara