2022-08-11 14:24:39 +02:00
|
|
|
# -*- Mode: Python -*-
|
|
|
|
# vim: filetype=python
|
|
|
|
#
|
|
|
|
|
|
|
|
##
|
|
|
|
# = Virtio devices
|
|
|
|
##
|
|
|
|
|
|
|
|
##
|
|
|
|
# @VirtioInfo:
|
|
|
|
#
|
|
|
|
# Basic information about a given VirtIODevice
|
|
|
|
#
|
|
|
|
# @path: The VirtIODevice's canonical QOM path
|
|
|
|
#
|
|
|
|
# @name: Name of the VirtIODevice
|
|
|
|
#
|
2022-11-01 02:46:47 +01:00
|
|
|
# Since: 7.2
|
2022-08-11 14:24:39 +02:00
|
|
|
##
|
|
|
|
{ 'struct': 'VirtioInfo',
|
|
|
|
'data': { 'path': 'str',
|
|
|
|
'name': 'str' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @x-query-virtio:
|
|
|
|
#
|
|
|
|
# Returns a list of all realized VirtIODevices
|
|
|
|
#
|
|
|
|
# Features:
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2022-08-11 14:24:39 +02:00
|
|
|
# @unstable: This command is meant for debugging.
|
|
|
|
#
|
|
|
|
# Returns: List of gathered VirtIODevices
|
|
|
|
#
|
2022-11-01 02:46:47 +01:00
|
|
|
# Since: 7.2
|
2022-08-11 14:24:39 +02:00
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
|
|
|
# -> { "execute": "x-query-virtio" }
|
|
|
|
# <- { "return": [
|
|
|
|
# {
|
|
|
|
# "name": "virtio-input",
|
|
|
|
# "path": "/machine/peripheral-anon/device[4]/virtio-backend"
|
|
|
|
# },
|
|
|
|
# {
|
|
|
|
# "name": "virtio-crypto",
|
|
|
|
# "path": "/machine/peripheral/crypto0/virtio-backend"
|
|
|
|
# },
|
|
|
|
# {
|
|
|
|
# "name": "virtio-scsi",
|
|
|
|
# "path": "/machine/peripheral-anon/device[2]/virtio-backend"
|
|
|
|
# },
|
|
|
|
# {
|
|
|
|
# "name": "virtio-net",
|
|
|
|
# "path": "/machine/peripheral-anon/device[1]/virtio-backend"
|
|
|
|
# },
|
|
|
|
# {
|
|
|
|
# "name": "virtio-serial",
|
|
|
|
# "path": "/machine/peripheral-anon/device[0]/virtio-backend"
|
|
|
|
# }
|
|
|
|
# ]
|
|
|
|
# }
|
|
|
|
##
|
|
|
|
{ 'command': 'x-query-virtio',
|
|
|
|
'returns': [ 'VirtioInfo' ],
|
|
|
|
'features': [ 'unstable' ] }
|
2022-08-11 14:24:40 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @VhostStatus:
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# Information about a vhost device. This information will only be
|
2022-08-11 14:24:40 +02:00
|
|
|
# displayed if the vhost device is active.
|
|
|
|
#
|
|
|
|
# @n-mem-sections: vhost_dev n_mem_sections
|
|
|
|
#
|
|
|
|
# @n-tmp-sections: vhost_dev n_tmp_sections
|
|
|
|
#
|
|
|
|
# @nvqs: vhost_dev nvqs (number of virtqueues being used)
|
|
|
|
#
|
|
|
|
# @vq-index: vhost_dev vq_index
|
|
|
|
#
|
|
|
|
# @features: vhost_dev features
|
|
|
|
#
|
|
|
|
# @acked-features: vhost_dev acked_features
|
|
|
|
#
|
|
|
|
# @backend-features: vhost_dev backend_features
|
|
|
|
#
|
|
|
|
# @protocol-features: vhost_dev protocol_features
|
|
|
|
#
|
|
|
|
# @max-queues: vhost_dev max_queues
|
|
|
|
#
|
|
|
|
# @backend-cap: vhost_dev backend_cap
|
|
|
|
#
|
|
|
|
# @log-enabled: vhost_dev log_enabled flag
|
|
|
|
#
|
|
|
|
# @log-size: vhost_dev log_size
|
|
|
|
#
|
2022-11-01 02:46:47 +01:00
|
|
|
# Since: 7.2
|
2022-08-11 14:24:40 +02:00
|
|
|
##
|
|
|
|
{ 'struct': 'VhostStatus',
|
|
|
|
'data': { 'n-mem-sections': 'int',
|
|
|
|
'n-tmp-sections': 'int',
|
|
|
|
'nvqs': 'uint32',
|
|
|
|
'vq-index': 'int',
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
'features': 'VirtioDeviceFeatures',
|
|
|
|
'acked-features': 'VirtioDeviceFeatures',
|
|
|
|
'backend-features': 'VirtioDeviceFeatures',
|
|
|
|
'protocol-features': 'VhostDeviceProtocols',
|
2022-08-11 14:24:40 +02:00
|
|
|
'max-queues': 'uint64',
|
|
|
|
'backend-cap': 'uint64',
|
|
|
|
'log-enabled': 'bool',
|
|
|
|
'log-size': 'uint64' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @VirtioStatus:
|
|
|
|
#
|
|
|
|
# Full status of the virtio device with most VirtIODevice members.
|
2023-04-28 12:54:29 +02:00
|
|
|
# Also includes the full status of the corresponding vhost device if
|
|
|
|
# the vhost device is active.
|
2022-08-11 14:24:40 +02:00
|
|
|
#
|
|
|
|
# @name: VirtIODevice name
|
|
|
|
#
|
|
|
|
# @device-id: VirtIODevice ID
|
|
|
|
#
|
|
|
|
# @vhost-started: VirtIODevice vhost_started flag
|
|
|
|
#
|
|
|
|
# @guest-features: VirtIODevice guest_features
|
|
|
|
#
|
|
|
|
# @host-features: VirtIODevice host_features
|
|
|
|
#
|
|
|
|
# @backend-features: VirtIODevice backend_features
|
|
|
|
#
|
|
|
|
# @device-endian: VirtIODevice device_endian
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @num-vqs: VirtIODevice virtqueue count. This is the number of
|
|
|
|
# active virtqueues being used by the VirtIODevice.
|
2022-08-11 14:24:40 +02:00
|
|
|
#
|
|
|
|
# @status: VirtIODevice configuration status (VirtioDeviceStatus)
|
|
|
|
#
|
|
|
|
# @isr: VirtIODevice ISR
|
|
|
|
#
|
|
|
|
# @queue-sel: VirtIODevice queue_sel
|
|
|
|
#
|
|
|
|
# @vm-running: VirtIODevice vm_running flag
|
|
|
|
#
|
|
|
|
# @broken: VirtIODevice broken flag
|
|
|
|
#
|
|
|
|
# @disabled: VirtIODevice disabled flag
|
|
|
|
#
|
|
|
|
# @use-started: VirtIODevice use_started flag
|
|
|
|
#
|
|
|
|
# @started: VirtIODevice started flag
|
|
|
|
#
|
|
|
|
# @start-on-kick: VirtIODevice start_on_kick flag
|
|
|
|
#
|
|
|
|
# @disable-legacy-check: VirtIODevice disabled_legacy_check flag
|
|
|
|
#
|
|
|
|
# @bus-name: VirtIODevice bus_name
|
|
|
|
#
|
|
|
|
# @use-guest-notifier-mask: VirtIODevice use_guest_notifier_mask flag
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @vhost-dev: Corresponding vhost device info for a given
|
|
|
|
# VirtIODevice. Present if the given VirtIODevice has an active
|
|
|
|
# vhost device.
|
2022-08-11 14:24:40 +02:00
|
|
|
#
|
2022-11-01 02:46:47 +01:00
|
|
|
# Since: 7.2
|
2022-08-11 14:24:40 +02:00
|
|
|
##
|
|
|
|
{ 'struct': 'VirtioStatus',
|
|
|
|
'data': { 'name': 'str',
|
|
|
|
'device-id': 'uint16',
|
|
|
|
'vhost-started': 'bool',
|
|
|
|
'device-endian': 'str',
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
'guest-features': 'VirtioDeviceFeatures',
|
|
|
|
'host-features': 'VirtioDeviceFeatures',
|
|
|
|
'backend-features': 'VirtioDeviceFeatures',
|
2022-08-11 14:24:40 +02:00
|
|
|
'num-vqs': 'int',
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
'status': 'VirtioDeviceStatus',
|
2022-08-11 14:24:40 +02:00
|
|
|
'isr': 'uint8',
|
|
|
|
'queue-sel': 'uint16',
|
|
|
|
'vm-running': 'bool',
|
|
|
|
'broken': 'bool',
|
|
|
|
'disabled': 'bool',
|
|
|
|
'use-started': 'bool',
|
|
|
|
'started': 'bool',
|
|
|
|
'start-on-kick': 'bool',
|
|
|
|
'disable-legacy-check': 'bool',
|
|
|
|
'bus-name': 'str',
|
|
|
|
'use-guest-notifier-mask': 'bool',
|
|
|
|
'*vhost-dev': 'VhostStatus' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @x-query-virtio-status:
|
|
|
|
#
|
|
|
|
# Poll for a comprehensive status of a given virtio device
|
|
|
|
#
|
|
|
|
# @path: Canonical QOM path of the VirtIODevice
|
|
|
|
#
|
|
|
|
# Features:
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2022-08-11 14:24:40 +02:00
|
|
|
# @unstable: This command is meant for debugging.
|
|
|
|
#
|
|
|
|
# Returns: VirtioStatus of the virtio device
|
|
|
|
#
|
2022-11-01 02:46:47 +01:00
|
|
|
# Since: 7.2
|
2022-08-11 14:24:40 +02:00
|
|
|
#
|
|
|
|
# Examples:
|
|
|
|
#
|
|
|
|
# 1. Poll for the status of virtio-crypto (no vhost-crypto active)
|
|
|
|
#
|
|
|
|
# -> { "execute": "x-query-virtio-status",
|
|
|
|
# "arguments": { "path": "/machine/peripheral/crypto0/virtio-backend" }
|
|
|
|
# }
|
|
|
|
# <- { "return": {
|
|
|
|
# "device-endian": "little",
|
|
|
|
# "bus-name": "",
|
|
|
|
# "disable-legacy-check": false,
|
|
|
|
# "name": "virtio-crypto",
|
|
|
|
# "started": true,
|
|
|
|
# "device-id": 20,
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
# "backend-features": {
|
|
|
|
# "transports": [],
|
|
|
|
# "dev-features": []
|
|
|
|
# },
|
2022-08-11 14:24:40 +02:00
|
|
|
# "start-on-kick": false,
|
|
|
|
# "isr": 1,
|
|
|
|
# "broken": false,
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
# "status": {
|
|
|
|
# "statuses": [
|
|
|
|
# "VIRTIO_CONFIG_S_ACKNOWLEDGE: Valid virtio device found",
|
|
|
|
# "VIRTIO_CONFIG_S_DRIVER: Guest OS compatible with device",
|
|
|
|
# "VIRTIO_CONFIG_S_FEATURES_OK: Feature negotiation complete",
|
|
|
|
# "VIRTIO_CONFIG_S_DRIVER_OK: Driver setup and ready"
|
|
|
|
# ]
|
|
|
|
# },
|
2022-08-11 14:24:40 +02:00
|
|
|
# "num-vqs": 2,
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
# "guest-features": {
|
|
|
|
# "dev-features": [],
|
|
|
|
# "transports": [
|
|
|
|
# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
|
|
|
|
# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
|
|
|
|
# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)"
|
|
|
|
# ]
|
|
|
|
# },
|
|
|
|
# "host-features": {
|
|
|
|
# "unknown-dev-features": 1073741824,
|
|
|
|
# "dev-features": [],
|
|
|
|
# "transports": [
|
|
|
|
# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
|
|
|
|
# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
|
|
|
|
# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)",
|
|
|
|
# "VIRTIO_F_ANY_LAYOUT: Device accepts arbitrary desc. layouts",
|
|
|
|
# "VIRTIO_F_NOTIFY_ON_EMPTY: Notify when device runs out of avail. descs. on VQ"
|
|
|
|
# ]
|
|
|
|
# },
|
2022-08-11 14:24:40 +02:00
|
|
|
# "use-guest-notifier-mask": true,
|
|
|
|
# "vm-running": true,
|
|
|
|
# "queue-sel": 1,
|
|
|
|
# "disabled": false,
|
|
|
|
# "vhost-started": false,
|
|
|
|
# "use-started": true
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
#
|
|
|
|
# 2. Poll for the status of virtio-net (vhost-net is active)
|
|
|
|
#
|
|
|
|
# -> { "execute": "x-query-virtio-status",
|
|
|
|
# "arguments": { "path": "/machine/peripheral-anon/device[1]/virtio-backend" }
|
|
|
|
# }
|
|
|
|
# <- { "return": {
|
|
|
|
# "device-endian": "little",
|
|
|
|
# "bus-name": "",
|
|
|
|
# "disabled-legacy-check": false,
|
|
|
|
# "name": "virtio-net",
|
|
|
|
# "started": true,
|
|
|
|
# "device-id": 1,
|
|
|
|
# "vhost-dev": {
|
|
|
|
# "n-tmp-sections": 4,
|
|
|
|
# "n-mem-sections": 4,
|
|
|
|
# "max-queues": 1,
|
|
|
|
# "backend-cap": 2,
|
|
|
|
# "log-size": 0,
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
# "backend-features": {
|
|
|
|
# "dev-features": [],
|
|
|
|
# "transports": []
|
|
|
|
# },
|
2022-08-11 14:24:40 +02:00
|
|
|
# "nvqs": 2,
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
# "protocol-features": {
|
|
|
|
# "protocols": []
|
|
|
|
# },
|
2022-08-11 14:24:40 +02:00
|
|
|
# "vq-index": 0,
|
|
|
|
# "log-enabled": false,
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
# "acked-features": {
|
|
|
|
# "dev-features": [
|
|
|
|
# "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffers"
|
|
|
|
# ],
|
|
|
|
# "transports": [
|
|
|
|
# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
|
|
|
|
# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
|
|
|
|
# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)"
|
|
|
|
# ]
|
|
|
|
# },
|
|
|
|
# "features": {
|
|
|
|
# "dev-features": [
|
|
|
|
# "VHOST_F_LOG_ALL: Logging write descriptors supported",
|
|
|
|
# "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffers"
|
|
|
|
# ],
|
|
|
|
# "transports": [
|
|
|
|
# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
|
|
|
|
# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
|
|
|
|
# "VIRTIO_F_IOMMU_PLATFORM: Device can be used on IOMMU platform",
|
|
|
|
# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)",
|
|
|
|
# "VIRTIO_F_ANY_LAYOUT: Device accepts arbitrary desc. layouts",
|
|
|
|
# "VIRTIO_F_NOTIFY_ON_EMPTY: Notify when device runs out of avail. descs. on VQ"
|
|
|
|
# ]
|
|
|
|
# }
|
|
|
|
# },
|
|
|
|
# "backend-features": {
|
|
|
|
# "dev-features": [
|
2022-11-10 20:08:25 +01:00
|
|
|
# "VHOST_USER_F_PROTOCOL_FEATURES: Vhost-user protocol features negotiation supported",
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
# "VIRTIO_NET_F_GSO: Handling GSO-type packets supported",
|
|
|
|
# "VIRTIO_NET_F_CTRL_MAC_ADDR: MAC address set through control channel",
|
|
|
|
# "VIRTIO_NET_F_GUEST_ANNOUNCE: Driver sending gratuitous packets supported",
|
|
|
|
# "VIRTIO_NET_F_CTRL_RX_EXTRA: Extra RX mode control supported",
|
|
|
|
# "VIRTIO_NET_F_CTRL_VLAN: Control channel VLAN filtering supported",
|
|
|
|
# "VIRTIO_NET_F_CTRL_RX: Control channel RX mode supported",
|
|
|
|
# "VIRTIO_NET_F_CTRL_VQ: Control channel available",
|
|
|
|
# "VIRTIO_NET_F_STATUS: Configuration status field available",
|
|
|
|
# "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffers",
|
|
|
|
# "VIRTIO_NET_F_HOST_UFO: Device can receive UFO",
|
|
|
|
# "VIRTIO_NET_F_HOST_ECN: Device can receive TSO with ECN",
|
|
|
|
# "VIRTIO_NET_F_HOST_TSO6: Device can receive TSOv6",
|
|
|
|
# "VIRTIO_NET_F_HOST_TSO4: Device can receive TSOv4",
|
|
|
|
# "VIRTIO_NET_F_GUEST_UFO: Driver can receive UFO",
|
|
|
|
# "VIRTIO_NET_F_GUEST_ECN: Driver can receive TSO with ECN",
|
|
|
|
# "VIRTIO_NET_F_GUEST_TSO6: Driver can receive TSOv6",
|
|
|
|
# "VIRTIO_NET_F_GUEST_TSO4: Driver can receive TSOv4",
|
|
|
|
# "VIRTIO_NET_F_MAC: Device has given MAC address",
|
|
|
|
# "VIRTIO_NET_F_CTRL_GUEST_OFFLOADS: Control channel offloading reconfig. supported",
|
|
|
|
# "VIRTIO_NET_F_GUEST_CSUM: Driver handling packets with partial checksum supported",
|
|
|
|
# "VIRTIO_NET_F_CSUM: Device handling packets with partial checksum supported"
|
|
|
|
# ],
|
|
|
|
# "transports": [
|
|
|
|
# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
|
|
|
|
# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
|
|
|
|
# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)",
|
|
|
|
# "VIRTIO_F_ANY_LAYOUT: Device accepts arbitrary desc. layouts",
|
|
|
|
# "VIRTIO_F_NOTIFY_ON_EMPTY: Notify when device runs out of avail. descs. on VQ"
|
|
|
|
# ]
|
2022-08-11 14:24:40 +02:00
|
|
|
# },
|
|
|
|
# "start-on-kick": false,
|
|
|
|
# "isr": 1,
|
|
|
|
# "broken": false,
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
# "status": {
|
|
|
|
# "statuses": [
|
|
|
|
# "VIRTIO_CONFIG_S_ACKNOWLEDGE: Valid virtio device found",
|
|
|
|
# "VIRTIO_CONFIG_S_DRIVER: Guest OS compatible with device",
|
|
|
|
# "VIRTIO_CONFIG_S_FEATURES_OK: Feature negotiation complete",
|
|
|
|
# "VIRTIO_CONFIG_S_DRIVER_OK: Driver setup and ready"
|
|
|
|
# ]
|
|
|
|
# },
|
2022-08-11 14:24:40 +02:00
|
|
|
# "num-vqs": 3,
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
# "guest-features": {
|
|
|
|
# "dev-features": [
|
|
|
|
# "VIRTIO_NET_F_CTRL_MAC_ADDR: MAC address set through control channel",
|
|
|
|
# "VIRTIO_NET_F_GUEST_ANNOUNCE: Driver sending gratuitous packets supported",
|
|
|
|
# "VIRTIO_NET_F_CTRL_VLAN: Control channel VLAN filtering supported",
|
|
|
|
# "VIRTIO_NET_F_CTRL_RX: Control channel RX mode supported",
|
|
|
|
# "VIRTIO_NET_F_CTRL_VQ: Control channel available",
|
|
|
|
# "VIRTIO_NET_F_STATUS: Configuration status field available",
|
|
|
|
# "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffers",
|
|
|
|
# "VIRTIO_NET_F_HOST_UFO: Device can receive UFO",
|
|
|
|
# "VIRTIO_NET_F_HOST_ECN: Device can receive TSO with ECN",
|
|
|
|
# "VIRTIO_NET_F_HOST_TSO6: Device can receive TSOv6",
|
|
|
|
# "VIRTIO_NET_F_HOST_TSO4: Device can receive TSOv4",
|
|
|
|
# "VIRTIO_NET_F_GUEST_UFO: Driver can receive UFO",
|
|
|
|
# "VIRTIO_NET_F_GUEST_ECN: Driver can receive TSO with ECN",
|
|
|
|
# "VIRTIO_NET_F_GUEST_TSO6: Driver can receive TSOv6",
|
|
|
|
# "VIRTIO_NET_F_GUEST_TSO4: Driver can receive TSOv4",
|
|
|
|
# "VIRTIO_NET_F_MAC: Device has given MAC address",
|
|
|
|
# "VIRTIO_NET_F_CTRL_GUEST_OFFLOADS: Control channel offloading reconfig. supported",
|
|
|
|
# "VIRTIO_NET_F_GUEST_CSUM: Driver handling packets with partial checksum supported",
|
|
|
|
# "VIRTIO_NET_F_CSUM: Device handling packets with partial checksum supported"
|
|
|
|
# ],
|
|
|
|
# "transports": [
|
|
|
|
# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
|
|
|
|
# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
|
|
|
|
# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)"
|
|
|
|
# ]
|
|
|
|
# },
|
|
|
|
# "host-features": {
|
|
|
|
# "dev-features": [
|
2022-11-10 20:08:25 +01:00
|
|
|
# "VHOST_USER_F_PROTOCOL_FEATURES: Vhost-user protocol features negotiation supported",
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
# "VIRTIO_NET_F_GSO: Handling GSO-type packets supported",
|
|
|
|
# "VIRTIO_NET_F_CTRL_MAC_ADDR: MAC address set through control channel",
|
|
|
|
# "VIRTIO_NET_F_GUEST_ANNOUNCE: Driver sending gratuitous packets supported",
|
|
|
|
# "VIRTIO_NET_F_CTRL_RX_EXTRA: Extra RX mode control supported",
|
|
|
|
# "VIRTIO_NET_F_CTRL_VLAN: Control channel VLAN filtering supported",
|
|
|
|
# "VIRTIO_NET_F_CTRL_RX: Control channel RX mode supported",
|
|
|
|
# "VIRTIO_NET_F_CTRL_VQ: Control channel available",
|
|
|
|
# "VIRTIO_NET_F_STATUS: Configuration status field available",
|
|
|
|
# "VIRTIO_NET_F_MRG_RXBUF: Driver can merge receive buffers",
|
|
|
|
# "VIRTIO_NET_F_HOST_UFO: Device can receive UFO",
|
|
|
|
# "VIRTIO_NET_F_HOST_ECN: Device can receive TSO with ECN",
|
|
|
|
# "VIRTIO_NET_F_HOST_TSO6: Device can receive TSOv6",
|
|
|
|
# "VIRTIO_NET_F_HOST_TSO4: Device can receive TSOv4",
|
|
|
|
# "VIRTIO_NET_F_GUEST_UFO: Driver can receive UFO",
|
|
|
|
# "VIRTIO_NET_F_GUEST_ECN: Driver can receive TSO with ECN",
|
|
|
|
# "VIRTIO_NET_F_GUEST_TSO6: Driver can receive TSOv6",
|
|
|
|
# "VIRTIO_NET_F_GUEST_TSO4: Driver can receive TSOv4",
|
|
|
|
# "VIRTIO_NET_F_MAC: Device has given MAC address",
|
|
|
|
# "VIRTIO_NET_F_CTRL_GUEST_OFFLOADS: Control channel offloading reconfig. supported",
|
|
|
|
# "VIRTIO_NET_F_GUEST_CSUM: Driver handling packets with partial checksum supported",
|
|
|
|
# "VIRTIO_NET_F_CSUM: Device handling packets with partial checksum supported"
|
|
|
|
# ],
|
|
|
|
# "transports": [
|
|
|
|
# "VIRTIO_RING_F_EVENT_IDX: Used & avail. event fields enabled",
|
|
|
|
# "VIRTIO_RING_F_INDIRECT_DESC: Indirect descriptors supported",
|
|
|
|
# "VIRTIO_F_VERSION_1: Device compliant for v1 spec (legacy)",
|
|
|
|
# "VIRTIO_F_ANY_LAYOUT: Device accepts arbitrary desc. layouts",
|
|
|
|
# "VIRTIO_F_NOTIFY_ON_EMPTY: Notify when device runs out of avail. descs. on VQ"
|
|
|
|
# ]
|
|
|
|
# },
|
2022-08-11 14:24:40 +02:00
|
|
|
# "use-guest-notifier-mask": true,
|
|
|
|
# "vm-running": true,
|
|
|
|
# "queue-sel": 2,
|
|
|
|
# "disabled": false,
|
|
|
|
# "vhost-started": true,
|
|
|
|
# "use-started": true
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
##
|
|
|
|
{ 'command': 'x-query-virtio-status',
|
|
|
|
'data': { 'path': 'str' },
|
|
|
|
'returns': 'VirtioStatus',
|
|
|
|
'features': [ 'unstable' ] }
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @VirtioDeviceStatus:
|
|
|
|
#
|
|
|
|
# A structure defined to list the configuration statuses of a virtio
|
|
|
|
# device
|
|
|
|
#
|
|
|
|
# @statuses: List of decoded configuration statuses of the virtio
|
2023-04-28 12:54:29 +02:00
|
|
|
# device
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @unknown-statuses: Virtio device statuses bitmap that have not been
|
|
|
|
# decoded
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
#
|
2022-11-01 02:46:47 +01:00
|
|
|
# Since: 7.2
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
##
|
|
|
|
{ 'struct': 'VirtioDeviceStatus',
|
|
|
|
'data': { 'statuses': [ 'str' ],
|
|
|
|
'*unknown-statuses': 'uint8' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @VhostDeviceProtocols:
|
|
|
|
#
|
|
|
|
# A structure defined to list the vhost user protocol features of a
|
|
|
|
# Vhost User device
|
|
|
|
#
|
|
|
|
# @protocols: List of decoded vhost user protocol features of a vhost
|
2023-04-28 12:54:29 +02:00
|
|
|
# user device
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
#
|
|
|
|
# @unknown-protocols: Vhost user device protocol features bitmap that
|
2023-04-28 12:54:29 +02:00
|
|
|
# have not been decoded
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
#
|
2022-11-01 02:46:47 +01:00
|
|
|
# Since: 7.2
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
##
|
|
|
|
{ 'struct': 'VhostDeviceProtocols',
|
|
|
|
'data': { 'protocols': [ 'str' ],
|
|
|
|
'*unknown-protocols': 'uint64' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @VirtioDeviceFeatures:
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# The common fields that apply to most Virtio devices. Some devices
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
# may not have their own device-specific features (e.g. virtio-rng).
|
|
|
|
#
|
|
|
|
# @transports: List of transport features of the virtio device
|
|
|
|
#
|
|
|
|
# @dev-features: List of device-specific features (if the device has
|
2023-04-28 12:54:29 +02:00
|
|
|
# unique features)
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
#
|
|
|
|
# @unknown-dev-features: Virtio device features bitmap that have not
|
2023-04-28 12:54:29 +02:00
|
|
|
# been decoded
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
#
|
2022-11-01 02:46:47 +01:00
|
|
|
# Since: 7.2
|
qmp: decode feature & status bits in virtio-status
Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.
Display status names instead of bitmaps for VirtIODevices.
Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.
Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).
Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.
[Jonah: Several changes made to this patch from prev. version (v14):
- Moved all device features mappings to hw/virtio/virtio.c
- Renamed device features mappings (less generic)
- Generalized @FEATURE_ENTRY macro for all device mappings
- Virtio device feature map definitions include descriptions of
feature bits
- Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
feature map to vhost-user-supported device feature mappings
(blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
- New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
- New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
- New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
- New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
- Added device feature map definition for virtio-rng
]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 14:24:41 +02:00
|
|
|
##
|
|
|
|
{ 'struct': 'VirtioDeviceFeatures',
|
|
|
|
'data': { 'transports': [ 'str' ],
|
|
|
|
'*dev-features': [ 'str' ],
|
|
|
|
'*unknown-dev-features': 'uint64' } }
|
2022-08-11 14:24:42 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @VirtQueueStatus:
|
|
|
|
#
|
|
|
|
# Information of a VirtIODevice VirtQueue, including most members of
|
|
|
|
# the VirtQueue data structure.
|
|
|
|
#
|
|
|
|
# @name: Name of the VirtIODevice that uses this VirtQueue
|
|
|
|
#
|
|
|
|
# @queue-index: VirtQueue queue_index
|
|
|
|
#
|
|
|
|
# @inuse: VirtQueue inuse
|
|
|
|
#
|
|
|
|
# @vring-num: VirtQueue vring.num
|
|
|
|
#
|
|
|
|
# @vring-num-default: VirtQueue vring.num_default
|
|
|
|
#
|
|
|
|
# @vring-align: VirtQueue vring.align
|
|
|
|
#
|
|
|
|
# @vring-desc: VirtQueue vring.desc (descriptor area)
|
|
|
|
#
|
|
|
|
# @vring-avail: VirtQueue vring.avail (driver area)
|
|
|
|
#
|
|
|
|
# @vring-used: VirtQueue vring.used (device area)
|
|
|
|
#
|
|
|
|
# @last-avail-idx: VirtQueue last_avail_idx or return of vhost_dev
|
2023-04-28 12:54:29 +02:00
|
|
|
# vhost_get_vring_base (if vhost active)
|
2022-08-11 14:24:42 +02:00
|
|
|
#
|
|
|
|
# @shadow-avail-idx: VirtQueue shadow_avail_idx
|
|
|
|
#
|
|
|
|
# @used-idx: VirtQueue used_idx
|
|
|
|
#
|
|
|
|
# @signalled-used: VirtQueue signalled_used
|
|
|
|
#
|
|
|
|
# @signalled-used-valid: VirtQueue signalled_used_valid flag
|
|
|
|
#
|
2022-11-01 02:46:47 +01:00
|
|
|
# Since: 7.2
|
2022-08-11 14:24:42 +02:00
|
|
|
##
|
|
|
|
{ 'struct': 'VirtQueueStatus',
|
|
|
|
'data': { 'name': 'str',
|
|
|
|
'queue-index': 'uint16',
|
|
|
|
'inuse': 'uint32',
|
|
|
|
'vring-num': 'uint32',
|
|
|
|
'vring-num-default': 'uint32',
|
|
|
|
'vring-align': 'uint32',
|
|
|
|
'vring-desc': 'uint64',
|
|
|
|
'vring-avail': 'uint64',
|
|
|
|
'vring-used': 'uint64',
|
|
|
|
'*last-avail-idx': 'uint16',
|
|
|
|
'*shadow-avail-idx': 'uint16',
|
|
|
|
'used-idx': 'uint16',
|
|
|
|
'signalled-used': 'uint16',
|
|
|
|
'signalled-used-valid': 'bool' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @x-query-virtio-queue-status:
|
|
|
|
#
|
|
|
|
# Return the status of a given VirtIODevice's VirtQueue
|
|
|
|
#
|
|
|
|
# @path: VirtIODevice canonical QOM path
|
|
|
|
#
|
|
|
|
# @queue: VirtQueue index to examine
|
|
|
|
#
|
|
|
|
# Features:
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2022-08-11 14:24:42 +02:00
|
|
|
# @unstable: This command is meant for debugging.
|
|
|
|
#
|
|
|
|
# Returns: VirtQueueStatus of the VirtQueue
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# Notes: last_avail_idx will not be displayed in the case where the
|
|
|
|
# selected VirtIODevice has a running vhost device and the
|
|
|
|
# VirtIODevice VirtQueue index (queue) does not exist for the
|
|
|
|
# corresponding vhost device vhost_virtqueue. Also,
|
|
|
|
# shadow_avail_idx will not be displayed in the case where the
|
|
|
|
# selected VirtIODevice has a running vhost device.
|
2022-08-11 14:24:42 +02:00
|
|
|
#
|
2022-11-01 02:46:47 +01:00
|
|
|
# Since: 7.2
|
2022-08-11 14:24:42 +02:00
|
|
|
#
|
|
|
|
# Examples:
|
|
|
|
#
|
|
|
|
# 1. Get VirtQueueStatus for virtio-vsock (vhost-vsock running)
|
|
|
|
#
|
|
|
|
# -> { "execute": "x-query-virtio-queue-status",
|
|
|
|
# "arguments": { "path": "/machine/peripheral/vsock0/virtio-backend",
|
|
|
|
# "queue": 1 }
|
|
|
|
# }
|
|
|
|
# <- { "return": {
|
|
|
|
# "signalled-used": 0,
|
|
|
|
# "inuse": 0,
|
|
|
|
# "name": "vhost-vsock",
|
|
|
|
# "vring-align": 4096,
|
|
|
|
# "vring-desc": 5217370112,
|
|
|
|
# "signalled-used-valid": false,
|
|
|
|
# "vring-num-default": 128,
|
|
|
|
# "vring-avail": 5217372160,
|
|
|
|
# "queue-index": 1,
|
|
|
|
# "last-avail-idx": 0,
|
|
|
|
# "vring-used": 5217372480,
|
|
|
|
# "used-idx": 0,
|
|
|
|
# "vring-num": 128
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
#
|
|
|
|
# 2. Get VirtQueueStatus for virtio-serial (no vhost)
|
|
|
|
#
|
|
|
|
# -> { "execute": "x-query-virtio-queue-status",
|
|
|
|
# "arguments": { "path": "/machine/peripheral-anon/device[0]/virtio-backend",
|
|
|
|
# "queue": 20 }
|
|
|
|
# }
|
|
|
|
# <- { "return": {
|
|
|
|
# "signalled-used": 0,
|
|
|
|
# "inuse": 0,
|
|
|
|
# "name": "virtio-serial",
|
|
|
|
# "vring-align": 4096,
|
|
|
|
# "vring-desc": 5182074880,
|
|
|
|
# "signalled-used-valid": false,
|
|
|
|
# "vring-num-default": 128,
|
|
|
|
# "vring-avail": 5182076928,
|
|
|
|
# "queue-index": 20,
|
|
|
|
# "last-avail-idx": 0,
|
|
|
|
# "vring-used": 5182077248,
|
|
|
|
# "used-idx": 0,
|
|
|
|
# "shadow-avail-idx": 0,
|
|
|
|
# "vring-num": 128
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
##
|
|
|
|
{ 'command': 'x-query-virtio-queue-status',
|
|
|
|
'data': { 'path': 'str', 'queue': 'uint16' },
|
|
|
|
'returns': 'VirtQueueStatus',
|
|
|
|
'features': [ 'unstable' ] }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @VirtVhostQueueStatus:
|
|
|
|
#
|
|
|
|
# Information of a vhost device's vhost_virtqueue, including most
|
|
|
|
# members of the vhost_dev vhost_virtqueue data structure.
|
|
|
|
#
|
|
|
|
# @name: Name of the VirtIODevice that uses this vhost_virtqueue
|
|
|
|
#
|
|
|
|
# @kick: vhost_virtqueue kick
|
|
|
|
#
|
|
|
|
# @call: vhost_virtqueue call
|
|
|
|
#
|
|
|
|
# @desc: vhost_virtqueue desc
|
|
|
|
#
|
|
|
|
# @avail: vhost_virtqueue avail
|
|
|
|
#
|
|
|
|
# @used: vhost_virtqueue used
|
|
|
|
#
|
|
|
|
# @num: vhost_virtqueue num
|
|
|
|
#
|
|
|
|
# @desc-phys: vhost_virtqueue desc_phys (descriptor area phys. addr.)
|
|
|
|
#
|
|
|
|
# @desc-size: vhost_virtqueue desc_size
|
|
|
|
#
|
|
|
|
# @avail-phys: vhost_virtqueue avail_phys (driver area phys. addr.)
|
|
|
|
#
|
|
|
|
# @avail-size: vhost_virtqueue avail_size
|
|
|
|
#
|
|
|
|
# @used-phys: vhost_virtqueue used_phys (device area phys. addr.)
|
|
|
|
#
|
|
|
|
# @used-size: vhost_virtqueue used_size
|
|
|
|
#
|
2022-11-01 02:46:47 +01:00
|
|
|
# Since: 7.2
|
2022-08-11 14:24:42 +02:00
|
|
|
##
|
|
|
|
{ 'struct': 'VirtVhostQueueStatus',
|
|
|
|
'data': { 'name': 'str',
|
|
|
|
'kick': 'int',
|
|
|
|
'call': 'int',
|
|
|
|
'desc': 'uint64',
|
|
|
|
'avail': 'uint64',
|
|
|
|
'used': 'uint64',
|
|
|
|
'num': 'int',
|
|
|
|
'desc-phys': 'uint64',
|
|
|
|
'desc-size': 'uint32',
|
|
|
|
'avail-phys': 'uint64',
|
|
|
|
'avail-size': 'uint32',
|
|
|
|
'used-phys': 'uint64',
|
|
|
|
'used-size': 'uint32' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @x-query-virtio-vhost-queue-status:
|
|
|
|
#
|
|
|
|
# Return information of a given vhost device's vhost_virtqueue
|
|
|
|
#
|
|
|
|
# @path: VirtIODevice canonical QOM path
|
|
|
|
#
|
|
|
|
# @queue: vhost_virtqueue index to examine
|
|
|
|
#
|
|
|
|
# Features:
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2022-08-11 14:24:42 +02:00
|
|
|
# @unstable: This command is meant for debugging.
|
|
|
|
#
|
|
|
|
# Returns: VirtVhostQueueStatus of the vhost_virtqueue
|
|
|
|
#
|
2022-11-01 02:46:47 +01:00
|
|
|
# Since: 7.2
|
2022-08-11 14:24:42 +02:00
|
|
|
#
|
|
|
|
# Examples:
|
|
|
|
#
|
|
|
|
# 1. Get vhost_virtqueue status for vhost-crypto
|
|
|
|
#
|
|
|
|
# -> { "execute": "x-query-virtio-vhost-queue-status",
|
|
|
|
# "arguments": { "path": "/machine/peripheral/crypto0/virtio-backend",
|
|
|
|
# "queue": 0 }
|
|
|
|
# }
|
|
|
|
# <- { "return": {
|
|
|
|
# "avail-phys": 5216124928,
|
|
|
|
# "name": "virtio-crypto",
|
|
|
|
# "used-phys": 5216127040,
|
|
|
|
# "avail-size": 2054,
|
|
|
|
# "desc-size": 16384,
|
|
|
|
# "used-size": 8198,
|
|
|
|
# "desc": 140141447430144,
|
|
|
|
# "num": 1024,
|
|
|
|
# "call": 0,
|
|
|
|
# "avail": 140141447446528,
|
|
|
|
# "desc-phys": 5216108544,
|
|
|
|
# "used": 140141447448640,
|
|
|
|
# "kick": 0
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
#
|
|
|
|
# 2. Get vhost_virtqueue status for vhost-vsock
|
|
|
|
#
|
|
|
|
# -> { "execute": "x-query-virtio-vhost-queue-status",
|
|
|
|
# "arguments": { "path": "/machine/peripheral/vsock0/virtio-backend",
|
|
|
|
# "queue": 0 }
|
|
|
|
# }
|
|
|
|
# <- { "return": {
|
|
|
|
# "avail-phys": 5182261248,
|
|
|
|
# "name": "vhost-vsock",
|
|
|
|
# "used-phys": 5182261568,
|
|
|
|
# "avail-size": 262,
|
|
|
|
# "desc-size": 2048,
|
|
|
|
# "used-size": 1030,
|
|
|
|
# "desc": 140141413580800,
|
|
|
|
# "num": 128,
|
|
|
|
# "call": 0,
|
|
|
|
# "avail": 140141413582848,
|
|
|
|
# "desc-phys": 5182259200,
|
|
|
|
# "used": 140141413583168,
|
|
|
|
# "kick": 0
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
##
|
|
|
|
{ 'command': 'x-query-virtio-vhost-queue-status',
|
|
|
|
'data': { 'path': 'str', 'queue': 'uint16' },
|
|
|
|
'returns': 'VirtVhostQueueStatus',
|
|
|
|
'features': [ 'unstable' ] }
|
2022-08-11 14:24:43 +02:00
|
|
|
|
|
|
|
##
|
|
|
|
# @VirtioRingDesc:
|
|
|
|
#
|
|
|
|
# Information regarding the vring descriptor area
|
|
|
|
#
|
|
|
|
# @addr: Guest physical address of the descriptor area
|
|
|
|
#
|
|
|
|
# @len: Length of the descriptor area
|
|
|
|
#
|
|
|
|
# @flags: List of descriptor flags
|
|
|
|
#
|
2022-11-01 02:46:47 +01:00
|
|
|
# Since: 7.2
|
2022-08-11 14:24:43 +02:00
|
|
|
##
|
|
|
|
{ 'struct': 'VirtioRingDesc',
|
|
|
|
'data': { 'addr': 'uint64',
|
|
|
|
'len': 'uint32',
|
|
|
|
'flags': [ 'str' ] } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @VirtioRingAvail:
|
|
|
|
#
|
|
|
|
# Information regarding the avail vring (a.k.a. driver area)
|
|
|
|
#
|
|
|
|
# @flags: VRingAvail flags
|
|
|
|
#
|
|
|
|
# @idx: VRingAvail index
|
|
|
|
#
|
|
|
|
# @ring: VRingAvail ring[] entry at provided index
|
|
|
|
#
|
2022-11-01 02:46:47 +01:00
|
|
|
# Since: 7.2
|
2022-08-11 14:24:43 +02:00
|
|
|
##
|
|
|
|
{ 'struct': 'VirtioRingAvail',
|
|
|
|
'data': { 'flags': 'uint16',
|
|
|
|
'idx': 'uint16',
|
|
|
|
'ring': 'uint16' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @VirtioRingUsed:
|
|
|
|
#
|
|
|
|
# Information regarding the used vring (a.k.a. device area)
|
|
|
|
#
|
|
|
|
# @flags: VRingUsed flags
|
|
|
|
#
|
|
|
|
# @idx: VRingUsed index
|
|
|
|
#
|
2022-11-01 02:46:47 +01:00
|
|
|
# Since: 7.2
|
2022-08-11 14:24:43 +02:00
|
|
|
##
|
|
|
|
{ 'struct': 'VirtioRingUsed',
|
|
|
|
'data': { 'flags': 'uint16',
|
|
|
|
'idx': 'uint16' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @VirtioQueueElement:
|
|
|
|
#
|
|
|
|
# Information regarding a VirtQueue's VirtQueueElement including
|
|
|
|
# descriptor, driver, and device areas
|
|
|
|
#
|
|
|
|
# @name: Name of the VirtIODevice that uses this VirtQueue
|
|
|
|
#
|
|
|
|
# @index: Index of the element in the queue
|
|
|
|
#
|
|
|
|
# @descs: List of descriptors (VirtioRingDesc)
|
|
|
|
#
|
|
|
|
# @avail: VRingAvail info
|
|
|
|
#
|
|
|
|
# @used: VRingUsed info
|
|
|
|
#
|
2022-11-01 02:46:47 +01:00
|
|
|
# Since: 7.2
|
2022-08-11 14:24:43 +02:00
|
|
|
##
|
|
|
|
{ 'struct': 'VirtioQueueElement',
|
|
|
|
'data': { 'name': 'str',
|
|
|
|
'index': 'uint32',
|
|
|
|
'descs': [ 'VirtioRingDesc' ],
|
|
|
|
'avail': 'VirtioRingAvail',
|
|
|
|
'used': 'VirtioRingUsed' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @x-query-virtio-queue-element:
|
|
|
|
#
|
|
|
|
# Return the information about a VirtQueue's VirtQueueElement
|
|
|
|
#
|
|
|
|
# @path: VirtIODevice canonical QOM path
|
|
|
|
#
|
|
|
|
# @queue: VirtQueue index to examine
|
|
|
|
#
|
2023-04-28 12:54:29 +02:00
|
|
|
# @index: Index of the element in the queue (default: head of the
|
|
|
|
# queue)
|
2022-08-11 14:24:43 +02:00
|
|
|
#
|
|
|
|
# Features:
|
2023-04-28 12:54:29 +02:00
|
|
|
#
|
2022-08-11 14:24:43 +02:00
|
|
|
# @unstable: This command is meant for debugging.
|
|
|
|
#
|
|
|
|
# Returns: VirtioQueueElement information
|
|
|
|
#
|
2022-11-01 02:46:47 +01:00
|
|
|
# Since: 7.2
|
2022-08-11 14:24:43 +02:00
|
|
|
#
|
|
|
|
# Examples:
|
|
|
|
#
|
|
|
|
# 1. Introspect on virtio-net's VirtQueue 0 at index 5
|
|
|
|
#
|
|
|
|
# -> { "execute": "x-query-virtio-queue-element",
|
|
|
|
# "arguments": { "path": "/machine/peripheral-anon/device[1]/virtio-backend",
|
|
|
|
# "queue": 0,
|
|
|
|
# "index": 5 }
|
|
|
|
# }
|
|
|
|
# <- { "return": {
|
|
|
|
# "index": 5,
|
|
|
|
# "name": "virtio-net",
|
|
|
|
# "descs": [
|
|
|
|
# {
|
|
|
|
# "flags": ["write"],
|
|
|
|
# "len": 1536,
|
|
|
|
# "addr": 5257305600
|
|
|
|
# }
|
|
|
|
# ],
|
|
|
|
# "avail": {
|
|
|
|
# "idx": 256,
|
|
|
|
# "flags": 0,
|
|
|
|
# "ring": 5
|
|
|
|
# },
|
|
|
|
# "used": {
|
|
|
|
# "idx": 13,
|
|
|
|
# "flags": 0
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
#
|
|
|
|
# 2. Introspect on virtio-crypto's VirtQueue 1 at head
|
|
|
|
#
|
|
|
|
# -> { "execute": "x-query-virtio-queue-element",
|
|
|
|
# "arguments": { "path": "/machine/peripheral/crypto0/virtio-backend",
|
|
|
|
# "queue": 1 }
|
|
|
|
# }
|
|
|
|
# <- { "return": {
|
|
|
|
# "index": 0,
|
|
|
|
# "name": "virtio-crypto",
|
|
|
|
# "descs": [
|
|
|
|
# {
|
|
|
|
# "flags": [],
|
|
|
|
# "len": 0,
|
|
|
|
# "addr": 8080268923184214134
|
|
|
|
# }
|
|
|
|
# ],
|
|
|
|
# "avail": {
|
|
|
|
# "idx": 280,
|
|
|
|
# "flags": 0,
|
|
|
|
# "ring": 0
|
|
|
|
# },
|
|
|
|
# "used": {
|
|
|
|
# "idx": 280,
|
|
|
|
# "flags": 0
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
#
|
|
|
|
# 3. Introspect on virtio-scsi's VirtQueue 2 at head
|
|
|
|
#
|
|
|
|
# -> { "execute": "x-query-virtio-queue-element",
|
|
|
|
# "arguments": { "path": "/machine/peripheral-anon/device[2]/virtio-backend",
|
|
|
|
# "queue": 2 }
|
|
|
|
# }
|
|
|
|
# <- { "return": {
|
|
|
|
# "index": 19,
|
|
|
|
# "name": "virtio-scsi",
|
|
|
|
# "descs": [
|
|
|
|
# {
|
|
|
|
# "flags": ["used", "indirect", "write"],
|
|
|
|
# "len": 4099327944,
|
|
|
|
# "addr": 12055409292258155293
|
|
|
|
# }
|
|
|
|
# ],
|
|
|
|
# "avail": {
|
|
|
|
# "idx": 1147,
|
|
|
|
# "flags": 0,
|
|
|
|
# "ring": 19
|
|
|
|
# },
|
|
|
|
# "used": {
|
|
|
|
# "idx": 280,
|
|
|
|
# "flags": 0
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
##
|
|
|
|
{ 'command': 'x-query-virtio-queue-element',
|
|
|
|
'data': { 'path': 'str', 'queue': 'uint16', '*index': 'uint16' },
|
|
|
|
'returns': 'VirtioQueueElement',
|
|
|
|
'features': [ 'unstable' ] }
|