From patchwork Mon Mar 20 10:10:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 665182 Delivered-To: patch@linaro.org Received: by 2002:a5d:5602:0:0:0:0:0 with SMTP id l2csp1036637wrv; Mon, 20 Mar 2023 03:11:26 -0700 (PDT) X-Google-Smtp-Source: AK7set/L1n0lg1l9R2BBPOlROig5RdrgqG5+TRUTD++dUs5dsEKKbom2jH2IaqNQtNZluvZWX/Tr X-Received: by 2002:a05:622a:138a:b0:3e2:3ae2:7904 with SMTP id o10-20020a05622a138a00b003e23ae27904mr2885952qtk.30.1679307085932; Mon, 20 Mar 2023 03:11:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679307085; cv=none; d=google.com; s=arc-20160816; b=Br1Tusm3kAtTdRigCD2ncbxRAAaAT3wKJApZ2h+tLKelVJzfe8kJPMu7Lc+6VMBDp8 FoueisLNMV2ANW5ES6bH2OeIJW8EB2sSRH8LnsMTlSk+xRo/H9XYTOZDkIKxCF2WNngE zHLGKh2HOllYnD6p8oGn7vfvJcnW4Y/B4KRPScKLttoSGpS60eKAVwYEM0mF9GG3lmJZ oxNnbY6+llO8a+kDeZPgu4GHTxNqDWgaCYLohG0aZ8sBDLeBj9ZnTnmdcamEHRlE4CgK DF5FZaeGC4S/geZneQs5DQjgsWXJPubwld0Iq04Elf6HNwW7MCh+qemgcI669oqvMXnU T2Jg== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=l59c9lso4K7bEwKaiD8KQ/Ithn+PwV5VTKVOr0L+32M=; b=RiFmrz4+Offm3d8Tabor26nBJOfRp+JRWnRt+YMa2uwz3BS7wIYueKXSsRQn6xrviL kbX4XN4AIsMKP2RJ6G+pVWZjr62NuUW1P8HE3krcPpjhHPOf8LJcAjYHYRngcA3beX6q CZAwW4NoH0MA0WWUIA+FSaQALTrZba0gm8ZGnvI31Y78oR4rm6/qDPLzKMyjEMGaXORA XgdIhIHRoDU2bCkP0ZWUUw9Npy8/dR+CgGBNrauyc3kWFga8Xvp3EWjOrMEeVqnkQk6Y +Z4DKZOIqdj2JNyqT9qsJJrhCMbSe1gWXHl9PSZCaQm3sWeVakFHfnvlVQh6c9OZGOLL 80HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Zr6lfSrH; 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 e4-20020a05622a110400b003d859501bf8si5586815qty.774.2023.03.20.03.11.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Mar 2023 03:11:25 -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=Zr6lfSrH; 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 1peCTe-0003oR-Lr; Mon, 20 Mar 2023 06:10:54 -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 1peCTT-0003kz-AI for qemu-devel@nongnu.org; Mon, 20 Mar 2023 06:10:44 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peCTP-0000CN-Hz for qemu-devel@nongnu.org; Mon, 20 Mar 2023 06:10:41 -0400 Received: by mail-wr1-x433.google.com with SMTP id m2so9752817wrh.6 for ; Mon, 20 Mar 2023 03:10:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679307036; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=l59c9lso4K7bEwKaiD8KQ/Ithn+PwV5VTKVOr0L+32M=; b=Zr6lfSrHzsuVrKHM9eDmnF1LQUv28uYmvlhr/K8EQmyNt1XdRbKu2izyq1tKXGiaEA u1I69m39BhPHxnJAbQdm1ZMv9DMAWx4ysYPcfbS/X4okMTcF9+J0eRBOEWAuTwgjV7Ku rZOvKlOZ9p6T46RZWGJpEU9M0AlEkoeksqSxDZrrkyS7mP/nv1P3zx0KtN8SExH20mog behU9AKQkTdy9GAM0WNVQxQA06dvuNjDnp5CRwAzYTSq4esL3SRXWCx82necdJB+yI0n lyaxRrB643JjEsGKYY6ByMCd4dotK9DExJcio8LWnZNLpGAgWkHmx21HZeOekNup9/5z kbVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679307036; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=l59c9lso4K7bEwKaiD8KQ/Ithn+PwV5VTKVOr0L+32M=; b=5beOft88by3OJFyHQHUkCVs9W92faDODkc6nAiXif7ZoQ2+bwg0PGisHqhcs52W50o aRQG+P26lNN0SCjfAXjbf+sVHiLrG69Nih8PdNexpa0UVNqAGwemwcON7GIWYQ9zIUyT sY9s9iiBMz9s21JI892LSIhBc5j7W9W/xTrFt7fU5XzezOech9uOqh1httpUWej1hFZE c3RFUbtUAsvz2/KgJnS46x2dfHgctWblt7ptnLBo1bZVXeZPMImpFanZ+mH6XklhtsMz 9tCrCrb8R+j/S1OtJ9KyxdgBRh39O13FZxFi1MJRKuygeZVdozj+Uhjf3Z35AQVnBwOp xttA== X-Gm-Message-State: AO0yUKV/1M6LofZvCcd32t80lcpDGxFidtUxApqtoN7pS0AT6exgMFB2 lLDjubstopvg6Q57CEgeE63l5Q== X-Received: by 2002:a5d:4ecc:0:b0:2d0:c73d:ef2a with SMTP id s12-20020a5d4ecc000000b002d0c73def2amr12100538wrv.24.1679307036576; Mon, 20 Mar 2023 03:10:36 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id h10-20020adffa8a000000b002ce3d3d17e5sm8589260wrr.79.2023.03.20.03.10.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 03:10:36 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CEB751FFB7; Mon, 20 Mar 2023 10:10:35 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: Alessandro Di Federico , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , Eduardo Habkost , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH 00/10] accel/tcg: refactor the cpu-exec loop Date: Mon, 20 Mar 2023 10:10:25 +0000 Message-Id: <20230320101035.2214196-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.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 This is an RFC for something I was playing with over the weekend to try and reduce target specific details polluting cpu-exec. In the end it does get rid of TARGET_I386 #ifdef'ery but I couldn't go further to just building one version of cpu-exec-user and cpu-exec-softmmu because there are still per target differences. Anyway what do people think? Alex Bennée (10): metadata: add .git-blame-ignore-revs accel/tcg: move cpu_reloading_memory_map into cpu-exec-softmmu accel/tcg: move i386 halt handling to sysemu_ops accel/tcg: don't bother with ifdef for CPU_DUMP_CCOP accel/tcg: remove the fake_user_interrupt guards includes: move irq definitions out of cpu-all.h accel/tcg: use QEMU_IOTHREAD_LOCK_GUARD to cover the exit accel/tcg: push i386 specific hacks into handle_cpu_interrupt callback accel/tcg: re-inline the filtering of virtual IRQs but data driven accel/tcg: remove unused includes include/exec/cpu-all.h | 52 +-------------- include/exec/cpu-irq.h | 83 +++++++++++++++++++++++ include/exec/poison.h | 13 ---- include/hw/core/sysemu-cpu-ops.h | 16 +++++ include/hw/core/tcg-cpu-ops.h | 7 +- target/i386/cpu-internal.h | 2 + accel/tcg/cpu-exec-common.c | 30 --------- accel/tcg/cpu-exec-softmmu.c | 66 +++++++++++++++++++ accel/tcg/cpu-exec.c | 109 ++++++++++--------------------- target/i386/cpu-sysemu.c | 29 ++++++++ target/i386/cpu.c | 2 + target/i386/tcg/tcg-cpu.c | 1 + .git-blame-ignore-revs | 18 +++++ accel/tcg/meson.build | 10 +++ 14 files changed, 267 insertions(+), 171 deletions(-) create mode 100644 include/exec/cpu-irq.h create mode 100644 accel/tcg/cpu-exec-softmmu.c create mode 100644 .git-blame-ignore-revs