From patchwork Mon Jun 25 16:00:04 2018 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: 139863 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4165765lji; Mon, 25 Jun 2018 09:06:25 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd9R3c4bxztJWLUArgNMVBKlRg5YfU2kXPPKvPrDN4GmiYPgWF5o3jPnp/UObAoeofSNd5Q X-Received: by 2002:a37:7e04:: with SMTP id z4-v6mr10699738qkc.298.1529942785428; Mon, 25 Jun 2018 09:06:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529942785; cv=none; d=google.com; s=arc-20160816; b=iUELXDHjbiXOvkknvcS22lgmWG7LX8+QwcevKL+/VLYmxJptTsHh7ZVLe7XJ86CJWB tvv9EwafG8Cqzdx8X8sMlOKdoLL6MIv2oviIYmZCQuKGJOcafrqKhYqpz8+k7wB/WKfW 3w8f8CPRMKWgCOoeIS7CkBf8Rhrs+n8K56SyYUX3xeGDLZFn0t3yub6YElspK8WNpJhF o0MGJYmQTy6ShhEMrto6tFjTa/i+dxU7A/Ize3f/DVhZxDYNHgdNhoX/mwjHdzptBPWr L2zo7HegpT7nQCbe9GeiHWcSAGOwrVad+Nn++sMDYc+yU2AqnqAeWoR2MQCWDWrfqUrA oV2Q== 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:subject :content-transfer-encoding:mime-version:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=/DAFjJUi4v4hQB2/MMl5a8pAzN+seA5AjMUgMJ/F1hY=; b=KukzkbWAXl8XiRiMXdCuvnQrtvEo6ZRyCIzdndXfzfRvayJY1rAKVeK+L1HjnR+ugL XEHvHhXPsnuNpW9tY0bPE0dswBwtnJkW+57xw/JFXrcYLAoLxr6CgmbNDsb09IDoGbuK TLraqDdf0wR0Lfe+URjstgEMB+vqNy8Xak1eXv+rUlP5WqPduHWKJ9T45aMDlQhzIKXO eSQvC98Nwjvy0c7vrcOqY9FISdenOIwW0TyeE+tbbtRPs+u05gQvV5vRDG2GlP9UpQHC I6W3AFzviWIGM+7MRV6IqXDFVZMhmBLKIbCjPFh4mTKgu9G4cSxR6QVYm2YmQysS/TfF e9Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZawPtlHC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 75-v6si5436328qki.95.2018.06.25.09.06.25 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 25 Jun 2018 09:06:25 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZawPtlHC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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]:48035 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXU0W-0001TB-EI for patch@linaro.org; Mon, 25 Jun 2018 12:06:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXTub-0004yU-HU for qemu-devel@nongnu.org; Mon, 25 Jun 2018 12:00:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXTuX-00052C-LL for qemu-devel@nongnu.org; Mon, 25 Jun 2018 12:00:17 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:52884) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fXTuX-00051N-FH for qemu-devel@nongnu.org; Mon, 25 Jun 2018 12:00:13 -0400 Received: by mail-wm0-x244.google.com with SMTP id p126-v6so9909272wmb.2 for ; Mon, 25 Jun 2018 09:00:13 -0700 (PDT) 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=/DAFjJUi4v4hQB2/MMl5a8pAzN+seA5AjMUgMJ/F1hY=; b=ZawPtlHCrOzJiQ5rZ7LWbrov9SSLcW66OcHcZTHDsNQkxf4bd2TuIs5YlQj526s4yr cZ+3pH02gpsavSoWBUtJTX2EHdWcyyOkS5ZnCUKFm0VrkafaqzGmoVSD/FccLUOSJ0I4 HOLghaDR/2q/5Kl72EMjdw53C5njgp3h+wRS4= 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=/DAFjJUi4v4hQB2/MMl5a8pAzN+seA5AjMUgMJ/F1hY=; b=cnjmccOUrmHrSEn2BqQLW73df+Xx2xyF5HG79ifu1XgiYrhR8bkA8IpqxSUQoGl9pN Cg4Pnm3LNkgEeFURWKxx/Mw0qQTW8fNHJ3NMeusqVXdTepvLmahHcHs+Yq5WChhfGWf0 7w7PVSeSsvr8Xf4UCSQaFnV1WUqZOJgvl0PMnH1hXCxxW/+Vg2fBiDZIkUniCsvPxSUq NjusP/7e0tS/z/omKmJ7MtRS03TvK+VjXmVkUZz8dqH4lu9cXp+NNPamkpcTGYQbxcn0 V078wJGUADKhgggl0FSVvkoAUWnqx1iE6TJesN4VIgOFXC5yFQa7J3DuuL883G1xN5xv dZ7g== X-Gm-Message-State: APt69E0nGSH7+gib5S/IHmyng8iGk64W9JYolAleZGOMBWM/PXQyNzbq ndcaJrLRkDitjRHEKXOJXQFCZQ== X-Received: by 2002:a1c:96c8:: with SMTP id y191-v6mr1413495wmd.37.1529942412214; Mon, 25 Jun 2018 09:00:12 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id m185-v6sm9224186wma.36.2018.06.25.09.00.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jun 2018 09:00:10 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 378623E084C; Mon, 25 Jun 2018 17:00:09 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Mon, 25 Jun 2018 17:00:04 +0100 Message-Id: <20180625160009.17437-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::244 Subject: [Qemu-devel] [PATCH v3 0/5] support reading some CPUID/CNT registers from user-space X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-arm@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Hi, This expands on the previous version by adding the additional CPUID registers as exposed by the HWCAP_CPUID kernel feature. Most of the work involves judicious use of macros. There is a easily extensible test case that uses the shiny new check-tcg infrastructure ;-) Alex Bennée (5): target/arm: support reading of CNT[VCT|FRQ]_EL0 from user-space target/arm: relax permission checks for HWCAP_CPUID registers target/arm: expose CPUID registers to userspace linux-user/elfload: enable HWCAP_CPUID for AArch64 tests/tcg/aarch64: userspace system register test linux-user/elfload.c | 1 + target/arm/cpu.h | 7 +++ target/arm/helper.c | 80 +++++++++++++++++++------ tests/tcg/aarch64/Makefile.target | 2 +- tests/tcg/aarch64/sysregs.c | 99 +++++++++++++++++++++++++++++++ 5 files changed, 170 insertions(+), 19 deletions(-) create mode 100644 tests/tcg/aarch64/sysregs.c -- 2.17.1