From patchwork Fri Aug 19 11:00:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 598493 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:4388:0:0:0:0 with SMTP id w8csp1295752mae; Fri, 19 Aug 2022 04:07:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR6gtc6PO6I/p9IOVfjluVizOHGRVejhwye9p3PaTA+xzlPPqvOBqDhJAon++4DUfzME5IC7 X-Received: by 2002:a05:620a:44c9:b0:6bb:600f:45db with SMTP id y9-20020a05620a44c900b006bb600f45dbmr4697879qkp.289.1660907258868; Fri, 19 Aug 2022 04:07:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660907258; cv=none; d=google.com; s=arc-20160816; b=pce01yXGAd3sP+MFxGY9/JgXfKhTlxHxk43B+zlyWbnYsdZDim3h4A/Fb7PInMpjcM RTb6lbymAT09J0Coob967Ncc0q2W99p98heXGTCXXtJCwES4mz7Zm6eY7kakj2yWOgNW Zf9YfdQwAavv86dAxs3KPSGPnkhJd0aswaUJuf/KZd/kOgubNkfH0qud11obppihCilQ rsmE7tXgvvyMJpfLqz/AQdQwXTyoHde/ChDZ+3uVZQVpuJ1+MJOr8Y3VwSYVM8KdU4kI f0AAj9zf9wcYJyldQ73HsWTrVOzM5c2ouOjrQgSpN/Tf6A9mGrL71+Nu48fttxo7s+NL HukQ== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=2SwX3hUzWovagIgXNOcUYZeZcVjENtYaAi9CW1/+M/4=; b=bbWucFTAWmbEXAi835qytUALv+up76Q0D29fNRu15IWjdJyKM1bnBrEI3omM6CBLx0 R0n5Tqix468hs0eAxLDttQRth4pGvp5rlljZogr4MGZ2c+YlObElrfM7JhSLT7mc+g5V TytxwnJh9/u/jrqIDkJzRQiUNAAirRtrg6Gw8CF8VjyaiFgDE8tXlhcnzPdOlo/5Xq23 RHpViLHBxtFPHmUPWxCxSPDjLArUnvIl9yHLApJPOqwoxnRJDOYp/YLFBHcDgSzrzc0x /PwSr1ofUiO2gEJJELg/TtdnlQD6LHkBEx4CFOh2iuY2sST6zah/xHOEZait59+n9eUc ULiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SAPTz6qo; 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 m1-20020ad45dc1000000b00496b80bed4dsi1849404qvh.28.2022.08.19.04.07.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Aug 2022 04:07:38 -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=SAPTz6qo; 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]:53016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oOzqk-0002xv-DJ for patch@linaro.org; Fri, 19 Aug 2022 07:07:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOzkO-0002DG-IU for qemu-devel@nongnu.org; Fri, 19 Aug 2022 07:01:07 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:36452) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oOzkH-0001QM-Bb for qemu-devel@nongnu.org; Fri, 19 Aug 2022 07:01:03 -0400 Received: by mail-wr1-x42e.google.com with SMTP id j7so4768612wrh.3 for ; Fri, 19 Aug 2022 04:00:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc; bh=2SwX3hUzWovagIgXNOcUYZeZcVjENtYaAi9CW1/+M/4=; b=SAPTz6qokLZqjkrdp23cbGRtyNxkarU+3wrGR7pD4C3qDbHsypxqx32HBy5LEMUqEk aM62J454dKBXHWtZA5e4cl2euedCqyzj1lAZJFeHyj5dEKuPMYU6CFktGATJIqZtfU4o 49pWWtDDIJ/hw5r9WB7iv59/mL+ssAUvSDnZ+1gj5mLodAtyaQobP97f7sBZ8o5mUrGz sUKPZ39+Tz/ZcORxpyNnk8ymxMgeZynJZtiyulaYUNVbv4abqCKf+NjqbCzQO+kz3m3n aPIQr4N4FXsSCWlzIqN3qj38vqLErWrHSZrJ6GVbuf4Oca00eXIKUephTRTX/xA9OlG9 4gcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc; bh=2SwX3hUzWovagIgXNOcUYZeZcVjENtYaAi9CW1/+M/4=; b=xfEKSjgHQoWdbKx6phjpCnTsaDpQ3k9o25gGVZqpZSS5I11AGlx+E2JNGQhBfU/AY6 qcQyDQdiX6aryI/ZWJmGBEhcvGL7qqfWoPJOi8M8Mx/NHUZzdxjznqp/t+3Xc9efstC4 nbWurfn6zcnEao59doJoMgZOKXCMA/geJXxXp324qEhWdxs454XkmfeSwDJ6ONyOzq1t U7PDe7As4YyBqSShJlPJoxyiF8bNaMRGz1k5/5PcPj7Mm7wA4iumAw/j6bgVVvpKiS2+ oYcjUpf1M+Gn06fYwkPH5gqXKszLVm2jajMUl6JxE8bJ2J4KPRBObrBxEwfF+wes5Sgs aVJQ== X-Gm-Message-State: ACgBeo1c6wUUuyMRGBfRGti0DUtZNdFImlNAjT91p5yvZichjg+rx4Hn 8JJTNzn1bWWh62dxFkyyBooUxA== X-Received: by 2002:a5d:6d04:0:b0:21f:877:e2ef with SMTP id e4-20020a5d6d04000000b0021f0877e2efmr4062500wrq.131.1660906855887; Fri, 19 Aug 2022 04:00:55 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id p22-20020a7bcc96000000b003a52969e89csm8154985wma.4.2022.08.19.04.00.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Aug 2022 04:00:55 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 2/6] target/arm: Sort KVM reads of AArch32 ID registers into encoding order Date: Fri, 19 Aug 2022 12:00:48 +0100 Message-Id: <20220819110052.2942289-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220819110052.2942289-1-peter.maydell@linaro.org> References: <20220819110052.2942289-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42e.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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" The code that reads the AArch32 ID registers from KVM in kvm_arm_get_host_cpu_features() does so almost but not quite in encoding order. Move the read of ID_PFR2 down so it's really in encoding order. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/kvm64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c index 9b9dd46d782..84c4c85f405 100644 --- a/target/arm/kvm64.c +++ b/target/arm/kvm64.c @@ -608,8 +608,6 @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf) ARM64_SYS_REG(3, 0, 0, 1, 0)); err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_pfr1, ARM64_SYS_REG(3, 0, 0, 1, 1)); - err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_pfr2, - ARM64_SYS_REG(3, 0, 0, 3, 4)); err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_dfr0, ARM64_SYS_REG(3, 0, 0, 1, 2)); err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_mmfr0, @@ -643,6 +641,8 @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf) ARM64_SYS_REG(3, 0, 0, 3, 1)); err |= read_sys_reg32(fdarray[2], &ahcf->isar.mvfr2, ARM64_SYS_REG(3, 0, 0, 3, 2)); + err |= read_sys_reg32(fdarray[2], &ahcf->isar.id_pfr2, + ARM64_SYS_REG(3, 0, 0, 3, 4)); /* * DBGDIDR is a bit complicated because the kernel doesn't