From patchwork Sat Sep 15 16:17:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 146781 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1940765ljw; Sat, 15 Sep 2018 09:20:43 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb+ms+vs70AzaXJs0UhdPEBN9mKsulziF2y+B3rIvi6saBZycIH/h2WiGDY7CoIX1ML4Zal X-Received: by 2002:a0c:e105:: with SMTP id w5-v6mr12516768qvk.174.1537028443026; Sat, 15 Sep 2018 09:20:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537028443; cv=none; d=google.com; s=arc-20160816; b=npiP7msAad14ZFMB1t5qEJSlhSbi5c43MM6e3u9mQngizRr/82kEKzdozrIEBaveTP PNKymaDdGNCnMgIEHEjpEbHG23xs9bLnA5bXHTVN+KJnIF6N9uMwVsmvIqyu8+ekLzAq ohy1Z6hwrM05lv4L9I2lFG7jm/tMzpfFE+fiM/baoWDPn6Lu4r0u6OFbgzYELGhxUvta FE2DXys0xpzExnOv/ElqcH+rlb0EPa++3mlSh98SCS/G12hpvwAPa2desZA90WkOI1N1 RIdNoI1+6VvewHJyihTXQA/Dy+Bghjy3vJ4lbXiEvheZgFgPiWmU93GHEZA+w/UoBsKl wMdA== 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:message-id:date:to:from :dkim-signature; bh=Oim+qlVid+JtXrE/kd/o1CukEvY5kg4p7wS/6w156DE=; b=NERPEaz74NYnWtGaVPA6aKPCv0QvhwR+MQA8D2/4sUT5G2GkbhSzBbjyLx47ZCVo02 btzq+KrROhsub5pKwXgyyuEwQSkjObT6w8ys/Y7/UW43eYze+A5L9hnECsQO6hhN+W6I Wjy3dAwGtsVIhiIzlSFZPqAsk+ECDrgCUSq4SuOUlr0uApUwzIHz7v4XfU/lPxs3gw89 aTWV3QpAO2s22WJRnXJbcojgEG46TmmqLc9pnHG/iMgxuHCSSPA4zCUnr97wVwXXSBiz 4CZxGy1kB5QDAVDGrHlNL7TsoXUhHerd0k9SFnOzoaH5l0UN9YPmbSNWh4gRqjt0qj3k HRfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZkryBXSB; 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 l62-v6si1787100qkb.0.2018.09.15.09.20.42 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 15 Sep 2018 09:20:43 -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=ZkryBXSB; 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]:56096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1DJK-0005as-Ee for patch@linaro.org; Sat, 15 Sep 2018 12:20:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1DGW-0004UU-6s for qemu-devel@nongnu.org; Sat, 15 Sep 2018 12:17:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g1DGR-0003q4-Dr for qemu-devel@nongnu.org; Sat, 15 Sep 2018 12:17:47 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:42252) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g1DGQ-0003oE-WE for qemu-devel@nongnu.org; Sat, 15 Sep 2018 12:17:43 -0400 Received: by mail-pf1-x42b.google.com with SMTP id l9-v6so5641008pff.9 for ; Sat, 15 Sep 2018 09:17:42 -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; bh=Oim+qlVid+JtXrE/kd/o1CukEvY5kg4p7wS/6w156DE=; b=ZkryBXSBrq/jS+S3EicR80Vlulz23yRx4sr86TNM2UmIt4W/x1cpCLBDHavd+aUuI0 vk0fdwc+fhJ8OHKR/g4Pszfu/GphwMPfWWu57ur8Iu24aYQmlG3cMUXlZQBM0Z8jRoUQ YP923jGT6qLNlIZoTIAUGNZ/CgpaDrHS6WSqc= 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; bh=Oim+qlVid+JtXrE/kd/o1CukEvY5kg4p7wS/6w156DE=; b=ejBI+f71C/z0/xd0xRni4EMIlKko7nIiB37xZh8F5vY/E3KPrlJG49JMa74ECPDjB6 WBWv7llvBiPkoK8rQhCE+Ruyn4fD67pG+cP8eNlFgkEuFxdzBZiXCrlYbCNvhojEiHKC 4tS94+9MzXNudb591VSDO/1GrCNSrHhSQRO92fNGqPwdcu+ks4VTG8mdC3KE3ga+PzZb R4cN21oxp+HRRLIg+/0pxPqs6Dk/2SJUkJfxyby6tjWvznZJrkQj3GaYLB+MrTjWbkJD k1YfiNigAYqPLkysskJEDLQI2iRzBcjHgLkHaVhovYdPX1MixWB4dQiSTiiIHR6T8W53 FqXQ== X-Gm-Message-State: APzg51DVu7LihKuMK59f0ml9rE9Uq4GOgkGZ6OFhFEVmaxbKui82FEUm kw7CGl60P0SlmoAV0hxQnNME5+zGcy8= X-Received: by 2002:a63:9b09:: with SMTP id r9-v6mr16668390pgd.324.1537028261115; Sat, 15 Sep 2018 09:17:41 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-8-179.tukw.qwest.net. [97.113.8.179]) by smtp.gmail.com with ESMTPSA id k26-v6sm18648793pfb.167.2018.09.15.09.17.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Sep 2018 09:17:40 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 15 Sep 2018 09:17:25 -0700 Message-Id: <20180915161738.25257-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::42b Subject: [Qemu-devel] [RFC PATCH 00/13] target/arm: Derive cpu id regs from features 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: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This is something we talked about in the context of enabling sve in system mode. We don't want to replicate info between these two locations. I'm not 100% happy with this, thus the RFC. In particular, there are several places in id_isar0, id_isar2, and id_isar4 that expose micro- architectural details of the cpus. We cannot infer these values. We'll not be able to replicate the exact id values without additional changes. But I'll also note that with ARM_FEATURE_SWP, we're now at 60 feature bits, which means that we only have 4 remaining before we have to come up with another solution there. I do wonder if we should instead introduce some little inline functions to test each of the current feature bits, and once that's done convert those to test cpu->id_* bits. Most, but not all, of the feature bits would go away. We'd have the exact id values one would expect for a given cpu without having to replicate the info. Thoughts, one way or the other? r~ Richard Henderson (13): target/arm: Add ARM_FEATURE_SWP target/arm: Derive id_isar0 from features target/arm: Derive id_isar1 from features target/arm: Derive id_isar2 from features target/arm: Derive id_isar3 from features target/arm: Derive id_isar4 from features target/arm: Derive id_isar5 and id_isar6 from features target/arm: Derive id_pfr0 from features target/arm: Derive id_pfr1 from features target/arm: Derive id_aa64isar0 from features target/arm: Derive id_aa64isar1 from features target/arm: Derive id_aa64pfr0 from features target/arm: Remove assertions from resolve_id_regs target/arm/cpu.h | 1 + linux-user/elfload.c | 3 +- target/arm/cpu.c | 381 +++++++++++++++++++++++++++++++++++++++++ target/arm/translate.c | 4 + 4 files changed, 388 insertions(+), 1 deletion(-) -- 2.17.1 Acked-by: Alex Bennée