From patchwork Thu Jan 23 23:44:03 2025 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: 859414 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp532451wrq; Thu, 23 Jan 2025 15:48:43 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWmZ71M/TAoylXy8JtqjCn2OvkcxyaqqUs/aNjTgQYlhy7Gx6J/eKIuMCtS74nk0t/hleNOwg==@linaro.org X-Google-Smtp-Source: AGHT+IHaVcXs1IWwDtpPxrAFgkdc07446GKsEyl+INOuq9Cf5AZyHmlWuHnyvimi1p3zLbkGw7Gt X-Received: by 2002:a05:620a:2892:b0:7b6:ea22:3069 with SMTP id af79cd13be357-7be63237c58mr3933996785a.26.1737676123189; Thu, 23 Jan 2025 15:48:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737676123; cv=none; d=google.com; s=arc-20240605; b=AxJxDCrlPiJXVLC5PrO35HxAGkZ3KwKX1AUSFatLwdaipBPzjSqRDh8aTAgeM2wxla qePexs1kzGqaAJ0JxS8eRyPdqFcJDXC0ft5+OjjMLD5Zd3eWZdwNhZn/259JDWcsQV4G yifiuhQEjoJXm5tY+ZGAkNvtdurm1ky1AgJzvCeyroeq3sjd9l29F3wEhj+mT+DLdRBS zKyNDtWBs2pyHkTn+eac1UlT/fPAE3ofQK1HosAUh9GF1AmsJj+L163beWqMLkzq4RUQ ZW6oYvTRrlvP7+wC0Oxp3uaQi+SlT21RsiSESXWFyHJDsYTinXccBw0YfosiSn7shO0C pskg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=yDFP15LbfYjBwdgoNtB1SUTPS+QYiGObjjbLDQKpiPc=; fh=n8P8n8mjPTF98Ox3aCUz2zCvv5jUpnKQrp7JPLvRSRI=; b=T+KuRsLYGUMNf58caj/SpcxewQIxAx3K5QPwyEdOLTp+8X/Vg4GbV5i1/iAI+VYU0k tdA9X/CO6eBGfTC1PGZwfmxk4L2BFz+E3t04URMC7VjzHJQSHolDDZrxtQeL+zfQbrVR jxsgvEcC/JwhS8DXKXuqBhEMQv1tztMmlcV822YzKj1CDj83R7GUM6tQ7kh0Wq5m5RjN ri6k8Sv4AZiFA9+XmH/a23INB+CRufnM3DjJvunqcVWBPOhxCbfbP/APb5XPQSNVYHgQ Q4u5AkxHUciUrgDl7Ax9BtBJrMpsoaYUbCfMNhLBjPw5UF14o5fR0y59er1Dnl3R0FX5 jMjQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JaYcnurg; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7be9af1171fsi78382685a.530.2025.01.23.15.48.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 Jan 2025 15:48:43 -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=JaYcnurg; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tb6sw-0006bH-4y; Thu, 23 Jan 2025 18:45:19 -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 1tb6sq-0006Zq-EA for qemu-devel@nongnu.org; Thu, 23 Jan 2025 18:45:12 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tb6sn-0004Df-Rv for qemu-devel@nongnu.org; Thu, 23 Jan 2025 18:45:11 -0500 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-385ddcfc97bso1317002f8f.1 for ; Thu, 23 Jan 2025 15:45:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737675908; x=1738280708; 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=yDFP15LbfYjBwdgoNtB1SUTPS+QYiGObjjbLDQKpiPc=; b=JaYcnurg7Wc1NwUPixsucQNIRXRWSC7zgF3HVlaKoIglWMt+rPZfdnhXNVtV3jZGg3 zPlLu9msph1F+zZJEkchUwhy8CuDQf9azL8r3NhYOnSKoxuQ/gTfRGkQb27JwK3hW/mv yvI36NjDuQfigkln3Y1fCDNWhgEa4v30Lx7W9juBDJzshr6BzT3h6enXKVzV23XHmwdA iA9A9bsQDzYfbAlaXEfd2OiXS5HXWP6n070H1kvmPOGhsN05L8t7G8VZ4cDWU+B0kWqE IkcKGRS0ATKKhaVmRaIckqPQRhYZMwTLPlL5NELqmojz6qHdKSh6oDu3yaDVANm4lnGB hboA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737675908; x=1738280708; 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=yDFP15LbfYjBwdgoNtB1SUTPS+QYiGObjjbLDQKpiPc=; b=KhjuWir67OlEl9mmqpKRw4DHJXyrKv4EVthejJTiEE88xVML89Jc0aQY4+/vwuqsae +Q2c/wWxy/PbMJMvTwPMr6DlrNAt4kCAFtPumVm1TxQ5exdMulHZBM/izxfwCHioM5N4 5F8nEeWU1UppvOax7HekGntl8+p1QdbkyJPSPwuiBOYT3/b/iecAoSi20ASgTVtGYlak ib1uzP7o4cDlL4PJqvTH3LIAmn3iUMoflcYOcfhXPenj+EANODj8oXHUlbtZJ14LoXeb De6mQ4t9sg8QczbRCBmCygA7zIOvIC2Np0xxKxha8n63wS66jcX4+TMdz6mcthExWTTt Ut0A== X-Gm-Message-State: AOJu0Yx9SiS8PW/q0kbjNGBLKX5ZeuF7DbfZYONgZpV5SUuebRCZ55vw afR5OrrdvYtsAxDqJ1/aetWk1J1VF+hKGrsDtAU3ibX88c3jaBzBkMlva8fThY21wdhgRd6lJK/ Oryk= X-Gm-Gg: ASbGncsIovLamNsvsLxqNYJU4AYz0l9IUnob9IOpaRVQcoxMpvvEcyIQkHXXOiKOdau RKYBjNfaKv9PECTM3+AYgzZ/3y722LQVlZJWYip+jKqrKyPi6Fqu7bh88SWvnLnnUg1CHv/ilSy 98K3c6wb55ubJal+pHS0TAvJbn7wEaIMwxGUrRFpFGwwxyLc7xNGd2Iip3OU0esCuJh2NgW5QRA EkWhzpFmb6v9rpGdcpZYd37vXIgmMZE4m9j5FIlL2E99tdFba/WmJroEb3bP+xedbFEWWmVsF2U HbUIwOWjMh/m3MhliOO5teaIkxg2B/XWSuRbwf0KCRWQYBq8uRZ2OF4= X-Received: by 2002:a05:6000:401f:b0:38c:2677:9bee with SMTP id ffacd0b85a97d-38c26779db8mr3711264f8f.15.1737675907708; Thu, 23 Jan 2025 15:45:07 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c2a17630asm997952f8f.6.2025.01.23.15.45.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Jan 2025 15:45:06 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , Paolo Bonzini , qemu-arm@nongnu.org, Igor Mammedov , =?utf-8?q?Alex_Benn=C3=A9e?= , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, David Hildenbrand , qemu-s390x@nongnu.org, xen-devel@lists.xenproject.org, Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH 09/20] accel/tcg: Restrict 'icount_align_option' global to TCG Date: Fri, 24 Jan 2025 00:44:03 +0100 Message-ID: <20250123234415.59850-10-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250123234415.59850-1-philmd@linaro.org> References: <20250123234415.59850-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.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 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 Since commit 740b1759734 ("cpu-timers, icount: new modules") we don't need to expose icount_align_option to all the system code, we can restrict it to TCG. Since it is used as a boolean, declare it as 'bool' type. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/internal-common.h | 2 ++ include/system/cpus.h | 2 -- accel/tcg/icount-common.c | 2 ++ system/globals.c | 1 - 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/accel/tcg/internal-common.h b/accel/tcg/internal-common.h index d3186721839..7ef620d9631 100644 --- a/accel/tcg/internal-common.h +++ b/accel/tcg/internal-common.h @@ -17,6 +17,8 @@ extern int64_t max_advance; extern bool one_insn_per_tb; +extern bool icount_align_option; + /* * Return true if CS is not running in parallel with other cpus, either * because there are no other cpus or we are within an exclusive context. diff --git a/include/system/cpus.h b/include/system/cpus.h index 3d8fd368f32..1cffeaaf5c4 100644 --- a/include/system/cpus.h +++ b/include/system/cpus.h @@ -38,8 +38,6 @@ void resume_all_vcpus(void); void pause_all_vcpus(void); void cpu_stop_current(void); -extern int icount_align_option; - /* Unblock cpu */ void qemu_cpu_kick_self(void); diff --git a/accel/tcg/icount-common.c b/accel/tcg/icount-common.c index b178dccec45..402d3e3f4e8 100644 --- a/accel/tcg/icount-common.c +++ b/accel/tcg/icount-common.c @@ -48,6 +48,8 @@ static bool icount_sleep = true; /* Arbitrarily pick 1MIPS as the minimum allowable speed. */ #define MAX_ICOUNT_SHIFT 10 +bool icount_align_option; + /* Do not count executed instructions */ ICountMode use_icount = ICOUNT_DISABLED; diff --git a/system/globals.c b/system/globals.c index 4867c93ca6b..b968e552452 100644 --- a/system/globals.c +++ b/system/globals.c @@ -48,7 +48,6 @@ unsigned int nb_prom_envs; const char *prom_envs[MAX_PROM_ENVS]; uint8_t *boot_splash_filedata; int only_migratable; /* turn it off unless user states otherwise */ -int icount_align_option; /* The bytes in qemu_uuid are in the order specified by RFC4122, _not_ in the * little-endian "wire format" described in the SMBIOS 2.6 specification.