From patchwork Fri May 3 12:34:52 2024 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: 794377 Delivered-To: patch@linaro.org Received: by 2002:adf:a153:0:b0:34d:5089:5a9e with SMTP id r19csp711837wrr; Fri, 3 May 2024 05:36:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU7VIR+yncQATBSSyVVKw0rgoxHR4Se63B5XXohxhdiEkGIuAqBGcB972nJfTq1uAIcoYFZldr2EeVECpsneETM X-Google-Smtp-Source: AGHT+IFo/04GP5k7nbHxXkHUrw5FJtING61tz+oygaOPXGP8CrdB4ZFbTz7ZhgOBPDfX3hWFnKPc X-Received: by 2002:a05:622a:1ba3:b0:43a:b5e9:7d6 with SMTP id bp35-20020a05622a1ba300b0043ab5e907d6mr2599140qtb.22.1714739786970; Fri, 03 May 2024 05:36:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714739786; cv=none; d=google.com; s=arc-20160816; b=Tub4Eha+g0iB7MhqGu1V8BMTb2t2MM3x5eAb4jEHOOBzXYb3zbtKnb1DiThr4ivL9w jBGFha/59/Fju/A0dD7pp3K/b0vueM9hIXv6Jgo9cZ35Uf86va0X+yIpB7Yp5Iiw9/wV gpFoDiE7b6/PhS9brD5D16kYPzl3a2etJ0/W6Ylj01FK6avGFXedSzarj2Q3bsLTuaUu 8XMjand+eDe3nYe4jxwLv8F8Zffbmc6k4bvCxCJDKD0vSdLlyY5zVf4+c/3cVif7v0jt CNvvVuos6Gbb1CEtPL9iok+m9q32CVracwloleUncKLlwj760t2gJW9ejtJKzdSAPiuY BIcA== 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=DJ2+DminAMBhR7ne1mJVPzDapawzOzMCaGznDAzlaXg=; fh=oECX/HpztodFaUv3pEO7ZivaceaHACgJ0hUyl/lk/I0=; b=KOCkftb31ewJQe8v6s04LsRO00Rn2eE0FTGaqTeWxjuUTkOwsXdQKls5xCrBf/NGPW rNGMp+OTtzSvpfbNT7WjedNuavI5ZB7OhIk2fNkQe8BKABCD5A0EmR3H0omoEaZFXgJq cyU/U1dmsB8K0Plx9w1BojUMI7O5jl1ob8a+KTJLuag93GQGzN1HpgBW4xL6Q5o2setd CSAVThfKqjxEZZaXE/23EnO/pCg3GYSM4dOMkSsuqN9QSP3QKVctBjAdbcnEyv/zhJ6X 6rhTFCgZw9a45JIk9HN90tBin/Hgss+JxzN/sJi2GFp2iSfLQsdSYBSArdfQ+hSO8hPJ 72qg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MNlJxYBB; 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 j19-20020ac85f93000000b00439d100fb3dsi3234779qta.668.2024.05.03.05.36.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 May 2024 05:36:26 -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=MNlJxYBB; 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 1s2s8n-0007c1-0u; Fri, 03 May 2024 08:35:55 -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 1s2s8A-0007EO-Fn for qemu-devel@nongnu.org; Fri, 03 May 2024 08:35:17 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2s83-0002nO-WE for qemu-devel@nongnu.org; Fri, 03 May 2024 08:35:11 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-41dc9f98e8dso11334825e9.1 for ; Fri, 03 May 2024 05:35:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714739706; x=1715344506; 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=DJ2+DminAMBhR7ne1mJVPzDapawzOzMCaGznDAzlaXg=; b=MNlJxYBB3woYKpnxO0ejtIrc1pAtUGax1j8olkw2ANawuy3nLCuMnWb2gnwJahhf5m vOpsooRhQzBYyqHO0DUkAC5wJLJukH+jevtvCeD01bqR2a6Ff8GFySyTBfAePoRHG62O SIz9pV/FjxZyi35shxmlmjVZJ+9AyPjs7NhhAvUHlT30Et1KTopnZHP7z8vypwFaQOCS wxu9beaJc+O0TWhzMtvxJRNqwOpb5EqiyJV9VDHn88QapXxlfZW1Xr6tC9Rv7PxXBXE8 Ks4CE4Z/zJEhfYGZXFQJcal5YzEwD+k5QOR4stf4sZHAmeEBebUTDq3OAe+ZiiLq7OSI wY/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714739706; x=1715344506; 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=DJ2+DminAMBhR7ne1mJVPzDapawzOzMCaGznDAzlaXg=; b=n4aQ8dtU4GvZ9prPGadNvktwOEkGTKPtDuM7b8qxfiemvtaWEGpP3es0x9SyHb2lNw E4MiM3WZFKapYbQXcoHFt6Dz4rqPrLmz1my+lIsVIesaDyVJwQcCZE7C+koVN/qS4HDD hsl7nzmHiQ26R0TXh2VcB4PqlroyymkMlqTEOPhDcqvaXD8F2GdwEknSGcHoLK64xrN+ Xg78uW0TGLZjaaNMxCl8GBCK0m7y/SAJWmT29alyeOTp9WbIMU4Qy41u5xIQx898otoc zOpOKy8oWuhhcGogefMsUN0byvI9yR2DvPOkCcohvoRpKZxMD/vaFTiJdFtkANvVmomD EyvQ== X-Gm-Message-State: AOJu0YyC6Jck7JlytYEQa25+Xh1+ZaNcWquQPq1f70nMoa4NraNjjxs+ 7ODMyvU46IrzyLIVeN5uTTVJy+VUBqwsj67Zp8kZCA004kg29i58aKWGvVrpUYSL83b7j9Q7Zbe W X-Received: by 2002:a05:600c:4f16:b0:41c:66:18c2 with SMTP id l22-20020a05600c4f1600b0041c006618c2mr5073169wmq.4.1714739706095; Fri, 03 May 2024 05:35:06 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id q8-20020a05600c46c800b0041ac4aafd3dsm5500179wmo.12.2024.05.03.05.35.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 05:35:05 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Warner Losh , Richard Henderson , Kyle Evans , Ilya Leoshkevich , Riku Voipio , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 1/5] accel/tcg: Move SoftMMU specific units to softmmu_specific_ss[] Date: Fri, 3 May 2024 14:34:52 +0200 Message-ID: <20240503123456.28866-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503123456.28866-1-philmd@linaro.org> References: <20240503123456.28866-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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=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 Currently these files are only used in system emulation, but could eventually be used by user emulation. Use the "softmmu_specific_ss" to express they are related to SoftMMU. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/meson.build | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index aef80de967..84826f043a 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -16,12 +16,13 @@ tcg_specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_false: files('user-exec-stub. if get_option('plugins') tcg_specific_ss.add(files('plugin-gen.c')) endif -specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_specific_ss) -specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files( +softmmu_specific_ss = ss.source_set() +softmmu_specific_ss.add(files( 'cputlb.c', 'watchpoint.c', )) +tcg_specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: softmmu_specific_ss) system_ss.add(when: ['CONFIG_TCG'], if_true: files( 'icount-common.c', @@ -34,3 +35,5 @@ tcg_module_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files( 'tcg-accel-ops-icount.c', 'tcg-accel-ops-rr.c', )) + +specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_specific_ss) From patchwork Fri May 3 12:34:53 2024 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: 794378 Delivered-To: patch@linaro.org Received: by 2002:adf:a153:0:b0:34d:5089:5a9e with SMTP id r19csp711902wrr; Fri, 3 May 2024 05:36:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWUbeW6oqF/lmgmpKzNIkoaVbEFwRgsI8Jd1yL6gAjH4knTYTg85UHZ+tToDM4UMuDos7DZll4ZmAXkX8KMJoL+ X-Google-Smtp-Source: AGHT+IEas/+VaaddjPzeaY87dZTmwD8px+H0bUfTD8Q6LVrY5QLdjE8g+IWV5sXWTCUkxSmjwVpr X-Received: by 2002:a05:6808:1492:b0:3c8:533d:3e9c with SMTP id e18-20020a056808149200b003c8533d3e9cmr3512685oiw.13.1714739797135; Fri, 03 May 2024 05:36:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714739797; cv=none; d=google.com; s=arc-20160816; b=rOdBjOSdRXYwMet62tGmvzmoltMeXzPhhA4g/mnNr1y9tyGUXXfmC9y3Fat32U5bQ3 1O0eFAlvzgMg6q28dcgA78Ic2InERdeIwou2y0EjDF+i+fmOA5zwP4OobMrSZrL6I5Ky HUIm4jC7L/iLNM0QnvJOGyY6d7N5tQHifm1sLJAtgGM1wpdo8QunHj+AmEANGzPH8jWY 7r74AKNyL0gTc7eSpS3z5KAR04m54EDr/hl8ggbwGcHxUE9zg2UNUZT1Fmm3y7alf2tC Qd6bAjtusz7IvEr+okX2e6i/e0CQbzKC+ZanZkTRoYRktZN7ShiiQggm3K7hC8A6Hayw uAEg== 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=tc6dayl5tulhCDU0tgAOjnRfAOhbRHX4YnefxEFrhW4=; fh=oECX/HpztodFaUv3pEO7ZivaceaHACgJ0hUyl/lk/I0=; b=QOibzQL81CAr3Dsj8GGzekwP8wO1eCfiIf3bLET1EexlOJiC+ww0FJ81sAp+3VuEeE +sXtZtMF7lYUjn4kVrwY66b9H+G3YoFFFpXJV2U1rekcdxwuaT/6COa0EVZV+6RG/ZUO 0Vn3xGDKLb1R92U1bLYf9zqs8kmZSY21FvFdM0AqLb/UXwB7ujtEKV4uDaTdSVQHvsIi 1iAVwRa4uqr3vCZoaxiN/Q7eX2o1JtOBXV85sT8vEU9vPafbH78byzi+bQXs1yqFsFAh FXCLlqa975Ck6pYNw49K2QRpZf+0Q8cou7+ulQm6GNWKV9ACq+7QFqYTxRkzZev1aYcT KZbw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MsI97ceG; 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 m3-20020a05622a118300b0043af8fa1328si3257335qtk.472.2024.05.03.05.36.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 May 2024 05:36:37 -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=MsI97ceG; 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 1s2s8n-0007bw-0W; Fri, 03 May 2024 08:35:55 -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 1s2s8E-0007Fp-Bf for qemu-devel@nongnu.org; Fri, 03 May 2024 08:35:20 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2s8A-00030F-AA for qemu-devel@nongnu.org; Fri, 03 May 2024 08:35:17 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-41bca450fa3so48323325e9.2 for ; Fri, 03 May 2024 05:35:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714739712; x=1715344512; 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=tc6dayl5tulhCDU0tgAOjnRfAOhbRHX4YnefxEFrhW4=; b=MsI97ceGgamI3T8MQhU3M/m5VRsbHKtX2ONfnoWq8ADdjTGD+CaMGFCaVZGPyh+HPS USkTm8jJH7QIwGqIxAvTN+ZsaUFB9/txnD6LR4LdhgOUjouR4TPvfgb61ES7JYNTEJZ8 V0XWWRiT9DF4FKiy1zeXBYJ7Pw/tba56VlhQs4iPrF0d7Rph8VQWFdDSB6TBG8BT0Yv7 gAHGjZSfbtOGVyxJwBTWANeXqwMQcu2syVmbBbbxb4UtXHFO2gU0rv50+FY8POmeCbcu YgFAhhWCWBYgK1F5t1tB89qWBRMG64CKX/22bJvXwOoxH+juiIrwVyomfd86mRrpiRsK 1fBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714739712; x=1715344512; 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=tc6dayl5tulhCDU0tgAOjnRfAOhbRHX4YnefxEFrhW4=; b=H9BFaHHlqrY5JK0/9V3IPeZZ0BBkEl9mWSwdgsTHrA6AvaC5EsQF2ewZlU3IDx76W7 HjamoK1o/nqhowvy/iPIxpHvjsdyfcBjwRYqFh7p12o72fDa4MUf5iRxkr0TUkMJpXXl 8P+7WJ+qcBoqOsNoxO6I6kiOrvgcjluRCZr+pfVpVJX488MWLhXhI5b8y05m0UOrW1So Bxy4G3Hst74ooEgrIKmeRQahNYI55Nj6wt0M8HbLLdLJHsUuzDcltLNbJmvUNfvdTuZA a/upHAqKQAq4XHCBXwrnfmJjcLJszN4NyJwGrd7h79zcK5tIct7hz3kw5AGdftG67MIl MvhA== X-Gm-Message-State: AOJu0YzklUFOPyjiYp1ngbt0yIobOWDnEetJ4QAAW5HNhspNfxru4N3v L/4oN2cLwYmKzJmpa4g34CL/MvcGDq1r6KDF34siY42w3v78Q0HbrfHw40JVayR7lT2OBplnGBF D X-Received: by 2002:a05:600c:46cb:b0:41b:d08d:dce4 with SMTP id q11-20020a05600c46cb00b0041bd08ddce4mr1919892wmo.5.1714739712282; Fri, 03 May 2024 05:35:12 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id f20-20020a05600c4e9400b0041b5500e438sm5504276wmq.23.2024.05.03.05.35.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 05:35:11 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Warner Losh , Richard Henderson , Kyle Evans , Ilya Leoshkevich , Riku Voipio , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 2/5] accel/tcg: Move system emulation files under sysemu/ subdirectory Date: Fri, 3 May 2024 14:34:53 +0200 Message-ID: <20240503123456.28866-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503123456.28866-1-philmd@linaro.org> References: <20240503123456.28866-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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=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 Some files are specific to system emulation. Move them under their own sysemu/ directory. This might help to notice what is affected (user, system or both) when doing global refactors. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/{ => sysemu}/tcg-accel-ops-icount.h | 0 accel/tcg/{ => sysemu}/tcg-accel-ops-mttcg.h | 0 accel/tcg/{ => sysemu}/tcg-accel-ops-rr.h | 0 accel/tcg/{ => sysemu}/tcg-accel-ops.h | 0 accel/tcg/{ => sysemu}/icount-common.c | 0 accel/tcg/{ => sysemu}/monitor.c | 4 ++-- accel/tcg/{ => sysemu}/tcg-accel-ops-icount.c | 0 accel/tcg/{ => sysemu}/tcg-accel-ops-mttcg.c | 0 accel/tcg/{ => sysemu}/tcg-accel-ops-rr.c | 0 accel/tcg/{ => sysemu}/tcg-accel-ops.c | 0 accel/tcg/meson.build | 12 ------------ accel/tcg/sysemu/meson.build | 11 +++++++++++ 12 files changed, 13 insertions(+), 14 deletions(-) rename accel/tcg/{ => sysemu}/tcg-accel-ops-icount.h (100%) rename accel/tcg/{ => sysemu}/tcg-accel-ops-mttcg.h (100%) rename accel/tcg/{ => sysemu}/tcg-accel-ops-rr.h (100%) rename accel/tcg/{ => sysemu}/tcg-accel-ops.h (100%) rename accel/tcg/{ => sysemu}/icount-common.c (100%) rename accel/tcg/{ => sysemu}/monitor.c (99%) rename accel/tcg/{ => sysemu}/tcg-accel-ops-icount.c (100%) rename accel/tcg/{ => sysemu}/tcg-accel-ops-mttcg.c (100%) rename accel/tcg/{ => sysemu}/tcg-accel-ops-rr.c (100%) rename accel/tcg/{ => sysemu}/tcg-accel-ops.c (100%) create mode 100644 accel/tcg/sysemu/meson.build diff --git a/accel/tcg/tcg-accel-ops-icount.h b/accel/tcg/sysemu/tcg-accel-ops-icount.h similarity index 100% rename from accel/tcg/tcg-accel-ops-icount.h rename to accel/tcg/sysemu/tcg-accel-ops-icount.h diff --git a/accel/tcg/tcg-accel-ops-mttcg.h b/accel/tcg/sysemu/tcg-accel-ops-mttcg.h similarity index 100% rename from accel/tcg/tcg-accel-ops-mttcg.h rename to accel/tcg/sysemu/tcg-accel-ops-mttcg.h diff --git a/accel/tcg/tcg-accel-ops-rr.h b/accel/tcg/sysemu/tcg-accel-ops-rr.h similarity index 100% rename from accel/tcg/tcg-accel-ops-rr.h rename to accel/tcg/sysemu/tcg-accel-ops-rr.h diff --git a/accel/tcg/tcg-accel-ops.h b/accel/tcg/sysemu/tcg-accel-ops.h similarity index 100% rename from accel/tcg/tcg-accel-ops.h rename to accel/tcg/sysemu/tcg-accel-ops.h diff --git a/accel/tcg/icount-common.c b/accel/tcg/sysemu/icount-common.c similarity index 100% rename from accel/tcg/icount-common.c rename to accel/tcg/sysemu/icount-common.c diff --git a/accel/tcg/monitor.c b/accel/tcg/sysemu/monitor.c similarity index 99% rename from accel/tcg/monitor.c rename to accel/tcg/sysemu/monitor.c index 093efe9714..620c18d267 100644 --- a/accel/tcg/monitor.c +++ b/accel/tcg/sysemu/monitor.c @@ -17,8 +17,8 @@ #include "sysemu/cpu-timers.h" #include "sysemu/tcg.h" #include "tcg/tcg.h" -#include "internal-common.h" -#include "tb-context.h" +#include "../internal-common.h" +#include "../tb-context.h" static void dump_drift_info(GString *buf) diff --git a/accel/tcg/tcg-accel-ops-icount.c b/accel/tcg/sysemu/tcg-accel-ops-icount.c similarity index 100% rename from accel/tcg/tcg-accel-ops-icount.c rename to accel/tcg/sysemu/tcg-accel-ops-icount.c diff --git a/accel/tcg/tcg-accel-ops-mttcg.c b/accel/tcg/sysemu/tcg-accel-ops-mttcg.c similarity index 100% rename from accel/tcg/tcg-accel-ops-mttcg.c rename to accel/tcg/sysemu/tcg-accel-ops-mttcg.c diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/sysemu/tcg-accel-ops-rr.c similarity index 100% rename from accel/tcg/tcg-accel-ops-rr.c rename to accel/tcg/sysemu/tcg-accel-ops-rr.c diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/sysemu/tcg-accel-ops.c similarity index 100% rename from accel/tcg/tcg-accel-ops.c rename to accel/tcg/sysemu/tcg-accel-ops.c diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index 84826f043a..3539b0b799 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -24,16 +24,4 @@ softmmu_specific_ss.add(files( )) tcg_specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: softmmu_specific_ss) -system_ss.add(when: ['CONFIG_TCG'], if_true: files( - 'icount-common.c', - 'monitor.c', -)) - -tcg_module_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files( - 'tcg-accel-ops.c', - 'tcg-accel-ops-mttcg.c', - 'tcg-accel-ops-icount.c', - 'tcg-accel-ops-rr.c', -)) - specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_specific_ss) diff --git a/accel/tcg/sysemu/meson.build b/accel/tcg/sysemu/meson.build new file mode 100644 index 0000000000..5a97cabe7b --- /dev/null +++ b/accel/tcg/sysemu/meson.build @@ -0,0 +1,11 @@ +system_ss.add(when: ['CONFIG_TCG'], if_true: files( + 'icount-common.c', + 'monitor.c', +)) + +tcg_module_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files( + 'tcg-accel-ops.c', + 'tcg-accel-ops-mttcg.c', + 'tcg-accel-ops-icount.c', + 'tcg-accel-ops-rr.c', +)) From patchwork Fri May 3 12:34:54 2024 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: 794376 Delivered-To: patch@linaro.org Received: by 2002:adf:a153:0:b0:34d:5089:5a9e with SMTP id r19csp711804wrr; Fri, 3 May 2024 05:36:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU7zs7GQmDaQxJKTGHV/lVcuJL0/hbqErVbw1a/G1zZe5xXeUbgm3Y0DdwsxctosNUregLR8+dfiu4SKFOeWMWL X-Google-Smtp-Source: AGHT+IF+8SgBdTwrhRdaMmp/ckscWX+/swPOj/9ZDqzxPA+VoYJUOwUn5XIXVfuPgWx8pijj4mTI X-Received: by 2002:ad4:5f49:0:b0:6a0:936e:4f93 with SMTP id p9-20020ad45f49000000b006a0936e4f93mr2325386qvg.60.1714739780388; Fri, 03 May 2024 05:36:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714739780; cv=none; d=google.com; s=arc-20160816; b=PffDIjwaSHyDnRicd8xag69/eq3r4qS9WPUrBH8E4RPrretp4xc02uSi9CdaKGI30G AXCDuowCx6eymhsZMen3T6I6nG7GOCGeEC+C9CkNwquUyTWLCxh8Ff4GG877F8YiKknE dL2sLRIyYpWxc0scDBfX1OdLyEc7a4bXO6iavohkCpQQGSpdYheyHv8gchSz62GQvbm7 LUyprTfZNDlI8akmg/81aSSSycu8TSi6ZKfN3UQ+jNrz9LLoKGUpTlTAwj4tUMjrQX8P jn++9YWlSozEXOJBwsBrfNfhHmoS2NF1woUtP9MJIYoWbyCWOVHs8uq6EGky7MDxrDpo tH1A== 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=b8DwnhcqDdYLqJv6uh/ywG6qW/XlS7dFgSw/LzDaIEU=; fh=oECX/HpztodFaUv3pEO7ZivaceaHACgJ0hUyl/lk/I0=; b=Ia+WUuSbYwmoJbZ1fKcUZtEgcypI4C4+hZvPgvGErm+fGUw53F+ahODHYJf1CDpltx wOZvg1Juv6a7Zr2xDbMVTfXivvubrkUp+vf9ZjjTHgDdpZNGOEXGws93cBleG9Ls9LpK y4+cLIqgXZDB+78ZX4LGWwaM3wlmhoOD++UgshpmwwlVIrLYAMXfmIfjqjKBuBp0JUi2 /oXBe61Iq87iH6226qAoRkpqh94tuk1mPdp7j3PvCyxhaTcZreEkY5WTwYNSZQ6pQ3L3 XWQqxuJz+DI0Xpx1ww9M9HuzokVKH5VBb+7BITeBKmFZ73DCxaNDRF4PKZ3bylceb1lT nFng==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wjXV8v5+; 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 n9-20020a0ce949000000b006a0cd406409si2797310qvo.130.2024.05.03.05.36.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 May 2024 05:36:20 -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=wjXV8v5+; 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 1s2s91-0007zp-A3; Fri, 03 May 2024 08:36:07 -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 1s2s8L-0007Hv-0C for qemu-devel@nongnu.org; Fri, 03 May 2024 08:35:28 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2s8H-00032O-Te for qemu-devel@nongnu.org; Fri, 03 May 2024 08:35:23 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-41b782405d5so78712165e9.2 for ; Fri, 03 May 2024 05:35:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714739719; x=1715344519; 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=b8DwnhcqDdYLqJv6uh/ywG6qW/XlS7dFgSw/LzDaIEU=; b=wjXV8v5+nLa6yd1Elu5FeD7gOCFbngXiTb6DKLq+m2brXsOEg8ygYTqNqO39oqlGGc fss+Omb87pnt5UOs3ny51LMc4F9OnIAeJZ/d47y88FEbV3ny9zqzF7dZyHc1qg5eOnNr d3Jya6/PB8WVbtzEcIE9aas6TJ939bTY2zfuwsGPa1rcLGG0Ic4ggTM9jkqpSQadrNIM aJ4ZH0Jm27KMlB0dFSjwLTN3auOA3/GlcSvo1PNeTfmi7EOYpYY8rR6s6BxeahibSxaf UROnAK5BlMSMHnuW9IqURpvjdM9GAVFylt63s6UodPH8v2lkOCc9DfZLapNsTId9yldV bqNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714739719; x=1715344519; 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=b8DwnhcqDdYLqJv6uh/ywG6qW/XlS7dFgSw/LzDaIEU=; b=nmZZVhbzoNH2r/O5DZHe1J/fY3hGa75RSLdpI55MZDM/VaWOQmNE0UVZ01fDtyuJV6 XTNp97kEC2FT2Pw47Dp1wgKC8bArieHmUSpyDQOXNwGmQBj/Xln9ywfX8clBCvVqA8dK 6S44BVecWczFi6mVvjMaK3SGODj8jpSrj7wIDa6WhCJQogs81FogfRw8rKGimDJGRHBe fTg+Cis1SHXTL92QALsyG2++9GsH4dVtguvPWhw4rEc9Mhg3z9kCVq2njeQhF25ip3lR dwnVnn3nfV/4r29ZLZ0p0NwcHRgtjukjHNbLxfxHVja4Ho6K3PXYBlAh0QIpKGqHN9d4 Et7w== X-Gm-Message-State: AOJu0YxoaRCx86NEO0ybjazii6/i7cN2aqkNcwuNepTsvwrpPaLUVQMX wVssliXCZG0tzBpYOLqTFEIHA+TJ9IaneByUMvKFoE0Ad8iIbIZTn2mIrbFURwv4lOIPdS7X9+7 q X-Received: by 2002:a05:600c:4fcb:b0:415:540e:74e3 with SMTP id o11-20020a05600c4fcb00b00415540e74e3mr2365576wmq.40.1714739718904; Fri, 03 May 2024 05:35:18 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id p17-20020a05600c469100b0041b083e16e2sm9330778wmo.2.2024.05.03.05.35.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 05:35:18 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Warner Losh , Richard Henderson , Kyle Evans , Ilya Leoshkevich , Riku Voipio , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 3/5] accel/tcg: Do not define cpu_exec_reset_hold() as stub Date: Fri, 3 May 2024 14:34:54 +0200 Message-ID: <20240503123456.28866-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503123456.28866-1-philmd@linaro.org> References: <20240503123456.28866-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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=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 In commit 1b5120d74b ("accel: Introduce cpu_exec_reset_hold()") we defined the user emulation backend cpu_exec_reset_hold() as a stub. This was a mistake, since common fields are set in CPU reset, and user emulation needs these fields to be resetted. Move cpu_exec_reset_hold() back. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/user-exec-stub.c | 4 ---- accel/tcg/user-exec.c | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/accel/tcg/user-exec-stub.c b/accel/tcg/user-exec-stub.c index 4fbe2dbdc8..2dc6fd9c4e 100644 --- a/accel/tcg/user-exec-stub.c +++ b/accel/tcg/user-exec-stub.c @@ -14,10 +14,6 @@ void qemu_init_vcpu(CPUState *cpu) { } -void cpu_exec_reset_hold(CPUState *cpu) -{ -} - /* User mode emulation does not support record/replay yet. */ bool replay_exception(void) diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 1c621477ad..6a108eb212 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -37,6 +37,10 @@ __thread uintptr_t helper_retaddr; //#define DEBUG_SIGNAL +void cpu_exec_reset_hold(CPUState *cpu) +{ +} + /* * Adjust the pc to pass to cpu_restore_state; return the memop type. */ From patchwork Fri May 3 12:34:55 2024 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: 794379 Delivered-To: patch@linaro.org Received: by 2002:adf:a153:0:b0:34d:5089:5a9e with SMTP id r19csp711946wrr; Fri, 3 May 2024 05:36:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVxJD8VzlMSSEN35rh1g3iG1efdpOGrwoHNciqu1AQsabhYEonWJngEpqfBCXPllXJpkY0MHSsAD5QmoCMaik39 X-Google-Smtp-Source: AGHT+IEpQMRRI+nxVqHejY/McVqft5FTZ6dyWHjoF5pIp0xWt1KWqH8k4RzXSJ3eyK/cB3Zab+D1 X-Received: by 2002:a05:620a:248d:b0:792:741b:3a27 with SMTP id i13-20020a05620a248d00b00792741b3a27mr2832413qkn.53.1714739803239; Fri, 03 May 2024 05:36:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714739803; cv=none; d=google.com; s=arc-20160816; b=LygmJhpv3EKlKpU4glRkFsjv7A1NkC1BZhpNCLsbSZZzvvVDzs6OMDbdk6BAk4QTgX RBj1pEKFHtaK9s7dkMsAmiPUKtIH97pv9iFN9jk/m72Ljv2YklAfUgxQfADi2CtQ55p9 ioYwjFBWFAQpObSrJoKV7k/IhVeEWhmWg86cPlCyzPUZpc3wWL3PP6O8U55b5lSGk8tX CGpu9Ow6c+wUfJYkQFVygW/DXjCfc8zkBs0YtSCR8hryVmLiWuJzjkiW604/aMd3Dkqe UGqd62p8N66js2UfAWFN3b/M/aTmxzP4zv8NJlAoUoGhkKAJMYXDMI1eiDsn1xcnvQYB BtRA== 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=L9C79ZCDN03MmjjHQ6TSF486EGxB4sAu8CtoKMbncco=; fh=oECX/HpztodFaUv3pEO7ZivaceaHACgJ0hUyl/lk/I0=; b=nsuTEntYU8eX/rtyHgy6nnC2+1kB3tZcDeMi+B0DT6jlIVvqtLCBoC33BdwRipB26A 7c54CCVn2j7/q/0toFQHtT5LQcuM3fRiJBb6tUE8M6xO8ttTK2wUoynXODiZtZhZux/e km5xzT4t+sSS7iXBnZLRg1QEgbNla9tLNcpmC8O4jyCc6K5JcbF+yRophlhVMbCRNrQ6 SMyDnw0vDbV9ymTiO/zAtzWhGFap2OifJBHqolp8pZJihhimVSzloq+DGYYoTmYj3nSl p7ZLN6ILqY8QzovCbPwkjNSq8QYrIO2SYPBG1SBaVI9Dqv5fslMmVpf6xEaPWLNX2OOW W92A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FftdX6fy; 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 e26-20020a05620a209a00b00790f6c6a1b7si2970083qka.772.2024.05.03.05.36.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 May 2024 05:36:43 -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=FftdX6fy; 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 1s2s8u-0007or-El; Fri, 03 May 2024 08:36:00 -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 1s2s8Q-0007Kt-Kn for qemu-devel@nongnu.org; Fri, 03 May 2024 08:35:33 -0400 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2s8N-00036V-HX for qemu-devel@nongnu.org; Fri, 03 May 2024 08:35:28 -0400 Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2e10b6e2bacso36646931fa.0 for ; Fri, 03 May 2024 05:35:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714739725; x=1715344525; 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=L9C79ZCDN03MmjjHQ6TSF486EGxB4sAu8CtoKMbncco=; b=FftdX6fy29BiINp8V42kiUQO7LkonRVxTQjAci7LA33uuOkABy4yyedgm6NdVSd2Mb uHSlbuN2nJw56EQhNWN34r1/uk5zW/Nn/MVIFNqJge62yO5Hq2DPNCO9W1La2hdGv5DV XhOTRz9m+qhqc/kcQRHP9oZTqTjF/ips8StkNvqzwGCperz/OTaWFF7U7UpNCzCcmFvI RTbYEOayCP8pOdSgvTEZ3kXe73HcVMcoFKcK0D1jLG7MUju5D1gNodbWH36UVKQP33Y7 t4aW3lYDpr7GMZNu0wrkn1K2UUK+YnUQJ51HYhDZoFjf2qPDe9vG7T9b4W0H8o2WLm9Y NoYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714739725; x=1715344525; 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=L9C79ZCDN03MmjjHQ6TSF486EGxB4sAu8CtoKMbncco=; b=uE4Bj/egKjN6r5GHjqK8UJgOIEpImCTGRJKswOoBjvDteu/iZhOgWR81TNqJlnNEtS upPkdVzaXy6BOHA/YLVcQs1UFQ3tf/JZslx7Ba+fQexCNNIDrcr/5U4azhpBwrhD3FLy lRRUI1hwvrg3ZEVrzhv0vp/lDeVYAdz8m/F6o5O4byCA2QprquZojWn3q32uU1spfPKp 6uOJCpcmrMInw/oxNu42uwwlBZ1SFuRV7zGSGEvAskjZMBXEHDoWdDvYLMjDu3hP91IT oZkBTPfxZm2ibQJjQ/G3AXDkfTOYcFh7H9QvnuD1FEODgfAWO75YuawxxI+/o7PiE4p7 +9Iw== X-Gm-Message-State: AOJu0YypyzXJ/dqr5oVE6E7xoN63fwrMx2Pchq5+BRpOdcz7IWlJ3uA8 4+cpTUaawCVsGViXQtgFSwZ496Gr2AQDteUMiU6R5RPLUFdYbq6DhSuhFEElrntzSRdt1ak/2Dp 4 X-Received: by 2002:a05:651c:553:b0:2dc:d2c5:ee9 with SMTP id q19-20020a05651c055300b002dcd2c50ee9mr2012704ljp.2.1714739725256; Fri, 03 May 2024 05:35:25 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id n17-20020a05600c4f9100b0041668162b45sm9200100wmq.26.2024.05.03.05.35.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 05:35:24 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Warner Losh , Richard Henderson , Kyle Evans , Ilya Leoshkevich , Riku Voipio , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 4/5] accel/tcg: Introduce common tcg_exec_cpu_reset_hold() method Date: Fri, 3 May 2024 14:34:55 +0200 Message-ID: <20240503123456.28866-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503123456.28866-1-philmd@linaro.org> References: <20240503123456.28866-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::234; envelope-from=philmd@linaro.org; helo=mail-lj1-x234.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=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 Introduce a method called by cpu_reset(), common to both system and user emulation. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/internal-common.h | 2 ++ accel/tcg/cpu-exec.c | 4 ++++ accel/tcg/sysemu/tcg-accel-ops.c | 3 ++- accel/tcg/user-exec.c | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/accel/tcg/internal-common.h b/accel/tcg/internal-common.h index edefd0dcb7..b85285e2ff 100644 --- a/accel/tcg/internal-common.h +++ b/accel/tcg/internal-common.h @@ -23,4 +23,6 @@ static inline bool cpu_in_serial_context(CPUState *cs) return !(cs->tcg_cflags & CF_PARALLEL) || cpu_in_exclusive_context(cs); } +void tcg_exec_cpu_reset_hold(CPUState *cpu); + #endif diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 225e5fbd3e..1bf85c324d 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -1096,3 +1096,7 @@ void tcg_exec_unrealizefn(CPUState *cpu) tlb_destroy(cpu); g_free_rcu(cpu->tb_jmp_cache, rcu); } + +void tcg_exec_cpu_reset_hold(CPUState *cpu) +{ +} diff --git a/accel/tcg/sysemu/tcg-accel-ops.c b/accel/tcg/sysemu/tcg-accel-ops.c index 2c7b0cc09e..82c8368f87 100644 --- a/accel/tcg/sysemu/tcg-accel-ops.c +++ b/accel/tcg/sysemu/tcg-accel-ops.c @@ -36,7 +36,7 @@ #include "exec/hwaddr.h" #include "exec/tb-flush.h" #include "exec/gdbstub.h" - +#include "../internal-common.h" #include "hw/core/cpu.h" #include "tcg-accel-ops.h" @@ -82,6 +82,7 @@ int tcg_cpu_exec(CPUState *cpu) static void tcg_cpu_reset_hold(CPUState *cpu) { + tcg_exec_cpu_reset_hold(cpu); tcg_flush_jmp_cache(cpu); tlb_flush(cpu); diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 6a108eb212..85e92ec8f2 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -39,6 +39,7 @@ __thread uintptr_t helper_retaddr; void cpu_exec_reset_hold(CPUState *cpu) { + tcg_exec_cpu_reset_hold(cpu); } /* From patchwork Fri May 3 12:34:56 2024 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: 794375 Delivered-To: patch@linaro.org Received: by 2002:adf:a153:0:b0:34d:5089:5a9e with SMTP id r19csp711744wrr; Fri, 3 May 2024 05:36:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWVJLyxkvPJOvkbKwn7SIfsI+NztDcO3sMp7z2lHuTDtUdntSz7+y5ngdefZ21PF1JGeWvlZ1YTJvL3h12/MYMI X-Google-Smtp-Source: AGHT+IEcp+nefpJnaDXFdzH8/Cg05Rb6Ylc0SoTClbROI5Cy1Kg9U7yUUclhTIhGaBJZA2zO1HLM X-Received: by 2002:ac8:7f03:0:b0:43a:712c:f985 with SMTP id f3-20020ac87f03000000b0043a712cf985mr2812327qtk.56.1714739770846; Fri, 03 May 2024 05:36:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714739770; cv=none; d=google.com; s=arc-20160816; b=ebG8rNZ3mrleYVttVarct/x+VY6OzAT99ATPyaY2CyZZQ1em98RyA0fs9Tf0UJRT91 EMPyvMLy8yoE557SY/kI6ylyj1sgMVlqzG1ZldbgW+TGwFKG11Ip8tSquWGB7VTnpQkS YebTYg7hraX2YW9sPMbnspHAQkVsQGHrTnJtC6D12F5Ncq7aCDfJzX9tzqITSF9IyLq0 s5/XMVeY8zpzf5AMcoLDU2/aiv/SagB2o/4XnqXfbwFJOqc1ev3DtdW/dkFohw6JD6Dj v/EvKAlriv+apekmN241IcT4BRqQ8xb1J4dZYB6w9V53hrGihu6rUtOHucBdml1fynf1 90SQ== 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=4Tb/CgMjRwAYjJGSlcjkSqdpYLQYMSWtat67VigpwVw=; fh=XMRXym02iLNKkh4CLdJ1KGbmlbC5N/mIofRY3czz1TM=; b=qRo0DQbsF0wJF+leHSSIY8Jm+9OC7KP33LBUqx+MfQ5lU+/k0oObCXek9bmLjboAs4 y3bNdIF4Ah6ZFjvyXkWgnLLc2PeDalMuIbzL4hCyHEJyBFrThX7eAH/iBY5mLRglqMX+ W7orlW+kmx/mjs2RTX8yIMsCMtE6L/35r3UV8AyJVOPuE1AwzNIBO8K2rKroB2HRp/jw uV4rphP/V6Oy3Nw7HTQWhcWQR9Y5G7Pcp5Ppk+qGipQvcQgZZeoo+KWLLqegOPyFQ1bC k1tluyjqg4nApBBuLZ1CdWWKIX+RQuXKWQ9uPR9MOyQngZ+wJ9CW29/KiADq04fdrim3 17+Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="U/FbBZDe"; 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 j16-20020a05622a039000b0043adc263ed1si3289518qtx.350.2024.05.03.05.36.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 May 2024 05:36:10 -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="U/FbBZDe"; 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 1s2s8s-0007g0-Us; Fri, 03 May 2024 08:35:58 -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 1s2s8X-0007Uv-B1 for qemu-devel@nongnu.org; Fri, 03 May 2024 08:35:41 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2s8T-00037f-Jb for qemu-devel@nongnu.org; Fri, 03 May 2024 08:35:36 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-41ba1ba5592so50089725e9.1 for ; Fri, 03 May 2024 05:35:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714739732; x=1715344532; 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=4Tb/CgMjRwAYjJGSlcjkSqdpYLQYMSWtat67VigpwVw=; b=U/FbBZDerOkJ2rUe1UU3n5vYfq7NJSfEADoYTFXWpqaRWMHG3FFsrpnimltFrCnOtX 3lpzMEnUjDJ3nKoljxz2sY3N0a+e4Mun3nlwJ2Ydu5GZR+MhrD14x+pbrWwdxfVmLDN+ nwubSI3r3k6H08YZXDJKRNr9o0wPb4G1I3DrIL3Izt6jcI/OE6HRIPXXBJPTdpeib5Cu XBo5PvYBe2BlFqKCOu3vOFZbANfkPjUda82q1GxlHS/q8E2M/u2g+BgQU6lWI7SmSKkT HTEYE6QDwLcYq90Q4qO/6OgppB6iHPqz99zfAiOlcVPqdviWIJ+lBxiwviMpyMKvMooO DE1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714739732; x=1715344532; 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=4Tb/CgMjRwAYjJGSlcjkSqdpYLQYMSWtat67VigpwVw=; b=hmHygPzTtv2HXKumVJqLlFkmT5ngRfdApG6rj/dXdZM1HCuCcyU87KyQO+JfPLHotr AzPgYuxYlMNagabf7qKuzj66X8hy7/32jrugBUCfGJx65/frhhvqBgmbBIV7DAQK8X6J 29A7Q1KEHzJntj4S1J09/n+L6fiFKcQkPX4GSH8PtuxriQfCmUZJsiMZhyinUWj7El2b ZOw6yN6KJ7BrD4WBHHiKz5ZF7AbS0qxpnZXHgQoki0ceOSilDRReAdoiSws/zU/r6k0e aVMOZRX1fk4II70ygQvHdmyFMnYoAWS6cb9wm9f1l+LQgAUDPOC9f/69100Fjf4qmW9o 7KdA== X-Gm-Message-State: AOJu0YxNcCKM/xiwO1H7SS4JxiZyxuP4PXJghzS/yyz8yed75Gj7ssKY 2bMsdeelmvRGaGHT3xC1S1fMV/+U3cllphPjZpSjEpYBfm2ale5BdV81Ou6gs4k9Y47LUogmQpE A X-Received: by 2002:a05:600c:1d0a:b0:41c:2699:dd9d with SMTP id l10-20020a05600c1d0a00b0041c2699dd9dmr2273086wms.28.1714739731682; Fri, 03 May 2024 05:35:31 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id je8-20020a05600c1f8800b0041bf28aa11dsm5504533wmb.42.2024.05.03.05.35.29 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 05:35:31 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Warner Losh , Richard Henderson , Kyle Evans , Ilya Leoshkevich , Riku Voipio , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-stable@nongnu.org Subject: [PATCH v3 5/5] accel/tcg: Always call tcg_flush_jmp_cache() on reset Date: Fri, 3 May 2024 14:34:56 +0200 Message-ID: <20240503123456.28866-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503123456.28866-1-philmd@linaro.org> References: <20240503123456.28866-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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 In commit bb6cf6f016 ("accel/tcg: Factor tcg_cpu_reset_hold() out") we unfortunately restricted the tcg_flush_jmp_cache() to system emulation. Move it to the common tcg_exec_cpu_reset_hold() handler so user emulation gets the jmp_cache initialized when threads are created. Remove the NULL check in tcg_flush_jmp_cache() from commit 4e4fa6c12d ("accel/tcg: Complete cpu initialization before registration") which was a band-aid fix for incorrect commit bb6cf6f016. Cc: qemu-stable@nongnu.org Fixes: bb6cf6f016 ("accel/tcg: Factor tcg_cpu_reset_hold() out") Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/cpu-exec.c | 2 ++ accel/tcg/sysemu/tcg-accel-ops.c | 2 -- accel/tcg/translate-all.c | 5 ----- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 1bf85c324d..7e04df2902 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -36,6 +36,7 @@ #include "exec/replay-core.h" #include "sysemu/tcg.h" #include "exec/helper-proto-common.h" +#include "exec/tb-flush.h" #include "tb-jmp-cache.h" #include "tb-hash.h" #include "tb-context.h" @@ -1099,4 +1100,5 @@ void tcg_exec_unrealizefn(CPUState *cpu) void tcg_exec_cpu_reset_hold(CPUState *cpu) { + tcg_flush_jmp_cache(cpu); } diff --git a/accel/tcg/sysemu/tcg-accel-ops.c b/accel/tcg/sysemu/tcg-accel-ops.c index 82c8368f87..13e450c088 100644 --- a/accel/tcg/sysemu/tcg-accel-ops.c +++ b/accel/tcg/sysemu/tcg-accel-ops.c @@ -34,7 +34,6 @@ #include "qemu/timer.h" #include "exec/exec-all.h" #include "exec/hwaddr.h" -#include "exec/tb-flush.h" #include "exec/gdbstub.h" #include "../internal-common.h" #include "hw/core/cpu.h" @@ -83,7 +82,6 @@ int tcg_cpu_exec(CPUState *cpu) static void tcg_cpu_reset_hold(CPUState *cpu) { tcg_exec_cpu_reset_hold(cpu); - tcg_flush_jmp_cache(cpu); tlb_flush(cpu); } diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 83cc14fbde..93202fa3c1 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -663,11 +663,6 @@ void tcg_flush_jmp_cache(CPUState *cpu) { CPUJumpCache *jc = cpu->tb_jmp_cache; - /* During early initialization, the cache may not yet be allocated. */ - if (unlikely(jc == NULL)) { - return; - } - for (int i = 0; i < TB_JMP_CACHE_SIZE; i++) { qatomic_set(&jc->array[i].tb, NULL); }