Merge remote-tracking branch 'remotes/berrange-gitlab/tags/dep-many-pull-request' into staging

Remove many old deprecated features

The following features have been deprecated for well over the 2
release cycle we promise

  ``-drive file=json:{...{'driver':'file'}}`` (since 3.0)
  ``-vnc acl`` (since 4.0.0)
  ``-mon ...,control=readline,pretty=on|off`` (since 4.1)
  ``migrate_set_downtime`` and ``migrate_set_speed`` (since 2.8.0)
  ``query-named-block-nodes`` result ``encryption_key_missing`` (since 2.10.0)
  ``query-block`` result ``inserted.encryption_key_missing`` (since 2.10.0)
  ``migrate-set-cache-size`` and ``query-migrate-cache-size`` (since 2.11.0)
  ``query-named-block-nodes`` and ``query-block`` result dirty-bitmaps[i].status (since 4.0)
  ``query-cpus`` (since 2.12.0)
  ``query-cpus-fast`` ``arch`` output member (since 3.0.0)
  ``query-events`` (since 4.0)
  chardev client socket with ``wait`` option (since 4.0)
  ``acl_show``, ``acl_reset``, ``acl_policy``, ``acl_add``, ``acl_remove`` (since 4.0.0)
  ``ide-drive`` (since 4.2)
  ``scsi-disk`` (since 4.2)

# gpg: Signature made Thu 18 Mar 2021 09:23:39 GMT
# gpg:                using RSA key DAF3A6FDB26B62912D0E8E3FBE86EBB415104FDF
# gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>" [full]
# gpg:                 aka "Daniel P. Berrange <berrange@redhat.com>" [full]
# Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E  8E3F BE86 EBB4 1510 4FDF

* remotes/berrange-gitlab/tags/dep-many-pull-request:
  block: remove support for using "file" driver with block/char devices
  block: remove 'dirty-bitmaps' field from 'BlockInfo' struct
  block: remove dirty bitmaps 'status' field
  block: remove 'encryption_key_missing' flag from QAPI
  hw/scsi: remove 'scsi-disk' device
  hw/ide: remove 'ide-drive' device
  chardev: reject use of 'wait' flag for socket client chardevs
  machine: remove 'arch' field from 'query-cpus-fast' QMP command
  machine: remove 'query-cpus' QMP command
  migrate: remove QMP/HMP commands for speed, downtime and cache size
  monitor: remove 'query-events' QMP command
  monitor: raise error when 'pretty' option is used with HMP
  ui, monitor: remove deprecated VNC ACL option and HMP commands

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell
2021-03-18 19:00:50 +00:00
64 changed files with 369 additions and 1801 deletions
-38
View File
@@ -166,43 +166,6 @@ bool bdrv_dirty_bitmap_enabled(BdrvDirtyBitmap *bitmap)
return !bitmap->disabled;
}
/**
* bdrv_dirty_bitmap_status: This API is now deprecated.
* Called with BQL taken.
*
* A BdrvDirtyBitmap can be in four possible user-visible states:
* (1) Active: successor is NULL, and disabled is false: full r/w mode
* (2) Disabled: successor is NULL, and disabled is true: qualified r/w mode,
* guest writes are dropped, but monitor writes are possible,
* through commands like merge and clear.
* (3) Frozen: successor is not NULL.
* A frozen bitmap cannot be renamed, deleted, cleared, set,
* enabled, merged to, etc. A frozen bitmap can only abdicate()
* or reclaim().
* In this state, the anonymous successor bitmap may be either
* Active and recording writes from the guest (e.g. backup jobs),
* or it can be Disabled and not recording writes.
* (4) Locked: Whether Active or Disabled, the user cannot modify this bitmap
* in any way from the monitor.
* (5) Inconsistent: This is a persistent bitmap whose "in use" bit is set, and
* is unusable by QEMU. It can be deleted to remove it from
* the qcow2.
*/
DirtyBitmapStatus bdrv_dirty_bitmap_status(BdrvDirtyBitmap *bitmap)
{
if (bdrv_dirty_bitmap_inconsistent(bitmap)) {
return DIRTY_BITMAP_STATUS_INCONSISTENT;
} else if (bdrv_dirty_bitmap_has_successor(bitmap)) {
return DIRTY_BITMAP_STATUS_FROZEN;
} else if (bdrv_dirty_bitmap_busy(bitmap)) {
return DIRTY_BITMAP_STATUS_LOCKED;
} else if (!bdrv_dirty_bitmap_enabled(bitmap)) {
return DIRTY_BITMAP_STATUS_DISABLED;
} else {
return DIRTY_BITMAP_STATUS_ACTIVE;
}
}
/* Called with BQL taken. */
static bool bdrv_dirty_bitmap_recording(BdrvDirtyBitmap *bitmap)
{
@@ -582,7 +545,6 @@ BlockDirtyInfoList *bdrv_query_dirty_bitmaps(BlockDriverState *bs)
info->granularity = bdrv_dirty_bitmap_granularity(bm);
info->has_name = !!bm->name;
info->name = g_strdup(bm->name);
info->status = bdrv_dirty_bitmap_status(bm);
info->recording = bdrv_dirty_bitmap_recording(bm);
info->busy = bdrv_dirty_bitmap_busy(bm);
info->persistent = bm->persistent;
+6 -11
View File
@@ -719,15 +719,9 @@ static int raw_open_common(BlockDriverState *bs, QDict *options,
}
if (!device) {
if (S_ISBLK(st.st_mode)) {
warn_report("Opening a block device as a file using the '%s' "
"driver is deprecated", bs->drv->format_name);
} else if (S_ISCHR(st.st_mode)) {
warn_report("Opening a character device as a file using the '%s' "
"driver is deprecated", bs->drv->format_name);
} else if (!S_ISREG(st.st_mode)) {
error_setg(errp, "A regular file was expected by the '%s' driver, "
"but something else was given", bs->drv->format_name);
if (!S_ISREG(st.st_mode)) {
error_setg(errp, "'%s' driver requires '%s' to be a regular file",
bs->drv->format_name, bs->filename);
ret = -EINVAL;
goto fail;
} else {
@@ -736,8 +730,9 @@ static int raw_open_common(BlockDriverState *bs, QDict *options,
}
} else {
if (!(S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode))) {
error_setg(errp, "'%s' driver expects either "
"a character or block device", bs->drv->format_name);
error_setg(errp, "'%s' driver requires '%s' to be either "
"a character or block device",
bs->drv->format_name, bs->filename);
ret = -EINVAL;
goto fail;
}
-6
View File
@@ -62,7 +62,6 @@ BlockDeviceInfo *bdrv_block_device_info(BlockBackend *blk,
info->ro = bs->read_only;
info->drv = g_strdup(bs->drv->format_name);
info->encrypted = bs->encrypted;
info->encryption_key_missing = false;
info->cache = g_new(BlockdevCacheInfo, 1);
*info->cache = (BlockdevCacheInfo) {
@@ -384,11 +383,6 @@ static void bdrv_query_info(BlockBackend *blk, BlockInfo **p_info,
info->io_status = blk_iostatus(blk);
}
if (bs && !QLIST_EMPTY(&bs->dirty_bitmaps)) {
info->has_dirty_bitmaps = true;
info->dirty_bitmaps = bdrv_query_dirty_bitmaps(bs);
}
if (bs && bs->drv) {
info->has_inserted = true;
info->inserted = bdrv_block_device_info(blk, bs, false, errp);
+4 -8
View File
@@ -1339,14 +1339,10 @@ static bool qmp_chardev_validate_socket(ChardevSocket *sock,
return false;
}
if (sock->has_wait) {
warn_report("'wait' option is deprecated with "
"socket in client connect mode");
if (sock->wait) {
error_setg(errp, "%s",
"'wait' option is incompatible with "
"socket in client connect mode");
return false;
}
error_setg(errp, "%s",
"'wait' option is incompatible with "
"socket in client connect mode");
return false;
}
}
+1 -1
View File
@@ -641,7 +641,7 @@ time per vCPU.
.. note::
During the postcopy phase, the bandwidth limits set using
``migrate_set_speed`` is ignored (to avoid delaying requested pages that
``migrate_set_parameter`` is ignored (to avoid delaying requested pages that
the destination is waiting for).
Postcopy device transfer
+1 -1
View File
@@ -388,7 +388,7 @@ type.
some DEVNAMEs:
default device suppressing DEVNAMEs
CD-ROM ide-cd, ide-drive, ide-hd, scsi-cd, scsi-hd
CD-ROM ide-cd, ide-hd, scsi-cd, scsi-hd
floppy floppy, isa-fdc
parallel isa-parallel
serial isa-serial
+1 -1
View File
@@ -89,7 +89,7 @@ RUNNING:
First, set the migration speed to match your hardware's capabilities:
QEMU Monitor Command:
$ migrate_set_speed 40g # or whatever is the MAX of your RDMA device
$ migrate_set_parameter max_bandwidth 40g # or whatever is the MAX of your RDMA device
Next, on the destination machine, add the following to the QEMU command line:
-108
View File
@@ -21,19 +21,6 @@ deprecated.
System emulator command line arguments
--------------------------------------
``-drive file=json:{...{'driver':'file'}}`` (since 3.0)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
The 'file' driver for drives is no longer appropriate for character or host
devices and will only accept regular files (S_IFREG). The correct driver
for these file types is 'host_cdrom' or 'host_device' as appropriate.
``-vnc acl`` (since 4.0.0)
''''''''''''''''''''''''''
The ``acl`` option to the ``-vnc`` argument has been replaced
by the ``tls-authz`` and ``sasl-authz`` options.
``QEMU_AUDIO_`` environment variables and ``-audio-help`` (since 4.0)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
@@ -59,13 +46,6 @@ needs two devices (``-device intel-hda -device hda-duplex``) and
``pcspk`` which can be activated using ``-machine
pcspk-audiodev=<name>``.
``-mon ...,control=readline,pretty=on|off`` (since 4.1)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
The ``pretty=on|off`` switch has no effect for HMP monitors, but is
silently ignored. Using the switch with HMP monitors will become an
error in the future.
RISC-V ``-bios`` (since 5.1)
''''''''''''''''''''''''''''
@@ -196,31 +176,11 @@ Use argument ``id`` instead.
Use argument ``id`` instead.
``migrate_set_downtime`` and ``migrate_set_speed`` (since 2.8.0)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Use ``migrate-set-parameters`` instead.
``query-named-block-nodes`` result ``encryption_key_missing`` (since 2.10.0)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Always false.
``query-block`` result ``inserted.encryption_key_missing`` (since 2.10.0)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Always false.
``blockdev-add`` empty string argument ``backing`` (since 2.10.0)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Use argument value ``null`` instead.
``migrate-set-cache-size`` and ``query-migrate-cache-size`` (since 2.11.0)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Use ``migrate-set-parameters`` and ``query-migrate-parameters`` instead.
``block-commit`` arguments ``base`` and ``top`` (since 3.1.0)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
@@ -231,49 +191,6 @@ Use arguments ``base-node`` and ``top-node`` instead.
Specify the properties for the object as top-level arguments instead.
``query-named-block-nodes`` and ``query-block`` result dirty-bitmaps[i].status (since 4.0)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
The ``status`` field of the ``BlockDirtyInfo`` structure, returned by
these commands is deprecated. Two new boolean fields, ``recording`` and
``busy`` effectively replace it.
``query-block`` result field ``dirty-bitmaps`` (Since 4.2)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
The ``dirty-bitmaps`` field of the ``BlockInfo`` structure, returned by
the query-block command is itself now deprecated. The ``dirty-bitmaps``
field of the ``BlockDeviceInfo`` struct should be used instead, which is the
type of the ``inserted`` field in query-block replies, as well as the
type of array items in query-named-block-nodes.
Since the ``dirty-bitmaps`` field is optionally present in both the old and
new locations, clients must use introspection to learn where to anticipate
the field if/when it does appear in command output.
``query-cpus`` (since 2.12.0)
'''''''''''''''''''''''''''''
The ``query-cpus`` command is replaced by the ``query-cpus-fast`` command.
``query-cpus-fast`` ``arch`` output member (since 3.0.0)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''
The ``arch`` output member of the ``query-cpus-fast`` command is
replaced by the ``target`` output member.
``query-events`` (since 4.0)
''''''''''''''''''''''''''''
The ``query-events`` command has been superseded by the more powerful
and accurate ``query-qmp-schema`` command.
chardev client socket with ``wait`` option (since 4.0)
''''''''''''''''''''''''''''''''''''''''''''''''''''''
Character devices creating sockets in client mode should not specify
the 'wait' field, which is only applicable to sockets in server mode
``nbd-server-add`` and ``nbd-server-remove`` (since 5.2)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''
@@ -281,16 +198,6 @@ Use the more generic commands ``block-export-add`` and ``block-export-del``
instead. As part of this deprecation, where ``nbd-server-add`` used a
single ``bitmap``, the new ``block-export-add`` uses a list of ``bitmaps``.
Human Monitor Protocol (HMP) commands
-------------------------------------
``acl_show``, ``acl_reset``, ``acl_policy``, ``acl_add``, ``acl_remove`` (since 4.0.0)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
The ``acl_show``, ``acl_reset``, ``acl_policy``, ``acl_add``, and
``acl_remove`` commands are deprecated with no replacement. Authorization
for VNC should be performed using the pluggable QAuthZ objects.
System emulator CPUS
--------------------
@@ -331,21 +238,6 @@ The ``I7200`` guest CPU relies on the nanoMIPS ISA, which is deprecated
(the ISA has never been upstreamed to a compiler toolchain). Therefore
this CPU is also deprecated.
System emulator devices
-----------------------
``ide-drive`` (since 4.2)
'''''''''''''''''''''''''
The 'ide-drive' device is deprecated. Users should use 'ide-hd' or
'ide-cd' as appropriate to get an IDE hard disk or CD-ROM as needed.
``scsi-disk`` (since 4.2)
'''''''''''''''''''''''''
The 'scsi-disk' device is deprecated. Users should use 'scsi-hd' or
'scsi-cd' as appropriate to get a SCSI hard disk or CD-ROM as needed.
System emulator machines
------------------------
+108
View File
@@ -45,6 +45,24 @@ This option lacked the possibility to specify an audio backend device.
Use ``-device usb-audio`` now instead (and specify a corresponding USB
host controller or ``-usb`` if necessary).
``-vnc acl`` (removed in 6.0)
'''''''''''''''''''''''''''''
The ``acl`` option to the ``-vnc`` argument has been replaced
by the ``tls-authz`` and ``sasl-authz`` options.
``-mon ...,control=readline,pretty=on|off`` (removed in 6.0)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
The ``pretty=on|off`` switch has no effect for HMP monitors and
its use is rejected.
``-drive file=json:{...{'driver':'file'}}`` (removed 6.0)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
The 'file' driver for drives is no longer appropriate for character or host
devices and will only accept regular files (S_IFREG). The correct driver
for these file types is 'host_cdrom' or 'host_device' as appropriate.
QEMU Machine Protocol (QMP) commands
------------------------------------
@@ -66,6 +84,65 @@ documentation of ``query-hotpluggable-cpus`` for additional details.
Use ``blockdev-change-medium`` or ``change-vnc-password`` instead.
``query-events`` (removed in 6.0)
'''''''''''''''''''''''''''''''''
The ``query-events`` command has been superseded by the more powerful
and accurate ``query-qmp-schema`` command.
``migrate_set_cache_size`` and ``query-migrate-cache-size`` (removed in 6.0)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Use ``migrate_set_parameter`` and ``info migrate_parameters`` instead.
``migrate_set_downtime`` and ``migrate_set_speed`` (removed in 6.0)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Use ``migrate_set_parameter`` instead.
``query-cpus`` (removed in 6.0)
'''''''''''''''''''''''''''''''
The ``query-cpus`` command is replaced by the ``query-cpus-fast`` command.
``query-cpus-fast`` ``arch`` output member (removed in 6.0)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
The ``arch`` output member of the ``query-cpus-fast`` command is
replaced by the ``target`` output member.
chardev client socket with ``wait`` option (removed in 6.0)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Character devices creating sockets in client mode should not specify
the 'wait' field, which is only applicable to sockets in server mode
``query-named-block-nodes`` result ``encryption_key_missing`` (removed in 6.0)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Removed with no replacement.
``query-block`` result ``inserted.encryption_key_missing`` (removed in 6.0)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Removed with no replacement.
``query-named-block-nodes`` and ``query-block`` result dirty-bitmaps[i].status (removed in 6.0)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
The ``status`` field of the ``BlockDirtyInfo`` structure, returned by
these commands is removed. Two new boolean fields, ``recording`` and
``busy`` effectively replace it.
``query-block`` result field ``dirty-bitmaps`` (removed in 6.0)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
The ``dirty-bitmaps`` field of the ``BlockInfo`` structure, returned by
the query-block command is itself now removed. The ``dirty-bitmaps``
field of the ``BlockDeviceInfo`` struct should be used instead, which is the
type of the ``inserted`` field in query-block replies, as well as the
type of array items in query-named-block-nodes.
Human Monitor Protocol (HMP) commands
-------------------------------------
@@ -87,6 +164,23 @@ documentation of ``query-hotpluggable-cpus`` for additional details.
No replacement. The ``change vnc password`` and ``change DEVICE MEDIUM``
commands are not affected.
``acl_show``, ``acl_reset``, ``acl_policy``, ``acl_add``, ``acl_remove`` (removed in 6.0)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
The ``acl_show``, ``acl_reset``, ``acl_policy``, ``acl_add``, and
``acl_remove`` commands were removed with no replacement. Authorization
for VNC should be performed using the pluggable QAuthZ objects.
``migrate-set-cache-size`` and ``info migrate-cache-size`` (removed in 6.0)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Use ``migrate-set-parameters`` and ``info migrate-parameters`` instead.
``migrate_set_downtime`` and ``migrate_set_speed`` (removed in 6.0)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Use ``migrate-set-parameters`` instead.
Guest Emulator ISAs
-------------------
@@ -163,6 +257,20 @@ the upstream Linux kernel in 2018, and it has also been dropped from glibc, so
there is no new Linux development taking place with this architecture. For
running the old binaries, you can use older versions of QEMU.
System emulator devices
-----------------------
``ide-drive`` (removed in 6.0)
''''''''''''''''''''''''''''''
The 'ide-drive' device has been removed. Users should use 'ide-hd' or
'ide-cd' as appropriate to get an IDE hard disk or CD-ROM as needed.
``scsi-disk`` (removed in 6.0)
''''''''''''''''''''''''''''''
The 'scsi-disk' device has been removed. Users should use 'scsi-hd' or
'scsi-cd' as appropriate to get a SCSI hard disk or CD-ROM as needed.
Related binaries
----------------
-5
View File
@@ -90,11 +90,6 @@ Usage
3. Set the XBZRLE cache size - the cache size is in MBytes and should be a
power of 2. The cache default value is 64MBytes. (on source only)
{qemu} migrate_set_cache_size 256m
Commit 73af8dd8d7 "migration: Make xbzrle_cache_size a migration parameter"
(v2.11.0) deprecated migrate-set-cache-size, therefore, the new parameter
is recommended.
{qemu} migrate_set_parameter xbzrle-cache-size 256m
4. Start outgoing migration
-13
View File
@@ -567,19 +567,6 @@ SRST
Show current migration parameters.
ERST
{
.name = "migrate_cache_size",
.args_type = "",
.params = "",
.help = "show current migration xbzrle cache size",
.cmd = hmp_info_migrate_cache_size,
},
SRST
``info migrate_cache_size``
Show current migration xbzrle cache size.
ERST
{
.name = "balloon",
.args_type = "",
-121
View File
@@ -979,51 +979,6 @@ SRST
Pause an ongoing migration. Currently it only supports postcopy.
ERST
{
.name = "migrate_set_cache_size",
.args_type = "value:o",
.params = "value",
.help = "set cache size (in bytes) for XBZRLE migrations,"
"the cache size will be rounded down to the nearest "
"power of 2.\n"
"The cache size affects the number of cache misses."
"In case of a high cache miss ratio you need to increase"
" the cache size",
.cmd = hmp_migrate_set_cache_size,
},
SRST
``migrate_set_cache_size`` *value*
Set cache size to *value* (in bytes) for xbzrle migrations.
ERST
{
.name = "migrate_set_speed",
.args_type = "value:o",
.params = "value",
.help = "set maximum speed (in bytes) for migrations. "
"Defaults to MB if no size suffix is specified, ie. B/K/M/G/T",
.cmd = hmp_migrate_set_speed,
},
SRST
``migrate_set_speed`` *value*
Set maximum speed to *value* (in bytes) for migrations.
ERST
{
.name = "migrate_set_downtime",
.args_type = "value:T",
.params = "value",
.help = "set maximum tolerated downtime (in seconds) for migrations",
.cmd = hmp_migrate_set_downtime,
},
SRST
``migrate_set_downtime`` *second*
Set maximum tolerated downtime (in seconds) for migration.
ERST
{
.name = "migrate_set_capability",
.args_type = "capability:s,state:b",
@@ -1433,82 +1388,6 @@ SRST
Change watchdog action.
ERST
{
.name = "acl_show",
.args_type = "aclname:s",
.params = "aclname",
.help = "list rules in the access control list",
.cmd = hmp_acl_show,
},
SRST
``acl_show`` *aclname*
List all the matching rules in the access control list, and the default
policy. There are currently two named access control lists,
*vnc.x509dname* and *vnc.username* matching on the x509 client
certificate distinguished name, and SASL username respectively.
ERST
{
.name = "acl_policy",
.args_type = "aclname:s,policy:s",
.params = "aclname allow|deny",
.help = "set default access control list policy",
.cmd = hmp_acl_policy,
},
SRST
``acl_policy`` *aclname* ``allow|deny``
Set the default access control list policy, used in the event that
none of the explicit rules match. The default policy at startup is
always ``deny``.
ERST
{
.name = "acl_add",
.args_type = "aclname:s,match:s,policy:s,index:i?",
.params = "aclname match allow|deny [index]",
.help = "add a match rule to the access control list",
.cmd = hmp_acl_add,
},
SRST
``acl_add`` *aclname* *match* ``allow|deny`` [*index*]
Add a match rule to the access control list, allowing or denying access.
The match will normally be an exact username or x509 distinguished name,
but can optionally include wildcard globs. eg ``*@EXAMPLE.COM`` to
allow all users in the ``EXAMPLE.COM`` kerberos realm. The match will
normally be appended to the end of the ACL, but can be inserted
earlier in the list if the optional *index* parameter is supplied.
ERST
{
.name = "acl_remove",
.args_type = "aclname:s,match:s",
.params = "aclname match",
.help = "remove a match rule from the access control list",
.cmd = hmp_acl_remove,
},
SRST
``acl_remove`` *aclname* *match*
Remove the specified match rule from the access control list.
ERST
{
.name = "acl_reset",
.args_type = "aclname:s",
.params = "aclname",
.help = "reset the access control list",
.cmd = hmp_acl_reset,
},
SRST
``acl_reset`` *aclname*
Remove all matches from the access control list, and set the default
policy back to ``deny``.
ERST
{
.name = "nbd_server_start",
.args_type = "all:-a,writable:-w,uri:s",
+4 -4
View File
@@ -130,7 +130,7 @@ void hmp_info_numa(Monitor *mon, const QDict *qdict)
{
int i, nb_numa_nodes;
NumaNodeMem *node_mem;
CpuInfoList *cpu_list, *cpu;
CpuInfoFastList *cpu_list, *cpu;
MachineState *ms = MACHINE(qdev_get_machine());
nb_numa_nodes = ms->numa_state ? ms->numa_state->num_nodes : 0;
@@ -139,7 +139,7 @@ void hmp_info_numa(Monitor *mon, const QDict *qdict)
return;
}
cpu_list = qmp_query_cpus(&error_abort);
cpu_list = qmp_query_cpus_fast(&error_abort);
node_mem = g_new0(NumaNodeMem, nb_numa_nodes);
query_numa_node_mem(node_mem, ms);
@@ -148,7 +148,7 @@ void hmp_info_numa(Monitor *mon, const QDict *qdict)
for (cpu = cpu_list; cpu; cpu = cpu->next) {
if (cpu->value->has_props && cpu->value->props->has_node_id &&
cpu->value->props->node_id == i) {
monitor_printf(mon, " %" PRIi64, cpu->value->CPU);
monitor_printf(mon, " %" PRIi64, cpu->value->cpu_index);
}
}
monitor_printf(mon, "\n");
@@ -157,6 +157,6 @@ void hmp_info_numa(Monitor *mon, const QDict *qdict)
monitor_printf(mon, "node %d plugged: %" PRId64 " MB\n", i,
node_mem[i].node_plugged_mem >> 20);
}
qapi_free_CpuInfoList(cpu_list);
qapi_free_CpuInfoFastList(cpu_list);
g_free(node_mem);
}
-120
View File
@@ -24,125 +24,6 @@
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
CpuInfoList *qmp_query_cpus(Error **errp)
{
MachineState *ms = MACHINE(qdev_get_machine());
MachineClass *mc = MACHINE_GET_CLASS(ms);
CpuInfoList *head = NULL, **tail = &head;
CPUState *cpu;
CPU_FOREACH(cpu) {
CpuInfo *value;
#if defined(TARGET_I386)
X86CPU *x86_cpu = X86_CPU(cpu);
CPUX86State *env = &x86_cpu->env;
#elif defined(TARGET_PPC)
PowerPCCPU *ppc_cpu = POWERPC_CPU(cpu);
CPUPPCState *env = &ppc_cpu->env;
#elif defined(TARGET_SPARC)
SPARCCPU *sparc_cpu = SPARC_CPU(cpu);
CPUSPARCState *env = &sparc_cpu->env;
#elif defined(TARGET_RISCV)
RISCVCPU *riscv_cpu = RISCV_CPU(cpu);
CPURISCVState *env = &riscv_cpu->env;
#elif defined(TARGET_MIPS)
MIPSCPU *mips_cpu = MIPS_CPU(cpu);
CPUMIPSState *env = &mips_cpu->env;
#elif defined(TARGET_TRICORE)
TriCoreCPU *tricore_cpu = TRICORE_CPU(cpu);
CPUTriCoreState *env = &tricore_cpu->env;
#elif defined(TARGET_S390X)
S390CPU *s390_cpu = S390_CPU(cpu);
CPUS390XState *env = &s390_cpu->env;
#endif
cpu_synchronize_state(cpu);
value = g_malloc0(sizeof(*value));
value->CPU = cpu->cpu_index;
value->current = (cpu == first_cpu);
value->halted = cpu->halted;
value->qom_path = object_get_canonical_path(OBJECT(cpu));
value->thread_id = cpu->thread_id;
#if defined(TARGET_I386)
value->arch = CPU_INFO_ARCH_X86;
value->u.x86.pc = env->eip + env->segs[R_CS].base;
#elif defined(TARGET_PPC)
value->arch = CPU_INFO_ARCH_PPC;
value->u.ppc.nip = env->nip;
#elif defined(TARGET_SPARC)
value->arch = CPU_INFO_ARCH_SPARC;
value->u.q_sparc.pc = env->pc;
value->u.q_sparc.npc = env->npc;
#elif defined(TARGET_MIPS)
value->arch = CPU_INFO_ARCH_MIPS;
value->u.q_mips.PC = env->active_tc.PC;
#elif defined(TARGET_TRICORE)
value->arch = CPU_INFO_ARCH_TRICORE;
value->u.tricore.PC = env->PC;
#elif defined(TARGET_S390X)
value->arch = CPU_INFO_ARCH_S390;
value->u.s390.cpu_state = env->cpu_state;
#elif defined(TARGET_RISCV)
value->arch = CPU_INFO_ARCH_RISCV;
value->u.riscv.pc = env->pc;
#else
value->arch = CPU_INFO_ARCH_OTHER;
#endif
value->has_props = !!mc->cpu_index_to_instance_props;
if (value->has_props) {
CpuInstanceProperties *props;
props = g_malloc0(sizeof(*props));
*props = mc->cpu_index_to_instance_props(ms, cpu->cpu_index);
value->props = props;
}
QAPI_LIST_APPEND(tail, value);
}
return head;
}
static CpuInfoArch sysemu_target_to_cpuinfo_arch(SysEmuTarget target)
{
/*
* The @SysEmuTarget -> @CpuInfoArch mapping below is based on the
* TARGET_ARCH -> TARGET_BASE_ARCH mapping in the "configure" script.
*/
switch (target) {
case SYS_EMU_TARGET_I386:
case SYS_EMU_TARGET_X86_64:
return CPU_INFO_ARCH_X86;
case SYS_EMU_TARGET_PPC:
case SYS_EMU_TARGET_PPC64:
return CPU_INFO_ARCH_PPC;
case SYS_EMU_TARGET_SPARC:
case SYS_EMU_TARGET_SPARC64:
return CPU_INFO_ARCH_SPARC;
case SYS_EMU_TARGET_MIPS:
case SYS_EMU_TARGET_MIPSEL:
case SYS_EMU_TARGET_MIPS64:
case SYS_EMU_TARGET_MIPS64EL:
return CPU_INFO_ARCH_MIPS;
case SYS_EMU_TARGET_TRICORE:
return CPU_INFO_ARCH_TRICORE;
case SYS_EMU_TARGET_S390X:
return CPU_INFO_ARCH_S390;
case SYS_EMU_TARGET_RISCV32:
case SYS_EMU_TARGET_RISCV64:
return CPU_INFO_ARCH_RISCV;
default:
return CPU_INFO_ARCH_OTHER;
}
}
static void cpustate_to_cpuinfo_s390(CpuInfoS390 *info, const CPUState *cpu)
{
#ifdef TARGET_S390X
@@ -183,7 +64,6 @@ CpuInfoFastList *qmp_query_cpus_fast(Error **errp)
value->props = props;
}
value->arch = sysemu_target_to_cpuinfo_arch(target);
value->target = target;
if (target == SYS_EMU_TARGET_S390X) {
cpustate_to_cpuinfo_s390(&value->u.s390x, cpu);
-2
View File
@@ -338,10 +338,8 @@ GlobalProperty pc_compat_1_4[] = {
PC_CPU_MODEL_IDS("1.4.0")
{ "scsi-hd", "discard_granularity", "0" },
{ "scsi-cd", "discard_granularity", "0" },
{ "scsi-disk", "discard_granularity", "0" },
{ "ide-hd", "discard_granularity", "0" },
{ "ide-cd", "discard_granularity", "0" },
{ "ide-drive", "discard_granularity", "0" },
{ "virtio-blk-pci", "discard_granularity", "0" },
/* DEV_NVECTORS_UNSPECIFIED as a uint32_t string: */
{ "virtio-serial-pci", "vectors", "0xFFFFFFFF" },
-38
View File
@@ -283,20 +283,6 @@ static void ide_cd_realize(IDEDevice *dev, Error **errp)
ide_dev_initfn(dev, IDE_CD, errp);
}
static void ide_drive_realize(IDEDevice *dev, Error **errp)
{
DriveInfo *dinfo = NULL;
warn_report("'ide-drive' is deprecated, "
"please use 'ide-hd' or 'ide-cd' instead");
if (dev->conf.blk) {
dinfo = blk_legacy_dinfo(dev->conf.blk);
}
ide_dev_initfn(dev, dinfo && dinfo->media_cd ? IDE_CD : IDE_HD, errp);
}
#define DEFINE_IDE_DEV_PROPERTIES() \
DEFINE_BLOCK_PROPERTIES(IDEDrive, dev.conf), \
DEFINE_BLOCK_ERROR_PROPERTIES(IDEDrive, dev.conf), \
@@ -355,29 +341,6 @@ static const TypeInfo ide_cd_info = {
.class_init = ide_cd_class_init,
};
static Property ide_drive_properties[] = {
DEFINE_IDE_DEV_PROPERTIES(),
DEFINE_PROP_END_OF_LIST(),
};
static void ide_drive_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
IDEDeviceClass *k = IDE_DEVICE_CLASS(klass);
k->realize = ide_drive_realize;
dc->fw_name = "drive";
dc->desc = "virtual IDE disk or CD-ROM (legacy)";
device_class_set_props(dc, ide_drive_properties);
}
static const TypeInfo ide_drive_info = {
.name = "ide-drive",
.parent = TYPE_IDE_DEVICE,
.instance_size = sizeof(IDEDrive),
.class_init = ide_drive_class_init,
};
static void ide_device_class_init(ObjectClass *klass, void *data)
{
DeviceClass *k = DEVICE_CLASS(klass);
@@ -402,7 +365,6 @@ static void ide_register_types(void)
type_register_static(&ide_bus_info);
type_register_static(&ide_hd_info);
type_register_static(&ide_cd_info);
type_register_static(&ide_drive_info);
type_register_static(&ide_device_type_info);
}
-13
View File
@@ -539,8 +539,6 @@ static char *core99_fw_dev_path(FWPathProvider *p, BusState *bus,
DeviceState *dev)
{
PCIDevice *pci;
IDEBus *ide_bus;
IDEState *ide_s;
MACIOIDEState *macio_ide;
if (!strcmp(object_get_typename(OBJECT(dev)), "macio-newworld")) {
@@ -553,17 +551,6 @@ static char *core99_fw_dev_path(FWPathProvider *p, BusState *bus,
return g_strdup_printf("ata-3@%x", macio_ide->addr);
}
if (!strcmp(object_get_typename(OBJECT(dev)), "ide-drive")) {
ide_bus = IDE_BUS(qdev_get_parent_bus(dev));
ide_s = idebus_active_if(ide_bus);
if (ide_s->drive_kind == IDE_CD) {
return g_strdup("cdrom");
}
return g_strdup("disk");
}
if (!strcmp(object_get_typename(OBJECT(dev)), "ide-hd")) {
return g_strdup("disk");
}
-13
View File
@@ -384,8 +384,6 @@ static char *heathrow_fw_dev_path(FWPathProvider *p, BusState *bus,
DeviceState *dev)
{
PCIDevice *pci;
IDEBus *ide_bus;
IDEState *ide_s;
MACIOIDEState *macio_ide;
if (!strcmp(object_get_typename(OBJECT(dev)), "macio-oldworld")) {
@@ -398,17 +396,6 @@ static char *heathrow_fw_dev_path(FWPathProvider *p, BusState *bus,
return g_strdup_printf("ata-3@%x", macio_ide->addr);
}
if (!strcmp(object_get_typename(OBJECT(dev)), "ide-drive")) {
ide_bus = IDE_BUS(qdev_get_parent_bus(dev));
ide_s = idebus_active_if(ide_bus);
if (ide_s->drive_kind == IDE_CD) {
return g_strdup("cdrom");
}
return g_strdup("disk");
}
if (!strcmp(object_get_typename(OBJECT(dev)), "ide-hd")) {
return g_strdup("disk");
}
-62
View File
@@ -2476,28 +2476,6 @@ static void scsi_cd_realize(SCSIDevice *dev, Error **errp)
aio_context_release(ctx);
}
static void scsi_disk_realize(SCSIDevice *dev, Error **errp)
{
DriveInfo *dinfo;
Error *local_err = NULL;
warn_report("'scsi-disk' is deprecated, "
"please use 'scsi-hd' or 'scsi-cd' instead");
if (!dev->conf.blk) {
scsi_realize(dev, &local_err);
assert(local_err);
error_propagate(errp, local_err);
return;
}
dinfo = blk_legacy_dinfo(dev->conf.blk);
if (dinfo && dinfo->media_cd) {
scsi_cd_realize(dev, errp);
} else {
scsi_hd_realize(dev, errp);
}
}
static const SCSIReqOps scsi_disk_emulate_reqops = {
.size = sizeof(SCSIDiskReq),
@@ -3161,45 +3139,6 @@ static const TypeInfo scsi_block_info = {
};
#endif
static Property scsi_disk_properties[] = {
DEFINE_SCSI_DISK_PROPERTIES(),
DEFINE_PROP_BIT("removable", SCSIDiskState, features,
SCSI_DISK_F_REMOVABLE, false),
DEFINE_PROP_BIT("dpofua", SCSIDiskState, features,
SCSI_DISK_F_DPOFUA, false),
DEFINE_PROP_UINT64("wwn", SCSIDiskState, qdev.wwn, 0),
DEFINE_PROP_UINT64("port_wwn", SCSIDiskState, qdev.port_wwn, 0),
DEFINE_PROP_UINT16("port_index", SCSIDiskState, port_index, 0),
DEFINE_PROP_UINT64("max_unmap_size", SCSIDiskState, max_unmap_size,
DEFAULT_MAX_UNMAP_SIZE),
DEFINE_PROP_UINT64("max_io_size", SCSIDiskState, max_io_size,
DEFAULT_MAX_IO_SIZE),
DEFINE_PROP_INT32("scsi_version", SCSIDiskState, qdev.default_scsi_version,
5),
DEFINE_PROP_END_OF_LIST(),
};
static void scsi_disk_class_initfn(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SCSIDeviceClass *sc = SCSI_DEVICE_CLASS(klass);
sc->realize = scsi_disk_realize;
sc->alloc_req = scsi_new_request;
sc->unit_attention_reported = scsi_disk_unit_attention_reported;
dc->fw_name = "disk";
dc->desc = "virtual SCSI disk or CD-ROM (legacy)";
dc->reset = scsi_disk_reset;
device_class_set_props(dc, scsi_disk_properties);
dc->vmsd = &vmstate_scsi_disk_state;
}
static const TypeInfo scsi_disk_info = {
.name = "scsi-disk",
.parent = TYPE_SCSI_DISK_BASE,
.class_init = scsi_disk_class_initfn,
};
static void scsi_disk_register_types(void)
{
type_register_static(&scsi_disk_base_info);
@@ -3208,7 +3147,6 @@ static void scsi_disk_register_types(void)
#ifdef __linux__
type_register_static(&scsi_block_info);
#endif
type_register_static(&scsi_disk_info);
}
type_init(scsi_disk_register_types)
-15
View File
@@ -749,9 +749,6 @@ static char *sun4u_fw_dev_path(FWPathProvider *p, BusState *bus,
DeviceState *dev)
{
PCIDevice *pci;
IDEBus *ide_bus;
IDEState *ide_s;
int bus_id;
if (!strcmp(object_get_typename(OBJECT(dev)), "pbm-bridge")) {
pci = PCI_DEVICE(dev);
@@ -764,18 +761,6 @@ static char *sun4u_fw_dev_path(FWPathProvider *p, BusState *bus,
}
}
if (!strcmp(object_get_typename(OBJECT(dev)), "ide-drive")) {
ide_bus = IDE_BUS(qdev_get_parent_bus(dev));
ide_s = idebus_active_if(ide_bus);
bus_id = ide_bus->bus_id;
if (ide_s->drive_kind == IDE_CD) {
return g_strdup_printf("ide@%x/cdrom", bus_id);
}
return g_strdup_printf("ide@%x/disk", bus_id);
}
if (!strcmp(object_get_typename(OBJECT(dev)), "ide-hd")) {
return g_strdup("disk");
}

Some files were not shown because too many files have changed in this diff Show More