From patchwork Thu Dec 7 15:45:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 751076 Delivered-To: patch@linaro.org Received: by 2002:adf:a499:0:b0:333:3a04:f257 with SMTP id g25csp502872wrb; Thu, 7 Dec 2023 07:48:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IEx6460KhdOMevTDBqwTNgAwyM1Cmca+FTmNVQatnrXLEOguVqvVYtUql2Wl36nP2bz1niP X-Received: by 2002:a05:6102:162a:b0:465:d88a:4e53 with SMTP id cu42-20020a056102162a00b00465d88a4e53mr3045843vsb.14.1701964113807; Thu, 07 Dec 2023 07:48:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701964113; cv=none; d=google.com; s=arc-20160816; b=AVl5AqQSje5ou6ikoNBuuGg/pc6DvvSm6eGku+pUVJc0blSiQp1ysHSaIGDHHc5AiD 3ZWlmmoXJPK69zupi1QFOYq+jiiBFc72DzM/THkGhjJ0kw4apc3xLB2ihKxsXFK9hNPK MYAvt+F5cNNchi4pnok2c8w04DOco0/xNa+RFyhOVO7RqcvutNYrT48xpfT9E1a94ALa A8hAteopPQHNH5LE+Af2RWjybcNgSYLFlWDYC53/9RBONZJaJshTE4IL/h2AKOTb/cnA gZEwHpCtEk6ALpg6D0j2+TO8+9j051A/Igm63W4hEZoeyXvbp6I23uCJasPqhvwFTQNU YFvA== 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=VDQz48eWGvAAxBK49fKsnjDhuFSF5WlUTAlWJ/FVbAE=; fh=A8ftaDMzewcMA0xKw++MSYMuCBPymoWdeCEx+9KcU8w=; b=ENkF6WdetrfHsbewOtULINa5HLetRUIsGlvT0zHofhTPNZg56jIteswYsKFpxGbGv7 +h8p14b9w58uPjWwlsqzoHkdZOkP5LfD7YC+YiwkS12ivDf50rsMtFWhZQBgCfkoq/FJ tmj9DzrdxyfVKg0cp/uc8V3JWQx9Ceh7hqgFY58w+7SHti2UQ0GQwDp8f77gU9Qouz3G 21fhWvXpzGIZFlyhDfpigRuHY4HQxsea7KCNdxcOgI4zwXbmjgZecgKCIeXhQ3XwwvtE GTiT57exYX+gcfpV2fXf1WVj0UzJGP8iEaXPAHZgH3KLlLU/3LvMt5o7YObxDyQC3Nkw fR4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tOYSHLqw; 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 d24-20020a056102041800b0046488a5d93fsi23248vsq.525.2023.12.07.07.48.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Dec 2023 07:48:33 -0800 (PST) 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=tOYSHLqw; 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 1rBGa3-0000mX-1w; Thu, 07 Dec 2023 10:46:27 -0500 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 1rBGa0-0000ks-C7 for qemu-devel@nongnu.org; Thu, 07 Dec 2023 10:46:24 -0500 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rBGZw-0002BB-57 for qemu-devel@nongnu.org; Thu, 07 Dec 2023 10:46:23 -0500 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-54cff638658so1475013a12.1 for ; Thu, 07 Dec 2023 07:46:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701963977; x=1702568777; darn=nongnu.org; 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=VDQz48eWGvAAxBK49fKsnjDhuFSF5WlUTAlWJ/FVbAE=; b=tOYSHLqwUulb8UCrB6OrnIZ61xIhkKvGwhxu1o9W1DWp5wyQQxrsdiTfvYx1pMDNZL ocMttqxVTCH3ffa8fXwrpmYDt6q1mBuY/cWYGsXmQOtWwV4ETHR8VJO3HmRiRm/P6cuk me51+M2J6IIMLEcXl8FBu4bUy7yyreu9VFetJuHArFr24UTeeQkoISi7CMnARlTwUU6f e3wUZ4bF+nhDOjaY+UveTuFPjQmZCu3vdRyinF97eH3LClFT8T/ptW5e4ukBPhvj/xdo UF6lnKASosgkgoWfDM3vZa2bwbO+o4pMBjZY3JLp4zMVpVWv3XE9iS86ZqalfIWTNFBA /eKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701963977; x=1702568777; 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=VDQz48eWGvAAxBK49fKsnjDhuFSF5WlUTAlWJ/FVbAE=; b=Y4y26/ONTB8RXACRu9bReetvyTeszeyyhEG0jw3veYkezHkE+fpSoMsaJvf/AhKyDR VBRfJTQNEEXkNB4loqeYIHCzRwE+gaQX+9cnACTk9qf/aGES19eb6XNK8MnzPs+kd7xc Ucs4gxHtRddaPHpe7iTA0woAtkx6ZD6HWVWUo8unMNpK+TX9JFYZ3pEKXZdrN5HMGAxP nLz8E+TGQb8mdcLwtsLMrGOPDTfjxmXtjn+Kv3RL8qmrT0GPhpU/Tvk2NsaS8SBIjsLz ITsvMTi29BRsj48gV0t+bi4DoE8jDfHVXThWLX8iivAwga/TfjuwdtMJLO/D40sN8X57 fY0w== X-Gm-Message-State: AOJu0YzxqsrBQhbg0AUsyLonKj3Kmm6uNCokVTHQxwB3GYPzevI50IaS IW0Mpqh2rRTPc4rszD+ekj/ej6MrnfxX9hcCOyI= X-Received: by 2002:a17:906:ae9b:b0:a16:9cc4:87c0 with SMTP id md27-20020a170906ae9b00b00a169cc487c0mr1567762ejb.51.1701963977054; Thu, 07 Dec 2023 07:46:17 -0800 (PST) Received: from m1x-phil.lan ([176.187.202.111]) by smtp.gmail.com with ESMTPSA id l17-20020a170906a41100b00a1d885359d6sm966918ejz.46.2023.12.07.07.46.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 07 Dec 2023 07:46:16 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Pavel Dovgalyuk , Fam Zheng , Stefan Hajnoczi , Richard Henderson , qemu-block@nongnu.org, Paolo Bonzini , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH v2 4/5] system/vl: Restrict icount to TCG emulation Date: Thu, 7 Dec 2023 16:45:49 +0100 Message-ID: <20231207154550.65087-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231207154550.65087-1-philmd@linaro.org> References: <20231207154550.65087-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=philmd@linaro.org; helo=mail-ed1-x529.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=unavailable 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 Signed-off-by: Philippe Mathieu-Daudé --- stubs/icount.c | 6 ------ system/vl.c | 6 +++++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/stubs/icount.c b/stubs/icount.c index a5202e2dd9..b060b03a73 100644 --- a/stubs/icount.c +++ b/stubs/icount.c @@ -1,5 +1,4 @@ #include "qemu/osdep.h" -#include "qapi/error.h" #include "sysemu/cpu-timers.h" /* icount - Instruction Counter API */ @@ -10,11 +9,6 @@ void icount_update(CPUState *cpu) { abort(); } -void icount_configure(QemuOpts *opts, Error **errp) -{ - /* signal error */ - error_setg(errp, "cannot configure icount, TCG support not available"); -} int64_t icount_get_raw(void) { abort(); diff --git a/system/vl.c b/system/vl.c index 2bcd9efb9a..8c99c5f681 100644 --- a/system/vl.c +++ b/system/vl.c @@ -2270,7 +2270,11 @@ static void user_register_global_props(void) static int do_configure_icount(void *opaque, QemuOpts *opts, Error **errp) { - icount_configure(opts, errp); + if (tcg_enabled()) { + icount_configure(opts, errp); + } else { + error_setg(errp, "cannot configure icount, TCG support not available"); + } return 0; }