From patchwork Fri Dec 20 12:04:17 2019 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: 182243 Delivered-To: patch@linaro.org Received: by 2002:a92:1f98:0:0:0:0:0 with SMTP id f24csp433630ilf; Fri, 20 Dec 2019 04:05:05 -0800 (PST) X-Google-Smtp-Source: APXvYqwSwHiOuIv4xyTD/0gQ6U/RvtwLedWGN10iIFloWFwPEdLVSmh7sLXEdycdHzVrn+vSwW4r X-Received: by 2002:ae9:e901:: with SMTP id x1mr12270472qkf.117.1576843505325; Fri, 20 Dec 2019 04:05:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576843505; cv=none; d=google.com; s=arc-20160816; b=rbKs5Stk9vKEuNb37QVfpoSP3xnEftv13vTg18bEjPtR4RREvnqe2fJLUhru7Br+Z7 voaJTx3h1MNgRydJml3Ao0c9E4JM7rsAqfCfgBfgzK0VjRJEZOJ90jv4M77bYDtAvggs PleNbsU1Mh0bMmIHZsee4yY/92MSy0pdrFLjebUnIf4XCcsttKMJ3dPTea46rdJkJJz7 NdReJdjW42QV4Q7zrRnpJrdVskE7VWhw7BeYjC3RoUlIsdeu91YgqkN1DdU5WEVSVui9 2o1aG+mlM2FpM8iL86tV5BTnWCrzTlqbtlXU5CgoJrkSbGWJ2ryjPrc0u3nBDoPpzT24 eCQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=seZxIJJzrC8aUFeIHKs7Llt2Klfs5NAbt8G7XufUqSc=; b=Jgqdl4cBubGk/a45aHtFvfeTHEW8wlcpaQYPlAPHjESoTaMsEqTkK4wPNO19GaDbn8 jxOau91Lfd9smC2/2J2a9FQhKVSs+8Ls9LZzpa+j6V+3uEJjJHvFaYos9sj7UfowGYpn RCDntTE8GM9AM3PzHmFp6ZkaxOTvP6b3YWfEpvJQGGBhWpiTNxmnOLvJkELWqwfO/d7f V5r/eoamBMadzeJkkS1QMPtgu7xX4kxlFlZJ1twfVeVWI/OHGvt0tA3C6arkTFtJjazN ej+tEmXbpVQRRxJSb4f0YNY7WJWieQ2Y+MNU5cD/byn/8i2LbMPxwpV/E+gwsq+Zm7ex 4YXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=A3RQ9f4+; 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=fail (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 w53si4755141qvc.21.2019.12.20.04.05.05 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Dec 2019 04:05:05 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=A3RQ9f4+; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iiH1k-0004ZZ-4J for patch@linaro.org; Fri, 20 Dec 2019 07:05:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51608) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iiH1R-0004YL-PS for qemu-devel@nongnu.org; Fri, 20 Dec 2019 07:04:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iiH1P-0007Ho-TB for qemu-devel@nongnu.org; Fri, 20 Dec 2019 07:04:45 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:44620) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iiH1P-0007D3-Iy for qemu-devel@nongnu.org; Fri, 20 Dec 2019 07:04:43 -0500 Received: by mail-wr1-x432.google.com with SMTP id q10so9168472wrm.11 for ; Fri, 20 Dec 2019 04:04:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=seZxIJJzrC8aUFeIHKs7Llt2Klfs5NAbt8G7XufUqSc=; b=A3RQ9f4+WDMTYxBWQnLzU1VlVY4mLxHrhqqx8v/sr4kCFvpi4kjsJV+ZiUuYGYPSfT Oe3XJCZce1zy8JpupLk7DfBqxJHnsBi3zClsiHCKE5RlZChoyQiuK203jzHC6C/jjh1J UtRyoIV4K7+bMzbQaYCE6/IB0xpuPQW3jlymKkwrJVycxrR7RA5Nf3tTu+ror3/9Hdel wGcPYSRY8q8DLma98V2BnHsBWgxpqkWHcAo2acz7eIV/DOxj6Jgcc7i3Ju4bX/OM7a1D AzsjE4fJV1HzYbXCbVW5PZlNZ62xJBfxFEESp/Z2PWiuTJZix7PmrbKNHejDQ0KqP+HH cRTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=seZxIJJzrC8aUFeIHKs7Llt2Klfs5NAbt8G7XufUqSc=; b=HqmDueWv5IH7lVGm8DIS1EqOg1LN0rHV/hNOwmJ2LnsVg9b12DBl7y5gOhLn7ZmWtU mdERQJQBCsrEAodPgWNSTR4CcEj1wk5Kc5Pmn8Q+xHWm6JKScKDA6HazgYgSdDNa5apQ 2S7frTXObWeq36F311eTfczKlNIQc1YFNaVdAKEP+lDmud23Rhw+hQuE6GHUUm0cnUEy ceJM+3aUdbmHyctWz9HPR3CpRAWgrvCrrZgqnVxKKUOY9+VvojXLf1xIa1W5UV6PQbQR jojyZKFNahXHxSnZyOeFGA61uFqgintuvH5FbN6q7HVw2LksgdYoLyIUR8U7uXfweCH+ z6mw== X-Gm-Message-State: APjAAAUkUmIhaB+NpV0Q8FsZx3FEGaq+8VAqhBbDFUi8fCf9uF0X5zJi 1lfK9VPXolW4G1TMBQycu6RgQA== X-Received: by 2002:adf:90e1:: with SMTP id i88mr14223975wri.95.1576843482265; Fri, 20 Dec 2019 04:04:42 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z8sm9597209wrq.22.2019.12.20.04.04.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 04:04:39 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D0F0E1FF87; Fri, 20 Dec 2019 12:04:38 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v4 00/21] gdbstub refactor and SVE support (+check-tcg tweaks) Date: Fri, 20 Dec 2019 12:04:17 +0000 Message-Id: <20191220120438.16114-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Received-From: 2a00:1450:4864:20::432 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: damien.hedde@greensocs.com, =?utf-8?q?Alex_Benn=C3=A9e?= , luis.machado@linaro.org, alan.hayward@arm.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Hi, This is the current iteration of gdbstub refactoring and SVE support. I've fixed a few of the bugs caught up in review and dropped the pseudo VG register. You can still read the state of zcr_el1 via the existing sysreg support (which doesn't allow writing). I've also included a couple of Damian's fixes to the gdbstub which I'll include in the final PR. The following patches need review 08 - gdbstub extend GByteArray to read register helper 09 - target arm prepare for multiple dynamic XMLs 12 - target arm generate xml description of our SVE re 13 - tests tcg add a configure compiler check for ARMv 15 - tests tcg aarch64 userspace system register test 16 - tests guest debug add a simple test runner 17 - tests tcg aarch64 add a gdbstub testcase for SVE 18 - tests tcg aarch64 add SVE iotcl test 19 - tests tcg aarch64 add test sve ioctl guest debug Alex Bennée (19): gdbstub: make GDBState static and have common init function gdbstub: stop passing GDBState * around and use global gdbstub: move str_buf to GDBState and use GString gdbstub: move mem_buf to GDBState and use GByteArray gdbstub: add helper for 128 bit registers target/arm: use gdb_get_reg helpers target/m68k: use gdb_get_reg helpers gdbstub: extend GByteArray to read register helpers target/arm: prepare for multiple dynamic XMLs target/arm: explicitly encode regnum in our XML target/arm: default SVE length to 64 bytes for linux-user target/arm: generate xml description of our SVE registers tests/tcg: add a configure compiler check for ARMv8.1 and SVE target/arm: don't bother with id_aa64pfr0_read for USER_ONLY tests/tcg/aarch64: userspace system register test tests/guest-debug: add a simple test runner tests/tcg/aarch64: add a gdbstub testcase for SVE registers tests/tcg/aarch64: add SVE iotcl test tests/tcg/aarch64: add test-sve-ioctl guest-debug test Damien Hedde (2): gdbstub: change GDBState.last_packet to GByteArray gdbstub: do not split gdb_monitor_write payload include/exec/gdbstub.h | 49 +- include/hw/core/cpu.h | 2 +- target/alpha/cpu.h | 2 +- target/arm/cpu.h | 31 +- target/cris/cpu.h | 4 +- target/hppa/cpu.h | 2 +- target/i386/cpu.h | 2 +- target/lm32/cpu.h | 2 +- target/m68k/cpu.h | 2 +- target/microblaze/cpu.h | 2 +- target/mips/internal.h | 2 +- target/openrisc/cpu.h | 2 +- target/ppc/cpu.h | 4 +- target/riscv/cpu.h | 2 +- target/s390x/internal.h | 2 +- target/sh4/cpu.h | 2 +- target/sparc/cpu.h | 2 +- target/xtensa/cpu.h | 2 +- gdbstub.c | 936 ++++++++++---------- hw/core/cpu.c | 2 +- target/alpha/gdbstub.c | 2 +- target/arm/cpu.c | 4 +- target/arm/gdbstub.c | 168 +++- target/arm/gdbstub64.c | 2 +- target/arm/helper.c | 174 +++- target/cris/gdbstub.c | 4 +- target/hppa/gdbstub.c | 2 +- target/i386/gdbstub.c | 2 +- target/lm32/gdbstub.c | 2 +- target/m68k/gdbstub.c | 2 +- target/m68k/helper.c | 33 +- target/microblaze/gdbstub.c | 2 +- target/mips/gdbstub.c | 2 +- target/nios2/cpu.c | 2 +- target/openrisc/gdbstub.c | 2 +- target/ppc/gdbstub.c | 48 +- target/ppc/translate_init.inc.c | 54 +- target/riscv/gdbstub.c | 18 +- target/s390x/gdbstub.c | 30 +- target/sh4/gdbstub.c | 2 +- target/sparc/gdbstub.c | 2 +- target/xtensa/gdbstub.c | 2 +- tests/tcg/aarch64/sve-ioctls.c | 77 ++ tests/tcg/aarch64/sysregs.c | 172 ++++ tests/.gitignore | 1 + tests/guest-debug/run-test.py | 57 ++ tests/tcg/aarch64/Makefile.target | 10 + tests/tcg/aarch64/gdbstub/test-sve-ioctl.py | 71 ++ tests/tcg/aarch64/gdbstub/test-sve.py | 75 ++ tests/tcg/configure.sh | 14 + 50 files changed, 1410 insertions(+), 680 deletions(-) create mode 100644 tests/tcg/aarch64/sve-ioctls.c create mode 100644 tests/tcg/aarch64/sysregs.c create mode 100755 tests/guest-debug/run-test.py create mode 100644 tests/tcg/aarch64/gdbstub/test-sve-ioctl.py create mode 100644 tests/tcg/aarch64/gdbstub/test-sve.py -- 2.20.1