From patchwork Fri May 3 09:16: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: 794363 Delivered-To: patch@linaro.org Received: by 2002:adf:a153:0:b0:34d:5089:5a9e with SMTP id r19csp642394wrr; Fri, 3 May 2024 02:18:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVNvfANuHggi2d+ioWxe5SMmKK0+d3WmoLm9vm9AEvOmw2q6B9+SW5Id4ka+umvI6+JcG6SAX8G9tzHzy2mAoyR X-Google-Smtp-Source: AGHT+IHVBOP1Plx7p2CMBOZJD/I1rpdj+1GgT/rX+u5An3iOk3lgrj5sGDrHFSrwpDx7akvL4A10 X-Received: by 2002:a25:a308:0:b0:de5:4ed6:d3f2 with SMTP id d8-20020a25a308000000b00de54ed6d3f2mr2224512ybi.20.1714727894642; Fri, 03 May 2024 02:18:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714727894; cv=none; d=google.com; s=arc-20160816; b=Lhp0btcFqtwqzXxqD2rquxuP2gtVihSfUZgOF67W+QnBubJx2KndKWAIiggfOPE3AE iPhCbn99ljyx7tCSQdWrVbKMddEYRiLiZr+Bqm95qY3Jn4MDr9nv8PFFMLG/a9anNoIt 4yaO7jdwSngXobhQivFyhXxcuygRrAiXOJt3dAigDPL9uCkydUfDypCDBdl994i09uRC y7AjzC9awobbH/hypeXnSWIecKSh2cZrhhcUEv0n8rusAB1Uh2+jqhTufY8RFAMBy3Vt 3qpiYtTwlch4gIG782Eaoeb3/bwfNuGyAYwi+90kN6WkX++ntqrRr4TrL4Vu/MB8t7hT bJjA== 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=PjIC0hzeanG/udtndv7wQlWjrcv140/3TttCqxYBKio=; fh=Wz5tv+q376m1WnuXLGinc1he4hBXyNhLC9q3oZt2ig0=; b=E6Ft0lQWswRNUDUEaIiXtQWCsK2OIfAn4fecrYPrwAOLlwTrG85UF3omKIRAqxgAgJ E5l1BmKUOGX5HPfd8ieBGhCmkz9dYMFrM1mIEOcFo78Gs906dM11K3aqIykm9a/WHUUk tRJcS9iETJ1tcZ9PBGfGUK7SOR6nHcsPcP6W+A1ByIEYIKKiUjjkDRgRHub9iXfWVpKQ 0ete9Z8SHiNQGd4qI2tGrMBWE//dYGrAgGXxr8cX0biDu9Ky5i1cDJp/v8M0JdCHn5SM FFQ/pKn3q+MB3bJ+5DDVvNBaCzoTACeyS+Q8QhUJTuAN9BS2QGC02WSWVHBUBXJSMHS6 y4qA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vyAsJSFd; 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 u18-20020a05622a14d200b0042aaa53f36dsi2930930qtx.573.2024.05.03.02.18.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 May 2024 02:18:14 -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=vyAsJSFd; 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 1s2p2W-0001gK-TY; Fri, 03 May 2024 05:17:12 -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 1s2p2T-0001fo-QK for qemu-devel@nongnu.org; Fri, 03 May 2024 05:17:10 -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 1s2p2S-0003W2-1s for qemu-devel@nongnu.org; Fri, 03 May 2024 05:17:09 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-41c7ac73fddso47135005e9.3 for ; Fri, 03 May 2024 02:17:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714727826; x=1715332626; 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=PjIC0hzeanG/udtndv7wQlWjrcv140/3TttCqxYBKio=; b=vyAsJSFdzRAB59KiGFBTE1CgT6NAo+7hWEYTEt+7+xJcGa/egpYRQs6ZUiK78nmC9A nHMKPgaap9PS6wNbTMtfePZ8+C/NgrSab8MseYZKVQl3TLgiW/rfLBVvLZ76fvi1rd91 B0wBHQRY5TV4mFfrRLXjhfO2qRvJgPfGQ5gHnmZTsy3dtjWmWDj7/EStihuBELz+26HQ Imei76ghl/CYBEgUPNUFjA0S1BbP7wghyc0pLcG+6A1Aw3Cx43hCGjSZDfZQabL5pNwc ueQ3xlcu6O2R6/5/UIqx6Btcdfnnr+dYtH9WHhYxMiffhh2AZD0bfDZTy6I1AG9vuoVi ydLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714727826; x=1715332626; 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=PjIC0hzeanG/udtndv7wQlWjrcv140/3TttCqxYBKio=; b=b20RYfTXBqx1rNcFE1rTW/ErHpxHqnBhlRpCq+rp1Ew1y7PM+01XiB77cwlVhOPDtS akazTXB+pZnH+C58fe/ynYJGkvF2p/v3JZcTqF/541omiJlw72Evg7FE6Y/gRiUepbID km4q9CkhX+baztTYkNx7zHz9EnwkRD3S8c2vWpOrLZIRNk7ElomO1hJQVW2wZAfGpC2M VgCi029z8xbfm9O8weA4qBzF0xeH/OOlitKpkpWQpoMypsdbyq0mlFd7g90wGeouv9Mk Qka0kbl51FuhurTyfvgFZC/7WToVUXdcBRkyT3CZGIjDv2ApAksDMzP2Pj5QlxSBReB/ BZwQ== X-Gm-Message-State: AOJu0Yy9J2VIRjZvPs0yUYvZhr4M9KhqwOrXDax4HMZnPeq1Fi4PmHh1 R/VoHq6PqylnmXUrS04EhFaCj5+nvZbX9xiQ8Ut+KfHOMCMFE3oPoYEgPqmqX01XgJ+MA4wV044 / X-Received: by 2002:a05:600c:1d0a:b0:41b:fa34:9e48 with SMTP id l10-20020a05600c1d0a00b0041bfa349e48mr2099286wms.30.1714727825926; Fri, 03 May 2024 02:17:05 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id p9-20020a05600c1d8900b0041563096e15sm8721875wms.5.2024.05.03.02.17.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 02:17:05 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Warner Losh , Paolo Bonzini , Laurent Vivier , Riku Voipio , Kyle Evans , Ilya Leoshkevich , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH 1/5] accel/tcg: Simplify meson.build using subdir_done() Date: Fri, 3 May 2024 11:16:53 +0200 Message-ID: <20240503091657.26468-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503091657.26468-1-philmd@linaro.org> References: <20240503091657.26468-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=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 If CONFIG_TCG is not defined, skip this directory calling subdir_done(). Then since we know CONFIG_TCG is defined, we don't need to check for it. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/meson.build | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index aef80de967..f40959436e 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -1,8 +1,11 @@ -common_ss.add(when: 'CONFIG_TCG', if_true: files( +if not config_all_accel.has_key('CONFIG_TCG') + subdir_done() +endif + +common_ss.add(files( 'cpu-exec-common.c', )) -tcg_specific_ss = ss.source_set() -tcg_specific_ss.add(files( +specific_ss.add(files( 'tcg-all.c', 'cpu-exec.c', 'tb-maint.c', @@ -11,24 +14,23 @@ tcg_specific_ss.add(files( 'translate-all.c', 'translator.c', )) -tcg_specific_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-exec.c')) -tcg_specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_false: files('user-exec-stub.c')) +specific_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-exec.c')) +specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_false: files('user-exec-stub.c')) if get_option('plugins') - tcg_specific_ss.add(files('plugin-gen.c')) + 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( +specific_ss.add(when: ['CONFIG_SYSTEM_ONLY'], if_true: files( 'cputlb.c', 'watchpoint.c', )) -system_ss.add(when: ['CONFIG_TCG'], if_true: files( +system_ss.add(files( 'icount-common.c', 'monitor.c', )) -tcg_module_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files( +tcg_module_ss.add(when: ['CONFIG_SYSTEM_ONLY'], if_true: files( 'tcg-accel-ops.c', 'tcg-accel-ops-mttcg.c', 'tcg-accel-ops-icount.c', From patchwork Fri May 3 09:16: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: 794367 Delivered-To: patch@linaro.org Received: by 2002:adf:a153:0:b0:34d:5089:5a9e with SMTP id r19csp642512wrr; Fri, 3 May 2024 02:18:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUliB6RUn1UwUslRlLNkEmHZ3dyJoscgq2lQEw57NOr5es/ANox2HnjSU+dHBn6aCt8sNfL/Q8RE5lAJA9PY4TP X-Google-Smtp-Source: AGHT+IFDbTCUfuY5fGh9i1nWyppeRtzCOv2CjZ5Wkzt/Qls8+IZuC2aVIcxZWOrmE6k4BHtSW/Xc X-Received: by 2002:a05:622a:164a:b0:43a:d84e:442b with SMTP id y10-20020a05622a164a00b0043ad84e442bmr2073815qtj.5.1714727917298; Fri, 03 May 2024 02:18:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714727917; cv=none; d=google.com; s=arc-20160816; b=NKETnUkjnymrWvlBDo4+NINE8t94TTzrCtuG9nVdSnAYqdMWozxXHlo8fvIryEeOS5 6uQz9UhSXM3pQyu1QVPRkztwWVOTDP75lDd27NJwc+sFsEAf/1lasAQ+zCfqKOw7dtR8 Apb8QjIjjl5vbNOh5ZWNYfEHhoasLZG+A4id+iFip+Hbk5zo9PxcMcyQLD37HCrYRJNv qm2nMhgqMYE7laArMGI0/V0U11C48GrAqf+iQITyuVQ7AHbuaWkdkMAg/1RhTUCcJjPG 2DK2PDYQPAxOud7hOKv6m4C4cU/HKi6osnPhDo26se6P86iUHps9AZcvn9bPHNMzeFyY Im0w== 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=1/nrhpPctNIFKbTVUUpB8iSj1laj4YlC2viiNoCursk=; fh=Wz5tv+q376m1WnuXLGinc1he4hBXyNhLC9q3oZt2ig0=; b=j+iw9JTNZiv/OyfHxKTCXiC79mcXioi4bJlAkj7kyEJeahbrk1Fqhitn3pNvT6IO3f rt3CrtnNGuesLiVYAAZRgn7H51xYfP43J82Pb6cKRRUSndDso8XN5mGXjNiVhEPHN0s4 ZeLgoKRvIV8e5kh/EKP0fRqaMS9BmuW+vYIHzQBZJUGWlFw4YyRI+HLa+yq+TEdAmBCT KoQWbGgEAA7/XL3PCxOxrn396wzctERJFkircHZlujHCeo59gQJqbjyiptYPp7aihV5C F5fERnGVISZit4UStFodgLyrEEUD2NvV7wb3VCkeIBc2MreEVwr5tLziUL31+gapj674 B20g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CWddUIEs; 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 8-20020ac85908000000b0043af86e7fb0si2980756qty.205.2024.05.03.02.18.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 May 2024 02:18: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=CWddUIEs; 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 1s2p2b-0001h6-6O; Fri, 03 May 2024 05:17:17 -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 1s2p2Z-0001gr-FI for qemu-devel@nongnu.org; Fri, 03 May 2024 05:17:15 -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 1s2p2X-0003ZV-Ir for qemu-devel@nongnu.org; Fri, 03 May 2024 05:17:15 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-41bab13ca4eso47913325e9.1 for ; Fri, 03 May 2024 02:17:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714727831; x=1715332631; 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=1/nrhpPctNIFKbTVUUpB8iSj1laj4YlC2viiNoCursk=; b=CWddUIEsDjkjJn/C7tFITvsJvhbVTwmpRy1MdbpZMX19W5vghItn59iOjZjF0O3s7Q ihIfCX8PSPvTkQkNCNEARSWIXKEsM4ik8A01UoGSslC85CY6KYiTtZhpz+Nrbo+bfTF1 OMpIKTVl0lBsHk6uVyaOCmbp49DtSJ0lMfAe34NE/3nQqM3qO+wG0QjW6wK2aU311ocM 3pBVHQW+1V4ZlYbxxPGMJLrbb8MabJtupV4m3msCDMiLnWr92d+/w2nclKNpvp14f8xV eaKW9vc3vakyVZDH2S2siwvQfNbSvbKUCZT4lspF4MOB1XcFFE6uRCerdGsBHhv2ceDI EQYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714727831; x=1715332631; 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=1/nrhpPctNIFKbTVUUpB8iSj1laj4YlC2viiNoCursk=; b=tP8mBrfFxzKcRy3rHtvn3fAo6Svn4bbL5NpsiLCydSkzsnXiQBkYmKi6sO8cy5E1aW vp/GbxeYFsHD7H0akF256/GYcDOy4i/jXm3OkKvf+3pYC//Pxh4W8smxOhekFzMwtRsQ C6ywcrlh8sEbQHzNzLs1g/GQ5eY7jrlLhRcPkY/WZDCwkNy2qi5dNI+fuu61OnWocyQa oajlYpFRyAFBM6H0XYJzxweJ5S4cC/PIDr6UPDTktOHBvCL+Jua2Td1qiSyKVr8TSm8R Sc+Y+ii6wBg0ntUPfDFL6NnaE0j1avLjknM/kfp5LEg9ag9/hb4CJbnFWgPINKRdq65Q Z4Iw== X-Gm-Message-State: AOJu0Yz2Iy2IrndwZYo5ow63Nxe5ghlRmZCW6Gj5TEIaH5dn3OLfJ9oX DaJjDaZ2jOlKYbTaA5qqYjkZKbeo364FoiTqP2ChpdKfnEh/U+kQpVBJT8VNTnumif1jia1AbuJ o X-Received: by 2002:a05:600c:4505:b0:41a:a08f:2696 with SMTP id t5-20020a05600c450500b0041aa08f2696mr1765123wmo.12.1714727831576; Fri, 03 May 2024 02:17:11 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id t1-20020a05600001c100b0034e0a3a9e14sm3273731wrx.75.2024.05.03.02.17.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 02:17:11 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Warner Losh , Paolo Bonzini , Laurent Vivier , Riku Voipio , Kyle Evans , Ilya Leoshkevich , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH 2/5] accel/tcg: Move system emulation files under sysemu/ subdirectory Date: Fri, 3 May 2024 11:16:54 +0200 Message-ID: <20240503091657.26468-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503091657.26468-1-philmd@linaro.org> References: <20240503091657.26468-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 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 | 14 ++------------ accel/tcg/sysemu/meson.build | 11 +++++++++++ 12 files changed, 15 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 f40959436e..8d263a71cd 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -20,19 +20,9 @@ if get_option('plugins') specific_ss.add(files('plugin-gen.c')) endif -specific_ss.add(when: ['CONFIG_SYSTEM_ONLY'], if_true: files( +specific_ss.add(when: ['CONFIG_SYSTEM_ONLY'], if_true: files( # SOFTMMU 'cputlb.c', 'watchpoint.c', )) -system_ss.add(files( - 'icount-common.c', - 'monitor.c', -)) - -tcg_module_ss.add(when: ['CONFIG_SYSTEM_ONLY'], if_true: files( - 'tcg-accel-ops.c', - 'tcg-accel-ops-mttcg.c', - 'tcg-accel-ops-icount.c', - 'tcg-accel-ops-rr.c', -)) +subdir('sysemu') diff --git a/accel/tcg/sysemu/meson.build b/accel/tcg/sysemu/meson.build new file mode 100644 index 0000000000..d0b4939ba9 --- /dev/null +++ b/accel/tcg/sysemu/meson.build @@ -0,0 +1,11 @@ +system_ss.add(files( + 'icount-common.c', + 'monitor.c', +)) + +tcg_module_ss.add(when: ['CONFIG_SYSTEM_ONLY'], 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 09:16: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: 794366 Delivered-To: patch@linaro.org Received: by 2002:adf:a153:0:b0:34d:5089:5a9e with SMTP id r19csp642465wrr; Fri, 3 May 2024 02:18:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUoexSrDLNkTHZPj3cboH4odFrvyJHRCjZJbLjGEI2obIkUxvP12khOInY2LaxhvMl4Pc9N9ClDEjulUQg12bmz X-Google-Smtp-Source: AGHT+IEBnKyIEtCifvzG48aplZjVJYg3exFYxKMy26ZOTOMYqIwGhLpnRIQ1KETW8PoCkSagNTWc X-Received: by 2002:ac8:57c4:0:b0:43a:ecf9:c179 with SMTP id w4-20020ac857c4000000b0043aecf9c179mr1571828qta.52.1714727907114; Fri, 03 May 2024 02:18:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714727907; cv=none; d=google.com; s=arc-20160816; b=MW+xvfsLDw/Mpqj+61t3o4m5y9V8m7re5m2Sp5jhsFuEVGV1X2UMtEmXTw65pT8gM8 K3+krG5GkcefxTlg5D+uFMEpetl9dOEm7hLAzbOHhOQLFhsXFG3tPxW5AtXN/l9sNiKY f+kSfDp+2Rteq65IULhK69B6GfObHf7vZqiRuOIU3eHEpC3yQX7iWu/S9ZcQ9t+QOUq7 1hksN3oo5tlHstsuyM5gm72xJnXr1xCNrMoz9Kxt0VFlvGCZI15VVTFLCo4P2it9WX+r 1Hol7kQLs95SbTWvUjVu+wkDaI+SYzx66aBwRy4jGJbPWf4vxTDM1rDzmoB4QC1QUGGQ /yFw== 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=Wz5tv+q376m1WnuXLGinc1he4hBXyNhLC9q3oZt2ig0=; b=ooGgIg45Tc4MjF2VacDEebT54mIn88AqNWrkKosjEtBlNvOzQLwOiefU4XrWbMiyHo djEdjbjUSogXS/jojNZxbzhVa2L8lMVMNYqjKs6MMTgd4P3Pgp9LYbhRVGAZ83k00Pi9 lbKeTEkRS3Crk+xVxd3Spj1JFXuXUNwais2dQbvhIqbGHzqlb2uoKqa+6jCC/DNvLkKi 2nNDVS575KLWg20rBRpcE/UrCYLC2APfoBEljf6u7G3Mg/yNnCCQD2J103uPVqHtlB+5 tuXBWYAKclqIwIGzGXcNLs6RNcxJhIgirDCWIWCkZGQiycJyetQVVxmzGLLnHFQswq2V 790A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JGWtKHlH; 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 o12-20020ac85a4c000000b00437c00fb70bsi2969832qta.627.2024.05.03.02.18.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 May 2024 02:18:27 -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=JGWtKHlH; 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 1s2p2h-0001hv-9X; Fri, 03 May 2024 05:17:23 -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 1s2p2e-0001hY-4h for qemu-devel@nongnu.org; Fri, 03 May 2024 05:17: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 1s2p2c-0003aM-K5 for qemu-devel@nongnu.org; Fri, 03 May 2024 05:17:19 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-41b5dd5af48so63880165e9.0 for ; Fri, 03 May 2024 02:17:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714727837; x=1715332637; 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=JGWtKHlHW3G7TlKBdB1wnjwifucetiaBr8ST0mZfmhrdDjhzo5/gLwEqbCHguZKtdD zIjspNbo8OKSRfZHHx04ywMjC94r4CC2p6+mk1FZiU4fpM2kx23RQg4JJfcaryBkCAqQ pvcQSpRG/LIjABVxOydCtaExbRwCbe2QSzJ5EuL3jAlbnkSexbEYq2dV4wQyQW7RXHpt 7ErwkLj1q0nl4IiM3Dx+2VA6h98noBWFY1gKLbtyOfyw9BW9AWD/m6u5ZXyBHqs1aU3o PVQHglDpi7IYeI+aXFshwSKNaVvd87X+UAbF7/Rc6Q//8j/pXQ1uizo+MoTxUVPmLZO2 xkTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714727837; x=1715332637; 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=n1VZSgQ38TAqZJGt5DZBTldXCAhmFX6FrauPQvDj1acnD7fT2Iybg/aMIGXz3Np4Xh 2aNe5+nElPFLzwsmuTGXUUSLjwYuAx1nIhH43icXDnSyYvDd3i8Zr3yA4vxYn1buomcL 2NapzXqJbGm0jprEDs7oebVix3vmM46EKQj3G7B6tkQEaHVrTj/OaHQetopkJBQVhr4S dg0TKE9x/wmpavLb1Dasp3q50EGixF128Zfw9s1l3igwKtobM/bUFsK4YQdVvuPoPNq1 zF5wvtFVr5UHnJqCBot8cKEuWctDBMbL7Ko860Uee9qSskYoJfU19QgjveeaJ61Qe2MU tylA== X-Gm-Message-State: AOJu0YxftHyJUzRJpRkFuJjKQE3M/tYo6d3wHXSKVSfPvr+QNLys3PpS dOUl/w6DmMBltroylBl8soeoyRQdyPY2S04QUyIQqZS7fobWZnReLqdunalfFrDiE5/iLaSwIB6 s X-Received: by 2002:a05:600c:1c09:b0:41a:a4d1:a896 with SMTP id j9-20020a05600c1c0900b0041aa4d1a896mr1749656wms.16.1714727837029; Fri, 03 May 2024 02:17:17 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id k6-20020a05600c478600b004185be4baefsm6847025wmo.0.2024.05.03.02.17.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 02:17:16 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Warner Losh , Paolo Bonzini , Laurent Vivier , Riku Voipio , Kyle Evans , Ilya Leoshkevich , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH 3/5] accel/tcg: Do not define cpu_exec_reset_hold() as stub Date: Fri, 3 May 2024 11:16:55 +0200 Message-ID: <20240503091657.26468-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503091657.26468-1-philmd@linaro.org> References: <20240503091657.26468-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 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 09:16: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: 794365 Delivered-To: patch@linaro.org Received: by 2002:adf:a153:0:b0:34d:5089:5a9e with SMTP id r19csp642459wrr; Fri, 3 May 2024 02:18:26 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVoAWzkZ/mw75sCUnse4aJa2hrBfLpHGuHsY0sb9dKbmH/wWgTAIy4KSpaZ+E+klUmIMvd2TYePIt2sjl5XCyGC X-Google-Smtp-Source: AGHT+IF1pnPcFo6a1JLcS0JVXT/g3FJRhT7UXcpOSfrE4bKpvday3Mh5E5EjgHy94zFiCU7ROL1E X-Received: by 2002:a37:e315:0:b0:790:9648:850e with SMTP id y21-20020a37e315000000b007909648850emr2197092qki.48.1714727906042; Fri, 03 May 2024 02:18:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714727906; cv=none; d=google.com; s=arc-20160816; b=F3Xr0C888u+//P4XER3Dtbcew/Fch0ON/PJaBTleDdr4tHkocenmsm4wCP8aNHWSuq LCtlyTHEzokkBBtQPG6UMVKnF7PWn8GrwYbG/MYRl2a9GFV1WfzhqL2AImwMWkFkbV3y yW4d9wSokZWqBoBFqYxi7gMsS4cm7FmOJowFt+XPHFnjqafo8EyisM79DCtZE6dXHOmU ZNCX+4Sd6ph5SBez9gzOv+fJDLyZJuo+wGJqwx8uJMfwBhCUZjcl1cwqaOHcYauXeQAD 2AjhJ9NgXzZKoGX1R9CDHYg/0+3T+wJ214Bv/OIZN1j4sJ8GgbU/3atyIaUN4v0hy4uT b/0g== 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=Wz5tv+q376m1WnuXLGinc1he4hBXyNhLC9q3oZt2ig0=; b=W40ej4mfZqQfFly9eSH1MBsK41fhg0CrBbWCt6YuB9FtZ1J+kyRMqzIT5+fYa7b9H5 wtrxkAhqwhoH3UYUN8fobD+uVCSlmsuSMyXGmvqSFIotfKO4YwL4zIQmnvLbM+wm6rd6 nDFQ3F166KV4Us/hegYydgKXjQG2oEp+bAsfzXlsHL/ax3lOa7R1nWUl/SfoRrYTZxvu Z/ZT8HBHfUbT2T2Wsi4CATsXmHqjmf6IBXc2eiZx7YeNGU1A0NSUrlm87CkMJSF2AYOx g4LKNCRwLx1tVRWXZjerqOOUKlyEmSC9ydbq5uMHU9o6ydYIQ19B8i/Rs+sxScUtaQlW kIRA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jbnHbEvs; 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 vk51-20020a05620a70f300b0078f0532cb9esi2737823qkn.436.2024.05.03.02.18.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 May 2024 02:18: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=jbnHbEvs; 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 1s2p2m-0001ih-7E; Fri, 03 May 2024 05:17:28 -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 1s2p2k-0001iX-Pd for qemu-devel@nongnu.org; Fri, 03 May 2024 05:17:26 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2p2j-0003ak-5x for qemu-devel@nongnu.org; Fri, 03 May 2024 05:17:26 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-347e635b1fcso6635329f8f.1 for ; Fri, 03 May 2024 02:17:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714727843; x=1715332643; 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=jbnHbEvsR0Xd7fBy4Vykdq9w6HG2xt09h722ooiDUBJR1EO+cdTQFvCDP0hDjMIo1B 90zba+/17477kCJAZE1k46/PKspjaRHbZ+OaV80XiiYwhYYxEL/PAG7uoNBdzmJSjcqQ 3ISTkbOkDN8LdNAD4lzCNrBVap3B6pq5veslO0LwuNlLue0jIJ9jUZyVWDNawXrcjdqv wZf+Y6RNv4Y1Yg4RYjdpYuUejiM4lpdJ3O8HzAECUAaxmHNXg/7WjJo4u2OHfyb4g9dH jmNQ5D64OaJbVf5w+YlNfP6pD93RbcBD+kTHJIbQd9DazMNYb4PEc+IW0vuYjmqN437R 2Qaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714727843; x=1715332643; 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=U8WIC5VqW99Oht5xqbo+PjTiuLL4ka1QNazGqwN/rpHARxxMCFFqsKnE+2y7ngO79z u5xMSaAkEY/flUj72PXOsqql16NTLOKlgRMjO5U1LxxtoY57mHk0o+0/HJr7jk3yy15G KTtCVk7xLqml0+s1iwIHXVpxRpoMKT6jAUEJf2pJ7yvtPhC6NYMV80Z/IjQXeNrgxCZk xkMFVBZT8foeQyxziqjOB07XCoeCPeDw/vIBwMbAva4gSgGnMu0mXIVglcEevn+91z4c 3B+3TtENvZx7oeOHkic6ZLbAtPOC6vAdGx+Vo0VPuNWcvIg4RdTvvXsa5Fa3lPLQDPWJ m91g== X-Gm-Message-State: AOJu0Ywnla8nnSugbYYWVLIxbtZ/63DrmpQGBOPZF3h3IQo0PdpasJUd AxCvAPf8bcDi2oHWpTiSbvaD1JukCvzOOrzR9AT6fO3lz1f4W+9LJMcZdZHZgBhu/2Rr69TeX4a o X-Received: by 2002:a05:6000:36f:b0:343:7b6b:dcc6 with SMTP id f15-20020a056000036f00b003437b6bdcc6mr1352192wrf.30.1714727843314; Fri, 03 May 2024 02:17:23 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id p18-20020a056000019200b00347f6b5bb6dsm3256568wrx.30.2024.05.03.02.17.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 02:17:22 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Warner Losh , Paolo Bonzini , Laurent Vivier , Riku Voipio , Kyle Evans , Ilya Leoshkevich , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH 4/5] accel/tcg: Introduce common tcg_exec_cpu_reset_hold() method Date: Fri, 3 May 2024 11:16:56 +0200 Message-ID: <20240503091657.26468-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503091657.26468-1-philmd@linaro.org> References: <20240503091657.26468-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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 09:16:57 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: 794368 Delivered-To: patch@linaro.org Received: by 2002:adf:a153:0:b0:34d:5089:5a9e with SMTP id r19csp642541wrr; Fri, 3 May 2024 02:18:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVGr70M1KJscSYCIjFq4UXYGprmLFGjUGDb1B80q300CMLzWgiiUM5qxe3bVud0Hj8TfhT1j9AHUg4utnr2FkQj X-Google-Smtp-Source: AGHT+IFixBskus2z/AZ5GH/Vnw9S/xCRxAg6/yJAHV2tHKHTQ7prOMEh+ER+KX3UD/PpulTHX1w/ X-Received: by 2002:a05:620a:4156:b0:790:88fe:5658 with SMTP id k22-20020a05620a415600b0079088fe5658mr4424561qko.32.1714727925825; Fri, 03 May 2024 02:18:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714727925; cv=none; d=google.com; s=arc-20160816; b=p5C1gT6+MvsJGS4bU8ethlyZNXkujQUFTcUDFdriM1k2we9Shl8065aBdJ8p5Yb+In BhtondFYL+jiAph97SzbadnYgP+8YLymcbzXSgyI2BxTIlgFsmtJ/AsnqxzM+amgHCp/ 2qmS95oA/yZ8RQkygTszkwmeBaa2jK4ccjrnSEKUeozVfNaGFl4yBeT4eiKmHRWMyG/8 g6UKdBfVKeoiE7duaeKX5brtv7EKhJIrwy0Dcu0is75pDyTK+/34fv3sQWH9VkAWm+Zc EoMvyazQvTf/PZDweycxo8XkMBSDE2s+MUT0JOiLOpFeTBBm2sTqi0MVMzMrO1HB0CE8 yaDw== 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=KmDB6QgYrc6xIg5X6To5kSVGcssfN5VPtzLI2Zb1TxQ=; b=zdI8qojAiOgrqCSmoeB0u7L5ZJl9zxXVJ9VSipsLC66Cwez2Hm1IMG4PIrNojJ97jm csEtGfsA0OcSsiOhcn+NbCPws51HzMIILE5rBb7oaqA/2LD62bLREvW3/X9/YIhqUf9Q XCIbRcGHBgsmerPCCMsXY+iDUEM5/zZUK76PMmLrPrEL1idOeC3RW4xbgrp+g0pbqZBw czoe2B3LLx1mWx0RD/Auoe4GJZTUhk8FIk42f0vd9QxjgX0eb5v3b8JnWCgYdLqUPXJ1 dJSh7Haoe8I4Y/CFuS/tUf2F71HSdSibD2LtS5o2Jl2MnBYlDTNVm2ndkp+OmRJDQsWy cPVg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="j7v/ejya"; 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 d11-20020a05620a240b00b00790f3aa0afcsi3185564qkn.566.2024.05.03.02.18.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 May 2024 02:18:45 -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="j7v/ejya"; 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 1s2p2s-0001kF-1h; Fri, 03 May 2024 05:17:34 -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 1s2p2q-0001jY-Ev for qemu-devel@nongnu.org; Fri, 03 May 2024 05:17:32 -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 1s2p2o-0003b7-T7 for qemu-devel@nongnu.org; Fri, 03 May 2024 05:17:32 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-41b4ff362a8so83312705e9.0 for ; Fri, 03 May 2024 02:17:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714727849; x=1715332649; 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=j7v/ejyavBhkW8SAeiXpAheO/6Dyk0yG5Y3UlNyFcg2KZDTpt9ebzh9jwjUwHRNau6 XKMjBgivtcdGUmMe0qFncQdrT5r/auey7o9udv3lZ9NGSRDAB7OCFe5x1ODbs4la57J2 WM8SYcWzjVRmFIHXjY5GX73Mma566Z4N8lME/uqzgYK+/9nXmmIQ5f8J3BKBdzH5cDw6 mVYhqV2aeedBCzCF5CguO681Pwlw4gKG4bPuGv+Hu2ynU+zNvuvcvac8PMkmVHe+NPq6 AHq1Qx51Y6lbE99pDdurvjY44oEUg2PL3QBoIQElOn2tGqOwkBOrqo7+08m3NbiC0d0/ x9FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714727849; x=1715332649; 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=pOuZuLoT7yfXzOp2wml2f2gDR3CJz5iuAzrJrQ5dfMI5DrvlBovgtAO1ooQJjMS0Io IP6NRq6EqabGhPhrCF7Vfl+HUzAjVZUNh3Hxt5Flj/6ZMdERcRCiVAA0M5eo0At8YWQQ WktF74YIuuE2VG3swiDr8WioIBx+OcVnre5WnUDA+ZJRu6FTKP1M00RNpyhL6V6yrRse tav7EUL7n4PlElG09kWJCFY1xIlIQ6PHNcD7nc/7gguXWBQ+gZ61BtTV9dfEeaQmHHLe EfMEeA7e8duMHdqn0FBY6Tomc0StOiGBvb4YO+iweKUbcsyUAgQ33O3r2/TNhfFgNzEa QiqQ== X-Gm-Message-State: AOJu0YzzcJM47r+YdvhDrlLb0tLp6BK0pa+bnjQapMgUhPfzU2Nj4c8A yvnw3t1YgID5LjWygCAVSSYIHgrTyB5SsEmefZb9oBaYMVLRuKVyA8DE6p3uMR5C9jVO3i7H/tW 4 X-Received: by 2002:a05:600c:3507:b0:41b:eaf2:f7e6 with SMTP id h7-20020a05600c350700b0041beaf2f7e6mr2189421wmq.2.1714727849170; Fri, 03 May 2024 02:17:29 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id v28-20020a5d591c000000b0034db47c7e6dsm3259435wrd.115.2024.05.03.02.17.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 02:17:28 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Warner Losh , Paolo Bonzini , Laurent Vivier , Riku Voipio , Kyle Evans , Ilya Leoshkevich , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , qemu-stable@nongnu.org Subject: [PATCH 5/5] accel/tcg: Always call tcg_flush_jmp_cache() on reset Date: Fri, 3 May 2024 11:16:57 +0200 Message-ID: <20240503091657.26468-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503091657.26468-1-philmd@linaro.org> References: <20240503091657.26468-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=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); }