From patchwork Wed May 24 13:39:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 685350 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp257498wrt; Wed, 24 May 2023 06:41:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Q508it4jhz5YoWbzExlFuZ9JOvY8+xSq/h9u3WRZmse708rogSW+CnmbkiWhfoGuIDmyt X-Received: by 2002:a05:6214:29e9:b0:625:8b9a:b426 with SMTP id jv9-20020a05621429e900b006258b9ab426mr7697414qvb.46.1684935675606; Wed, 24 May 2023 06:41:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684935675; cv=none; d=google.com; s=arc-20160816; b=tmbwxiNrtKtqixy2zgseozRPcRVQ5wFj849l56/BMrh1Sns4iiTxcDUQS+bCVlVmbO bVqSoWw/sgwOauQb4KNW23p8mqoS3CL7KAnOYEW7E74F7ptP1wnEsNEnDcEeLn7pwUSj y/bRl8ryeKZFPrPQA8b2a/EOXwqoBIsVLVkJoVc+1K66RzN8lbrZ/e07vBokuOGyAi9g yx5oQUMjXIOfPBWJlrrqIvoqxfu9ws1lMgkOo3TZFdgOffjyZ0xZ53geCnvVEgPkUNs9 y5P4r3ymABFnoquComysCFBWopJcd57VU2RKYHkHUxseVPEbhMpnbbqnOt8k0CB1gG9C oEkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=o8t/+YNw/1eSOPZpziklGn9RfJ8rpI03v6Iz3JI+Nis=; b=YVdMBYUijvQZ+H1JI4iuEJRTvAh3oX4whq6xAZmhOdbu2KJ7MiPvvh4VUwa/3HBgH1 vV26Epln96dYBgOn5EuLvLNa+IHL+NRiWxeNbcQYd1gC5fIrNFcw574GNto/2QC8qXoT vSSAoXA4I1LXVDXeFdF4/msLe3YyjJuUSVvNueZQD8MSgvIsVyhByCskDlFRD8iiC4Nd 6VR3iRAWpKV6S7xg5lfJlM58ktWXHBSME8JuQ/SgOAJBxxdbxd7U/TgSqU/7xu+tDKHl jfNsE5OnwCArc1jrsWTi88p8mXDxUJsf/PgRAuyY1cK6587seZXtj67ZQyr4sDuuzYvh 8rSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="c7r/IPmz"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k6-20020ac85fc6000000b003ef49fe5460si6691286qta.765.2023.05.24.06.41.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 May 2023 06:41:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="c7r/IPmz"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1oij-0008KL-SO; Wed, 24 May 2023 09:40:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1oie-0008DA-Dj for qemu-devel@nongnu.org; Wed, 24 May 2023 09:40:01 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1oib-0003m7-Rg for qemu-devel@nongnu.org; Wed, 24 May 2023 09:39:59 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-3078a3f3b5fso853753f8f.0 for ; Wed, 24 May 2023 06:39:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684935596; x=1687527596; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=o8t/+YNw/1eSOPZpziklGn9RfJ8rpI03v6Iz3JI+Nis=; b=c7r/IPmz4+dCI2ecMOxeIYY/cmrdZ0Ww4+tpx2GLjdV6yJ/zaBwYChz3kF1lRfksR8 zbTdA64H1xf8fI9rNnph1G3cysabyea57TSuTI4iRwYCzhVUmVojzxaDXweixWgjWWQu bLDrTzeLUoLzv+YbAW2/2a2YSoHNPvpGOj3p09mgbuvy5+f/bOxKphmtpBIo/fMW2Dzp cOw5Rbwh57is3ULKQmc8eI62IWI8tkPTUlgJ4GIKxdqKc1cT8JG9HyB8liS6G2OhdOnk 7oYFef9EQGZbQkckzPAklUwuQO46990P+ZetUZJ9ebod/JzcRdVtD6w9oIFhjSFOfEpz vQJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684935596; x=1687527596; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o8t/+YNw/1eSOPZpziklGn9RfJ8rpI03v6Iz3JI+Nis=; b=QLJ832G2iYayHFtMeTj5VUM7zWOiTK5gn0+tKqcFi/AU9aTMfHV0Z6Atxfe95jaZJV 1jKiE2bfQwzyGJu9CeEzRZXsiFFGwung+68boBQDYopdYa0fjVkPs072GlbIHzWSH1KY BPeZ8xNP8asrn4LdGNSMx4tPyz0OnY4NSTrBAhkwyy4B2bE6ZbE8OxfIFnfVuNtT4rJv oQk4/gdMJgduK7ucAjkjCVWeXUlgaVQ8d5J7eIdvLre3I8IH8hSkh/8TvbKvtX1ll6Ov laq6e/28Ck4h8NA7trNVcZu6k30rfZJL7bf4vC66xoSEboRttn47/JOB6amEEXnYVFrE VPjQ== X-Gm-Message-State: AC+VfDzrdfBnaazp3/5sZIexhEAgRGgSOkf6iC/Yc2p5oJbx3Si1YkX/ iYez+l5YQS4Ih4kB0/3JSk+NSA== X-Received: by 2002:a5d:6ace:0:b0:306:3945:65e9 with SMTP id u14-20020a5d6ace000000b00306394565e9mr13786975wrw.3.1684935596080; Wed, 24 May 2023 06:39:56 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id y10-20020adff6ca000000b002f103ca90cdsm14555961wrp.101.2023.05.24.06.39.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 06:39:55 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7F1751FFC0; Wed, 24 May 2023 14:39:53 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Kyle Evans , libvir-list@redhat.com, =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= , Greg Kurz , Eric Blake , Markus Armbruster , Warner Losh , Marcel Apfelbaum , Eduardo Habkost , Michael Roth , Richard Henderson , Christian Schoenebeck , Riku Voipio , Paolo Bonzini , Yanan Wang , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v5 05/10] qapi: make the vcpu parameters deprecated for 8.1 Date: Wed, 24 May 2023 14:39:47 +0100 Message-Id: <20230524133952.3971948-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230524133952.3971948-1-alex.bennee@linaro.org> References: <20230524133952.3971948-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org I don't think I can remove the parameters directly but certainly mark them as deprecated. Reviewed-by: Stefan Hajnoczi Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20230523125000.3674739-6-alex.bennee@linaro.org> --- v5 - reword match description - fix reference to return for set operation --- docs/about/deprecated.rst | 9 +++++++++ qapi/trace.json | 40 +++++++++++++++++---------------------- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index e934e0a13a..e44cde057f 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -254,6 +254,15 @@ it. Since all recent x86 hardware from the past >10 years is capable of the QEMU API (QAPI) events ---------------------- +``vcpu`` trace events (since 8.1) +''''''''''''''''''''''''''''''''' + +The ability to instrument QEMU helper functions with vcpu aware trace +points was removed in 7.0. However the QAPI still exposed the vcpu +parameter. This argument has now been deprecated and the remaining +used trace points converted to plain trace points selected just by +name. + ``MEM_UNPLUG_ERROR`` (since 6.2) '''''''''''''''''''''''''''''''''''''''''''''''''''''''' diff --git a/qapi/trace.json b/qapi/trace.json index 6bf0af0946..e561f3d3da 100644 --- a/qapi/trace.json +++ b/qapi/trace.json @@ -37,13 +37,14 @@ # # @vcpu: Whether this is a per-vCPU event (since 2.7). # -# An event is per-vCPU if it has the "vcpu" property in the -# "trace-events" files. +# Features: +# @deprecated: Member @vcpu is deprecated, and always false. # # Since: 2.2 ## { 'struct': 'TraceEventInfo', - 'data': {'name': 'str', 'state': 'TraceEventState', 'vcpu': 'bool'} } + 'data': {'name': 'str', 'state': 'TraceEventState', + 'vcpu': { 'type': 'bool', 'features': ['deprecated'] } } } ## # @trace-event-get-state: @@ -52,19 +53,15 @@ # # @name: Event name pattern (case-sensitive glob). # -# @vcpu: The vCPU to query (any by default; since 2.7). +# @vcpu: The vCPU to query (since 2.7). # -# Returns: a list of @TraceEventInfo for the matching events -# -# An event is returned if: +# Features: +# @deprecated: Member @vcpu is deprecated, and always false. # -# - its name matches the @name pattern, and -# - if @vcpu is given, the event has the "vcpu" property. +# Returns: a list of @TraceEventInfo for the matching events # -# Therefore, if @vcpu is given, the operation will only match per-vCPU -# events, returning their state on the specified vCPU. Special case: -# if @name is an exact match, @vcpu is given and the event does not -# have the "vcpu" property, an error is returned. +# An event is returned if its name matches the @name pattern +# (There are no longer any per-vCPU events). # # Since: 2.2 # @@ -75,7 +72,8 @@ # <- { "return": [ { "name": "qemu_memalign", "state": "disabled", "vcpu": false } ] } ## { 'command': 'trace-event-get-state', - 'data': {'name': 'str', '*vcpu': 'int'}, + 'data': {'name': 'str', + '*vcpu': {'type': 'int', 'features': ['deprecated'] } }, 'returns': ['TraceEventInfo'] } ## @@ -91,15 +89,11 @@ # # @vcpu: The vCPU to act upon (all by default; since 2.7). # -# An event's state is modified if: -# -# - its name matches the @name pattern, and -# - if @vcpu is given, the event has the "vcpu" property. +# Features: +# @deprecated: Member @vcpu is deprecated, and always false. # -# Therefore, if @vcpu is given, the operation will only match per-vCPU -# events, setting their state on the specified vCPU. Special case: if -# @name is an exact match, @vcpu is given and the event does not have -# the "vcpu" property, an error is returned. +# An event is enabled if its name matches the @name pattern +# (There are no longer any per-vCPU events). # # Since: 2.2 # @@ -111,4 +105,4 @@ ## { 'command': 'trace-event-set-state', 'data': {'name': 'str', 'enable': 'bool', '*ignore-unavailable': 'bool', - '*vcpu': 'int'} } + '*vcpu': {'type': 'int', 'features': ['deprecated'] } } }