From nobody Sun Apr 28 16:18:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614172497; cv=none; d=zohomail.com; s=zohoarc; b=kFaWKo6COOtcmpJKzHkohuXL+bES4lli1MHC0LcJ19r/eBrB9wZM9Ja4GnWNo3UIbKbNOxQvwQCL0cnQOPuC0D44NKYI/xkJq5KDMPbl3cOefa7XzrEo7CqQCErsk8NGQgjwwmRq7aAJDodSuMYfRENm9IQbAmoSVYPUcbfcDU0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614172497; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=oDfs36Qw30tVjAgO5Reou+Nttw8R1j7SZW5jcB+8xgg=; b=iHPb9Z2Aohefh/6N/w4YhEy5tp3Gb5a+XpBTgOwtd3JEkOfGjIh+UbzoSkVSHdSGYxhqs5SXOQHzoatvfaugWoYu10VwRqEeQuB+IxlOQ+/aVSUOTgRbShYKznLe3Zly0tUAnGjxYqTgN80RJN80iHqBdXGtcTGgl+QBwA5CV/s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1614172497342464.3644655894666; Wed, 24 Feb 2021 05:14:57 -0800 (PST) Received: from localhost ([::1]:51936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEu0E-0003LB-8N for importer@patchew.org; Wed, 24 Feb 2021 08:14:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEtyB-0001gT-8q for qemu-devel@nongnu.org; Wed, 24 Feb 2021 08:12:47 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:49352) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lEty8-0004jM-GI for qemu-devel@nongnu.org; Wed, 24 Feb 2021 08:12:47 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-590-BFjUvoPJP1W73jI1-96v5w-1; Wed, 24 Feb 2021 08:12:40 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6C92610CE787; Wed, 24 Feb 2021 13:12:30 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-119.ams2.redhat.com [10.36.115.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id 01A4310016F8; Wed, 24 Feb 2021 13:12:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614172363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oDfs36Qw30tVjAgO5Reou+Nttw8R1j7SZW5jcB+8xgg=; b=UIVi+CauU4e1esGCwSAAhZq/U6P5588yh882mklQYbrlxrRCAyqdtQ8WS3VplTAX/7qWEk 0B1nSLpGx99rBRXVSsh0DQXhjiKZYAMw6+QeLbZnbrCYUe65XgyIgPxaQlx5V7OTbGT3dU fw58ArPhjjT06jzGefXg1Zx/To9B4l0= X-MC-Unique: BFjUvoPJP1W73jI1-96v5w-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 01/14] ui, monitor: remove deprecated VNC ACL option and HMP commands Date: Wed, 24 Feb 2021 13:11:29 +0000 Message-Id: <20210224131142.1952027-2-berrange@redhat.com> In-Reply-To: <20210224131142.1952027-1-berrange@redhat.com> References: <20210224131142.1952027-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=berrange@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=63.128.21.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , "Michael S. Tsirkin" , libvir-list@redhat.com, Mark Cave-Ayland , Gerd Hoffmann , qemu-block@nongnu.org, Juan Quintela , Markus Armbruster , Wainer dos Santos Moschetta , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , "Dr. David Alan Gilbert" , Greg Kurz , Cleber Rosa , John Snow , David Gibson , Kevin Wolf , Vladimir Sementsov-Ogievskiy , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The VNC ACL concept has been replaced by the pluggable "authz" framework which does not use monitor commands. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Thomas Huth --- docs/system/deprecated.rst | 16 --- docs/system/removed-features.rst | 13 +++ hmp-commands.hx | 76 ------------- monitor/misc.c | 187 ------------------------------- ui/vnc.c | 38 ------- 5 files changed, 13 insertions(+), 317 deletions(-) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 2fcac7861e..786b997fe7 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -37,12 +37,6 @@ The 'file' driver for drives is no longer appropriate fo= r 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. =20 -``-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) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' =20 @@ -254,16 +248,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``. =20 -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 -------------------- =20 diff --git a/docs/system/removed-features.rst b/docs/system/removed-feature= s.rst index c8481cafbd..0424b9a89d 100644 --- a/docs/system/removed-features.rst +++ b/docs/system/removed-features.rst @@ -38,6 +38,12 @@ or ``-display default,show-cursor=3Don`` instead. QEMU 5.0 introduced an alternative syntax to specify the size of the trans= lation block cache, ``-accel tcg,tb-size=3D``. =20 +``-vnc acl`` (removed in 6.0) +''''''''''''''''''''''''''''' + +The ``acl`` option to the ``-vnc`` argument has been replaced +by the ``tls-authz`` and ``sasl-authz`` options. + QEMU Machine Protocol (QMP) commands ------------------------------------ =20 @@ -79,6 +85,13 @@ documentation of ``query-hotpluggable-cpus`` for additio= nal details. No replacement. The ``change vnc password`` and ``change DEVICE MEDIUM`` commands are not affected. =20 +``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. + Guest Emulator ISAs ------------------- =20 diff --git a/hmp-commands.hx b/hmp-commands.hx index d4001f9c5d..b500b8526d 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -1433,82 +1433,6 @@ SRST Change watchdog action. ERST =20 - { - .name =3D "acl_show", - .args_type =3D "aclname:s", - .params =3D "aclname", - .help =3D "list rules in the access control list", - .cmd =3D 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 =3D "acl_policy", - .args_type =3D "aclname:s,policy:s", - .params =3D "aclname allow|deny", - .help =3D "set default access control list policy", - .cmd =3D 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 =3D "acl_add", - .args_type =3D "aclname:s,match:s,policy:s,index:i?", - .params =3D "aclname match allow|deny [index]", - .help =3D "add a match rule to the access control list", - .cmd =3D 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 =3D "acl_remove", - .args_type =3D "aclname:s,match:s", - .params =3D "aclname match", - .help =3D "remove a match rule from the access control list", - .cmd =3D hmp_acl_remove, - }, - -SRST -``acl_remove`` *aclname* *match* - Remove the specified match rule from the access control list. -ERST - - { - .name =3D "acl_reset", - .args_type =3D "aclname:s", - .params =3D "aclname", - .help =3D "reset the access control list", - .cmd =3D 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 =3D "nbd_server_start", .args_type =3D "all:-a,writable:-w,uri:s", diff --git a/monitor/misc.c b/monitor/misc.c index a7650ed747..d9ed2bacef 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -1045,193 +1045,6 @@ static void hmp_wavcapture(Monitor *mon, const QDic= t *qdict) QLIST_INSERT_HEAD (&capture_head, s, entries); } =20 -static QAuthZList *find_auth(Monitor *mon, const char *name) -{ - Object *obj; - Object *container; - - container =3D object_get_objects_root(); - obj =3D object_resolve_path_component(container, name); - if (!obj) { - monitor_printf(mon, "acl: unknown list '%s'\n", name); - return NULL; - } - - return QAUTHZ_LIST(obj); -} - -static bool warn_acl; -static void hmp_warn_acl(void) -{ - if (warn_acl) { - return; - } - error_report("The acl_show, acl_reset, acl_policy, acl_add, acl_remove= " - "commands are deprecated with no replacement. Authorizati= on " - "for VNC should be performed using the pluggable QAuthZ " - "objects"); - warn_acl =3D true; -} - -static void hmp_acl_show(Monitor *mon, const QDict *qdict) -{ - const char *aclname =3D qdict_get_str(qdict, "aclname"); - QAuthZList *auth =3D find_auth(mon, aclname); - QAuthZListRuleList *rules; - size_t i =3D 0; - - hmp_warn_acl(); - - if (!auth) { - return; - } - - monitor_printf(mon, "policy: %s\n", - QAuthZListPolicy_str(auth->policy)); - - rules =3D auth->rules; - while (rules) { - QAuthZListRule *rule =3D rules->value; - i++; - monitor_printf(mon, "%zu: %s %s\n", i, - QAuthZListPolicy_str(rule->policy), - rule->match); - rules =3D rules->next; - } -} - -static void hmp_acl_reset(Monitor *mon, const QDict *qdict) -{ - const char *aclname =3D qdict_get_str(qdict, "aclname"); - QAuthZList *auth =3D find_auth(mon, aclname); - - hmp_warn_acl(); - - if (!auth) { - return; - } - - auth->policy =3D QAUTHZ_LIST_POLICY_DENY; - qapi_free_QAuthZListRuleList(auth->rules); - auth->rules =3D NULL; - monitor_printf(mon, "acl: removed all rules\n"); -} - -static void hmp_acl_policy(Monitor *mon, const QDict *qdict) -{ - const char *aclname =3D qdict_get_str(qdict, "aclname"); - const char *policy =3D qdict_get_str(qdict, "policy"); - QAuthZList *auth =3D find_auth(mon, aclname); - int val; - Error *err =3D NULL; - - hmp_warn_acl(); - - if (!auth) { - return; - } - - val =3D qapi_enum_parse(&QAuthZListPolicy_lookup, - policy, - QAUTHZ_LIST_POLICY_DENY, - &err); - if (err) { - error_free(err); - monitor_printf(mon, "acl: unknown policy '%s', " - "expected 'deny' or 'allow'\n", policy); - } else { - auth->policy =3D val; - if (auth->policy =3D=3D QAUTHZ_LIST_POLICY_ALLOW) { - monitor_printf(mon, "acl: policy set to 'allow'\n"); - } else { - monitor_printf(mon, "acl: policy set to 'deny'\n"); - } - } -} - -static QAuthZListFormat hmp_acl_get_format(const char *match) -{ - if (strchr(match, '*')) { - return QAUTHZ_LIST_FORMAT_GLOB; - } else { - return QAUTHZ_LIST_FORMAT_EXACT; - } -} - -static void hmp_acl_add(Monitor *mon, const QDict *qdict) -{ - const char *aclname =3D qdict_get_str(qdict, "aclname"); - const char *match =3D qdict_get_str(qdict, "match"); - const char *policystr =3D qdict_get_str(qdict, "policy"); - int has_index =3D qdict_haskey(qdict, "index"); - int index =3D qdict_get_try_int(qdict, "index", -1); - QAuthZList *auth =3D find_auth(mon, aclname); - Error *err =3D NULL; - QAuthZListPolicy policy; - QAuthZListFormat format; - size_t i =3D 0; - - hmp_warn_acl(); - - if (!auth) { - return; - } - - policy =3D qapi_enum_parse(&QAuthZListPolicy_lookup, - policystr, - QAUTHZ_LIST_POLICY_DENY, - &err); - if (err) { - error_free(err); - monitor_printf(mon, "acl: unknown policy '%s', " - "expected 'deny' or 'allow'\n", policystr); - return; - } - - format =3D hmp_acl_get_format(match); - - if (has_index && index =3D=3D 0) { - monitor_printf(mon, "acl: unable to add acl entry\n"); - return; - } - - if (has_index) { - i =3D qauthz_list_insert_rule(auth, match, policy, - format, index - 1, &err); - } else { - i =3D qauthz_list_append_rule(auth, match, policy, - format, &err); - } - if (err) { - monitor_printf(mon, "acl: unable to add rule: %s", - error_get_pretty(err)); - error_free(err); - } else { - monitor_printf(mon, "acl: added rule at position %zu\n", i + 1); - } -} - -static void hmp_acl_remove(Monitor *mon, const QDict *qdict) -{ - const char *aclname =3D qdict_get_str(qdict, "aclname"); - const char *match =3D qdict_get_str(qdict, "match"); - QAuthZList *auth =3D find_auth(mon, aclname); - ssize_t i =3D 0; - - hmp_warn_acl(); - - if (!auth) { - return; - } - - i =3D qauthz_list_delete_rule(auth, match); - if (i >=3D 0) { - monitor_printf(mon, "acl: removed rule at position %zu\n", i + 1); - } else { - monitor_printf(mon, "acl: no matching acl entry\n"); - } -} - void qmp_getfd(const char *fdname, Error **errp) { Monitor *cur_mon =3D monitor_cur(); diff --git a/ui/vnc.c b/ui/vnc.c index 16bb3be770..edb100dfbc 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3481,9 +3481,6 @@ static QemuOptsList qemu_vnc_opts =3D { },{ .name =3D "sasl", .type =3D QEMU_OPT_BOOL, - },{ - .name =3D "acl", - .type =3D QEMU_OPT_BOOL, },{ .name =3D "tls-authz", .type =3D QEMU_OPT_STRING, @@ -3935,7 +3932,6 @@ void vnc_display_open(const char *id, Error **errp) bool reverse =3D false; const char *credid; bool sasl =3D false; - int acl =3D 0; const char *tlsauthz; const char *saslauthz; int lock_key_sync =3D 1; @@ -4010,29 +4006,13 @@ void vnc_display_open(const char *id, Error **errp) goto fail; } } - if (qemu_opt_get(opts, "acl")) { - error_report("The 'acl' option to -vnc is deprecated. " - "Please use the 'tls-authz' and 'sasl-authz' " - "options instead"); - } - acl =3D qemu_opt_get_bool(opts, "acl", false); tlsauthz =3D qemu_opt_get(opts, "tls-authz"); - if (acl && tlsauthz) { - error_setg(errp, "'acl' option is mutually exclusive with the " - "'tls-authz' option"); - goto fail; - } if (tlsauthz && !vd->tlscreds) { error_setg(errp, "'tls-authz' provided but TLS is not enabled"); goto fail; } =20 saslauthz =3D qemu_opt_get(opts, "sasl-authz"); - if (acl && saslauthz) { - error_setg(errp, "'acl' option is mutually exclusive with the " - "'sasl-authz' option"); - goto fail; - } if (saslauthz && !sasl) { error_setg(errp, "'sasl-authz' provided but SASL auth is not enabl= ed"); goto fail; @@ -4070,29 +4050,11 @@ void vnc_display_open(const char *id, Error **errp) =20 if (tlsauthz) { vd->tlsauthzid =3D g_strdup(tlsauthz); - } else if (acl) { - if (strcmp(vd->id, "default") =3D=3D 0) { - vd->tlsauthzid =3D g_strdup("vnc.x509dname"); - } else { - vd->tlsauthzid =3D g_strdup_printf("vnc.%s.x509dname", vd->id); - } - vd->tlsauthz =3D QAUTHZ(qauthz_list_new(vd->tlsauthzid, - QAUTHZ_LIST_POLICY_DENY, - &error_abort)); } #ifdef CONFIG_VNC_SASL if (sasl) { if (saslauthz) { vd->sasl.authzid =3D g_strdup(saslauthz); - } else if (acl) { - if (strcmp(vd->id, "default") =3D=3D 0) { - vd->sasl.authzid =3D g_strdup("vnc.username"); - } else { - vd->sasl.authzid =3D g_strdup_printf("vnc.%s.username", vd= ->id); - } - vd->sasl.authz =3D QAUTHZ(qauthz_list_new(vd->sasl.authzid, - QAUTHZ_LIST_POLICY_DEN= Y, - &error_abort)); } } #endif --=20 2.29.2 From nobody Sun Apr 28 16:18:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614172530; cv=none; d=zohomail.com; s=zohoarc; b=ZvbmwlkSeiJRGluOwc3JhVt/YWROAnBAB+DDZg2ltemVMzotrWqho6ANxX0JI9w2qSGoI6gyGz2TmwOD4TdtD59T262H281ZH91NOtfB2XMbPVebrnGWTQ8p0fH16xGOXZho2aWDHlJyyUzpBKazAW7zJjzkDqyJU9KquIQr2GI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614172530; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=GKOjyUhx7RA2dTsSSojbjSBEl5q4SaZOZuRyvXpvXA0=; b=QD/CZQ6fvx/EUGYBss8xozRwSmT4xL4meRjukII2MPoxXVpL+A2GrJSKc60Nyn2PZhFM3ScxsjlwZ6Hvb9+gcHHBD+i99TRGVRNAJarTYADgp28j18mxgpzH1N5J3eBnJm8rUGP87sfVDZ6RBD47O3jKQqYWq5BudYBt2Q9aFQA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1614172530494702.317556871484; Wed, 24 Feb 2021 05:15:30 -0800 (PST) Received: from localhost ([::1]:53008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEu0n-0003ml-DW for importer@patchew.org; Wed, 24 Feb 2021 08:15:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEtyS-0001tG-Hz for qemu-devel@nongnu.org; Wed, 24 Feb 2021 08:13:04 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:41736) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lEtyP-0004qG-LD for qemu-devel@nongnu.org; Wed, 24 Feb 2021 08:13:04 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-551-TWhyyE6uMs-vKY4Yv5kJtQ-1; Wed, 24 Feb 2021 08:12:56 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C63238030BB; Wed, 24 Feb 2021 13:12:54 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-119.ams2.redhat.com [10.36.115.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id C47DA10016F6; Wed, 24 Feb 2021 13:12:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614172380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GKOjyUhx7RA2dTsSSojbjSBEl5q4SaZOZuRyvXpvXA0=; b=SH4WnOvImo7D/lXr4dfy5y+rejWXkuGR6lVc5hSSUiGbRzRFAuwHp63A4vIF6JTVV1EoqX IQAB1HTOqGei1VUdizXC2O5nBz9HAlOutP0+ewVHh5GOYUg/ypnCO1cukppSd8v3KzRsd3 3BHeiR41irPJwwJ9qpUoq1KIu5PBYrI= X-MC-Unique: TWhyyE6uMs-vKY4Yv5kJtQ-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 02/14] monitor: raise error when 'pretty' option is used with HMP Date: Wed, 24 Feb 2021 13:11:30 +0000 Message-Id: <20210224131142.1952027-3-berrange@redhat.com> In-Reply-To: <20210224131142.1952027-1-berrange@redhat.com> References: <20210224131142.1952027-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=berrange@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , "Michael S. Tsirkin" , libvir-list@redhat.com, Mark Cave-Ayland , Gerd Hoffmann , qemu-block@nongnu.org, Juan Quintela , Markus Armbruster , Wainer dos Santos Moschetta , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , "Dr. David Alan Gilbert" , Greg Kurz , Cleber Rosa , John Snow , David Gibson , Kevin Wolf , Vladimir Sementsov-Ogievskiy , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This is only semantically useful for QMP. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Dr. David Alan Gilbert --- docs/system/deprecated.rst | 7 ------- docs/system/removed-features.rst | 6 ++++++ monitor/monitor.c | 4 ++-- qemu-options.hx | 5 +++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 786b997fe7..dfd8a8c497 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -62,13 +62,6 @@ needs two devices (``-device intel-hda -device hda-duple= x``) and ``pcspk`` which can be activated using ``-machine pcspk-audiodev=3D``. =20 -``-mon ...,control=3Dreadline,pretty=3Don|off`` (since 4.1) -''''''''''''''''''''''''''''''''''''''''''''''''''''''' - -The ``pretty=3Don|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) '''''''''''''''''''''''''''' =20 diff --git a/docs/system/removed-features.rst b/docs/system/removed-feature= s.rst index 0424b9a89d..3ca13d2844 100644 --- a/docs/system/removed-features.rst +++ b/docs/system/removed-features.rst @@ -44,6 +44,12 @@ block cache, ``-accel tcg,tb-size=3D``. The ``acl`` option to the ``-vnc`` argument has been replaced by the ``tls-authz`` and ``sasl-authz`` options. =20 +``-mon ...,control=3Dreadline,pretty=3Don|off`` (removed in 6.0) +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +The ``pretty=3Don|off`` switch has no effect for HMP monitors and +its use is rejected. + QEMU Machine Protocol (QMP) commands ------------------------------------ =20 diff --git a/monitor/monitor.c b/monitor/monitor.c index e94f532cf5..515efb015e 100644 --- a/monitor/monitor.c +++ b/monitor/monitor.c @@ -720,8 +720,8 @@ int monitor_init(MonitorOptions *opts, bool allow_hmp, = Error **errp) return -1; } if (opts->pretty) { - warn_report("'pretty' is deprecated for HMP monitors, it has n= o " - "effect and will be removed in future versions"); + error_setg(errp, "'pretty' is not compatible with HMP monitors= "); + return -1; } monitor_init_hmp(chr, true, &local_err); break; diff --git a/qemu-options.hx b/qemu-options.hx index 6c34c7050f..a934d5c787 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -3702,8 +3702,9 @@ DEF("mon", HAS_ARG, QEMU_OPTION_mon, \ "-mon [chardev=3D]name[,mode=3Dreadline|control][,pretty[=3Don|off]]\n= ", QEMU_ARCH_ALL) SRST ``-mon [chardev=3D]name[,mode=3Dreadline|control][,pretty[=3Don|off]]`` - Setup monitor on chardev name. ``pretty`` turns on JSON pretty - printing easing human reading and debugging. + Setup monitor on chardev name. ``pretty`` is only valid when + ``mode=3Dcontrol``, turning on JSON pretty printing to ease + human reading and debugging. ERST =20 DEF("debugcon", HAS_ARG, QEMU_OPTION_debugcon, \ --=20 2.29.2 From nobody Sun Apr 28 16:18:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614172544; cv=none; d=zohomail.com; s=zohoarc; b=Eh1DUjn0Gv4/H8gVtTIeHK1ebOABqge1oJxy2YvFnxQXUt2qCyXdAsEAoy198bI3OVbAyv3EbYfuck/J1ZPxy6ImtE/1mVMLdCu1zIkxF3MAUaGDLCT8AgWrR8bg0Q7GZ+4Qk5GaeHQ6+TeedpIR4qdRgHVpCcjnl++Gj6cTmv8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614172544; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8SI05MdPS4f/GzogNORcXrpyFidB7MvFz60k/mjgfRo=; b=AmT8iU8xSoF60Ij8xKT57L7CJNhCmlsReAGxjcSab0YFEpxcEHfj8g0JYqKtjPpAiZobXw8bdKR6gsYMIZiO+xPAl7HzV9OCKGB0CCC7WqGxuqXomDWEBFItHITt+7fyPTMiHH8R7u/SVgT+UmIdgkgLljWwPLQPG2KAXLZ1aSg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1614172544347881.5772067248624; Wed, 24 Feb 2021 05:15:44 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-595--Si2U1oHNE-23Ftpu0DMaw-1; Wed, 24 Feb 2021 08:15:38 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3B0C4804043; Wed, 24 Feb 2021 13:15:32 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 16A325D6D3; Wed, 24 Feb 2021 13:15:31 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0049518095C9; Wed, 24 Feb 2021 13:15:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11ODDFLI011339 for ; Wed, 24 Feb 2021 08:13:16 -0500 Received: by smtp.corp.redhat.com (Postfix) id F1102100239A; Wed, 24 Feb 2021 13:13:15 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-119.ams2.redhat.com [10.36.115.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id 438C81002388; Wed, 24 Feb 2021 13:12:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614172543; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=8SI05MdPS4f/GzogNORcXrpyFidB7MvFz60k/mjgfRo=; b=Og9jlsivY3fs9ANBYcKWZ5WFTHTfMVmlKhuaySQyDFVo2QHEVaK5aoko3jAm9xcjXDNpRL E6t9g1FNrsr0s79cA8cQbIved/TsUdn9os3Sy5MaM+vi/l5I16TZYkAS6vLQ4iqaY6rwQ8 Bn1w5qnAa4pCG6izAM/EzmovLm7mvng= X-MC-Unique: -Si2U1oHNE-23Ftpu0DMaw-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 03/14] monitor: remove 'query-events' QMP command Date: Wed, 24 Feb 2021 13:11:31 +0000 Message-Id: <20210224131142.1952027-4-berrange@redhat.com> In-Reply-To: <20210224131142.1952027-1-berrange@redhat.com> References: <20210224131142.1952027-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Fam Zheng , "Michael S. Tsirkin" , libvir-list@redhat.com, Mark Cave-Ayland , Gerd Hoffmann , qemu-block@nongnu.org, Juan Quintela , Wainer dos Santos Moschetta , Marcel Apfelbaum , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , "Dr. David Alan Gilbert" , Greg Kurz , Cleber Rosa , John Snow , David Gibson , Kevin Wolf , Vladimir Sementsov-Ogievskiy , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The code comment suggests removing QAPIEvent_(str|lookup) symbols too, however, these are both auto-generated as standard for any enum in QAPI. As such it they'll exist whether we use them or not. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Thomas Huth --- docs/system/deprecated.rst | 6 ----- docs/system/removed-features.rst | 6 +++++ monitor/qmp-cmds-control.c | 24 ----------------- qapi/control.json | 45 -------------------------------- 4 files changed, 6 insertions(+), 75 deletions(-) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index dfd8a8c497..611adf60f7 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -222,12 +222,6 @@ The ``query-cpus`` command is replaced by the ``query-= cpus-fast`` command. The ``arch`` output member of the ``query-cpus-fast`` command is replaced by the ``target`` output member. =20 -``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) '''''''''''''''''''''''''''''''''''''''''''''''''''''' =20 diff --git a/docs/system/removed-features.rst b/docs/system/removed-feature= s.rst index 3ca13d2844..dc63581fe5 100644 --- a/docs/system/removed-features.rst +++ b/docs/system/removed-features.rst @@ -70,6 +70,12 @@ documentation of ``query-hotpluggable-cpus`` for additio= nal details. =20 Use ``blockdev-change-medium`` or ``change-vnc-password`` instead. =20 +``query-events`` (removed in 6.0) +''''''''''''''''''''''''''''''''' + +The ``query-events`` command has been superseded by the more powerful +and accurate ``query-qmp-schema`` command. + Human Monitor Protocol (HMP) commands ------------------------------------- =20 diff --git a/monitor/qmp-cmds-control.c b/monitor/qmp-cmds-control.c index 509ae870bd..513b547233 100644 --- a/monitor/qmp-cmds-control.c +++ b/monitor/qmp-cmds-control.c @@ -130,30 +130,6 @@ CommandInfoList *qmp_query_commands(Error **errp) return list; } =20 -EventInfoList *qmp_query_events(Error **errp) -{ - /* - * TODO This deprecated command is the only user of - * QAPIEvent_str() and QAPIEvent_lookup[]. When the command goes, - * they should go, too. - */ - EventInfoList *ev_list =3D NULL; - QAPIEvent e; - - for (e =3D 0 ; e < QAPI_EVENT__MAX ; e++) { - const char *event_name =3D QAPIEvent_str(e); - EventInfo *info; - - assert(event_name !=3D NULL); - info =3D g_malloc0(sizeof(*info)); - info->name =3D g_strdup(event_name); - - QAPI_LIST_PREPEND(ev_list, info); - } - - return ev_list; -} - /* * Minor hack: generated marshalling suppressed for this command * ('gen': false in the schema) so we can parse the JSON string diff --git a/qapi/control.json b/qapi/control.json index 2615d5170b..71a838d49e 100644 --- a/qapi/control.json +++ b/qapi/control.json @@ -159,51 +159,6 @@ { 'command': 'query-commands', 'returns': ['CommandInfo'], 'allow-preconfig': true } =20 -## -# @EventInfo: -# -# Information about a QMP event -# -# @name: The event name -# -# Since: 1.2 -## -{ 'struct': 'EventInfo', 'data': {'name': 'str'} } - -## -# @query-events: -# -# Return information on QMP events. -# -# Features: -# @deprecated: This command is deprecated, because its output doesn't -# reflect compile-time configuration. Use 'query-qmp-schema' -# instead. -# -# Returns: A list of @EventInfo. -# -# Since: 1.2 -# -# Example: -# -# -> { "execute": "query-events" } -# <- { -# "return": [ -# { -# "name":"SHUTDOWN" -# }, -# { -# "name":"RESET" -# } -# ] -# } -# -# Note: This example has been shortened as the real response is too long. -# -## -{ 'command': 'query-events', 'returns': ['EventInfo'], - 'features': [ 'deprecated' ] } - ## # @quit: # --=20 2.29.2 From nobody Sun Apr 28 16:18:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614172558; cv=none; d=zohomail.com; s=zohoarc; b=T2SKOKuaAibNYm7m05tQKzlbm/2NBpI00a5AAhMAlCvv6YaCJU33d/MGTycnYqf+SP2l4CQd6XiJ8fuRLAof7xO0WUc+yQErQGzDvbVZA7V5TCc1BRcOUEHHIpTp1ug2K7eEkJ40qEvxSahXguBwbZ/ecN5jVJzoXKO7gRQEezc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614172558; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=AxBoh4lolgLfXpFW+Uw/kgKyoRvdfkcVOv8fk3PBqO8=; b=iwjXTnLHkmqw3aitz6ggp/HFtubumPkXacQdp8SPxjjQGIZ/qBzN83wjv0aDmDOw8tCtYrP67ahfvbohcgDQDSPL7wcDx9mLQrxdNunXLS7DS7m4zC2t9HyKRTxsprZvLSWMJu+0tYMgUVrn3j/d9Vam/Y8Mp3JQ70TgIKGmCl0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1614172558733268.51222841951096; Wed, 24 Feb 2021 05:15:58 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-593-pVT_w-K-PwK62G0Ef8rDAA-1; Wed, 24 Feb 2021 08:15:54 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 34FD380197B; Wed, 24 Feb 2021 13:15:49 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0B41319D9F; Wed, 24 Feb 2021 13:15:49 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C50AE58076; Wed, 24 Feb 2021 13:15:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11ODDb3U011398 for ; Wed, 24 Feb 2021 08:13:37 -0500 Received: by smtp.corp.redhat.com (Postfix) id EFCCF1002388; Wed, 24 Feb 2021 13:13:36 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-119.ams2.redhat.com [10.36.115.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5AC591001281; Wed, 24 Feb 2021 13:13:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614172557; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=AxBoh4lolgLfXpFW+Uw/kgKyoRvdfkcVOv8fk3PBqO8=; b=L+9lXOkFDTKs32siPCuBOUBmz1uWvVJocsWP3GpGceZE3YOJfoCt2lV+smjjlf4kbbk8R6 +QH/QdjFBQmRnW2tuYH8rxMbJ2FfJcMrv6wTQWU8k2uFRSKvDF51vdJ5g5aI7oUbsZzA9a SsDjgXWWhDi3Imjdl7gxz+N7fQfYGiI= X-MC-Unique: pVT_w-K-PwK62G0Ef8rDAA-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 04/14] softmmu: remove '-usbdevice' command line option Date: Wed, 24 Feb 2021 13:11:32 +0000 Message-Id: <20210224131142.1952027-5-berrange@redhat.com> In-Reply-To: <20210224131142.1952027-1-berrange@redhat.com> References: <20210224131142.1952027-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Fam Zheng , "Michael S. Tsirkin" , libvir-list@redhat.com, Mark Cave-Ayland , Gerd Hoffmann , qemu-block@nongnu.org, Juan Quintela , Wainer dos Santos Moschetta , Marcel Apfelbaum , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , "Dr. David Alan Gilbert" , Greg Kurz , Cleber Rosa , John Snow , David Gibson , Kevin Wolf , Vladimir Sementsov-Ogievskiy , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) This was replaced by the '-device usb-DEV' option. Signed-off-by: Daniel P. Berrang=C3=A9 --- docs/system/deprecated.rst | 9 ------- docs/system/removed-features.rst | 9 +++++++ softmmu/vl.c | 42 -------------------------------- 3 files changed, 9 insertions(+), 51 deletions(-) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 611adf60f7..c577cc97c4 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -21,15 +21,6 @@ deprecated. System emulator command line arguments -------------------------------------- =20 -``-usbdevice`` (since 2.10.0) -''''''''''''''''''''''''''''' - -The ``-usbdevice DEV`` argument is now a synonym for setting -the ``-device usb-DEV`` argument instead. The deprecated syntax -would automatically enable USB support on the machine type. -If using the new syntax, USB support must be explicitly -enabled via the ``-machine usb=3Don`` argument. - ``-drive file=3Djson:{...{'driver':'file'}}`` (since 3.0) ''''''''''''''''''''''''''''''''''''''''''''''''''''''' =20 diff --git a/docs/system/removed-features.rst b/docs/system/removed-feature= s.rst index dc63581fe5..74d022babf 100644 --- a/docs/system/removed-features.rst +++ b/docs/system/removed-features.rst @@ -50,6 +50,15 @@ by the ``tls-authz`` and ``sasl-authz`` options. The ``pretty=3Don|off`` switch has no effect for HMP monitors and its use is rejected. =20 +``-usbdevice`` (removed in 6.0) +''''''''''''''''''''''''''''''' + +The ``-usbdevice DEV`` argument was now a synonym for setting +the ``-device usb-DEV`` argument instead. The removed syntax +would automatically enable USB support on the machine type. +When using the new syntax, USB support must be explicitly +enabled via the ``-machine usb=3Don`` argument. + QEMU Machine Protocol (QMP) commands ------------------------------------ =20 diff --git a/softmmu/vl.c b/softmmu/vl.c index b219ce1f35..c31061cc09 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -743,34 +743,6 @@ static void configure_msg(QemuOpts *opts) } =20 =20 -/***********************************************************/ -/* USB devices */ - -static int usb_device_add(const char *devname) -{ - USBDevice *dev =3D NULL; - - if (!machine_usb(current_machine)) { - return -1; - } - - dev =3D usbdevice_create(devname); - if (!dev) - return -1; - - return 0; -} - -static int usb_parse(const char *cmdline) -{ - int r; - r =3D usb_device_add(cmdline); - if (r < 0) { - error_report("could not add USB device '%s'", cmdline); - } - return r; -} - /***********************************************************/ /* machine registration */ =20 @@ -1267,7 +1239,6 @@ static void monitor_parse(const char *optarg, const c= har *mode, bool pretty) =20 struct device_config { enum { - DEV_USB, /* -usbdevice */ DEV_SERIAL, /* -serial */ DEV_PARALLEL, /* -parallel */ DEV_DEBUGCON, /* -debugcon */ @@ -2484,12 +2455,6 @@ static void qemu_create_cli_devices(void) qemu_opts_foreach(qemu_find_opts("fw_cfg"), parse_fw_cfg, fw_cfg_find(), &error_fatal); =20 - /* init USB devices */ - if (machine_usb(current_machine)) { - if (foreach_device_config(DEV_USB, usb_parse) < 0) - exit(1); - } - /* init generic devices */ rom_set_order_override(FW_CFG_ORDER_OVERRIDE_DEVICE); qemu_opts_foreach(qemu_find_opts("device"), @@ -3182,13 +3147,6 @@ void qemu_init(int argc, char **argv, char **envp) olist =3D qemu_find_opts("machine"); qemu_opts_parse_noisily(olist, "usb=3Don", false); break; - case QEMU_OPTION_usbdevice: - error_report("'-usbdevice' is deprecated, please use " - "'-device usb-...' instead"); - olist =3D qemu_find_opts("machine"); - qemu_opts_parse_noisily(olist, "usb=3Don", false); - add_device_config(DEV_USB, optarg); - break; case QEMU_OPTION_device: if (!qemu_opts_parse_noisily(qemu_find_opts("device"), optarg, true)) { --=20 2.29.2 From nobody Sun Apr 28 16:18:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614172645; cv=none; d=zohomail.com; s=zohoarc; b=M3lrKbV9u55dSJAIWtgpg5qYzu3vfrNuvgl2Qk2HZ13iteb1h4zRZSusqHZqFLJXsMq1ycs+i3AWWaUMNpBXn5g6qWEP/RggsJgR5ZZxX0LzZpY5tTN21chFZI5TX8yO22gqsXMWRXtFa2GzzyRYPGFunP5fW0fWHVVggiXsNug= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614172645; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xTve/5x2/EV6t3mZ3Zn08IRY9tClbftbIuM+d/X7uAY=; b=R4nrhe7PobV9AkCsKtZt6HqS1dabkZJUKJs3OWovsHXmxqOzvLbFnWm4WBjfWcjFihO+Gh9WWofuNcE7xxt0fpQHGORCEvkHFhG6TkUi7pp6XEMgItnBp4Q1Xf3FGykbaQmRH6zKPSlGJxW4CYYTUCLhWSOL4mXhkk/hEQxdN+A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 161417264570773.95049888241158; Wed, 24 Feb 2021 05:17:25 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-555-Zr5isqeSO3K4RnIYWc_t9A-1; Wed, 24 Feb 2021 08:15:59 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 47F7C6D4F9; Wed, 24 Feb 2021 13:15:53 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 247CD5D9DD; Wed, 24 Feb 2021 13:15:53 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E0D835807D; Wed, 24 Feb 2021 13:15:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11ODDww3011452 for ; Wed, 24 Feb 2021 08:13:58 -0500 Received: by smtp.corp.redhat.com (Postfix) id 468A310023B6; Wed, 24 Feb 2021 13:13:58 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-119.ams2.redhat.com [10.36.115.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id 57DCA1002388; Wed, 24 Feb 2021 13:13:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614172644; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=xTve/5x2/EV6t3mZ3Zn08IRY9tClbftbIuM+d/X7uAY=; b=UxtuoEM/OQ8dpvk/a6WXTIi9WhZamWDmnAgFOO2MX2Db55BUl8RCnfAwCbaJiZ8CsVjGO5 T8cd/oOmEqXOumF91bwMSc666rRI8cW8ypZyN1Zd3tAVGWUZdd+esjilwuZmqdjUJAVuGP 6m6L6bLaPfmOxi8sAiMcpFk52o6ODhg= X-MC-Unique: Zr5isqeSO3K4RnIYWc_t9A-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 05/14] migrate: remove QMP/HMP commands for speed, downtime and cache size Date: Wed, 24 Feb 2021 13:11:33 +0000 Message-Id: <20210224131142.1952027-6-berrange@redhat.com> In-Reply-To: <20210224131142.1952027-1-berrange@redhat.com> References: <20210224131142.1952027-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Fam Zheng , "Michael S. Tsirkin" , libvir-list@redhat.com, Mark Cave-Ayland , Gerd Hoffmann , qemu-block@nongnu.org, Juan Quintela , Wainer dos Santos Moschetta , Marcel Apfelbaum , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , "Dr. David Alan Gilbert" , Greg Kurz , Cleber Rosa , John Snow , David Gibson , Kevin Wolf , Vladimir Sementsov-Ogievskiy , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The generic 'migrate_set_parameters' command handle all types of param. Only the QMP commands were documented in the deprecations page, but the rationale for deprecating applies equally to HMP, and the replacements exist. Furthermore the HMP commands are just shims to the QMP commands, so removing the latter breaks the former unless they get re-implemented. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Dr. David Alan Gilbert --- docs/devel/migration.rst | 2 +- docs/rdma.txt | 2 +- docs/system/deprecated.rst | 10 --- docs/system/removed-features.rst | 20 ++++++ docs/xbzrle.txt | 5 -- hmp-commands-info.hx | 13 ---- hmp-commands.hx | 45 ------------- include/monitor/hmp.h | 4 -- migration/migration.c | 45 ------------- migration/ram.c | 2 +- monitor/hmp-cmds.c | 34 ---------- qapi/migration.json | 98 ----------------------------- tests/migration/guestperf/engine.py | 16 ++--- tests/qemu-iotests/181 | 2 +- tests/qtest/migration-test.c | 48 -------------- tests/qtest/test-hmp.c | 6 +- tests/qtest/vhost-user-test.c | 8 +-- 17 files changed, 40 insertions(+), 320 deletions(-) diff --git a/docs/devel/migration.rst b/docs/devel/migration.rst index ad381b89b2..19c3d4f3ea 100644 --- a/docs/devel/migration.rst +++ b/docs/devel/migration.rst @@ -641,7 +641,7 @@ time per vCPU. =20 .. 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). =20 Postcopy device transfer diff --git a/docs/rdma.txt b/docs/rdma.txt index 49dc9f8bca..2b4cdea1d8 100644 --- a/docs/rdma.txt +++ b/docs/rdma.txt @@ -89,7 +89,7 @@ RUNNING: First, set the migration speed to match your hardware's capabilities: =20 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 =20 Next, on the destination machine, add the following to the QEMU command li= ne: =20 diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index c577cc97c4..e214f0a9cf 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -147,11 +147,6 @@ Use argument ``id`` instead. =20 Use argument ``id`` instead. =20 -``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) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''= '' =20 @@ -167,11 +162,6 @@ Always false. =20 Use argument value ``null`` instead. =20 -``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) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' =20 diff --git a/docs/system/removed-features.rst b/docs/system/removed-feature= s.rst index 74d022babf..2c5513dcc7 100644 --- a/docs/system/removed-features.rst +++ b/docs/system/removed-features.rst @@ -85,6 +85,16 @@ Use ``blockdev-change-medium`` or ``change-vnc-password`= ` instead. The ``query-events`` command has been superseded by the more powerful and accurate ``query-qmp-schema`` command. =20 +``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. + Human Monitor Protocol (HMP) commands ------------------------------------- =20 @@ -113,6 +123,16 @@ 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. =20 +``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 ------------------- =20 diff --git a/docs/xbzrle.txt b/docs/xbzrle.txt index 6bd1828f34..bcb3f0c901 100644 --- a/docs/xbzrle.txt +++ b/docs/xbzrle.txt @@ -90,11 +90,6 @@ Usage =20 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 =20 4. Start outgoing migration diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index 117ba25f91..ab0c7aa5ee 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -567,19 +567,6 @@ SRST Show current migration parameters. ERST =20 - { - .name =3D "migrate_cache_size", - .args_type =3D "", - .params =3D "", - .help =3D "show current migration xbzrle cache size", - .cmd =3D hmp_info_migrate_cache_size, - }, - -SRST - ``info migrate_cache_size`` - Show current migration xbzrle cache size. -ERST - { .name =3D "balloon", .args_type =3D "", diff --git a/hmp-commands.hx b/hmp-commands.hx index b500b8526d..2bbe133bb6 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -979,51 +979,6 @@ SRST Pause an ongoing migration. Currently it only supports postcopy. ERST =20 - { - .name =3D "migrate_set_cache_size", - .args_type =3D "value:o", - .params =3D "value", - .help =3D "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 incr= ease" - " the cache size", - .cmd =3D hmp_migrate_set_cache_size, - }, - -SRST -``migrate_set_cache_size`` *value* - Set cache size to *value* (in bytes) for xbzrle migrations. -ERST - - { - .name =3D "migrate_set_speed", - .args_type =3D "value:o", - .params =3D "value", - .help =3D "set maximum speed (in bytes) for migrations. " - "Defaults to MB if no size suffix is specified, ie. B/K/M/G/T", - .cmd =3D hmp_migrate_set_speed, - }, - -SRST -``migrate_set_speed`` *value* - Set maximum speed to *value* (in bytes) for migrations. -ERST - - { - .name =3D "migrate_set_downtime", - .args_type =3D "value:T", - .params =3D "value", - .help =3D "set maximum tolerated downtime (in seconds) for m= igrations", - .cmd =3D hmp_migrate_set_downtime, - }, - -SRST -``migrate_set_downtime`` *second* - Set maximum tolerated downtime (in seconds) for migration. -ERST - { .name =3D "migrate_set_capability", .args_type =3D "capability:s,state:b", diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h index ed2913fd18..605d57287a 100644 --- a/include/monitor/hmp.h +++ b/include/monitor/hmp.h @@ -28,7 +28,6 @@ void hmp_info_mice(Monitor *mon, const QDict *qdict); void hmp_info_migrate(Monitor *mon, const QDict *qdict); void hmp_info_migrate_capabilities(Monitor *mon, const QDict *qdict); void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict); -void hmp_info_migrate_cache_size(Monitor *mon, const QDict *qdict); void hmp_info_cpus(Monitor *mon, const QDict *qdict); void hmp_info_vnc(Monitor *mon, const QDict *qdict); void hmp_info_spice(Monitor *mon, const QDict *qdict); @@ -64,11 +63,8 @@ void hmp_migrate_continue(Monitor *mon, const QDict *qdi= ct); void hmp_migrate_incoming(Monitor *mon, const QDict *qdict); void hmp_migrate_recover(Monitor *mon, const QDict *qdict); void hmp_migrate_pause(Monitor *mon, const QDict *qdict); -void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict); -void hmp_migrate_set_speed(Monitor *mon, const QDict *qdict); void hmp_migrate_set_capability(Monitor *mon, const QDict *qdict); void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict); -void hmp_migrate_set_cache_size(Monitor *mon, const QDict *qdict); void hmp_client_migrate_info(Monitor *mon, const QDict *qdict); void hmp_migrate_start_postcopy(Monitor *mon, const QDict *qdict); void hmp_x_colo_lost_heartbeat(Monitor *mon, const QDict *qdict); diff --git a/migration/migration.c b/migration/migration.c index a5ddf43559..5408367eda 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -2318,51 +2318,6 @@ void qmp_migrate_continue(MigrationStatus state, Err= or **errp) qemu_sem_post(&s->pause_sem); } =20 -void qmp_migrate_set_cache_size(int64_t value, Error **errp) -{ - MigrateSetParameters p =3D { - .has_xbzrle_cache_size =3D true, - .xbzrle_cache_size =3D value, - }; - - qmp_migrate_set_parameters(&p, errp); -} - -uint64_t qmp_query_migrate_cache_size(Error **errp) -{ - return migrate_xbzrle_cache_size(); -} - -void qmp_migrate_set_speed(int64_t value, Error **errp) -{ - MigrateSetParameters p =3D { - .has_max_bandwidth =3D true, - .max_bandwidth =3D value, - }; - - qmp_migrate_set_parameters(&p, errp); -} - -void qmp_migrate_set_downtime(double value, Error **errp) -{ - if (value < 0 || value > MAX_MIGRATE_DOWNTIME_SECONDS) { - error_setg(errp, QERR_INVALID_PARAMETER_VALUE, - "downtime_limit", - "an integer in the range of 0 to " - stringify(MAX_MIGRATE_DOWNTIME_SECONDS)" seconds"); - return; - } - - value *=3D 1000; /* Convert to milliseconds */ - - MigrateSetParameters p =3D { - .has_downtime_limit =3D true, - .downtime_limit =3D (int64_t)value, - }; - - qmp_migrate_set_parameters(&p, errp); -} - bool migrate_release_ram(void) { MigrationState *s; diff --git a/migration/ram.c b/migration/ram.c index 72143da0ac..a569b87875 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -121,7 +121,7 @@ static void XBZRLE_cache_unlock(void) /** * xbzrle_cache_resize: resize the xbzrle cache * - * This function is called from qmp_migrate_set_cache_size in main + * This function is called from migrate_params_apply in main * thread, possibly while a migration is in progress. A running * migration may be using the cache and might finish during this call, * hence changes to the cache are protected by XBZRLE.lock(). diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index 3c88a4faef..8a47ba8fbb 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -518,12 +518,6 @@ void hmp_info_migrate_parameters(Monitor *mon, const Q= Dict *qdict) qapi_free_MigrationParameters(params); } =20 -void hmp_info_migrate_cache_size(Monitor *mon, const QDict *qdict) -{ - monitor_printf(mon, "xbzrel cache size: %" PRId64 " kbytes\n", - qmp_query_migrate_cache_size(NULL) >> 10); -} - =20 #ifdef CONFIG_VNC /* Helper for hmp_info_vnc_clients, _servers */ @@ -1226,34 +1220,6 @@ void hmp_migrate_pause(Monitor *mon, const QDict *qd= ict) hmp_handle_error(mon, err); } =20 -/* Kept for backwards compatibility */ -void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict) -{ - Error *err =3D NULL; - - double value =3D qdict_get_double(qdict, "value"); - qmp_migrate_set_downtime(value, &err); - hmp_handle_error(mon, err); -} - -void hmp_migrate_set_cache_size(Monitor *mon, const QDict *qdict) -{ - int64_t value =3D qdict_get_int(qdict, "value"); - Error *err =3D NULL; - - qmp_migrate_set_cache_size(value, &err); - hmp_handle_error(mon, err); -} - -/* Kept for backwards compatibility */ -void hmp_migrate_set_speed(Monitor *mon, const QDict *qdict) -{ - Error *err =3D NULL; - - int64_t value =3D qdict_get_int(qdict, "value"); - qmp_migrate_set_speed(value, &err); - hmp_handle_error(mon, err); -} =20 void hmp_migrate_set_capability(Monitor *mon, const QDict *qdict) { diff --git a/qapi/migration.json b/qapi/migration.json index 6e5943fbb4..9bf0bc4d25 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -1398,104 +1398,6 @@ ## { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} } =20 -## -# @migrate_set_downtime: -# -# Set maximum tolerated downtime for migration. -# -# @value: maximum downtime in seconds -# -# Features: -# @deprecated: This command is deprecated. Use -# 'migrate-set-parameters' instead. -# -# Returns: nothing on success -# -# Since: 0.14 -# -# Example: -# -# -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } } -# <- { "return": {} } -# -## -{ 'command': 'migrate_set_downtime', 'data': {'value': 'number'}, - 'features': [ 'deprecated' ] } - -## -# @migrate_set_speed: -# -# Set maximum speed for migration. -# -# @value: maximum speed in bytes per second. -# -# Features: -# @deprecated: This command is deprecated. Use -# 'migrate-set-parameters' instead. -# -# Returns: nothing on success -# -# Since: 0.14 -# -# Example: -# -# -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } } -# <- { "return": {} } -# -## -{ 'command': 'migrate_set_speed', 'data': {'value': 'int'}, - 'features': [ 'deprecated' ] } - -## -# @migrate-set-cache-size: -# -# Set cache size to be used by XBZRLE migration -# -# @value: cache size in bytes -# -# Features: -# @deprecated: This command is deprecated. Use -# 'migrate-set-parameters' instead. -# -# The size will be rounded down to the nearest power of 2. -# The cache size can be modified before and during ongoing migration -# -# Returns: nothing on success -# -# Since: 1.2 -# -# Example: -# -# -> { "execute": "migrate-set-cache-size", -# "arguments": { "value": 536870912 } } -# <- { "return": {} } -# -## -{ 'command': 'migrate-set-cache-size', 'data': {'value': 'int'}, - 'features': [ 'deprecated' ] } - -## -# @query-migrate-cache-size: -# -# Query migration XBZRLE cache size -# -# Features: -# @deprecated: This command is deprecated. Use -# 'query-migrate-parameters' instead. -# -# Returns: XBZRLE cache size in bytes -# -# Since: 1.2 -# -# Example: -# -# -> { "execute": "query-migrate-cache-size" } -# <- { "return": 67108864 } -# -## -{ 'command': 'query-migrate-cache-size', 'returns': 'size', - 'features': [ 'deprecated' ] } - ## # @migrate: # diff --git a/tests/migration/guestperf/engine.py b/tests/migration/guestper= f/engine.py index 83bfc3b6bb..5161e4ff81 100644 --- a/tests/migration/guestperf/engine.py +++ b/tests/migration/guestperf/engine.py @@ -149,11 +149,11 @@ def _migrate(self, hardware, scenario, src, dst, conn= ect_uri): "state": True } ]) =20 - resp =3D src.command("migrate_set_speed", - value=3Dscenario._bandwidth * 1024 * 1024) + resp =3D src.command("migrate-set-parameters", + max_bandwidth=3Dscenario._bandwidth * 1024 * 10= 24) =20 - resp =3D src.command("migrate_set_downtime", - value=3Dscenario._downtime / 1024.0) + resp =3D src.command("migrate-set-parameters", + downtime_limit=3Dscenario._downtime / 1024.0) =20 if scenario._compression_mt: resp =3D src.command("migrate-set-capabilities", @@ -182,9 +182,11 @@ def _migrate(self, hardware, scenario, src, dst, conne= ct_uri): { "capability": "xbzrle", "state": True } ]) - resp =3D src.command("migrate-set-cache-size", - value=3D(hardware._mem * 1024 * 1024 * 1024= / 100 * - scenario._compression_xbzrle_cache)) + resp =3D src.command("migrate-set-parameters", + xbzrle_cache_size=3D( + hardware._mem * + 1024 * 1024 * 1024 / 100 * + scenario._compression_xbzrle_cache)) =20 resp =3D src.command("migrate", uri=3Dconnect_uri) =20 diff --git a/tests/qemu-iotests/181 b/tests/qemu-iotests/181 index 820c53ef35..cb96d09ae5 100755 --- a/tests/qemu-iotests/181 +++ b/tests/qemu-iotests/181 @@ -109,7 +109,7 @@ if [ ${QEMU_STATUS[$dest]} -lt 0 ]; then _notrun 'Postcopy is not supported' fi =20 -_send_qemu_cmd $src 'migrate_set_speed 4k' "(qemu)" +_send_qemu_cmd $src 'migrate_set_parameter max_bandwidth 4k' "(qemu)" _send_qemu_cmd $src 'migrate_set_capability postcopy-ram on' "(qemu)" _send_qemu_cmd $src "migrate -d unix:${MIG_SOCKET}" "(qemu)" _send_qemu_cmd $src 'migrate_start_postcopy' "(qemu)" diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index f2142fbd3c..3a711bb492 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -658,53 +658,6 @@ static void test_migrate_end(QTestState *from, QTestSt= ate *to, bool test_dest) cleanup("dest_serial"); } =20 -static void deprecated_set_downtime(QTestState *who, const double value) -{ - QDict *rsp; - - rsp =3D qtest_qmp(who, - "{ 'execute': 'migrate_set_downtime'," - " 'arguments': { 'value': %f } }", value); - g_assert(qdict_haskey(rsp, "return")); - qobject_unref(rsp); - migrate_check_parameter_int(who, "downtime-limit", value * 1000); -} - -static void deprecated_set_speed(QTestState *who, long long value) -{ - QDict *rsp; - - rsp =3D qtest_qmp(who, "{ 'execute': 'migrate_set_speed'," - "'arguments': { 'value': %lld } }", value); - g_assert(qdict_haskey(rsp, "return")); - qobject_unref(rsp); - migrate_check_parameter_int(who, "max-bandwidth", value); -} - -static void deprecated_set_cache_size(QTestState *who, long long value) -{ - QDict *rsp; - - rsp =3D qtest_qmp(who, "{ 'execute': 'migrate-set-cache-size'," - "'arguments': { 'value': %lld } }", value); - g_assert(qdict_haskey(rsp, "return")); - qobject_unref(rsp); - migrate_check_parameter_int(who, "xbzrle-cache-size", value); -} - -static void test_deprecated(void) -{ - QTestState *from; - - from =3D qtest_init("-machine none"); - - deprecated_set_downtime(from, 0.12345); - deprecated_set_speed(from, 12345); - deprecated_set_cache_size(from, 4096); - - qtest_quit(from); -} - static int migrate_postcopy_prepare(QTestState **from_ptr, QTestState **to_ptr, MigrateStart *args) @@ -1486,7 +1439,6 @@ int main(int argc, char **argv) =20 qtest_add_func("/migration/postcopy/unix", test_postcopy); qtest_add_func("/migration/postcopy/recovery", test_postcopy_recovery); - qtest_add_func("/migration/deprecated", test_deprecated); qtest_add_func("/migration/bad_dest", test_baddest); qtest_add_func("/migration/precopy/unix", test_precopy_unix); qtest_add_func("/migration/precopy/tcp", test_precopy_tcp); diff --git a/tests/qtest/test-hmp.c b/tests/qtest/test-hmp.c index 94a8023173..413eb95d2a 100644 --- a/tests/qtest/test-hmp.c +++ b/tests/qtest/test-hmp.c @@ -45,9 +45,9 @@ static const char *hmp_cmds[] =3D { "log all", "log none", "memsave 0 4096 \"/dev/null\"", - "migrate_set_cache_size 1", - "migrate_set_downtime 1", - "migrate_set_speed 1", + "migrate_set_parameter xbzrle_cache_size 1", + "migrate_set_parameter downtime_limit 1", + "migrate_set_parameter max_bandwidth 1", "netdev_add user,id=3Dnet1", "set_link net1 off", "set_link net1 on", diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c index 1a5f5313ff..3d6337fb5c 100644 --- a/tests/qtest/vhost-user-test.c +++ b/tests/qtest/vhost-user-test.c @@ -756,8 +756,8 @@ static void test_migrate(void *obj, void *arg, QGuestAl= locator *alloc) =20 /* slow down migration to have time to fiddle with log */ /* TODO: qtest could learn to break on some places */ - rsp =3D qmp("{ 'execute': 'migrate_set_speed'," - "'arguments': { 'value': 10 } }"); + rsp =3D qmp("{ 'execute': 'migrate-set-parameters'," + "'arguments': { 'max-bandwidth': 10 } }"); g_assert(qdict_haskey(rsp, "return")); qobject_unref(rsp); =20 @@ -776,8 +776,8 @@ static void test_migrate(void *obj, void *arg, QGuestAl= locator *alloc) munmap(log, size); =20 /* speed things up */ - rsp =3D qmp("{ 'execute': 'migrate_set_speed'," - "'arguments': { 'value': 0 } }"); + rsp =3D qmp("{ 'execute': 'migrate-set-parameters'," + "'arguments': { 'max-bandwidth': 0 } }"); g_assert(qdict_haskey(rsp, "return")); qobject_unref(rsp); =20 --=20 2.29.2 From nobody Sun Apr 28 16:18:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614172572; cv=none; d=zohomail.com; s=zohoarc; b=Ndhc+X01JyzUeJcHT3Qdgxutbz8jlwzz8wmGwAcqoEz3XsekRQ7mUu6pAo/GKkjTxXtMgVEIhYoyDA32GLEUsggz8WQdg9wRm+/7cr4onaFfLERzgFECPEOrer9mrz++Kb6OlvxpjNu4H5HXkB7S+910bQ2p6+2gN0jSYUV/KlQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614172572; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=HQzO0Jo+DbOu/YNRhE/0/BOYVESW8I7vEaPAS9UD8mE=; b=gyo2V243A8NCedFdZoGkC18uiW6Jgp9CXobDFmr2FWJKeehufYErjC2s3bM0oZleTYSaOGfJmYVkLnd3M2Wxho3pcrD8uM+6aUrBHDpA2HYmmJEV4TsNK9ah1KVTJGlHk2bp6i4kRVaxCf6qjkt1CSZvkaAsU6oDBiP5rYH6pIc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1614172572342148.23422153129127; Wed, 24 Feb 2021 05:16:12 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-96-h2oUEzbkNq6LaqbyHQGQ4g-1; Wed, 24 Feb 2021 08:15:57 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 66BC6804050; Wed, 24 Feb 2021 13:15:51 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3FFAA60CE6; Wed, 24 Feb 2021 13:15:51 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 08FE618089C9; Wed, 24 Feb 2021 13:15:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11ODEKfB011518 for ; Wed, 24 Feb 2021 08:14:20 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3F6BE10023B0; Wed, 24 Feb 2021 13:14:20 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-119.ams2.redhat.com [10.36.115.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id A130F1002388; Wed, 24 Feb 2021 13:13:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614172571; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=HQzO0Jo+DbOu/YNRhE/0/BOYVESW8I7vEaPAS9UD8mE=; b=O1wYhDlrtkMUvmQNqg72fAYzdybM+xK7uc6aowAwmE41pcW6QicvAcm66vtXPj8p4F6f1p 9mDShJ1KURpiEopD8BUtdZf6YkB3S4+2gMmIFlikNNWOEZfn6aHNq0eyTd6cOOwzXP+DSp jvE0RsDUv/pgkRfOPY2PmvbmkjreeAk= X-MC-Unique: h2oUEzbkNq6LaqbyHQGQ4g-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 06/14] machine: remove 'query-cpus' QMP command Date: Wed, 24 Feb 2021 13:11:34 +0000 Message-Id: <20210224131142.1952027-7-berrange@redhat.com> In-Reply-To: <20210224131142.1952027-1-berrange@redhat.com> References: <20210224131142.1952027-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Fam Zheng , "Michael S. Tsirkin" , libvir-list@redhat.com, Mark Cave-Ayland , Gerd Hoffmann , qemu-block@nongnu.org, Juan Quintela , Wainer dos Santos Moschetta , Marcel Apfelbaum , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , "Dr. David Alan Gilbert" , Greg Kurz , Cleber Rosa , John Snow , David Gibson , Kevin Wolf , Vladimir Sementsov-Ogievskiy , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The newer 'query-cpus-fast' command avoids side effects on the guest execution. Note that some of the field names are different in the 'query-cpus-fast' command. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Wainer dos Santos Moschetta Tested-by: Wainer dos Santos Moschetta --- docs/system/deprecated.rst | 5 - docs/system/removed-features.rst | 5 + hw/core/machine-hmp-cmds.c | 8 +- hw/core/machine-qmp-cmds.c | 79 ---------- qapi/machine.json | 161 +-------------------- tests/acceptance/pc_cpu_hotplug_props.py | 2 +- tests/acceptance/x86_cpu_model_versions.py | 2 +- tests/migration/guestperf/engine.py | 2 +- tests/qtest/numa-test.c | 6 +- tests/qtest/qmp-test.c | 6 +- tests/qtest/test-x86-cpuid-compat.c | 4 +- 11 files changed, 22 insertions(+), 258 deletions(-) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index e214f0a9cf..484f017119 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -192,11 +192,6 @@ Since the ``dirty-bitmaps`` field is optionally presen= t 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. =20 -``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) '''''''''''''''''''''''''''''''''''''''''''''''''''''''' =20 diff --git a/docs/system/removed-features.rst b/docs/system/removed-feature= s.rst index 2c5513dcc7..ad146daf9b 100644 --- a/docs/system/removed-features.rst +++ b/docs/system/removed-features.rst @@ -95,6 +95,11 @@ Use ``migrate_set_parameter`` and ``info migrate_paramet= ers`` instead. =20 Use ``migrate_set_parameter`` instead. =20 +``query-cpus`` (removed in 6.0) +''''''''''''''''''''''''''''''' + +The ``query-cpus`` command is replaced by the ``query-cpus-fast`` command. + Human Monitor Protocol (HMP) commands ------------------------------------- =20 diff --git a/hw/core/machine-hmp-cmds.c b/hw/core/machine-hmp-cmds.c index 6357be9c6b..58248cffa3 100644 --- a/hw/core/machine-hmp-cmds.c +++ b/hw/core/machine-hmp-cmds.c @@ -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 =3D MACHINE(qdev_get_machine()); =20 nb_numa_nodes =3D ms->numa_state ? ms->numa_state->num_nodes : 0; @@ -139,7 +139,7 @@ void hmp_info_numa(Monitor *mon, const QDict *qdict) return; } =20 - cpu_list =3D qmp_query_cpus(&error_abort); + cpu_list =3D qmp_query_cpus_fast(&error_abort); node_mem =3D g_new0(NumaNodeMem, nb_numa_nodes); =20 query_numa_node_mem(node_mem, ms); @@ -148,7 +148,7 @@ void hmp_info_numa(Monitor *mon, const QDict *qdict) for (cpu =3D cpu_list; cpu; cpu =3D cpu->next) { if (cpu->value->has_props && cpu->value->props->has_node_id && cpu->value->props->node_id =3D=3D 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); } diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index 44e979e503..af60cd969d 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -24,85 +24,6 @@ #include "sysemu/runstate.h" #include "sysemu/sysemu.h" =20 -CpuInfoList *qmp_query_cpus(Error **errp) -{ - MachineState *ms =3D MACHINE(qdev_get_machine()); - MachineClass *mc =3D MACHINE_GET_CLASS(ms); - CpuInfoList *head =3D NULL, **tail =3D &head; - CPUState *cpu; - - CPU_FOREACH(cpu) { - CpuInfo *value; -#if defined(TARGET_I386) - X86CPU *x86_cpu =3D X86_CPU(cpu); - CPUX86State *env =3D &x86_cpu->env; -#elif defined(TARGET_PPC) - PowerPCCPU *ppc_cpu =3D POWERPC_CPU(cpu); - CPUPPCState *env =3D &ppc_cpu->env; -#elif defined(TARGET_SPARC) - SPARCCPU *sparc_cpu =3D SPARC_CPU(cpu); - CPUSPARCState *env =3D &sparc_cpu->env; -#elif defined(TARGET_RISCV) - RISCVCPU *riscv_cpu =3D RISCV_CPU(cpu); - CPURISCVState *env =3D &riscv_cpu->env; -#elif defined(TARGET_MIPS) - MIPSCPU *mips_cpu =3D MIPS_CPU(cpu); - CPUMIPSState *env =3D &mips_cpu->env; -#elif defined(TARGET_TRICORE) - TriCoreCPU *tricore_cpu =3D TRICORE_CPU(cpu); - CPUTriCoreState *env =3D &tricore_cpu->env; -#elif defined(TARGET_S390X) - S390CPU *s390_cpu =3D S390_CPU(cpu); - CPUS390XState *env =3D &s390_cpu->env; -#endif - - cpu_synchronize_state(cpu); - - value =3D g_malloc0(sizeof(*value)); - value->CPU =3D cpu->cpu_index; - value->current =3D (cpu =3D=3D first_cpu); - value->halted =3D cpu->halted; - value->qom_path =3D object_get_canonical_path(OBJECT(cpu)); - value->thread_id =3D cpu->thread_id; -#if defined(TARGET_I386) - value->arch =3D CPU_INFO_ARCH_X86; - value->u.x86.pc =3D env->eip + env->segs[R_CS].base; -#elif defined(TARGET_PPC) - value->arch =3D CPU_INFO_ARCH_PPC; - value->u.ppc.nip =3D env->nip; -#elif defined(TARGET_SPARC) - value->arch =3D CPU_INFO_ARCH_SPARC; - value->u.q_sparc.pc =3D env->pc; - value->u.q_sparc.npc =3D env->npc; -#elif defined(TARGET_MIPS) - value->arch =3D CPU_INFO_ARCH_MIPS; - value->u.q_mips.PC =3D env->active_tc.PC; -#elif defined(TARGET_TRICORE) - value->arch =3D CPU_INFO_ARCH_TRICORE; - value->u.tricore.PC =3D env->PC; -#elif defined(TARGET_S390X) - value->arch =3D CPU_INFO_ARCH_S390; - value->u.s390.cpu_state =3D env->cpu_state; -#elif defined(TARGET_RISCV) - value->arch =3D CPU_INFO_ARCH_RISCV; - value->u.riscv.pc =3D env->pc; -#else - value->arch =3D CPU_INFO_ARCH_OTHER; -#endif - value->has_props =3D !!mc->cpu_index_to_instance_props; - if (value->has_props) { - CpuInstanceProperties *props; - props =3D g_malloc0(sizeof(*props)); - *props =3D mc->cpu_index_to_instance_props(ms, cpu->cpu_index); - value->props =3D props; - } - - QAPI_LIST_APPEND(tail, value); - } - - return head; -} - static CpuInfoArch sysemu_target_to_cpuinfo_arch(SysEmuTarget target) { /* diff --git a/qapi/machine.json b/qapi/machine.json index 330189efe3..9811927504 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -38,7 +38,7 @@ # @CpuInfoArch: # # An enumeration of cpu types that enable additional information during -# @query-cpus and @query-cpus-fast. +# @query-cpus-fast. # # @s390: since 2.12 # @@ -49,114 +49,6 @@ { 'enum': 'CpuInfoArch', 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 's390', 'riscv', 'oth= er' ] } =20 -## -# @CpuInfo: -# -# Information about a virtual CPU -# -# @CPU: the index of the virtual CPU -# -# @current: this only exists for backwards compatibility and should be ign= ored -# -# @halted: true if the virtual CPU is in the halt state. Halt usually ref= ers -# to a processor specific low power mode. -# -# @qom_path: path to the CPU object in the QOM tree (since 2.4) -# -# @thread_id: ID of the underlying host thread -# -# @props: properties describing to which node/socket/core/thread -# virtual CPU belongs to, provided if supported by board (since 2.= 10) -# -# @arch: architecture of the cpu, which determines which additional fields -# will be listed (since 2.6) -# -# Since: 0.14 -# -# Notes: @halted is a transient state that changes frequently. By the tim= e the -# data is sent to the client, the guest may no longer be halted. -## -{ 'union': 'CpuInfo', - 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', - 'qom_path': 'str', 'thread_id': 'int', - '*props': 'CpuInstanceProperties', 'arch': 'CpuInfoArch' }, - 'discriminator': 'arch', - 'data': { 'x86': 'CpuInfoX86', - 'sparc': 'CpuInfoSPARC', - 'ppc': 'CpuInfoPPC', - 'mips': 'CpuInfoMIPS', - 'tricore': 'CpuInfoTricore', - 's390': 'CpuInfoS390', - 'riscv': 'CpuInfoRISCV' } } - -## -# @CpuInfoX86: -# -# Additional information about a virtual i386 or x86_64 CPU -# -# @pc: the 64-bit instruction pointer -# -# Since: 2.6 -## -{ 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } } - -## -# @CpuInfoSPARC: -# -# Additional information about a virtual SPARC CPU -# -# @pc: the PC component of the instruction pointer -# -# @npc: the NPC component of the instruction pointer -# -# Since: 2.6 -## -{ 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } } - -## -# @CpuInfoPPC: -# -# Additional information about a virtual PPC CPU -# -# @nip: the instruction pointer -# -# Since: 2.6 -## -{ 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } } - -## -# @CpuInfoMIPS: -# -# Additional information about a virtual MIPS CPU -# -# @PC: the instruction pointer -# -# Since: 2.6 -## -{ 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } } - -## -# @CpuInfoTricore: -# -# Additional information about a virtual Tricore CPU -# -# @PC: the instruction pointer -# -# Since: 2.6 -## -{ 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } } - -## -# @CpuInfoRISCV: -# -# Additional information about a virtual RISCV CPU -# -# @pc: the instruction pointer -# -# Since 2.12 -## -{ 'struct': 'CpuInfoRISCV', 'data': { 'pc': 'int' } } - ## # @CpuS390State: # @@ -180,53 +72,6 @@ ## { 'struct': 'CpuInfoS390', 'data': { 'cpu-state': 'CpuS390State' } } =20 -## -# @query-cpus: -# -# Returns a list of information about each virtual CPU. -# -# This command causes vCPU threads to exit to userspace, which causes -# a small interruption to guest CPU execution. This will have a negative -# impact on realtime guests and other latency sensitive guest workloads. -# -# Features: -# @deprecated: This command is deprecated, because it interferes with -# the guest. Use 'query-cpus-fast' instead to avoid the vCPU -# interruption. -# -# Returns: a list of @CpuInfo for each virtual CPU -# -# Since: 0.14 -# -# Example: -# -# -> { "execute": "query-cpus" } -# <- { "return": [ -# { -# "CPU":0, -# "current":true, -# "halted":false, -# "qom_path":"/machine/unattached/device[0]", -# "arch":"x86", -# "pc":3227107138, -# "thread_id":3134 -# }, -# { -# "CPU":1, -# "current":false, -# "halted":true, -# "qom_path":"/machine/unattached/device[2]", -# "arch":"x86", -# "pc":7108165, -# "thread_id":3135 -# } -# ] -# } -# -## -{ 'command': 'query-cpus', 'returns': ['CpuInfo'], - 'features': [ 'deprecated' ] } - ## # @CpuInfoFast: # @@ -266,9 +111,7 @@ ## # @query-cpus-fast: # -# Returns information about all virtual CPUs. This command does not -# incur a performance penalty and should be used in production -# instead of query-cpus. +# Returns information about all virtual CPUs. # # Returns: list of @CpuInfoFast # diff --git a/tests/acceptance/pc_cpu_hotplug_props.py b/tests/acceptance/pc= _cpu_hotplug_props.py index e49bf33fc5..f48f68fc6b 100644 --- a/tests/acceptance/pc_cpu_hotplug_props.py +++ b/tests/acceptance/pc_cpu_hotplug_props.py @@ -32,4 +32,4 @@ def test_no_die_id(self): self.vm.add_args('-cpu', 'qemu64') self.vm.add_args('-device', 'qemu64-x86_64-cpu,socket-id=3D1,core-= id=3D0,thread-id=3D0') self.vm.launch() - self.assertEquals(len(self.vm.command('query-cpus')), 2) + self.assertEquals(len(self.vm.command('query-cpus-fast')), 2) diff --git a/tests/acceptance/x86_cpu_model_versions.py b/tests/acceptance/= x86_cpu_model_versions.py index 2b7461bb41..77ed8597a4 100644 --- a/tests/acceptance/x86_cpu_model_versions.py +++ b/tests/acceptance/x86_cpu_model_versions.py @@ -246,7 +246,7 @@ class CascadelakeArchCapabilities(avocado_qemu.Test): :avocado: tags=3Darch:x86_64 """ def get_cpu_prop(self, prop): - cpu_path =3D self.vm.command('query-cpus')[0].get('qom_path') + cpu_path =3D self.vm.command('query-cpus-fast')[0].get('qom-path') return self.vm.command('qom-get', path=3Dcpu_path, property=3Dprop) =20 def test_4_1(self): diff --git a/tests/migration/guestperf/engine.py b/tests/migration/guestper= f/engine.py index 5161e4ff81..5c965140f8 100644 --- a/tests/migration/guestperf/engine.py +++ b/tests/migration/guestperf/engine.py @@ -110,7 +110,7 @@ def _migrate(self, hardware, scenario, src, dst, connec= t_uri): src_vcpu_time =3D [] src_pid =3D src.get_pid() =20 - vcpus =3D src.command("query-cpus") + vcpus =3D src.command("query-cpus-fast") src_threads =3D [] for vcpu in vcpus: src_threads.append(vcpu["thread_id"]) diff --git a/tests/qtest/numa-test.c b/tests/qtest/numa-test.c index b25ebf97d8..dc0ec571ca 100644 --- a/tests/qtest/numa-test.c +++ b/tests/qtest/numa-test.c @@ -72,7 +72,7 @@ static void test_mon_partial(const void *data) =20 static QList *get_cpus(QTestState *qts, QDict **resp) { - *resp =3D qtest_qmp(qts, "{ 'execute': 'query-cpus' }"); + *resp =3D qtest_qmp(qts, "{ 'execute': 'query-cpus-fast' }"); g_assert(*resp); g_assert(qdict_haskey(*resp, "return")); return qdict_get_qlist(*resp, "return"); @@ -97,10 +97,10 @@ static void test_query_cpus(const void *data) int64_t cpu_idx, node; =20 cpu =3D qobject_to(QDict, e); - g_assert(qdict_haskey(cpu, "CPU")); + g_assert(qdict_haskey(cpu, "cpu-index")); g_assert(qdict_haskey(cpu, "props")); =20 - cpu_idx =3D qdict_get_int(cpu, "CPU"); + cpu_idx =3D qdict_get_int(cpu, "cpu-index"); props =3D qdict_get_qdict(cpu, "props"); g_assert(qdict_haskey(props, "node-id")); node =3D qdict_get_int(props, "node-id"); diff --git a/tests/qtest/qmp-test.c b/tests/qtest/qmp-test.c index 11614bf63f..cd27fae3de 100644 --- a/tests/qtest/qmp-test.c +++ b/tests/qtest/qmp-test.c @@ -252,7 +252,7 @@ static void test_qmp_oob(void) * Try any command that does not support OOB but with OOB flag. We * should get failure. */ - resp =3D qtest_qmp(qts, "{ 'exec-oob': 'query-cpus' }"); + resp =3D qtest_qmp(qts, "{ 'exec-oob': 'query-cpus-fast' }"); g_assert(qdict_haskey(resp, "error")); qobject_unref(resp); =20 @@ -289,7 +289,7 @@ static void test_qmp_preconfig(void) g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-commands' = }"))); =20 /* forbidden commands, expected error */ - g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus' }"))); + g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus-fast' = }"))); =20 /* check that query-status returns preconfig state */ rsp =3D qtest_qmp(qs, "{ 'execute': 'query-status' }"); @@ -313,7 +313,7 @@ static void test_qmp_preconfig(void) g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'x-exit-preconfig'= }"))); =20 /* enabled commands, no error expected */ - g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus' }"))= ); + g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus-fast'= }"))); =20 qtest_quit(qs); } diff --git a/tests/qtest/test-x86-cpuid-compat.c b/tests/qtest/test-x86-cpu= id-compat.c index 7ca1883a29..2ac169faf0 100644 --- a/tests/qtest/test-x86-cpuid-compat.c +++ b/tests/qtest/test-x86-cpuid-compat.c @@ -13,12 +13,12 @@ static char *get_cpu0_qom_path(void) QDict *cpu0; char *path; =20 - resp =3D qmp("{'execute': 'query-cpus', 'arguments': {}}"); + resp =3D qmp("{'execute': 'query-cpus-fast', 'arguments': {}}"); g_assert(qdict_haskey(resp, "return")); ret =3D qdict_get_qlist(resp, "return"); =20 cpu0 =3D qobject_to(QDict, qlist_peek(ret)); - path =3D g_strdup(qdict_get_str(cpu0, "qom_path")); + path =3D g_strdup(qdict_get_str(cpu0, "qom-path")); qobject_unref(resp); return path; } --=20 2.29.2 From nobody Sun Apr 28 16:18:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614172581; cv=none; d=zohomail.com; s=zohoarc; b=bLGBt3SxdAtlSVjCCDGiaz8nVwHXIc1MbQAe9jabbM+FmfPpLMHRvnsn6edLwRt9KcKKTHWvebkNbHCDS38KXtGd31yljQLVSTuGOZISr9CUG/PEzkkqADCnfljWexHsIcxEn3nanHT+srZVi6msl8ctlMSBVm+Wnfp4fMszU1E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614172581; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=NiVKZO6sJm4o6Qk3gWvGlk2+4nRy+cCa6wUAps1jcwQ=; b=BBkxaqBmnAsBaQB+TGVTVcT+K2iIf1PcJbQ9Zx4EU5GGQfoDdyi39aaBs6aw0O30WNY6wzld7+XgIEZuiUrcRPNyx5X9w4VQ7tZUPDhsxAdQiM/5eluD9iodx1L1o6DoqfuwisxBxzd3Zt19TpXFcpJ3k5BFlu16ec3O7el+Jmc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1614172581445271.8458640037537; Wed, 24 Feb 2021 05:16:21 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-326-QWKVg1wyOfGbbgAC8YyVig-1; Wed, 24 Feb 2021 08:16:06 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 97EE9100A61F; Wed, 24 Feb 2021 13:15:56 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 714235D9DD; Wed, 24 Feb 2021 13:15:56 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0A78C18089D3; Wed, 24 Feb 2021 13:15:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11ODEfF3011586 for ; Wed, 24 Feb 2021 08:14:41 -0500 Received: by smtp.corp.redhat.com (Postfix) id 93CEB10023B2; Wed, 24 Feb 2021 13:14:41 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-119.ams2.redhat.com [10.36.115.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id 893B61001281; Wed, 24 Feb 2021 13:14:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614172580; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=NiVKZO6sJm4o6Qk3gWvGlk2+4nRy+cCa6wUAps1jcwQ=; b=L44/1UiTy8v2xhtp6aEGYZ3uu5qU3mC59BKrA/bLHJ2ZB/lE6oYNQE+TBu6sqfsGv2d4ef Z4AwnAjWiSTVzT7cp+vvW8DynTYRG2ez6BGc4N8hFxmrk4VQKVub8gxX5Q47NCgl+uS6ng LHNXpROMCcDXGNaRboNQLlkY+oJAEuw= X-MC-Unique: QWKVg1wyOfGbbgAC8YyVig-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 07/14] machine: remove 'arch' field from 'query-cpus-fast' QMP command Date: Wed, 24 Feb 2021 13:11:35 +0000 Message-Id: <20210224131142.1952027-8-berrange@redhat.com> In-Reply-To: <20210224131142.1952027-1-berrange@redhat.com> References: <20210224131142.1952027-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Fam Zheng , "Michael S. Tsirkin" , libvir-list@redhat.com, Mark Cave-Ayland , Gerd Hoffmann , qemu-block@nongnu.org, Juan Quintela , Wainer dos Santos Moschetta , Marcel Apfelbaum , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , "Dr. David Alan Gilbert" , Greg Kurz , Cleber Rosa , John Snow , David Gibson , Kevin Wolf , Vladimir Sementsov-Ogievskiy , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Thomas Huth --- docs/system/deprecated.rst | 6 ----- docs/system/removed-features.rst | 6 +++++ hw/core/machine-qmp-cmds.c | 41 -------------------------------- qapi/machine.json | 22 ----------------- 4 files changed, 6 insertions(+), 69 deletions(-) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 484f017119..78474f0845 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -192,12 +192,6 @@ Since the ``dirty-bitmaps`` field is optionally presen= t 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. =20 -``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. - chardev client socket with ``wait`` option (since 4.0) '''''''''''''''''''''''''''''''''''''''''''''''''''''' =20 diff --git a/docs/system/removed-features.rst b/docs/system/removed-feature= s.rst index ad146daf9b..7942c2e513 100644 --- a/docs/system/removed-features.rst +++ b/docs/system/removed-features.rst @@ -100,6 +100,12 @@ Use ``migrate_set_parameter`` instead. =20 The ``query-cpus`` command is replaced by the ``query-cpus-fast`` command. =20 +``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. + Human Monitor Protocol (HMP) commands ------------------------------------- =20 diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index af60cd969d..68a942595a 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -24,46 +24,6 @@ #include "sysemu/runstate.h" #include "sysemu/sysemu.h" =20 -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 *cp= u) { #ifdef TARGET_S390X @@ -104,7 +64,6 @@ CpuInfoFastList *qmp_query_cpus_fast(Error **errp) value->props =3D props; } =20 - value->arch =3D sysemu_target_to_cpuinfo_arch(target); value->target =3D target; if (target =3D=3D SYS_EMU_TARGET_S390X) { cpustate_to_cpuinfo_s390(&value->u.s390x, cpu); diff --git a/qapi/machine.json b/qapi/machine.json index 9811927504..c0c52aef10 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -34,21 +34,6 @@ 'sh4eb', 'sparc', 'sparc64', 'tricore', 'unicore32', 'x86_64', 'xtensa', 'xtensaeb' ] } =20 -## -# @CpuInfoArch: -# -# An enumeration of cpu types that enable additional information during -# @query-cpus-fast. -# -# @s390: since 2.12 -# -# @riscv: since 2.12 -# -# Since: 2.6 -## -{ 'enum': 'CpuInfoArch', - 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 's390', 'riscv', 'oth= er' ] } - ## # @CpuS390State: # @@ -86,14 +71,9 @@ # @props: properties describing to which node/socket/core/thread # virtual CPU belongs to, provided if supported by board # -# @arch: base architecture of the cpu -# # @target: the QEMU system emulation target, which determines which # additional fields will be listed (since 3.0) # -# Features: -# @deprecated: Member @arch is deprecated. Use @target instead. -# # Since: 2.12 # ## @@ -102,8 +82,6 @@ 'qom-path' : 'str', 'thread-id' : 'int', '*props' : 'CpuInstanceProperties', - 'arch' : { 'type': 'CpuInfoArch', - 'features': [ 'deprecated' ] }, 'target' : 'SysEmuTarget' }, 'discriminator' : 'target', 'data' : { 's390x' : 'CpuInfoS390' } } --=20 2.29.2 From nobody Sun Apr 28 16:18:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614172565; cv=none; d=zohomail.com; s=zohoarc; b=aChfUcta99FykyRqJ7fcIi1EVZqXP80awEzB3U/zaxn49D7FM6f6nqgp/BfKjmYIYCQLIdXMr9Xp03TBVOfNZbpIPrCP0D8CLRm0RDAC2KtWWUGfSZWcoC5rhMgFpE5Lbc0pKaupCcggesNExOF69nBvU58Tgr47d8l05wPfuIg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614172565; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lmnyfIbPyy7DxT/Gn6LmF1DAVQG4g//yGveYaJvNomA=; b=gu3l1zjxplFz+D4ejySehz/F3t0TEKZ20UJ5z79t4+dRrBgKAfTyfXt/Xn7ceG7grcoobrpFh3vekz+QLXfOJOj6NCBiMV1C5DgMirDmDUiUiNllwrhNgMfRKLtQbtnpzjDCDsiPyeNlUVLGnuuRzgEhPFYoYswASCt91uYgsGY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1614172565727325.2364273377261; Wed, 24 Feb 2021 05:16:05 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-184-pCQA2-JeO-Crn368KsaLHA-1; Wed, 24 Feb 2021 08:16:02 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3A6E710866AE; Wed, 24 Feb 2021 13:15:54 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0D3D510016F6; Wed, 24 Feb 2021 13:15:54 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id BFD7458083; Wed, 24 Feb 2021 13:15:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11ODF2LL011675 for ; Wed, 24 Feb 2021 08:15:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id B6D1110023B1; Wed, 24 Feb 2021 13:15:02 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-119.ams2.redhat.com [10.36.115.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id E3C031002388; Wed, 24 Feb 2021 13:14:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614172564; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=lmnyfIbPyy7DxT/Gn6LmF1DAVQG4g//yGveYaJvNomA=; b=BtH2YJlZdhY8W7obq1B80aK2VFKYUYB4l7jS/vbdTxW9EOJVpoPFLGIZ8xwsDzmAV9Dej7 mmWxjzAsJxWwt4UTUzqwGrjSE3JkrVQbUKTLPGLe1kEtDAPdTeBAAMiHjXj0fqU8mAEWMF QMuMc+5YylIeDdMrgSp9FaF908SHxZM= X-MC-Unique: pCQA2-JeO-Crn368KsaLHA-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 08/14] chardev: reject use of 'wait' flag for socket client chardevs Date: Wed, 24 Feb 2021 13:11:36 +0000 Message-Id: <20210224131142.1952027-9-berrange@redhat.com> In-Reply-To: <20210224131142.1952027-1-berrange@redhat.com> References: <20210224131142.1952027-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Fam Zheng , "Michael S. Tsirkin" , libvir-list@redhat.com, Mark Cave-Ayland , Gerd Hoffmann , qemu-block@nongnu.org, Juan Quintela , Wainer dos Santos Moschetta , Marcel Apfelbaum , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , "Dr. David Alan Gilbert" , Greg Kurz , Cleber Rosa , John Snow , David Gibson , Kevin Wolf , Vladimir Sementsov-Ogievskiy , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) This only makes sense conceptually when used with listener chardevs. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau --- chardev/char-socket.c | 12 ++++-------- docs/system/deprecated.rst | 6 ------ docs/system/removed-features.rst | 6 ++++++ 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index 9061981f6d..b24618b581 100644 --- a/chardev/char-socket.c +++ b/chardev/char-socket.c @@ -1336,14 +1336,10 @@ static bool qmp_chardev_validate_socket(ChardevSock= et *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; } } =20 diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 78474f0845..c69887dca8 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -192,12 +192,6 @@ Since the ``dirty-bitmaps`` field is optionally presen= t 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. =20 -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) '''''''''''''''''''''''''''''''''''''''''''''''''''''''' =20 diff --git a/docs/system/removed-features.rst b/docs/system/removed-feature= s.rst index 7942c2e513..870a222062 100644 --- a/docs/system/removed-features.rst +++ b/docs/system/removed-features.rst @@ -106,6 +106,12 @@ The ``query-cpus`` command is replaced by the ``query-= cpus-fast`` command. The ``arch`` output member of the ``query-cpus-fast`` command is replaced by the ``target`` output member. =20 +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 + Human Monitor Protocol (HMP) commands ------------------------------------- =20 --=20 2.29.2 From nobody Sun Apr 28 16:18:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614172565; cv=none; d=zohomail.com; s=zohoarc; b=SbIEnlwIDMvOC8rhdVsVqi1vgiL99ci/1WXVl4zK6H3qLf4Sf9TufEOd1nfHQqYZoVZxgy6sSgdALK2rEaDC8TqoYDxlm6fqMMuxP6w1VUeblOnVZy55oLORYKlg1OTh9inmNWPujYUEXPhHnsjapdCepbwYqr1fvXSwQufY0rM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614172565; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Hgp3Ivuf7y5HYNQKGzzSka+Uf/kvFmx7vyLC/I97ZFI=; b=cDvEgUX0L7cDNsBegCQiLuueroyvKhimCMJMn4j3FotDIoDcTX7kg/kGeWDgjFCV6AHjGOC4UuzYOzsVmOqqaAQFI+DnNcV/pKkRQGIr06bVmja5FBzNzAc4Wujcd89vv5wqraaQwLXXBPnL/vRQbr3tR9p99UrJY/iXHuweneo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1614172565574842.0239900493352; Wed, 24 Feb 2021 05:16:05 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-408-bzvEL2y0OyewcIDkm08HUA-1; Wed, 24 Feb 2021 08:16:02 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 78F2380405E; Wed, 24 Feb 2021 13:15:54 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4A23910016FD; Wed, 24 Feb 2021 13:15:54 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0AEE858086; Wed, 24 Feb 2021 13:15:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11ODFO7f011721 for ; Wed, 24 Feb 2021 08:15:24 -0500 Received: by smtp.corp.redhat.com (Postfix) id AD0FA10023B0; Wed, 24 Feb 2021 13:15:24 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-119.ams2.redhat.com [10.36.115.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2AC521002388; Wed, 24 Feb 2021 13:15:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614172564; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Hgp3Ivuf7y5HYNQKGzzSka+Uf/kvFmx7vyLC/I97ZFI=; b=KbcL+Ry4qFfl4nGJNK8v6ltE4MpsdNF9hUwwN1mFJNYuIrWJegPhXVm2Eq6zroYV+t6Y+3 p76xaShG8PclAqqTuUdE2g/Bar6zN+TnnuLBwk5cOE5dp16rvyCu0hMtrdbcHAHHzjqBSq kX0y5nwQjXLERsGnII4KNzCG6ltknBk= X-MC-Unique: bzvEL2y0OyewcIDkm08HUA-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 09/14] hw/ide: remove 'ide-drive' device Date: Wed, 24 Feb 2021 13:11:37 +0000 Message-Id: <20210224131142.1952027-10-berrange@redhat.com> In-Reply-To: <20210224131142.1952027-1-berrange@redhat.com> References: <20210224131142.1952027-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Fam Zheng , "Michael S. Tsirkin" , libvir-list@redhat.com, Mark Cave-Ayland , Gerd Hoffmann , qemu-block@nongnu.org, Juan Quintela , Wainer dos Santos Moschetta , Marcel Apfelbaum , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , "Dr. David Alan Gilbert" , Greg Kurz , Cleber Rosa , John Snow , David Gibson , Kevin Wolf , Vladimir Sementsov-Ogievskiy , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The 'ide-hd' and 'ide-cd' devices provide suitable alternatives. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Thomas Huth --- docs/qdev-device-use.txt | 2 +- docs/system/deprecated.rst | 6 ----- docs/system/removed-features.rst | 9 ++++++++ hw/i386/pc.c | 1 - hw/ide/qdev.c | 38 -------------------------------- hw/ppc/mac_newworld.c | 13 ----------- hw/ppc/mac_oldworld.c | 13 ----------- hw/sparc64/sun4u.c | 14 ------------ scripts/device-crash-test | 1 - softmmu/vl.c | 1 - tests/qemu-iotests/051 | 2 -- tests/qemu-iotests/051.pc.out | 10 --------- 12 files changed, 10 insertions(+), 100 deletions(-) diff --git a/docs/qdev-device-use.txt b/docs/qdev-device-use.txt index 245cdf29c7..2408889334 100644 --- a/docs/qdev-device-use.txt +++ b/docs/qdev-device-use.txt @@ -388,7 +388,7 @@ type. some DEVNAMEs: =20 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 diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index c69887dca8..f5c82a46dc 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -242,12 +242,6 @@ this CPU is also deprecated. System emulator devices ----------------------- =20 -``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) ''''''''''''''''''''''''' =20 diff --git a/docs/system/removed-features.rst b/docs/system/removed-feature= s.rst index 870a222062..8fd3fafb32 100644 --- a/docs/system/removed-features.rst +++ b/docs/system/removed-features.rst @@ -213,6 +213,15 @@ This machine has been renamed ``fuloong2e``. These machine types were very old and likely could not be used for live migration from old QEMU versions anymore. Use a newer machine type instead. =20 +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. + Related binaries ---------------- =20 diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 8aa85dec54..828122e21e 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -342,7 +342,6 @@ GlobalProperty pc_compat_1_4[] =3D { { "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" }, diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 8cd19fa5e9..e70ebc83a0 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -283,20 +283,6 @@ static void ide_cd_realize(IDEDevice *dev, Error **err= p) ide_dev_initfn(dev, IDE_CD, errp); } =20 -static void ide_drive_realize(IDEDevice *dev, Error **errp) -{ - DriveInfo *dinfo =3D NULL; - - warn_report("'ide-drive' is deprecated, " - "please use 'ide-hd' or 'ide-cd' instead"); - - if (dev->conf.blk) { - dinfo =3D 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 =3D { .class_init =3D ide_cd_class_init, }; =20 -static Property ide_drive_properties[] =3D { - DEFINE_IDE_DEV_PROPERTIES(), - DEFINE_PROP_END_OF_LIST(), -}; - -static void ide_drive_class_init(ObjectClass *klass, void *data) -{ - DeviceClass *dc =3D DEVICE_CLASS(klass); - IDEDeviceClass *k =3D IDE_DEVICE_CLASS(klass); - - k->realize =3D ide_drive_realize; - dc->fw_name =3D "drive"; - dc->desc =3D "virtual IDE disk or CD-ROM (legacy)"; - device_class_set_props(dc, ide_drive_properties); -} - -static const TypeInfo ide_drive_info =3D { - .name =3D "ide-drive", - .parent =3D TYPE_IDE_DEVICE, - .instance_size =3D sizeof(IDEDrive), - .class_init =3D ide_drive_class_init, -}; - static void ide_device_class_init(ObjectClass *klass, void *data) { DeviceClass *k =3D 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); } =20 diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index e991db4add..2175962846 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -539,8 +539,6 @@ static char *core99_fw_dev_path(FWPathProvider *p, BusS= tate *bus, DeviceState *dev) { PCIDevice *pci; - IDEBus *ide_bus; - IDEState *ide_s; MACIOIDEState *macio_ide; =20 if (!strcmp(object_get_typename(OBJECT(dev)), "macio-newworld")) { @@ -553,17 +551,6 @@ static char *core99_fw_dev_path(FWPathProvider *p, Bus= State *bus, return g_strdup_printf("ata-3@%x", macio_ide->addr); } =20 - if (!strcmp(object_get_typename(OBJECT(dev)), "ide-drive")) { - ide_bus =3D IDE_BUS(qdev_get_parent_bus(dev)); - ide_s =3D idebus_active_if(ide_bus); - - if (ide_s->drive_kind =3D=3D IDE_CD) { - return g_strdup("cdrom"); - } - - return g_strdup("disk"); - } - if (!strcmp(object_get_typename(OBJECT(dev)), "ide-hd")) { return g_strdup("disk"); } diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index 44ee99be88..963d247f5f 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c @@ -384,8 +384,6 @@ static char *heathrow_fw_dev_path(FWPathProvider *p, Bu= sState *bus, DeviceState *dev) { PCIDevice *pci; - IDEBus *ide_bus; - IDEState *ide_s; MACIOIDEState *macio_ide; =20 if (!strcmp(object_get_typename(OBJECT(dev)), "macio-oldworld")) { @@ -398,17 +396,6 @@ static char *heathrow_fw_dev_path(FWPathProvider *p, B= usState *bus, return g_strdup_printf("ata-3@%x", macio_ide->addr); } =20 - if (!strcmp(object_get_typename(OBJECT(dev)), "ide-drive")) { - ide_bus =3D IDE_BUS(qdev_get_parent_bus(dev)); - ide_s =3D idebus_active_if(ide_bus); - - if (ide_s->drive_kind =3D=3D IDE_CD) { - return g_strdup("cdrom"); - } - - return g_strdup("disk"); - } - if (!strcmp(object_get_typename(OBJECT(dev)), "ide-hd")) { return g_strdup("disk"); } diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 0fa13a7330..d7c27144ba 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -749,8 +749,6 @@ static char *sun4u_fw_dev_path(FWPathProvider *p, BusSt= ate *bus, DeviceState *dev) { PCIDevice *pci; - IDEBus *ide_bus; - IDEState *ide_s; int bus_id; =20 if (!strcmp(object_get_typename(OBJECT(dev)), "pbm-bridge")) { @@ -764,18 +762,6 @@ static char *sun4u_fw_dev_path(FWPathProvider *p, BusS= tate *bus, } } =20 - if (!strcmp(object_get_typename(OBJECT(dev)), "ide-drive")) { - ide_bus =3D IDE_BUS(qdev_get_parent_bus(dev)); - ide_s =3D idebus_active_if(ide_bus); - bus_id =3D ide_bus->bus_id; - - if (ide_s->drive_kind =3D=3D 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"); } diff --git a/scripts/device-crash-test b/scripts/device-crash-test index ef1412ca59..3981209165 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -76,7 +76,6 @@ ERROR_RULE_LIST =3D [ {'device':'ics', 'expected':True}, # ics_base_real= ize: required link 'xics' not found: Property '.xics' not found # "-device ide-cd" does work on more recent QEMU versions, so it doesn= 't have expected=3DTrue {'device':'ide-cd'}, # No drive specif= ied - {'device':'ide-drive', 'expected':True}, # No drive spec= ified {'device':'ide-hd', 'expected':True}, # No drive spec= ified {'device':'ipmi-bmc-extern', 'expected':True}, # IPMI external= bmc requires chardev attribute {'device':'isa-debugcon', 'expected':True}, # Can't create = serial device, empty char device diff --git a/softmmu/vl.c b/softmmu/vl.c index c31061cc09..fdabf68433 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -177,7 +177,6 @@ static struct { { .driver =3D "floppy", .flag =3D &default_floppy }, { .driver =3D "ide-cd", .flag =3D &default_cdrom }, { .driver =3D "ide-hd", .flag =3D &default_cdrom }, - { .driver =3D "ide-drive", .flag =3D &default_cdrom }, { .driver =3D "scsi-cd", .flag =3D &default_cdrom }, { .driver =3D "scsi-hd", .flag =3D &default_cdrom }, { .driver =3D "VGA", .flag =3D &default_vga }, diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index 7cbd1415ce..8b334fe41d 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -185,7 +185,6 @@ case "$QEMU_DEFAULT_MACHINE" in pc) run_qemu -drive if=3Dnone,id=3Ddisk -device ide-cd,drive=3Ddisk run_qemu -drive if=3Dnone,id=3Ddisk -device lsi53c895a -device scs= i-cd,drive=3Ddisk - run_qemu -drive if=3Dnone,id=3Ddisk -device ide-drive,drive=3Ddisk run_qemu -drive if=3Dnone,id=3Ddisk -device ide-hd,drive=3Ddisk run_qemu -drive if=3Dnone,id=3Ddisk -device lsi53c895a -device scs= i-disk,drive=3Ddisk run_qemu -drive if=3Dnone,id=3Ddisk -device lsi53c895a -device scs= i-hd,drive=3Ddisk @@ -238,7 +237,6 @@ case "$QEMU_DEFAULT_MACHINE" in pc) run_qemu -drive file=3D"$TEST_IMG",if=3Dnone,id=3Ddisk,readonly=3D= on -device ide-cd,drive=3Ddisk run_qemu -drive file=3D"$TEST_IMG",if=3Dnone,id=3Ddisk,readonly=3D= on -device lsi53c895a -device scsi-cd,drive=3Ddisk - run_qemu -drive file=3D"$TEST_IMG",if=3Dnone,id=3Ddisk,readonly=3D= on -device ide-drive,drive=3Ddisk run_qemu -drive file=3D"$TEST_IMG",if=3Dnone,id=3Ddisk,readonly=3D= on -device ide-hd,drive=3Ddisk run_qemu -drive file=3D"$TEST_IMG",if=3Dnone,id=3Ddisk,readonly=3D= on -device lsi53c895a -device scsi-disk,drive=3Ddisk run_qemu -drive file=3D"$TEST_IMG",if=3Dnone,id=3Ddisk,readonly=3D= on -device lsi53c895a -device scsi-hd,drive=3Ddisk diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out index f707471fb0..2e23a4caa0 100644 --- a/tests/qemu-iotests/051.pc.out +++ b/tests/qemu-iotests/051.pc.out @@ -156,11 +156,6 @@ Testing: -drive if=3Dnone,id=3Ddisk -device lsi53c895a= -device scsi-cd,drive=3Ddisk QEMU X.Y.Z monitor - type 'help' for more information (qemu) quit =20 -Testing: -drive if=3Dnone,id=3Ddisk -device ide-drive,drive=3Ddisk -QEMU X.Y.Z monitor - type 'help' for more information -(qemu) QEMU_PROG: -device ide-drive,drive=3Ddisk: warning: 'ide-drive' is = deprecated, please use 'ide-hd' or 'ide-cd' instead -QEMU_PROG: -device ide-drive,drive=3Ddisk: Device needs media, but drive i= s empty - Testing: -drive if=3Dnone,id=3Ddisk -device ide-hd,drive=3Ddisk QEMU X.Y.Z monitor - type 'help' for more information (qemu) QEMU_PROG: -device ide-hd,drive=3Ddisk: Device needs media, but dri= ve is empty @@ -228,11 +223,6 @@ Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dnone,id= =3Ddisk,readonly=3Don -device lsi53c QEMU X.Y.Z monitor - type 'help' for more information (qemu) quit =20 -Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dnone,id=3Ddisk,readonly=3Don = -device ide-drive,drive=3Ddisk -QEMU X.Y.Z monitor - type 'help' for more information -(qemu) QEMU_PROG: -device ide-drive,drive=3Ddisk: warning: 'ide-drive' is = deprecated, please use 'ide-hd' or 'ide-cd' instead -QEMU_PROG: -device ide-drive,drive=3Ddisk: Block node is read-only - Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dnone,id=3Ddisk,readonly=3Don = -device ide-hd,drive=3Ddisk QEMU X.Y.Z monitor - type 'help' for more information (qemu) QEMU_PROG: -device ide-hd,drive=3Ddisk: Block node is read-only --=20 2.29.2 From nobody Sun Apr 28 16:18:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614172636; cv=none; d=zohomail.com; s=zohoarc; b=QXMH7SqoWsR1QrKS42eSNin1QqtuA8vTL6xBIbIg1e0WIADj2nc7danDFPOIq5eDiLgBD5tCgISRLX1NQ1047kRtE77w/Z3PYAkD6z0QauGd4fxgDini31UExdOFS0gxJ8610Wj0pNFrIn3LxK2WrzqywZs2vTUCQSXJROlVIvA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614172636; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=YrDSFsdww8aqL++zW66pmRh6IHAulWX2gpqg/omiMtE=; b=V8Jg3VAeVwL0+NAoz9lcE1vK9eJeU+nLU7wDs0uYFFb00h/oWFs4ta0x72EFCYR8/IuybErW5ShraHsMCO9pCzIc7m1JydaojMNam1He3enLT9clwAdRjVOP9qQ6CJ75yAxNatpIO5X6bo+OtHXx+cuQmVr99TWvt0P4UXh38HM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1614172636982141.76378415884403; Wed, 24 Feb 2021 05:17:16 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-467-9duL6-wKMI28OlKbIZmQlg-1; Wed, 24 Feb 2021 08:16:08 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 004A2814303; Wed, 24 Feb 2021 13:16:02 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D07345D9DD; Wed, 24 Feb 2021 13:16:01 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 92AAE58083; Wed, 24 Feb 2021 13:16:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11ODFk7t011759 for ; Wed, 24 Feb 2021 08:15:46 -0500 Received: by smtp.corp.redhat.com (Postfix) id 650C510021AA; Wed, 24 Feb 2021 13:15:46 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-119.ams2.redhat.com [10.36.115.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id 162931002388; Wed, 24 Feb 2021 13:15:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614172635; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=YrDSFsdww8aqL++zW66pmRh6IHAulWX2gpqg/omiMtE=; b=Zw4rcWw5+SSGeTok7hpHGeeRHzLjRfnqaxTrFE/fnRFofNK8aEOWRjAMZ3UJxaZ/FgebU9 P3Guk27KMFkOaMVT3Y9ZzkPH40hvxiwPorueJQv90UwtIXdIY6M2FSpdfEnA+UHuxcVUBU U52lDi6RffEQPOajFD0Zs6nnMjWEgNU= X-MC-Unique: 9duL6-wKMI28OlKbIZmQlg-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 10/14] hw/scsi: remove 'scsi-disk' device Date: Wed, 24 Feb 2021 13:11:38 +0000 Message-Id: <20210224131142.1952027-11-berrange@redhat.com> In-Reply-To: <20210224131142.1952027-1-berrange@redhat.com> References: <20210224131142.1952027-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Fam Zheng , "Michael S. Tsirkin" , libvir-list@redhat.com, Mark Cave-Ayland , Gerd Hoffmann , qemu-block@nongnu.org, Juan Quintela , Wainer dos Santos Moschetta , Marcel Apfelbaum , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , "Dr. David Alan Gilbert" , Greg Kurz , Cleber Rosa , John Snow , David Gibson , Kevin Wolf , Vladimir Sementsov-Ogievskiy , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The 'scsi-hd' and 'scsi-cd' devices provide suitable alternatives. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Thomas Huth --- docs/system/deprecated.rst | 9 ----- docs/system/removed-features.rst | 6 ++++ hw/i386/pc.c | 1 - hw/scsi/scsi-disk.c | 62 -------------------------------- hw/sparc64/sun4u.c | 1 - scripts/device-crash-test | 1 - tests/qemu-iotests/051 | 2 -- tests/qemu-iotests/051.pc.out | 10 ------ 8 files changed, 6 insertions(+), 86 deletions(-) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index f5c82a46dc..cb88fea94f 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -239,15 +239,6 @@ The ``I7200`` guest CPU relies on the nanoMIPS ISA, wh= ich is deprecated (the ISA has never been upstreamed to a compiler toolchain). Therefore this CPU is also deprecated. =20 -System emulator devices ------------------------ - -``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 ------------------------ =20 diff --git a/docs/system/removed-features.rst b/docs/system/removed-feature= s.rst index 8fd3fafb32..bb6bc8dfc8 100644 --- a/docs/system/removed-features.rst +++ b/docs/system/removed-features.rst @@ -222,6 +222,12 @@ System emulator devices 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. =20 +``scsi-disk`` (removed in 6.0) +'''''''''''''''''''''''''''''' + +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. + Related binaries ---------------- =20 diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 828122e21e..28a77df0d0 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -339,7 +339,6 @@ GlobalProperty pc_compat_1_4[] =3D { 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" }, { "virtio-blk-pci", "discard_granularity", "0" }, diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index ed52fcd49f..2c8f68d3f0 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -2490,28 +2490,6 @@ static void scsi_cd_realize(SCSIDevice *dev, Error *= *errp) aio_context_release(ctx); } =20 -static void scsi_disk_realize(SCSIDevice *dev, Error **errp) -{ - DriveInfo *dinfo; - Error *local_err =3D 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 =3D blk_legacy_dinfo(dev->conf.blk); - if (dinfo && dinfo->media_cd) { - scsi_cd_realize(dev, errp); - } else { - scsi_hd_realize(dev, errp); - } -} =20 static const SCSIReqOps scsi_disk_emulate_reqops =3D { .size =3D sizeof(SCSIDiskReq), @@ -3131,45 +3109,6 @@ static const TypeInfo scsi_block_info =3D { }; #endif =20 -static Property scsi_disk_properties[] =3D { - 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_ver= sion, - 5), - DEFINE_PROP_END_OF_LIST(), -}; - -static void scsi_disk_class_initfn(ObjectClass *klass, void *data) -{ - DeviceClass *dc =3D DEVICE_CLASS(klass); - SCSIDeviceClass *sc =3D SCSI_DEVICE_CLASS(klass); - - sc->realize =3D scsi_disk_realize; - sc->alloc_req =3D scsi_new_request; - sc->unit_attention_reported =3D scsi_disk_unit_attention_reported; - dc->fw_name =3D "disk"; - dc->desc =3D "virtual SCSI disk or CD-ROM (legacy)"; - dc->reset =3D scsi_disk_reset; - device_class_set_props(dc, scsi_disk_properties); - dc->vmsd =3D &vmstate_scsi_disk_state; -} - -static const TypeInfo scsi_disk_info =3D { - .name =3D "scsi-disk", - .parent =3D TYPE_SCSI_DISK_BASE, - .class_init =3D scsi_disk_class_initfn, -}; - static void scsi_disk_register_types(void) { type_register_static(&scsi_disk_base_info); @@ -3178,7 +3117,6 @@ static void scsi_disk_register_types(void) #ifdef __linux__ type_register_static(&scsi_block_info); #endif - type_register_static(&scsi_disk_info); } =20 type_init(scsi_disk_register_types) diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index d7c27144ba..cda7df36e3 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -749,7 +749,6 @@ static char *sun4u_fw_dev_path(FWPathProvider *p, BusSt= ate *bus, DeviceState *dev) { PCIDevice *pci; - int bus_id; =20 if (!strcmp(object_get_typename(OBJECT(dev)), "pbm-bridge")) { pci =3D PCI_DEVICE(dev); diff --git a/scripts/device-crash-test b/scripts/device-crash-test index 3981209165..6d809ac711 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -93,7 +93,6 @@ ERROR_RULE_LIST =3D [ {'device':'pci-bridge-seat', 'expected':True}, # Bridge chassi= s not specified. Each bridge is required to be assigned a unique chassis id= > 0. {'device':'pxb', 'expected':True}, # Bridge chassi= s not specified. Each bridge is required to be assigned a unique chassis id= > 0. {'device':'scsi-block', 'expected':True}, # drive propert= y not set - {'device':'scsi-disk', 'expected':True}, # drive propert= y not set {'device':'scsi-generic', 'expected':True}, # drive propert= y not set {'device':'scsi-hd', 'expected':True}, # drive propert= y not set {'device':'spapr-pci-host-bridge', 'expected':True}, # BUID not spec= ified for PHB diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index 8b334fe41d..f92161d8ef 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -186,7 +186,6 @@ case "$QEMU_DEFAULT_MACHINE" in run_qemu -drive if=3Dnone,id=3Ddisk -device ide-cd,drive=3Ddisk run_qemu -drive if=3Dnone,id=3Ddisk -device lsi53c895a -device scs= i-cd,drive=3Ddisk run_qemu -drive if=3Dnone,id=3Ddisk -device ide-hd,drive=3Ddisk - run_qemu -drive if=3Dnone,id=3Ddisk -device lsi53c895a -device scs= i-disk,drive=3Ddisk run_qemu -drive if=3Dnone,id=3Ddisk -device lsi53c895a -device scs= i-hd,drive=3Ddisk ;; *) @@ -238,7 +237,6 @@ case "$QEMU_DEFAULT_MACHINE" in run_qemu -drive file=3D"$TEST_IMG",if=3Dnone,id=3Ddisk,readonly=3D= on -device ide-cd,drive=3Ddisk run_qemu -drive file=3D"$TEST_IMG",if=3Dnone,id=3Ddisk,readonly=3D= on -device lsi53c895a -device scsi-cd,drive=3Ddisk run_qemu -drive file=3D"$TEST_IMG",if=3Dnone,id=3Ddisk,readonly=3D= on -device ide-hd,drive=3Ddisk - run_qemu -drive file=3D"$TEST_IMG",if=3Dnone,id=3Ddisk,readonly=3D= on -device lsi53c895a -device scsi-disk,drive=3Ddisk run_qemu -drive file=3D"$TEST_IMG",if=3Dnone,id=3Ddisk,readonly=3D= on -device lsi53c895a -device scsi-hd,drive=3Ddisk ;; *) diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out index 2e23a4caa0..845fe0149f 100644 --- a/tests/qemu-iotests/051.pc.out +++ b/tests/qemu-iotests/051.pc.out @@ -160,11 +160,6 @@ Testing: -drive if=3Dnone,id=3Ddisk -device ide-hd,dri= ve=3Ddisk QEMU X.Y.Z monitor - type 'help' for more information (qemu) QEMU_PROG: -device ide-hd,drive=3Ddisk: Device needs media, but dri= ve is empty =20 -Testing: -drive if=3Dnone,id=3Ddisk -device lsi53c895a -device scsi-disk,d= rive=3Ddisk -QEMU X.Y.Z monitor - type 'help' for more information -(qemu) QEMU_PROG: -device scsi-disk,drive=3Ddisk: warning: 'scsi-disk' is = deprecated, please use 'scsi-hd' or 'scsi-cd' instead -QEMU_PROG: -device scsi-disk,drive=3Ddisk: Device needs media, but drive i= s empty - Testing: -drive if=3Dnone,id=3Ddisk -device lsi53c895a -device scsi-hd,dri= ve=3Ddisk QEMU X.Y.Z monitor - type 'help' for more information (qemu) QEMU_PROG: -device scsi-hd,drive=3Ddisk: Device needs media, but dr= ive is empty @@ -227,11 +222,6 @@ Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dnone,id= =3Ddisk,readonly=3Don -device ide-hd QEMU X.Y.Z monitor - type 'help' for more information (qemu) QEMU_PROG: -device ide-hd,drive=3Ddisk: Block node is read-only =20 -Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dnone,id=3Ddisk,readonly=3Don = -device lsi53c895a -device scsi-disk,drive=3Ddisk -QEMU X.Y.Z monitor - type 'help' for more information -(qemu) QEMU_PROG: -device scsi-disk,drive=3Ddisk: warning: 'scsi-disk' is = deprecated, please use 'scsi-hd' or 'scsi-cd' instead -quit - Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dnone,id=3Ddisk,readonly=3Don = -device lsi53c895a -device scsi-hd,drive=3Ddisk QEMU X.Y.Z monitor - type 'help' for more information (qemu) quit --=20 2.29.2 From nobody Sun Apr 28 16:18:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614172626; cv=none; d=zohomail.com; s=zohoarc; b=oJLnUuRgwXJ4cxSgovbC5qmUv6aqXA3CgIJvNebiW5RUIg3qZgx+3Ei/6durUZHfb2VewY45bz1f9FvJZQCp5U/6vI8oaD7qtrvsF6iWgYhjWRAuQD7+wIhgE2N5UMhIbuvX3c997TP7TjDgAaQ5DpJvNy038QkM76jV+pEM518= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614172626; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LJVk6pIwSaMP1AILmYQwABWl7aaXQ9UQ7XdFTrwwTF8=; b=HSEahtE4HGwVc8R92Nfl/V0FGl4r9ScJzLHQQWaTAvx2ThAIJvMKFiOfBz1d1ZCg54VYPp7/FzR1MNN0SY8eN2vWPD4JGIVssiR9rJqF65rU5ZOVag5rc/fiLJ7vSSK+DhDZTlajGBA7ky3ek1fJdjNBkEvf6iJ3jRSQ90+Yoqw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 16141726269341018.0677609120374; Wed, 24 Feb 2021 05:17:06 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-99-J9XdHBD-Mm6UOFV7R5j8ew-1; Wed, 24 Feb 2021 08:16:21 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id ABF606D4F2; Wed, 24 Feb 2021 13:16:14 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5043C19727; Wed, 24 Feb 2021 13:16:14 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0C84A18095CE; Wed, 24 Feb 2021 13:16:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11ODGCOa011927 for ; Wed, 24 Feb 2021 08:16:12 -0500 Received: by smtp.corp.redhat.com (Postfix) id 83ADB10023B8; Wed, 24 Feb 2021 13:16:12 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-119.ams2.redhat.com [10.36.115.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id B6ECE1002388; Wed, 24 Feb 2021 13:15:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614172625; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=LJVk6pIwSaMP1AILmYQwABWl7aaXQ9UQ7XdFTrwwTF8=; b=FG9hnnuWC69UpYu5pBJ4FutaNbh6Y88XIF3xbC5vKKwm++O6IRoMpg+jt0ffU79VggEv3A E6a87BNnag3+gntRJoclLCFcdx/YEGtOv2/xn59J6pD1XgwVcgVyvs+EauH4G51UJyI+gF xzbQxd79ExiBJtYiMjpWbSG/Mpma//w= X-MC-Unique: J9XdHBD-Mm6UOFV7R5j8ew-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 11/14] block: remove 'encryption_key_missing' flag from QAPI Date: Wed, 24 Feb 2021 13:11:39 +0000 Message-Id: <20210224131142.1952027-12-berrange@redhat.com> In-Reply-To: <20210224131142.1952027-1-berrange@redhat.com> References: <20210224131142.1952027-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Fam Zheng , "Michael S. Tsirkin" , libvir-list@redhat.com, Mark Cave-Ayland , Gerd Hoffmann , qemu-block@nongnu.org, Juan Quintela , Wainer dos Santos Moschetta , Marcel Apfelbaum , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , "Dr. David Alan Gilbert" , Greg Kurz , Cleber Rosa , John Snow , David Gibson , Kevin Wolf , Vladimir Sementsov-Ogievskiy , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) This has been hardcoded to "false" since 2.10.0, since secrets required to unlock block devices are now always provided upfront instead of using interactive prompts. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Thomas Huth --- block/qapi.c | 1 - docs/system/deprecated.rst | 10 ------- docs/system/removed-features.rst | 10 +++++++ qapi/block-core.json | 8 ------ tests/qemu-iotests/184.out | 6 ++-- tests/qemu-iotests/191.out | 48 +++++++++++--------------------- tests/qemu-iotests/273.out | 15 ++++------ 7 files changed, 33 insertions(+), 65 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index 84a0aadc09..3acc118c44 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -62,7 +62,6 @@ BlockDeviceInfo *bdrv_block_device_info(BlockBackend *blk, info->ro =3D bs->read_only; info->drv =3D g_strdup(bs->drv->format_name); info->encrypted =3D bs->encrypted; - info->encryption_key_missing =3D false; =20 info->cache =3D g_new(BlockdevCacheInfo, 1); *info->cache =3D (BlockdevCacheInfo) { diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index cb88fea94f..e746a63edf 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -147,16 +147,6 @@ Use argument ``id`` instead. =20 Use argument ``id`` instead. =20 -``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) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' =20 diff --git a/docs/system/removed-features.rst b/docs/system/removed-feature= s.rst index bb6bc8dfc8..583f14f02e 100644 --- a/docs/system/removed-features.rst +++ b/docs/system/removed-features.rst @@ -112,6 +112,16 @@ 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 =20 +``query-named-block-nodes`` result ``encryption_key_missing`` (removed in = 6.0) +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''= '''' + +Always false. + +``query-block`` result ``inserted.encryption_key_missing`` (removed in 6.0) +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +Removed with no replacement + Human Monitor Protocol (HMP) commands ------------------------------------- =20 diff --git a/qapi/block-core.json b/qapi/block-core.json index 9f555d5c1d..d256b7b776 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -319,8 +319,6 @@ # # @encrypted: true if the backing device is encrypted # -# @encryption_key_missing: always false -# # @detect_zeroes: detect and optimize zero writes (Since 2.1) # # @bps: total throughput limit in bytes per second is specified @@ -385,10 +383,6 @@ # @dirty-bitmaps: dirty bitmaps information (only present if node # has one or more dirty bitmaps) (Since 4.2) # -# Features: -# @deprecated: Member @encryption_key_missing is deprecated. It is -# always false. -# # Since: 0.14 # ## @@ -396,8 +390,6 @@ 'data': { 'file': 'str', '*node-name': 'str', 'ro': 'bool', 'drv': 'str', '*backing_file': 'str', 'backing_file_depth': 'int', 'encrypted': 'bool', - 'encryption_key_missing': { 'type': 'bool', - 'features': [ 'deprecated' ] }, 'detect_zeroes': 'BlockdevDetectZeroesOptions', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int', 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int', diff --git a/tests/qemu-iotests/184.out b/tests/qemu-iotests/184.out index 87c73070e3..77e5489d65 100644 --- a/tests/qemu-iotests/184.out +++ b/tests/qemu-iotests/184.out @@ -54,8 +54,7 @@ Testing: "direct": false, "writeback": true }, - "file": "json:{\"throttle-group\": \"group0\", \"driver\": \"t= hrottle\", \"file\": {\"driver\": \"null-co\"}}", - "encryption_key_missing": false + "file": "json:{\"throttle-group\": \"group0\", \"driver\": \"t= hrottle\", \"file\": {\"driver\": \"null-co\"}}" }, { "iops_rd": 0, @@ -82,8 +81,7 @@ Testing: "direct": false, "writeback": true }, - "file": "null-co://", - "encryption_key_missing": false + "file": "null-co://" } ] } diff --git a/tests/qemu-iotests/191.out b/tests/qemu-iotests/191.out index 022021efab..ea88777374 100644 --- a/tests/qemu-iotests/191.out +++ b/tests/qemu-iotests/191.out @@ -150,8 +150,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.IMGFMT.ovl2", - "encryption_key_missing": false + "file": "TEST_DIR/t.IMGFMT.ovl2" }, { "iops_rd": 0, @@ -179,8 +178,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.IMGFMT.ovl2", - "encryption_key_missing": false + "file": "TEST_DIR/t.IMGFMT.ovl2" }, { "iops_rd": 0, @@ -221,8 +219,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.IMGFMT", - "encryption_key_missing": false + "file": "TEST_DIR/t.IMGFMT" }, { "iops_rd": 0, @@ -250,8 +247,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.IMGFMT", - "encryption_key_missing": false + "file": "TEST_DIR/t.IMGFMT" }, { "iops_rd": 0, @@ -292,8 +288,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.IMGFMT.mid", - "encryption_key_missing": false + "file": "TEST_DIR/t.IMGFMT.mid" }, { "iops_rd": 0, @@ -321,8 +316,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.IMGFMT.mid", - "encryption_key_missing": false + "file": "TEST_DIR/t.IMGFMT.mid" }, { "iops_rd": 0, @@ -351,8 +345,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.IMGFMT.base", - "encryption_key_missing": false + "file": "TEST_DIR/t.IMGFMT.base" }, { "iops_rd": 0, @@ -380,8 +373,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.IMGFMT.base", - "encryption_key_missing": false + "file": "TEST_DIR/t.IMGFMT.base" } ] } @@ -565,8 +557,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.IMGFMT.ovl2", - "encryption_key_missing": false + "file": "TEST_DIR/t.IMGFMT.ovl2" }, { "iops_rd": 0, @@ -594,8 +585,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.IMGFMT.ovl2", - "encryption_key_missing": false + "file": "TEST_DIR/t.IMGFMT.ovl2" }, { "iops_rd": 0, @@ -647,8 +637,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.IMGFMT.ovl3", - "encryption_key_missing": false + "file": "TEST_DIR/t.IMGFMT.ovl3" }, { "iops_rd": 0, @@ -676,8 +665,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.IMGFMT.ovl3", - "encryption_key_missing": false + "file": "TEST_DIR/t.IMGFMT.ovl3" }, { "iops_rd": 0, @@ -706,8 +694,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.IMGFMT.base", - "encryption_key_missing": false + "file": "TEST_DIR/t.IMGFMT.base" }, { "iops_rd": 0, @@ -735,8 +722,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.IMGFMT.base", - "encryption_key_missing": false + "file": "TEST_DIR/t.IMGFMT.base" }, { "iops_rd": 0, @@ -777,8 +763,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.IMGFMT", - "encryption_key_missing": false + "file": "TEST_DIR/t.IMGFMT" }, { "iops_rd": 0, @@ -806,8 +791,7 @@ wrote 65536/65536 bytes at offset 1048576 "direct": false, "writeback": true }, - "file": "TEST_DIR/t.IMGFMT", - "encryption_key_missing": false + "file": "TEST_DIR/t.IMGFMT" } ] } diff --git a/tests/qemu-iotests/273.out b/tests/qemu-iotests/273.out index 8247cbaea1..4e840b6730 100644 --- a/tests/qemu-iotests/273.out +++ b/tests/qemu-iotests/273.out @@ -69,8 +69,7 @@ Testing: -blockdev file,node-name=3Dbase,filename=3DTEST_= DIR/t.IMGFMT.base -blockdev "direct": false, "writeback": true }, - "file": "TEST_DIR/t.IMGFMT", - "encryption_key_missing": false + "file": "TEST_DIR/t.IMGFMT" }, { "iops_rd": 0, @@ -98,8 +97,7 @@ Testing: -blockdev file,node-name=3Dbase,filename=3DTEST_= DIR/t.IMGFMT.base -blockdev "direct": false, "writeback": true }, - "file": "TEST_DIR/t.IMGFMT", - "encryption_key_missing": false + "file": "TEST_DIR/t.IMGFMT" }, { "iops_rd": 0, @@ -139,8 +137,7 @@ Testing: -blockdev file,node-name=3Dbase,filename=3DTES= T_DIR/t.IMGFMT.base -blockdev "direct": false, "writeback": true }, - "file": "TEST_DIR/t.IMGFMT.mid", - "encryption_key_missing": false + "file": "TEST_DIR/t.IMGFMT.mid" }, { "iops_rd": 0, @@ -168,8 +165,7 @@ Testing: -blockdev file,node-name=3Dbase,filename=3DTES= T_DIR/t.IMGFMT.base -blockdev "direct": false, "writeback": true }, - "file": "TEST_DIR/t.IMGFMT.mid", - "encryption_key_missing": false + "file": "TEST_DIR/t.IMGFMT.mid" }, { "iops_rd": 0, @@ -197,8 +193,7 @@ Testing: -blockdev file,node-name=3Dbase,filename=3DTES= T_DIR/t.IMGFMT.base -blockdev "direct": false, "writeback": true }, - "file": "TEST_DIR/t.IMGFMT.base", - "encryption_key_missing": false + "file": "TEST_DIR/t.IMGFMT.base" } ] } --=20 2.29.2 From nobody Sun Apr 28 16:18:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614172629; cv=none; d=zohomail.com; s=zohoarc; b=Sc7yPJT+swoRYwHPaVNpTinqCfXwgVT2dX7g73cx229SmNjXKwTCtngvJN6Sv5qE0Xt1YaNwfldL+mpZW+Ij0Wb5NLWZf+I1tFGC9ku21Ybag8avkhvC2yz8lup331J42oomx/38SqeEtsyak8r6TX9HmSyxGHwMwBzPaLefIcQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614172629; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9foc5fh4Plm2l/NuKwiNYidRm4/bMSbXpienHV9gYKA=; b=mg4Cab+0LCLQuHbZCxQ3GTYOlVsMqUbpWvsVpdN8iu3m5nY96IC5IBQzkEgoDJxO223VVF9Iq7RumnssA57VJ6zljb/Nc8FWvzdNxCTMRFR5Rxirx5c3oDqJnMAGaUn+SWJh56FNhtAlcRaYwolnZ407dSu4bBzWJ4XjQNr+gOI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1614172629799543.7798341902061; Wed, 24 Feb 2021 05:17:09 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-591--eYYvszmMz6jpT8t3fa-rg-1; Wed, 24 Feb 2021 08:17:06 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E657C100CCDC; Wed, 24 Feb 2021 13:16:59 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C4D9D5D9D3; Wed, 24 Feb 2021 13:16:59 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8467B18095CB; Wed, 24 Feb 2021 13:16:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11ODGiYS012160 for ; Wed, 24 Feb 2021 08:16:44 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2D71310023B0; Wed, 24 Feb 2021 13:16:44 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-119.ams2.redhat.com [10.36.115.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id D42961002C10; Wed, 24 Feb 2021 13:16:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614172628; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=9foc5fh4Plm2l/NuKwiNYidRm4/bMSbXpienHV9gYKA=; b=acRtIz8i+7zm/zFHTspKWTFmtu5dCxIuOahliisFYwmcVPl7gP5d583hSG4w/dELha20BI aJ7tGRV88dlQ/Krd06Pyez1dSgVRikUzdiSefFaMYMNPVULeMYjzHQHrAknjR/Fp3SQDrF 4kJBtYW3EZ9GzHS668g6Cd+018CrNBM= X-MC-Unique: -eYYvszmMz6jpT8t3fa-rg-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 12/14] block: remove dirty bitmaps 'status' field Date: Wed, 24 Feb 2021 13:11:40 +0000 Message-Id: <20210224131142.1952027-13-berrange@redhat.com> In-Reply-To: <20210224131142.1952027-1-berrange@redhat.com> References: <20210224131142.1952027-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Fam Zheng , "Michael S. Tsirkin" , libvir-list@redhat.com, Mark Cave-Ayland , Gerd Hoffmann , qemu-block@nongnu.org, Juan Quintela , Wainer dos Santos Moschetta , Marcel Apfelbaum , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , "Dr. David Alan Gilbert" , Greg Kurz , Cleber Rosa , John Snow , David Gibson , Kevin Wolf , Vladimir Sementsov-Ogievskiy , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The same information is available via the 'recording' and 'busy' fields. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 38 ---- docs/system/deprecated.rst | 7 - docs/system/removed-features.rst | 7 + include/block/dirty-bitmap.h | 1 - qapi/block-core.json | 45 ---- tests/qemu-iotests/124 | 4 - tests/qemu-iotests/194.out | 4 +- tests/qemu-iotests/236.out | 42 ++-- tests/qemu-iotests/246.out | 66 ++---- tests/qemu-iotests/254.out | 9 +- tests/qemu-iotests/257.out | 378 +++++++++++-------------------- 11 files changed, 174 insertions(+), 427 deletions(-) diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index 9b9cd71238..085aa343e1 100644 --- a/block/dirty-bitmap.c +++ b/block/dirty-bitmap.c @@ -166,43 +166,6 @@ bool bdrv_dirty_bitmap_enabled(BdrvDirtyBitmap *bitmap) return !bitmap->disabled; } =20 -/** - * 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 mo= de, - * 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 abdicat= e() - * or reclaim(). - * In this state, the anonymous successor bitmap may be eith= er - * Active and recording writes from the guest (e.g. backup j= obs), - * or it can be Disabled and not recording writes. - * (4) Locked: Whether Active or Disabled, the user cannot modify this b= itmap - * 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 f= rom - * 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(BlockDrive= rState *bs) info->granularity =3D bdrv_dirty_bitmap_granularity(bm); info->has_name =3D !!bm->name; info->name =3D g_strdup(bm->name); - info->status =3D bdrv_dirty_bitmap_status(bm); info->recording =3D bdrv_dirty_bitmap_recording(bm); info->busy =3D bdrv_dirty_bitmap_busy(bm); info->persistent =3D bm->persistent; diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index e746a63edf..a8ac104c19 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -162,13 +162,6 @@ Use arguments ``base-node`` and ``top-node`` instead. =20 Specify the properties for the object as top-level arguments instead. =20 -``query-named-block-nodes`` and ``query-block`` result dirty-bitmaps[i].st= atus (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) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''' =20 diff --git a/docs/system/removed-features.rst b/docs/system/removed-feature= s.rst index 583f14f02e..725a316a4e 100644 --- a/docs/system/removed-features.rst +++ b/docs/system/removed-features.rst @@ -122,6 +122,13 @@ Always false. =20 Removed with no replacement =20 +``query-named-block-nodes`` and ``query-block`` result dirty-bitmaps[i].st= atus (removed in 6.0) +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''= ''''''''''''''''''''' + +The ``status`` field of the ``BlockDirtyInfo`` structure, returned by +these commands is deprecated. Two new boolean fields, ``recording`` and +``busy`` effectively replace it. + Human Monitor Protocol (HMP) commands ------------------------------------- =20 diff --git a/include/block/dirty-bitmap.h b/include/block/dirty-bitmap.h index 36e8da4fc2..71374fba95 100644 --- a/include/block/dirty-bitmap.h +++ b/include/block/dirty-bitmap.h @@ -46,7 +46,6 @@ bool bdrv_dirty_bitmap_enabled(BdrvDirtyBitmap *bitmap); bool bdrv_dirty_bitmap_has_successor(BdrvDirtyBitmap *bitmap); const char *bdrv_dirty_bitmap_name(const BdrvDirtyBitmap *bitmap); int64_t bdrv_dirty_bitmap_size(const BdrvDirtyBitmap *bitmap); -DirtyBitmapStatus bdrv_dirty_bitmap_status(BdrvDirtyBitmap *bitmap); void bdrv_set_dirty_bitmap(BdrvDirtyBitmap *bitmap, int64_t offset, int64_t bytes); void bdrv_reset_dirty_bitmap(BdrvDirtyBitmap *bitmap, diff --git a/qapi/block-core.json b/qapi/block-core.json index d256b7b776..2a0c345c2c 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -418,43 +418,6 @@ ## { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] } =20 -## -# @DirtyBitmapStatus: -# -# An enumeration of possible states that a dirty bitmap can report to the = user. -# -# @frozen: The bitmap is currently in-use by some operation and is immutab= le. -# If the bitmap was @active prior to the operation, new writes by= the -# guest are being recorded in a temporary buffer, and will not be= lost. -# Generally, bitmaps are cleared on successful use in an operatio= n and -# the temporary buffer is committed into the bitmap. On failure, = the -# temporary buffer is merged back into the bitmap without first -# clearing it. -# Please refer to the documentation for each bitmap-using operati= on, -# See also @blockdev-backup, @drive-backup. -# -# @disabled: The bitmap is not currently recording new writes by the guest. -# This is requested explicitly via @block-dirty-bitmap-disable. -# It can still be cleared, deleted, or used for backup operatio= ns. -# -# @active: The bitmap is actively monitoring for new writes, and can be cl= eared, -# deleted, or used for backup operations. -# -# @locked: The bitmap is currently in-use by some operation and is immutab= le. -# If the bitmap was @active prior to the operation, it is still -# recording new writes. If the bitmap was @disabled, it is not -# recording new writes. (Since 2.12) -# -# @inconsistent: This is a persistent dirty bitmap that was marked in-use = on -# disk, and is unusable by QEMU. It can only be deleted. -# Please rely on the inconsistent field in @BlockDirtyInfo -# instead, as the status field is deprecated. (Since 4.0) -# -# Since: 2.4 -## -{ 'enum': 'DirtyBitmapStatus', - 'data': ['active', 'disabled', 'frozen', 'locked', 'inconsistent'] } - ## # @BlockDirtyInfo: # @@ -466,8 +429,6 @@ # # @granularity: granularity of the dirty bitmap in bytes (since 1.4) # -# @status: current status of the dirty bitmap (since 2.4) -# # @recording: true if the bitmap is recording new writes from the guest. # Replaces `active` and `disabled` statuses. (since 4.0) # @@ -483,17 +444,11 @@ # @busy to be false. This bitmap cannot be used. To remove # it, use @block-dirty-bitmap-remove. (Since 4.0) # -# Features: -# @deprecated: Member @status is deprecated. Use @recording and -# @locked instead. -# # Since: 1.3 ## { 'struct': 'BlockDirtyInfo', 'data': {'*name': 'str', 'count': 'int', 'granularity': 'uint32', 'recording': 'bool', 'busy': 'bool', - 'status': { 'type': 'DirtyBitmapStatus', - 'features': [ 'deprecated' ] }, 'persistent': 'bool', '*inconsistent': 'bool' } } =20 ## diff --git a/tests/qemu-iotests/124 b/tests/qemu-iotests/124 index 90cdbd8e24..845ab5303c 100755 --- a/tests/qemu-iotests/124 +++ b/tests/qemu-iotests/124 @@ -348,7 +348,6 @@ class TestIncrementalBackup(TestIncrementalBackupBase): 'name': 'bitmap0', 'count': 458752, 'granularity': 65536, - 'status': 'active', 'persistent': False })) =20 @@ -705,7 +704,6 @@ class TestIncrementalBackupBlkdebug(TestIncrementalBack= upBase): drive0['id'], bitmap.name, { 'count': 458752, 'granularity': 65536, - 'status': 'active', 'busy': False, 'recording': True })) @@ -736,7 +734,6 @@ class TestIncrementalBackupBlkdebug(TestIncrementalBack= upBase): drive0['id'], bitmap.name, { 'count': 458752, 'granularity': 65536, - 'status': 'frozen', 'busy': True, 'recording': True })) @@ -751,7 +748,6 @@ class TestIncrementalBackupBlkdebug(TestIncrementalBack= upBase): drive0['id'], bitmap.name, { 'count': 0, 'granularity': 65536, - 'status': 'active', 'busy': False, 'recording': True })) diff --git a/tests/qemu-iotests/194.out b/tests/qemu-iotests/194.out index a51bdb2d4f..4e6df1565a 100644 --- a/tests/qemu-iotests/194.out +++ b/tests/qemu-iotests/194.out @@ -24,6 +24,6 @@ Stopping the NBD server on destination... Wait for migration completion on target... {"data": {"status": "completed"}, "event": "MIGRATION", "timestamp": {"mic= roseconds": "USECS", "seconds": "SECS"}} Check bitmaps on source: -[{"busy": false, "count": 0, "granularity": 65536, "name": "bitmap0", "per= sistent": false, "recording": true, "status": "active"}] +[{"busy": false, "count": 0, "granularity": 65536, "name": "bitmap0", "per= sistent": false, "recording": true}] Check bitmaps on target: -[{"busy": false, "count": 0, "granularity": 65536, "name": "bitmap0", "per= sistent": false, "recording": true, "status": "active"}] +[{"busy": false, "count": 0, "granularity": 65536, "name": "bitmap0", "per= sistent": false, "recording": true}] diff --git a/tests/qemu-iotests/236.out b/tests/qemu-iotests/236.out index 815cd053f0..7448ceea02 100644 --- a/tests/qemu-iotests/236.out +++ b/tests/qemu-iotests/236.out @@ -27,8 +27,7 @@ write -P0xcd 0x3ff0000 64k "granularity": 65536, "name": "bitmapB", "persistent": false, - "recording": true, - "status": "active" + "recording": true }, { "busy": false, @@ -36,8 +35,7 @@ write -P0xcd 0x3ff0000 64k "granularity": 65536, "name": "bitmapA", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -93,8 +91,7 @@ write -P0xcd 0x3ff0000 64k "granularity": 65536, "name": "bitmapB", "persistent": false, - "recording": true, - "status": "active" + "recording": true }, { "busy": false, @@ -102,8 +99,7 @@ write -P0xcd 0x3ff0000 64k "granularity": 65536, "name": "bitmapA", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -197,8 +193,7 @@ write -P0xea 0x3fe0000 64k "granularity": 65536, "name": "bitmapC", "persistent": false, - "recording": false, - "status": "disabled" + "recording": false }, { "busy": false, @@ -206,8 +201,7 @@ write -P0xea 0x3fe0000 64k "granularity": 65536, "name": "bitmapB", "persistent": false, - "recording": false, - "status": "disabled" + "recording": false }, { "busy": false, @@ -215,8 +209,7 @@ write -P0xea 0x3fe0000 64k "granularity": 65536, "name": "bitmapA", "persistent": false, - "recording": false, - "status": "disabled" + "recording": false } ] } @@ -270,8 +263,7 @@ write -P0xea 0x3fe0000 64k "granularity": 65536, "name": "bitmapC", "persistent": false, - "recording": false, - "status": "disabled" + "recording": false }, { "busy": false, @@ -279,8 +271,7 @@ write -P0xea 0x3fe0000 64k "granularity": 65536, "name": "bitmapB", "persistent": false, - "recording": false, - "status": "disabled" + "recording": false }, { "busy": false, @@ -288,8 +279,7 @@ write -P0xea 0x3fe0000 64k "granularity": 65536, "name": "bitmapA", "persistent": false, - "recording": false, - "status": "disabled" + "recording": false } ] } @@ -336,8 +326,7 @@ write -P0xea 0x3fe0000 64k "granularity": 65536, "name": "bitmapD", "persistent": false, - "recording": false, - "status": "disabled" + "recording": false }, { "busy": false, @@ -345,8 +334,7 @@ write -P0xea 0x3fe0000 64k "granularity": 65536, "name": "bitmapC", "persistent": false, - "recording": false, - "status": "disabled" + "recording": false }, { "busy": false, @@ -354,8 +342,7 @@ write -P0xea 0x3fe0000 64k "granularity": 65536, "name": "bitmapB", "persistent": false, - "recording": false, - "status": "disabled" + "recording": false }, { "busy": false, @@ -363,8 +350,7 @@ write -P0xea 0x3fe0000 64k "granularity": 65536, "name": "bitmapA", "persistent": false, - "recording": false, - "status": "disabled" + "recording": false } ] } diff --git a/tests/qemu-iotests/246.out b/tests/qemu-iotests/246.out index 6671a11fdd..eeb98ab37c 100644 --- a/tests/qemu-iotests/246.out +++ b/tests/qemu-iotests/246.out @@ -24,8 +24,7 @@ "granularity": 65536, "name": "Transient", "persistent": false, - "recording": true, - "status": "active" + "recording": true }, { "busy": false, @@ -33,8 +32,7 @@ "granularity": 131072, "name": "Large", "persistent": true, - "recording": true, - "status": "active" + "recording": true }, { "busy": false, @@ -42,8 +40,7 @@ "granularity": 65536, "name": "Medium", "persistent": true, - "recording": true, - "status": "active" + "recording": true }, { "busy": false, @@ -51,8 +48,7 @@ "granularity": 32768, "name": "Small", "persistent": true, - "recording": true, - "status": "active" + "recording": true } ] } @@ -68,8 +64,7 @@ "granularity": 32768, "name": "Small", "persistent": true, - "recording": true, - "status": "active" + "recording": true }, { "busy": false, @@ -77,8 +72,7 @@ "granularity": 65536, "name": "Medium", "persistent": true, - "recording": true, - "status": "active" + "recording": true }, { "busy": false, @@ -86,8 +80,7 @@ "granularity": 131072, "name": "Large", "persistent": true, - "recording": true, - "status": "active" + "recording": true } ] } @@ -108,8 +101,7 @@ "granularity": 65536, "name": "Newtwo", "persistent": true, - "recording": true, - "status": "active" + "recording": true }, { "busy": false, @@ -117,8 +109,7 @@ "granularity": 65536, "name": "New", "persistent": true, - "recording": true, - "status": "active" + "recording": true }, { "busy": false, @@ -126,8 +117,7 @@ "granularity": 32768, "name": "Small", "persistent": true, - "recording": true, - "status": "active" + "recording": true }, { "busy": false, @@ -135,8 +125,7 @@ "granularity": 65536, "name": "Medium", "persistent": true, - "recording": true, - "status": "active" + "recording": true }, { "busy": false, @@ -144,8 +133,7 @@ "granularity": 131072, "name": "Large", "persistent": true, - "recording": true, - "status": "active" + "recording": true } ] } @@ -163,8 +151,7 @@ "granularity": 65536, "name": "New", "persistent": true, - "recording": true, - "status": "active" + "recording": true }, { "busy": false, @@ -172,8 +159,7 @@ "granularity": 65536, "name": "Newtwo", "persistent": true, - "recording": true, - "status": "active" + "recording": true }, { "busy": false, @@ -181,8 +167,7 @@ "granularity": 32768, "name": "Small", "persistent": true, - "recording": true, - "status": "active" + "recording": true }, { "busy": false, @@ -190,8 +175,7 @@ "granularity": 65536, "name": "Medium", "persistent": true, - "recording": true, - "status": "active" + "recording": true }, { "busy": false, @@ -199,8 +183,7 @@ "granularity": 131072, "name": "Large", "persistent": true, - "recording": true, - "status": "active" + "recording": true } ] } @@ -232,8 +215,7 @@ "granularity": 65536, "name": "NewB", "persistent": true, - "recording": true, - "status": "active" + "recording": true }, { "busy": false, @@ -241,8 +223,7 @@ "granularity": 65536, "name": "NewC", "persistent": true, - "recording": true, - "status": "active" + "recording": true }, { "busy": false, @@ -250,8 +231,7 @@ "granularity": 32768, "name": "Small", "persistent": true, - "recording": true, - "status": "active" + "recording": true }, { "busy": false, @@ -259,8 +239,7 @@ "granularity": 65536, "name": "Medium", "persistent": true, - "recording": true, - "status": "active" + "recording": true }, { "busy": false, @@ -268,8 +247,7 @@ "granularity": 131072, "name": "Large", "persistent": true, - "recording": true, - "status": "active" + "recording": true } ] } diff --git a/tests/qemu-iotests/254.out b/tests/qemu-iotests/254.out index d185c0532f..fe52da9338 100644 --- a/tests/qemu-iotests/254.out +++ b/tests/qemu-iotests/254.out @@ -99,8 +99,7 @@ query-block: device =3D drive0, node-name =3D snap, dirty= -bitmaps: "granularity": 65536, "name": "bitmap2", "persistent": true, - "recording": true, - "status": "active" + "recording": true }, { "busy": false, @@ -108,8 +107,7 @@ query-block: device =3D drive0, node-name =3D snap, dir= ty-bitmaps: "granularity": 65536, "name": "bitmap1", "persistent": true, - "recording": true, - "status": "active" + "recording": true }, { "busy": false, @@ -117,8 +115,7 @@ query-block: device =3D drive0, node-name =3D snap, dir= ty-bitmaps: "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] =20 diff --git a/tests/qemu-iotests/257.out b/tests/qemu-iotests/257.out index a7ba512f4c..50cbd8e882 100644 --- a/tests/qemu-iotests/257.out +++ b/tests/qemu-iotests/257.out @@ -58,8 +58,7 @@ write -P0x69 0x3fe0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -113,16 +112,14 @@ write -P0x67 0x3fe0000 0x20000 "count": 0, "granularity": 65536, "persistent": false, - "recording": false, - "status": "disabled" + "recording": false }, { "busy": false, "count": 458752, "granularity": 65536, "persistent": false, - "recording": true, - "status": "active" + "recording": true }, { "busy": true, @@ -130,8 +127,7 @@ write -P0x67 0x3fe0000 0x20000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "frozen" + "recording": true } ] } @@ -156,8 +152,7 @@ expecting 7 dirty sectors; have 7. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -185,8 +180,7 @@ write -P0xdd 0x3fc0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -234,8 +228,7 @@ expecting 15 dirty sectors; have 15. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -318,8 +311,7 @@ write -P0x69 0x3fe0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -367,8 +359,7 @@ expecting 6 dirty sectors; have 6. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -396,8 +387,7 @@ write -P0xdd 0x3fc0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -445,8 +435,7 @@ expecting 14 dirty sectors; have 14. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -529,8 +518,7 @@ write -P0x69 0x3fe0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -584,16 +572,14 @@ write -P0x67 0x3fe0000 0x20000 "count": 0, "granularity": 65536, "persistent": false, - "recording": false, - "status": "disabled" + "recording": false }, { "busy": false, "count": 458752, "granularity": 65536, "persistent": false, - "recording": true, - "status": "active" + "recording": true }, { "busy": true, @@ -601,8 +587,7 @@ write -P0x67 0x3fe0000 0x20000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "frozen" + "recording": true } ] } @@ -627,8 +612,7 @@ expecting 7 dirty sectors; have 7. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -656,8 +640,7 @@ write -P0xdd 0x3fc0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -705,8 +688,7 @@ expecting 15 dirty sectors; have 15. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -789,8 +771,7 @@ write -P0x69 0x3fe0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -844,16 +825,14 @@ write -P0x67 0x3fe0000 0x20000 "count": 0, "granularity": 65536, "persistent": false, - "recording": false, - "status": "disabled" + "recording": false }, { "busy": false, "count": 458752, "granularity": 65536, "persistent": false, - "recording": true, - "status": "active" + "recording": true }, { "busy": true, @@ -861,8 +840,7 @@ write -P0x67 0x3fe0000 0x20000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "frozen" + "recording": true } ] } @@ -887,8 +865,7 @@ expecting 7 dirty sectors; have 7. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -916,8 +893,7 @@ write -P0xdd 0x3fc0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -965,8 +941,7 @@ expecting 15 dirty sectors; have 15. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -1049,8 +1024,7 @@ write -P0x69 0x3fe0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -1098,8 +1072,7 @@ expecting 6 dirty sectors; have 6. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -1127,8 +1100,7 @@ write -P0xdd 0x3fc0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -1176,8 +1148,7 @@ expecting 14 dirty sectors; have 14. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -1260,8 +1231,7 @@ write -P0x69 0x3fe0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -1315,16 +1285,14 @@ write -P0x67 0x3fe0000 0x20000 "count": 0, "granularity": 65536, "persistent": false, - "recording": false, - "status": "disabled" + "recording": false }, { "busy": false, "count": 458752, "granularity": 65536, "persistent": false, - "recording": true, - "status": "active" + "recording": true }, { "busy": true, @@ -1332,8 +1300,7 @@ write -P0x67 0x3fe0000 0x20000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "frozen" + "recording": true } ] } @@ -1358,8 +1325,7 @@ expecting 7 dirty sectors; have 7. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -1387,8 +1353,7 @@ write -P0xdd 0x3fc0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -1436,8 +1401,7 @@ expecting 12 dirty sectors; have 12. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -1520,8 +1484,7 @@ write -P0x69 0x3fe0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -1575,16 +1538,14 @@ write -P0x67 0x3fe0000 0x20000 "count": 0, "granularity": 65536, "persistent": false, - "recording": false, - "status": "disabled" + "recording": false }, { "busy": false, "count": 458752, "granularity": 65536, "persistent": false, - "recording": true, - "status": "active" + "recording": true }, { "busy": true, @@ -1592,8 +1553,7 @@ write -P0x67 0x3fe0000 0x20000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "frozen" + "recording": true } ] } @@ -1618,8 +1578,7 @@ expecting 7 dirty sectors; have 7. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -1647,8 +1606,7 @@ write -P0xdd 0x3fc0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -1696,8 +1654,7 @@ expecting 12 dirty sectors; have 12. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -1780,8 +1737,7 @@ write -P0x69 0x3fe0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -1829,8 +1785,7 @@ expecting 6 dirty sectors; have 6. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -1858,8 +1813,7 @@ write -P0xdd 0x3fc0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -1907,8 +1861,7 @@ expecting 13 dirty sectors; have 13. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -1991,8 +1944,7 @@ write -P0x69 0x3fe0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -2046,16 +1998,14 @@ write -P0x67 0x3fe0000 0x20000 "count": 0, "granularity": 65536, "persistent": false, - "recording": false, - "status": "disabled" + "recording": false }, { "busy": false, "count": 458752, "granularity": 65536, "persistent": false, - "recording": true, - "status": "active" + "recording": true }, { "busy": true, @@ -2063,8 +2013,7 @@ write -P0x67 0x3fe0000 0x20000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "frozen" + "recording": true } ] } @@ -2089,8 +2038,7 @@ expecting 7 dirty sectors; have 7. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -2118,8 +2066,7 @@ write -P0xdd 0x3fc0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -2167,8 +2114,7 @@ expecting 12 dirty sectors; have 12. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -2251,8 +2197,7 @@ write -P0x69 0x3fe0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -2306,16 +2251,14 @@ write -P0x67 0x3fe0000 0x20000 "count": 0, "granularity": 65536, "persistent": false, - "recording": false, - "status": "disabled" + "recording": false }, { "busy": false, "count": 458752, "granularity": 65536, "persistent": false, - "recording": true, - "status": "active" + "recording": true }, { "busy": true, @@ -2323,8 +2266,7 @@ write -P0x67 0x3fe0000 0x20000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "frozen" + "recording": true } ] } @@ -2349,8 +2291,7 @@ expecting 7 dirty sectors; have 7. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -2378,8 +2319,7 @@ write -P0xdd 0x3fc0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -2427,8 +2367,7 @@ expecting 15 dirty sectors; have 15. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -2511,8 +2450,7 @@ write -P0x69 0x3fe0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -2560,8 +2498,7 @@ expecting 6 dirty sectors; have 6. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -2589,8 +2526,7 @@ write -P0xdd 0x3fc0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -2638,8 +2574,7 @@ expecting 14 dirty sectors; have 14. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -2722,8 +2657,7 @@ write -P0x69 0x3fe0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -2777,16 +2711,14 @@ write -P0x67 0x3fe0000 0x20000 "count": 0, "granularity": 65536, "persistent": false, - "recording": false, - "status": "disabled" + "recording": false }, { "busy": false, "count": 458752, "granularity": 65536, "persistent": false, - "recording": true, - "status": "active" + "recording": true }, { "busy": true, @@ -2794,8 +2726,7 @@ write -P0x67 0x3fe0000 0x20000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "frozen" + "recording": true } ] } @@ -2820,8 +2751,7 @@ expecting 7 dirty sectors; have 7. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -2849,8 +2779,7 @@ write -P0xdd 0x3fc0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -2898,8 +2827,7 @@ expecting 12 dirty sectors; have 12. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -2982,8 +2910,7 @@ write -P0x69 0x3fe0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -3037,16 +2964,14 @@ write -P0x67 0x3fe0000 0x20000 "count": 0, "granularity": 65536, "persistent": false, - "recording": false, - "status": "disabled" + "recording": false }, { "busy": false, "count": 458752, "granularity": 65536, "persistent": false, - "recording": true, - "status": "active" + "recording": true }, { "busy": true, @@ -3054,8 +2979,7 @@ write -P0x67 0x3fe0000 0x20000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "frozen" + "recording": true } ] } @@ -3080,8 +3004,7 @@ expecting 7 dirty sectors; have 7. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -3109,8 +3032,7 @@ write -P0xdd 0x3fc0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -3158,8 +3080,7 @@ expecting 12 dirty sectors; have 12. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -3242,8 +3163,7 @@ write -P0x69 0x3fe0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -3291,8 +3211,7 @@ expecting 6 dirty sectors; have 6. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -3320,8 +3239,7 @@ write -P0xdd 0x3fc0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -3369,8 +3287,7 @@ expecting 1014 dirty sectors; have 1014. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -3453,8 +3370,7 @@ write -P0x69 0x3fe0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -3508,16 +3424,14 @@ write -P0x67 0x3fe0000 0x20000 "count": 0, "granularity": 65536, "persistent": false, - "recording": false, - "status": "disabled" + "recording": false }, { "busy": false, "count": 458752, "granularity": 65536, "persistent": false, - "recording": true, - "status": "active" + "recording": true }, { "busy": true, @@ -3525,8 +3439,7 @@ write -P0x67 0x3fe0000 0x20000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "frozen" + "recording": true } ] } @@ -3551,8 +3464,7 @@ expecting 7 dirty sectors; have 7. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -3580,8 +3492,7 @@ write -P0xdd 0x3fc0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -3629,8 +3540,7 @@ expecting 12 dirty sectors; have 12. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -3713,8 +3623,7 @@ write -P0x69 0x3fe0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -3768,16 +3677,14 @@ write -P0x67 0x3fe0000 0x20000 "count": 0, "granularity": 65536, "persistent": false, - "recording": false, - "status": "disabled" + "recording": false }, { "busy": false, "count": 458752, "granularity": 65536, "persistent": false, - "recording": true, - "status": "active" + "recording": true }, { "busy": true, @@ -3785,8 +3692,7 @@ write -P0x67 0x3fe0000 0x20000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "frozen" + "recording": true } ] } @@ -3811,8 +3717,7 @@ expecting 7 dirty sectors; have 7. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -3840,8 +3745,7 @@ write -P0xdd 0x3fc0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -3889,8 +3793,7 @@ expecting 15 dirty sectors; have 15. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -3973,8 +3876,7 @@ write -P0x69 0x3fe0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -4022,8 +3924,7 @@ expecting 6 dirty sectors; have 6. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -4051,8 +3952,7 @@ write -P0xdd 0x3fc0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -4100,8 +4000,7 @@ expecting 14 dirty sectors; have 14. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -4184,8 +4083,7 @@ write -P0x69 0x3fe0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -4239,16 +4137,14 @@ write -P0x67 0x3fe0000 0x20000 "count": 0, "granularity": 65536, "persistent": false, - "recording": false, - "status": "disabled" + "recording": false }, { "busy": false, "count": 458752, "granularity": 65536, "persistent": false, - "recording": true, - "status": "active" + "recording": true }, { "busy": true, @@ -4256,8 +4152,7 @@ write -P0x67 0x3fe0000 0x20000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "frozen" + "recording": true } ] } @@ -4282,8 +4177,7 @@ expecting 7 dirty sectors; have 7. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -4311,8 +4205,7 @@ write -P0xdd 0x3fc0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -4360,8 +4253,7 @@ expecting 12 dirty sectors; have 12. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -4444,8 +4336,7 @@ write -P0x69 0x3fe0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -4499,16 +4390,14 @@ write -P0x67 0x3fe0000 0x20000 "count": 0, "granularity": 65536, "persistent": false, - "recording": false, - "status": "disabled" + "recording": false }, { "busy": false, "count": 458752, "granularity": 65536, "persistent": false, - "recording": true, - "status": "active" + "recording": true }, { "busy": true, @@ -4516,8 +4405,7 @@ write -P0x67 0x3fe0000 0x20000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "frozen" + "recording": true } ] } @@ -4542,8 +4430,7 @@ expecting 7 dirty sectors; have 7. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -4571,8 +4458,7 @@ write -P0xdd 0x3fc0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -4620,8 +4506,7 @@ expecting 12 dirty sectors; have 12. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -4704,8 +4589,7 @@ write -P0x69 0x3fe0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -4753,8 +4637,7 @@ expecting 6 dirty sectors; have 6. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -4782,8 +4665,7 @@ write -P0xdd 0x3fc0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -4831,8 +4713,7 @@ expecting 14 dirty sectors; have 14. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -4915,8 +4796,7 @@ write -P0x69 0x3fe0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -4970,16 +4850,14 @@ write -P0x67 0x3fe0000 0x20000 "count": 0, "granularity": 65536, "persistent": false, - "recording": false, - "status": "disabled" + "recording": false }, { "busy": false, "count": 458752, "granularity": 65536, "persistent": false, - "recording": true, - "status": "active" + "recording": true }, { "busy": true, @@ -4987,8 +4865,7 @@ write -P0x67 0x3fe0000 0x20000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "frozen" + "recording": true } ] } @@ -5013,8 +4890,7 @@ expecting 7 dirty sectors; have 7. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -5042,8 +4918,7 @@ write -P0xdd 0x3fc0000 0x10000 "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } @@ -5091,8 +4966,7 @@ expecting 12 dirty sectors; have 12. OK! "granularity": 65536, "name": "bitmap0", "persistent": false, - "recording": true, - "status": "active" + "recording": true } ] } --=20 2.29.2 From nobody Sun Apr 28 16:18:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614172645; cv=none; d=zohomail.com; s=zohoarc; b=DJum4ld0+Nq1C2iLUqxWANG8BMgx1SA//QeaYNAeQh0bHgPXscell68ewA51fmy1ZN6NYW1wwy7FmmGVHYKMPN/QP61JWRvru6E35B+wNOKslrzfWwRmFAQBHrV/xsiAiV5d29Mvu+Wtn2nNNWqVXp1gFFwGv4JjePIfNrlCSDw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614172645; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=NKrTjeI+mAvMD/XR5Yf2hfapbBt3p9gKEhYgtI1iM1M=; b=Vc3ct3QMLabAI51kFK9JA845bNDHZfnrJM1EU5ZAOR8viaH7jkShIOYCXfT6PMXBJqkoW64Bi8H5TWB5QY+v34i6tZOPlcxsgmv0uVuFI8Ndh28DHrjLbweqh/eJsBaDkStcYy9emznI/ps0t9x9jcbFGQzli3hbRrOnmhBGYs0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1614172645759614.0918187311897; Wed, 24 Feb 2021 05:17:25 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-492-8RZu1o3fPt6KwYJXxnu-vg-1; Wed, 24 Feb 2021 08:17:22 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CC2D51052067; Wed, 24 Feb 2021 13:17:16 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A5FD65D6D3; Wed, 24 Feb 2021 13:17:16 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6A18A58074; Wed, 24 Feb 2021 13:17:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11ODHEck012315 for ; Wed, 24 Feb 2021 08:17:14 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2B37210023AE; Wed, 24 Feb 2021 13:17:14 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-119.ams2.redhat.com [10.36.115.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id 867BB100AE2E; Wed, 24 Feb 2021 13:16:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614172644; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=NKrTjeI+mAvMD/XR5Yf2hfapbBt3p9gKEhYgtI1iM1M=; b=LgVOL12mHU3jtcGEptgJZ0BZ0KaG3oWHWBzLDQ0dP9IsHvzJHfXRJ797RF4u8eq/pRUPIi M/lr0BQ6xyFIIyz1wl1cwfp0TufcnI0AgmnBdu3SwGxrOkL0Viskwffd5j7bHqoTLoXEFo kqmcwPhL78P3oNBDkI9gNB6WFmbaRGQ= X-MC-Unique: 8RZu1o3fPt6KwYJXxnu-vg-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 13/14] block: remove 'dirty-bitmaps' field from 'BlockInfo' struct Date: Wed, 24 Feb 2021 13:11:41 +0000 Message-Id: <20210224131142.1952027-14-berrange@redhat.com> In-Reply-To: <20210224131142.1952027-1-berrange@redhat.com> References: <20210224131142.1952027-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Fam Zheng , "Michael S. Tsirkin" , libvir-list@redhat.com, Mark Cave-Ayland , Gerd Hoffmann , qemu-block@nongnu.org, Juan Quintela , Wainer dos Santos Moschetta , Marcel Apfelbaum , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , "Dr. David Alan Gilbert" , Greg Kurz , Cleber Rosa , John Snow , David Gibson , Kevin Wolf , Vladimir Sementsov-Ogievskiy , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The same data is available in the 'BlockDeviceInfo' struct. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/qapi.c | 5 ----- docs/system/deprecated.rst | 13 ------------- docs/system/removed-features.rst | 13 +++++++++++++ qapi/block-core.json | 11 +---------- tests/qemu-iotests/194 | 4 ++-- tests/qemu-iotests/236 | 2 +- tests/qemu-iotests/246 | 3 ++- tests/qemu-iotests/254 | 2 +- tests/qemu-iotests/260 | 5 +++-- 9 files changed, 23 insertions(+), 35 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index 3acc118c44..943e7b15ad 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -383,11 +383,6 @@ static void bdrv_query_info(BlockBackend *blk, BlockIn= fo **p_info, info->io_status =3D blk_iostatus(blk); } =20 - if (bs && !QLIST_EMPTY(&bs->dirty_bitmaps)) { - info->has_dirty_bitmaps =3D true; - info->dirty_bitmaps =3D bdrv_query_dirty_bitmaps(bs); - } - if (bs && bs->drv) { info->has_inserted =3D true; info->inserted =3D bdrv_block_device_info(blk, bs, false, errp); diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index a8ac104c19..dc76584e02 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -162,19 +162,6 @@ Use arguments ``base-node`` and ``top-node`` instead. =20 Specify the properties for the object as top-level arguments instead. =20 -``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 t= he -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. - ``nbd-server-add`` and ``nbd-server-remove`` (since 5.2) '''''''''''''''''''''''''''''''''''''''''''''''''''''''' =20 diff --git a/docs/system/removed-features.rst b/docs/system/removed-feature= s.rst index 725a316a4e..990bf7e015 100644 --- a/docs/system/removed-features.rst +++ b/docs/system/removed-features.rst @@ -129,6 +129,19 @@ The ``status`` field of the ``BlockDirtyInfo`` structu= re, returned by these commands is deprecated. Two new boolean fields, ``recording`` and ``busy`` effectively replace it. =20 +``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 deprecated. The ``dirty-bitmaps`` +field of the ``BlockDeviceInfo`` struct should be used instead, which is t= he +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. + Human Monitor Protocol (HMP) commands ------------------------------------- =20 diff --git a/qapi/block-core.json b/qapi/block-core.json index 2a0c345c2c..0399449e13 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -539,9 +539,6 @@ # @tray_open: True if the device's tray is open # (only present if it has a tray) # -# @dirty-bitmaps: dirty bitmaps information (only present if the -# driver has one or more dirty bitmaps) (Since 2.0) -# # @io-status: @BlockDeviceIoStatus. Only present if the device # supports it and the VM is configured to stop on errors # (supported device models: virtio-blk, IDE, SCSI except @@ -550,18 +547,12 @@ # @inserted: @BlockDeviceInfo describing the device if media is # present # -# Features: -# @deprecated: Member @dirty-bitmaps is deprecated. Use @inserted -# member @dirty-bitmaps instead. -# # Since: 0.14 ## { 'struct': 'BlockInfo', 'data': {'device': 'str', '*qdev': 'str', 'type': 'str', 'removable': 'b= ool', 'locked': 'bool', '*inserted': 'BlockDeviceInfo', - '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus', - '*dirty-bitmaps': { 'type': ['BlockDirtyInfo'], - 'features': [ 'deprecated' ] } } } + '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus' } } =20 ## # @BlockMeasureInfo: diff --git a/tests/qemu-iotests/194 b/tests/qemu-iotests/194 index 3889266afa..e44b8df728 100755 --- a/tests/qemu-iotests/194 +++ b/tests/qemu-iotests/194 @@ -95,7 +95,7 @@ with iotests.FilePath('source.img') as source_img_path, \ iotests.log(event, filters=3D[iotests.filter_qmp_event]) =20 iotests.log('Check bitmaps on source:') - iotests.log(source_vm.qmp('query-block')['return'][0]['dirty-bitmaps']) + iotests.log(source_vm.qmp('query-block')['return'][0]['inserted']['dir= ty-bitmaps']) =20 iotests.log('Check bitmaps on target:') - iotests.log(dest_vm.qmp('query-block')['return'][0]['dirty-bitmaps']) + iotests.log(dest_vm.qmp('query-block')['return'][0]['inserted']['dirty= -bitmaps']) diff --git a/tests/qemu-iotests/236 b/tests/qemu-iotests/236 index f6c44517d6..20419bbb9e 100755 --- a/tests/qemu-iotests/236 +++ b/tests/qemu-iotests/236 @@ -39,7 +39,7 @@ overwrite =3D [("0xab", "0", "64k"), # Full overw= rite =20 def query_bitmaps(vm): res =3D vm.qmp("query-block") - return { "bitmaps": { device['device']: device.get('dirty-bitmaps', []= ) for + return { "bitmaps": { device['device']: device.get('inserted', {}).get= ('dirty-bitmaps', []) for device in res['return'] } } =20 with iotests.FilePath('img') as img_path, \ diff --git a/tests/qemu-iotests/246 b/tests/qemu-iotests/246 index fa3102c546..5932a0e8a9 100755 --- a/tests/qemu-iotests/246 +++ b/tests/qemu-iotests/246 @@ -30,7 +30,8 @@ gran_large =3D 128 * 1024 =20 def query_bitmaps(vm): res =3D vm.qmp("query-block") - return { "bitmaps": { device['device']: device.get('dirty-bitmaps', []= ) for + return { "bitmaps": { device['device']: device.get('inserted', {}) + .get('dirty-bitmaps', []) for device in res['return'] } } =20 with iotests.FilePath('img') as img_path, \ diff --git a/tests/qemu-iotests/254 b/tests/qemu-iotests/254 index 49da948407..108bf5f894 100755 --- a/tests/qemu-iotests/254 +++ b/tests/qemu-iotests/254 @@ -73,7 +73,7 @@ vm.qmp_log('transaction', indent=3D2, actions=3D[ result =3D vm.qmp('query-block')['return'][0] log("query-block: device =3D {}, node-name =3D {}, dirty-bitmaps:".format( result['device'], result['inserted']['node-name'])) -log(result['dirty-bitmaps'], indent=3D2) +log(result['inserted']['dirty-bitmaps'], indent=3D2) log("\nbitmaps in backing image:") log(result['inserted']['image']['backing-image']['format-specific'] \ ['data']['bitmaps'], indent=3D2) diff --git a/tests/qemu-iotests/260 b/tests/qemu-iotests/260 index a35cb7b61f..2ec64a9b99 100755 --- a/tests/qemu-iotests/260 +++ b/tests/qemu-iotests/260 @@ -32,8 +32,9 @@ size =3D 64 * 1024 * 3 =20 def print_bitmap(msg, vm): result =3D vm.qmp('query-block')['return'][0] - if 'dirty-bitmaps' in result: - bitmap =3D result['dirty-bitmaps'][0] + info =3D result.get("inserted", {}) + if 'dirty-bitmaps' in info: + bitmap =3D info['dirty-bitmaps'][0] log('{}: name=3D{} dirty-clusters=3D{}'.format(msg, bitmap['name'], bitmap['count'] // 64 // 1024)) else: --=20 2.29.2 From nobody Sun Apr 28 16:18:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614172670; cv=none; d=zohomail.com; s=zohoarc; b=ImllXwhChCTRys7R6c7m1zzwvIosViwpPdurjEAKy1LpbmGQw/n2jJ0e2jzdl2f9l3m68oFDw6zf+ejyP6LYV7r/ijvp8/8tgoJWMu1stEKoCksb4XR+TDfwwDwX+h03kpaxvoc6cxsjmDk4MdRjKrP6YeU7CIJGZ3yUjLFigkM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614172670; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=oypxNtzraYDLXzirYnap4GAZprBPwtAniiaXz4f/554=; b=jPR9INpS7Ir4006NOccr3YSI2Tl+4ZvTwwRDt51rRQ14QMW107CqLtiGJCF1EPpUUCOdsF/p1z08VBTtBqWdursQMJ2Zbm2ZTn9E+o9Kmrp9OEr5hS+EQHyseRTeXR0LU6BoeKZppEPwVV2zJZp+1UAZwnAmlB8hDa/4mnLtc+I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1614172670214444.18193596005744; Wed, 24 Feb 2021 05:17:50 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-69-Vh116MUgOt6fcfbKC_gYSQ-1; Wed, 24 Feb 2021 08:17:46 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4995485EE61; Wed, 24 Feb 2021 13:17:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1EE4210016F6; Wed, 24 Feb 2021 13:17:40 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D4E9118095CC; Wed, 24 Feb 2021 13:17:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11ODHcGC012488 for ; Wed, 24 Feb 2021 08:17:38 -0500 Received: by smtp.corp.redhat.com (Postfix) id 574CC10021AA; Wed, 24 Feb 2021 13:17:38 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-119.ams2.redhat.com [10.36.115.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id 86D7A10016F6; Wed, 24 Feb 2021 13:17:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614172669; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=oypxNtzraYDLXzirYnap4GAZprBPwtAniiaXz4f/554=; b=Qoz8iGOqdun36MthQ/9roCQ70OP6pyfSHqN2NzXyW5H01INayDgdvY3a92QJmByCRlmEPZ U/ojvD6gV34iL8kQu+pJPPnS+S4RJSXa76LLNDNdKu6Kg2FRQU44WbfcMB3yoFKaaaVBSR byOZtftKcTLA+KYeotzhjqNcMCbvBMU= X-MC-Unique: Vh116MUgOt6fcfbKC_gYSQ-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 14/14] block: remove support for using "file" driver with block/char devices Date: Wed, 24 Feb 2021 13:11:42 +0000 Message-Id: <20210224131142.1952027-15-berrange@redhat.com> In-Reply-To: <20210224131142.1952027-1-berrange@redhat.com> References: <20210224131142.1952027-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Fam Zheng , "Michael S. Tsirkin" , libvir-list@redhat.com, Mark Cave-Ayland , Gerd Hoffmann , qemu-block@nongnu.org, Juan Quintela , Wainer dos Santos Moschetta , Marcel Apfelbaum , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , "Dr. David Alan Gilbert" , Greg Kurz , Cleber Rosa , John Snow , David Gibson , Kevin Wolf , Vladimir Sementsov-Ogievskiy , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The 'host_device' and 'host_cdrom' drivers must be used instead. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Eric Blake --- block/file-posix.c | 17 ++++++----------- docs/system/deprecated.rst | 7 ------- docs/system/removed-features.rst | 7 +++++++ tests/qemu-iotests/226.out | 10 +++++----- 4 files changed, 18 insertions(+), 23 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index 05079b40ca..20e14f8e96 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -719,15 +719,9 @@ static int raw_open_common(BlockDriverState *bs, QDict= *options, } =20 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' driv= er, " - "but something else was given", bs->drv->format_nam= e); + if (!S_ISREG(st.st_mode)) { + error_setg(errp, "'%s' driver requires '%s' to be a regular fi= le", + bs->drv->format_name, bs->filename); ret =3D -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 =3D -EINVAL; goto fail; } diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index dc76584e02..3a86deb450 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -21,13 +21,6 @@ deprecated. System emulator command line arguments -------------------------------------- =20 -``-drive file=3Djson:{...{'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. - ``QEMU_AUDIO_`` environment variables and ``-audio-help`` (since 4.0) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' =20 diff --git a/docs/system/removed-features.rst b/docs/system/removed-feature= s.rst index 990bf7e015..1c9e384cb0 100644 --- a/docs/system/removed-features.rst +++ b/docs/system/removed-features.rst @@ -59,6 +59,13 @@ would automatically enable USB support on the machine ty= pe. When using the new syntax, USB support must be explicitly enabled via the ``-machine usb=3Don`` argument. =20 +``-drive file=3Djson:{...{'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 ------------------------------------ =20 diff --git a/tests/qemu-iotests/226.out b/tests/qemu-iotests/226.out index 42be973ff2..55504d29c4 100644 --- a/tests/qemu-iotests/226.out +++ b/tests/qemu-iotests/226.out @@ -3,23 +3,23 @@ QA output created by 226 =3D=3D=3D Testing with driver:file =3D=3D=3D =20 =3D=3D Testing RO =3D=3D -qemu-io: can't open: A regular file was expected by the 'file' driver, but= something else was given -qemu-io: warning: Opening a character device as a file using the 'file' dr= iver is deprecated +qemu-io: can't open: 'file' driver requires 'TEST_DIR/t.IMGFMT' to be a re= gular file +qemu-io: can't open: 'file' driver requires '/dev/null' to be a regular fi= le =3D=3D Testing RW =3D=3D qemu-io: can't open: Could not open 'TEST_DIR/t.IMGFMT': Is a directory -qemu-io: warning: Opening a character device as a file using the 'file' dr= iver is deprecated +qemu-io: can't open: 'file' driver requires '/dev/null' to be a regular fi= le =20 =3D=3D=3D Testing with driver:host_device =3D=3D=3D =20 =3D=3D Testing RO =3D=3D -qemu-io: can't open: 'host_device' driver expects either a character or bl= ock device +qemu-io: can't open: 'host_device' driver requires 'TEST_DIR/t.IMGFMT' to = be either a character or block device =3D=3D Testing RW =3D=3D qemu-io: can't open: Could not open 'TEST_DIR/t.IMGFMT': Is a directory =20 =3D=3D=3D Testing with driver:host_cdrom =3D=3D=3D =20 =3D=3D Testing RO =3D=3D -qemu-io: can't open: 'host_cdrom' driver expects either a character or blo= ck device +qemu-io: can't open: 'host_cdrom' driver requires 'TEST_DIR/t.IMGFMT' to b= e either a character or block device =3D=3D Testing RW =3D=3D qemu-io: can't open: Could not open 'TEST_DIR/t.IMGFMT': Is a directory =20 --=20 2.29.2