qemu/qapi/block.json
Kevin Wolf b3cf1ec06a block: Move common QMP commands to block-core QAPI module
block-core is for everything that isn't related to the system emulator.
Internal snapshots, the NBD server and quorum events make sense in the
tools, too, so move them to block-core.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200224143008.13362-5-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2020-03-06 17:15:38 +01:00

170 lines
4.5 KiB
Python

# -*- Mode: Python -*-
##
# = Block devices
##
{ 'include': 'block-core.json' }
##
# == Additional block stuff (VM related)
##
##
# @BiosAtaTranslation:
#
# Policy that BIOS should use to interpret cylinder/head/sector
# addresses. Note that Bochs BIOS and SeaBIOS will not actually
# translate logical CHS to physical; instead, they will use logical
# block addressing.
#
# @auto: If cylinder/heads/sizes are passed, choose between none and LBA
# depending on the size of the disk. If they are not passed,
# choose none if QEMU can guess that the disk had 16 or fewer
# heads, large if QEMU can guess that the disk had 131072 or
# fewer tracks across all heads (i.e. cylinders*heads<131072),
# otherwise LBA.
#
# @none: The physical disk geometry is equal to the logical geometry.
#
# @lba: Assume 63 sectors per track and one of 16, 32, 64, 128 or 255
# heads (if fewer than 255 are enough to cover the whole disk
# with 1024 cylinders/head). The number of cylinders/head is
# then computed based on the number of sectors and heads.
#
# @large: The number of cylinders per head is scaled down to 1024
# by correspondingly scaling up the number of heads.
#
# @rechs: Same as @large, but first convert a 16-head geometry to
# 15-head, by proportionally scaling up the number of
# cylinders/head.
#
# Since: 2.0
##
{ 'enum': 'BiosAtaTranslation',
'data': ['auto', 'none', 'lba', 'large', 'rechs']}
##
# @FloppyDriveType:
#
# Type of Floppy drive to be emulated by the Floppy Disk Controller.
#
# @144: 1.44MB 3.5" drive
# @288: 2.88MB 3.5" drive
# @120: 1.2MB 5.25" drive
# @none: No drive connected
# @auto: Automatically determined by inserted media at boot
#
# Since: 2.6
##
{ 'enum': 'FloppyDriveType',
'data': ['144', '288', '120', 'none', 'auto']}
##
# @PRManagerInfo:
#
# Information about a persistent reservation manager
#
# @id: the identifier of the persistent reservation manager
#
# @connected: true if the persistent reservation manager is connected to
# the underlying storage or helper
#
# Since: 3.0
##
{ 'struct': 'PRManagerInfo',
'data': {'id': 'str', 'connected': 'bool'} }
##
# @query-pr-managers:
#
# Returns a list of information about each persistent reservation manager.
#
# Returns: a list of @PRManagerInfo for each persistent reservation manager
#
# Since: 3.0
##
{ 'command': 'query-pr-managers', 'returns': ['PRManagerInfo'],
'allow-preconfig': true }
##
# @eject:
#
# Ejects a device from a removable drive.
#
# @device: Block device name (deprecated, use @id instead)
#
# @id: The name or QOM path of the guest device (since: 2.8)
#
# @force: If true, eject regardless of whether the drive is locked.
# If not specified, the default value is false.
#
# Returns: - Nothing on success
# - If @device is not a valid block device, DeviceNotFound
# Notes: Ejecting a device with no media results in success
#
# Since: 0.14.0
#
# Example:
#
# -> { "execute": "eject", "arguments": { "id": "ide1-0-1" } }
# <- { "return": {} }
##
{ 'command': 'eject',
'data': { '*device': 'str',
'*id': 'str',
'*force': 'bool' } }
##
# @DEVICE_TRAY_MOVED:
#
# Emitted whenever the tray of a removable device is moved by the guest or by
# HMP/QMP commands
#
# @device: Block device name. This is always present for compatibility
# reasons, but it can be empty ("") if the image does not
# have a device name associated.
#
# @id: The name or QOM path of the guest device (since 2.8)
#
# @tray-open: true if the tray has been opened or false if it has been closed
#
# Since: 1.1
#
# Example:
#
# <- { "event": "DEVICE_TRAY_MOVED",
# "data": { "device": "ide1-cd0",
# "id": "/machine/unattached/device[22]",
# "tray-open": true
# },
# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
#
##
{ 'event': 'DEVICE_TRAY_MOVED',
'data': { 'device': 'str', 'id': 'str', 'tray-open': 'bool' } }
##
# @PR_MANAGER_STATUS_CHANGED:
#
# Emitted whenever the connected status of a persistent reservation
# manager changes.
#
# @id: The id of the PR manager object
#
# @connected: true if the PR manager is connected to a backend
#
# Since: 3.0
#
# Example:
#
# <- { "event": "PR_MANAGER_STATUS_CHANGED",
# "data": { "id": "pr-helper0",
# "connected": true
# },
# "timestamp": { "seconds": 1519840375, "microseconds": 450486 } }
#
##
{ 'event': 'PR_MANAGER_STATUS_CHANGED',
'data': { 'id': 'str', 'connected': 'bool' } }