From patchwork Thu Sep 22 14:58:23 2022 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: 608214 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp388753pvb; Thu, 22 Sep 2022 08:02:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4IVUj5FvKLzEu/bD6FQenim1ZpTWZKasAnXJcm89mr0ixWr4ssDSpgpBSLgTlNEZeyhraG X-Received: by 2002:a05:620a:400f:b0:6be:971c:3749 with SMTP id h15-20020a05620a400f00b006be971c3749mr2389328qko.427.1663858923247; Thu, 22 Sep 2022 08:02:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663858923; cv=none; d=google.com; s=arc-20160816; b=mcXPWR7xkLNN1fFxQM4+4sLDUMQxjZXnOvepX8otOeCH7VlX4vQlElG1HemSGPH7/Y Gt6K3DGydjLdiUwSq6bvExTtlGe3gqfkorPSnm4wtsCdVHj0PauvOfMS+Uki9P6JJouG 2CH+dWiolC9+NEPtgHE4nc215IFWGjP1BXTYcYchbZXreB+hyE2MmfsHHHfzR9YlkDno 2M3/OMxs4wSaKBKML0ZhtZ4CF7dv0xwtVLwU5qkzactk27AK+4ohxVFtIVCFJhb9mgQT sUeMr0JJmDfbyQUhRpBwyVCbXzx+P//W9Zkt26wj9OrJEYiyXUR5Wwym/9KURJi7e6yy nPKQ== 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=fJPef0+d8KnIqOgWHzhMLoi0gj7iFSR6z8ZevEFYEc4=; b=w6reA78Encz9MaLRw2iIngE3la97wx04AEtqpYwdelXedTRIrp+Jslw7XD6E7QtOk6 hr7qDTndVB72KALwXJ92dnA7YHHu0fg+FEptAcSqPxOhjUzs5pytP8cXxl64AB5xEfgq jMyLZivnmhfMdCrtdUc3tN1Ur0oqZ+84ibMa1eX5f87UJM3f4msXtWipSq8z0pfOAGdk 48+QGKtltwRwjau+XAGcVN7m07lj0oANhxn+Iriv0nPYODkC1XJKDJmdKj9QW8qvD9IN zJIOH7YwqO1o/5dgSjBKgfWwFSI++3vkUH6HmHi/8SecLwnP/SoOd29YTS+WhSogZyOb 5GZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rQZTIhmU; 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 ay24-20020a05622a229800b0035d1b116b2asi240534qtb.80.2022.09.22.08.02.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Sep 2022 08:02:03 -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=rQZTIhmU; 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]:45340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obNiE-0001GX-JB for patch@linaro.org; Thu, 22 Sep 2022 11:02:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47822) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obNew-0001EA-9m for qemu-devel@nongnu.org; Thu, 22 Sep 2022 10:58:38 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:38504) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1obNeu-0000v5-Gw for qemu-devel@nongnu.org; Thu, 22 Sep 2022 10:58:37 -0400 Received: by mail-wr1-x430.google.com with SMTP id n15so9071172wrq.5 for ; Thu, 22 Sep 2022 07:58:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=fJPef0+d8KnIqOgWHzhMLoi0gj7iFSR6z8ZevEFYEc4=; b=rQZTIhmUNq+1icbn1YSf01Ud2EjKyCV9U4cIOQzTXof48twPeb0qBee1nS89AZhiAS sOHI7eQzAHkXxc5szvgPmzFp8vxZyojrf8e46qDIMuTm49aMbMM8OYpOefmWvn3T7yZX PQk6MOC2qshBsuIK9akYkXMMYNXUcbyiKqlfzMmdg/0dA/5bLJPc4y7j4k+1YZ7rlMp1 TrBKgwsyUkzLUsy+dXj06qkl9cDGTW0mpfXAC+qrTTsGSA+IcJWZHF2s6ZAWyscu35/1 /gUVMSz5t41Yw6uh6Ye3dhkkuknd2NM5ZPoUjTEBhh0hHytnqawOkwAEbcLiUXEQYQs9 0N9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=fJPef0+d8KnIqOgWHzhMLoi0gj7iFSR6z8ZevEFYEc4=; b=YHiLZtwU5O7+XBumt46V9I4k2mAwZBbn3+sRGYe10HpGDiGtULzaOHsdT5eGuLpGT+ 13J33fkrzdFMPe+4XA8vc1nVBHgXKGJ6VvNQDJf5q6VKRQ0+M0iEdOl+QYyqIKjM19uN qI06c+WTJr34XFB6wbSMgPGhwAyCMD23rnmz1Xlezmk1yYrSi9bEhxbxOLVt9SOvUaAV ZoCPEPEaZoY74mLH49JLOULyQMqJwDYz9qS/0a8vyuLOF3f6aUUgAEez5FNqC03TSzmP 8ln0wNQc5ZHnltzrp0MfN7CNb/NJT2ATYexlQtdEDkyL4etRYBjAvAxsJim+gYSpvLGc UJhQ== X-Gm-Message-State: ACrzQf17Y4pBz/wOKCzKVChRzzN61NTBc2hGWkHR2ayp0Kb6u5Q/eoVE DtxQbEvpCD2Znld2gjPrLd8n0Q== X-Received: by 2002:adf:f4cf:0:b0:228:63bd:da33 with SMTP id h15-20020adff4cf000000b0022863bdda33mr2323236wrp.181.1663858713391; Thu, 22 Sep 2022 07:58:33 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id z5-20020a1c4c05000000b003b5054c6f87sm1524827wmf.21.2022.09.22.07.58.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 07:58:32 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 503291FFB7; Thu, 22 Sep 2022 15:58:32 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: f4bug@amsat.org, mads@ynddal.dk, =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v1 0/9] MemTxAttrs cpu_index and gdbstub/next Date: Thu, 22 Sep 2022 15:58:23 +0100 Message-Id: <20220922145832.1934429-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.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" Hi, This is v2 of the MexTxAttrs update alongside the current state of gdbstub/next (as fixing current_cpu from gdbstub was the original motivation). This includes a little re-factoring to split of the growing gdbstub.c core into smaller discreet units. The first aim of the re-factoring it to remove the kvm specific hacks in gdbstub and replace it with accelerator operations. This will help with enabling debug support on more accelerators by keeping things well partitioned. Please review. Alex Bennée (9): hw: encode accessing CPU index in MemTxAttrs qtest: make read/write operation appear to be from CPU hw/intc/gic: use MxTxAttrs to divine accessing CPU hw/timer: convert mptimer access to attrs to derive cpu index configure: move detected gdb to TCG's config-host.mak gdbstub: move into its own sub directory gdbstub: move sstep flags probing into AccelClass gdbstub: move breakpoint logic to accel ops gdbstub: move guest debug support check to ops configure | 7 ++ meson.build | 4 +- accel/kvm/kvm-cpus.h | 4 + gdbstub/internals.h | 17 ++++ gdbstub/trace.h | 1 + include/exec/memattrs.h | 8 ++ include/qemu/accel.h | 12 +++ include/sysemu/accel-ops.h | 7 ++ include/sysemu/cpus.h | 3 + include/sysemu/kvm.h | 20 ----- accel/accel-common.c | 10 +++ accel/kvm/kvm-accel-ops.c | 9 ++ accel/kvm/kvm-all.c | 44 +++++----- accel/stubs/kvm-stub.c | 16 ---- accel/tcg/cputlb.c | 22 +++-- accel/tcg/tcg-accel-ops.c | 98 +++++++++++++++++++++ accel/tcg/tcg-all.c | 17 ++++ gdbstub.c => gdbstub/gdbstub.c | 156 ++++----------------------------- gdbstub/softmmu.c | 51 +++++++++++ gdbstub/user.c | 68 ++++++++++++++ hw/core/cpu-sysemu.c | 17 +++- hw/intc/arm_gic.c | 39 +++++---- hw/timer/arm_mptimer.c | 25 +++--- softmmu/cpus.c | 7 ++ softmmu/qtest.c | 26 +++--- MAINTAINERS | 2 +- gdbstub/meson.build | 9 ++ gdbstub/trace-events | 29 ++++++ trace-events | 28 ------ 29 files changed, 477 insertions(+), 279 deletions(-) create mode 100644 gdbstub/internals.h create mode 100644 gdbstub/trace.h rename gdbstub.c => gdbstub/gdbstub.c (95%) create mode 100644 gdbstub/softmmu.c create mode 100644 gdbstub/user.c create mode 100644 gdbstub/meson.build create mode 100644 gdbstub/trace-events