From patchwork Thu Mar 9 14:52:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 13167693 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 655F1C64EC4 for ; Thu, 9 Mar 2023 15:00:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lnl/TXIeyHSL5iTvAZbDztHI3b2R+7j8AJwTUbm/doo=; b=2VI9+fF1HDYy58 t4P0cgkeI8FnXz7v11W93AWU5ymZBrrsl37JZegMLrndDfq26GnThyPx2PsrZwvAlSXJXSgaE2ysG 4nwIGPZuBFarw44ouL4hRAeSdFvilabBv96UB5ezqGbC9J1Pk0oMqDF2vVl2kQg+tRUiETNKVl8Y+ +yUCnp6o0YiHxkCYz/eBAUvJZOy507xq4koeJyNqQEhOak94AqU3ZTZ3ViQze8ZWBXld/jBjyo6j1 i7+N4xxcatC1v609oxpUnFCMVQKsU+U/9NFmSI1WPh0dcgY/h+E4ejmzJv8f/wRGMpnU6UphEiqNT vMA5xAuoi8zEcqqjtXSQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1paHj3-00AjbC-WF; Thu, 09 Mar 2023 14:58:40 +0000 Received: from mail-vi1eur05on2060e.outbound.protection.outlook.com ([2a01:111:f400:7d00::60e] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1paHdp-00AhID-JE for linux-arm-kernel@lists.infradead.org; Thu, 09 Mar 2023 14:53:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mXPZvc2n2lC7V+pardqZsdHaTSXNlOWmeWvuc7MZtEc=; b=LSi4OcUETElKlWyQmhvRaDIE3bZo/swr48uITUplD+0xVZAYSjblYcQOgnnKzoz0bJxdLlHLIDeThNipFB8dlWXNwWCbkObQl9FHZqTlZ7qv/AI9eny7IpEaZV1c5nNLoIrv+VxQ7aB3qzODhsEwQDaWzB36LmYTwMWogESjgLk= Received: from AM7PR04CA0002.eurprd04.prod.outlook.com (2603:10a6:20b:110::12) by AM8PR08MB5572.eurprd08.prod.outlook.com (2603:10a6:20b:1db::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.16; Thu, 9 Mar 2023 14:53:07 +0000 Received: from VI1EUR03FT031.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:110:cafe::30) by AM7PR04CA0002.outlook.office365.com (2603:10a6:20b:110::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.28 via Frontend Transport; Thu, 9 Mar 2023 14:53:07 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VI1EUR03FT031.mail.protection.outlook.com (100.127.144.221) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.19 via Frontend Transport; Thu, 9 Mar 2023 14:53:07 +0000 Received: ("Tessian outbound cfb430c87a1e:v135"); Thu, 09 Mar 2023 14:53:06 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 81515142b35c118f X-CR-MTA-TID: 64aa7808 Received: from c768d5f3841c.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 620DE7FD-54DC-4FC1-8D7B-CE504F06CBAC.1; Thu, 09 Mar 2023 14:53:00 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c768d5f3841c.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 09 Mar 2023 14:53:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GA/M9qC9DmDfBs9dUJ2tF4x5CHTuNV8fXG7FckuK1qyqwcU3PH7O/aNCIj4JPhGh2yOwXgCVCPY8Q/XdTpsDrs+j9D4BU1N6Hhe+YfCc8pzFyqTuCPjbV7Y9STFO8l023f2dVAvGrnlkWG1TyqC5ubJBCZk3NnyyjFIIfsY+pg2c3cQm5HCCAWIwqXvT1vFuMmhroF+2QOAsxlPAjCVB1nvh9LosJlHTieTtbPdAnNY1z5zg7ayb5wfVLyN13YGlAYbAeLe4elEHX9UhnMxePm6OG336xuURyh38j9TRFuc0HqNNRagaA5BOCEZk04NIU0VnY29IEJeexyus4f8rEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mXPZvc2n2lC7V+pardqZsdHaTSXNlOWmeWvuc7MZtEc=; b=f0AEiarGBU9Hogoq9gfS1oeslbo9i1thwctuYcIJiZSV5OKciGE8IzYbmni6Oph1fhNobnq5KTqEeRgERVcw2PaTq70yZCFqqwHR86ZffaERbRfEH3BXBySmG94+YT8BOo3Tg3U8r+8IM6O8NHt9kjIzioNdkGkd2kOwl9W2pqsEOSm4Yzyz3chBulv2oJ1MPzzLhInYBDuMlSnbF2SDmexGzYW7joYJdmh1f8KdIr7+RXwoGezCYCoHkIyIFm36wvm47N9p8F/nGlmBKTEdlahq0Ma+BGUnZri0o5hU2zCHWwW4Ztj3bpDwsokqTJRG7Xvq7AqWytEmdo1nwFRqWw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mXPZvc2n2lC7V+pardqZsdHaTSXNlOWmeWvuc7MZtEc=; b=LSi4OcUETElKlWyQmhvRaDIE3bZo/swr48uITUplD+0xVZAYSjblYcQOgnnKzoz0bJxdLlHLIDeThNipFB8dlWXNwWCbkObQl9FHZqTlZ7qv/AI9eny7IpEaZV1c5nNLoIrv+VxQ7aB3qzODhsEwQDaWzB36LmYTwMWogESjgLk= Received: from AS8PR07CA0043.eurprd07.prod.outlook.com (2603:10a6:20b:459::12) by GVXPR08MB7846.eurprd08.prod.outlook.com (2603:10a6:150::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.18; Thu, 9 Mar 2023 14:52:56 +0000 Received: from VI1EUR03FT013.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:459:cafe::c9) by AS8PR07CA0043.outlook.office365.com (2603:10a6:20b:459::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.19 via Frontend Transport; Thu, 9 Mar 2023 14:52:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by VI1EUR03FT013.mail.protection.outlook.com (100.127.145.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.19 via Frontend Transport; Thu, 9 Mar 2023 14:52:56 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Thu, 9 Mar 2023 14:52:55 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Thu, 9 Mar 2023 14:52:55 +0000 Received: from e124191.cambridge.arm.com (10.1.197.45) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.17 via Frontend Transport; Thu, 9 Mar 2023 14:52:54 +0000 From: Joey Gouly To: CC: , , , , , , , , , , Subject: [PATCH v1 11/18] KVM: arm64: expose ID_AA64MMFR3_EL1 to guests Date: Thu, 9 Mar 2023 14:52:39 +0000 Message-ID: <20230309145246.22787-12-joey.gouly@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230309145246.22787-1-joey.gouly@arm.com> References: <20230309145246.22787-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: VI1EUR03FT013:EE_|GVXPR08MB7846:EE_|VI1EUR03FT031:EE_|AM8PR08MB5572:EE_ X-MS-Office365-Filtering-Correlation-Id: 7ad26a9b-f657-4af9-89e9-08db20adfe78 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: QB0nu8Gdav60r7YgIDKuSd48pRhcjhllpo2JqCvA6iMZZ8xuuHpDhrRLE8cXduyI6yH9cGfg6X/uWIuyA7/CZ85EqzJQ8JXLFsFljSwgsd7QO48bWsC5gcwxCdmj9sQm3FZenFUekpOvB9SKMsmmjBapXFhI35SkM3jJHrtNaQ+62zKPOr+EtMQcyZRb4Mk8bnPxWG7NtfMrtC6uT/1Fc3+RuDKXfMsb+MRptzY66fyQ5M2f0voa06mXlE0G0r4q8g9GFjmrqKMX1F2ACh+xxm3XrzaYHTqETCXW3jy0jlMo7MbcvaZS+wgqHyZCyg65iM0iI9OhaTsuKlwak8DBlgS7ZWMXeHm6MHiTFbt4mNiWWotlp8y8Q0e2VcDvPouCk3cNfwmnRgOenwExR4SVOMe6xYEYRgm9HOugQKIbjnsY3hNPRicHmWee+/tNAhvwridjCWuGlsvBB5g0BrFAxSPlXJhfyXP9WOcHMR3Fg2Gs7Hxqi2L5E7m2NgrSGg0lSbzG1RfRdhRZS72240b+d5GUh9b7A5Nx4S1pnSf7Ivs2KhDwh2G+oBdGgs+WVKmjqLKdK4weNeqyDW4Tn1ow9X4TsJw+ETmwHoGoszkjeWnp2y0b3570/ZRKRxa5rX4jl1+tByqlc6o3L6897SpmaXSOu8TdlcN+EIv6xRi2eOy+s9mGvWqZ+gvX9+y4afebOeNPnq1GD/rnXp4KLPEO6A== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230025)(4636009)(396003)(376002)(136003)(346002)(39860400002)(451199018)(36840700001)(46966006)(8676002)(36756003)(8936002)(5660300002)(26005)(1076003)(36860700001)(6666004)(81166007)(336012)(47076005)(83380400001)(82310400005)(426003)(82740400003)(186003)(2616005)(40480700001)(54906003)(316002)(86362001)(70586007)(41300700001)(70206006)(6916009)(4326008)(356005)(7696005)(478600001)(2906002)(44832011)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB7846 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VI1EUR03FT031.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: a7a3ce73-2546-45fc-5d1a-08db20adf803 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: U+cv8N0pXjXZSr4badiUukZ7DnnfED2YNLWaRbm36FyzNeDXcniN3CkWzv5nbkzfFelXOZ/kLMZ5RDWkUzpUnK2s2kV/HVzn8uBvlU/+WRWNNNh++V0Sb6Z3dZuDh9ncPI2nQLdG5IDvBRxdGBhA6lvLBUPw7l0/N+YTQYDAEptMmdUSVk0tc11qlt9aIZrI/nSIOmMKkosNfLfaFAYsR9QhQ9E08dsRcKcVIO5Qq3iHOD9FxZl2W+Vmk6U/GDv1FcmFPVbAQV+dQn09wpejD/egMjHGagaUHzrbIme6K8pw5/DqaycFLrDXHvTI5toqRCApGll0ADK9d8wWFjhqFeSnKOkfY3l4iTPLzsVbD/YB4ZfQWv35LOXvSAba+eY+u+UtJ227GsOVqB5RI/NVbugctZKrTNtPQcFbPghRc4AtesrCCjEDJP2ORi42alc7R/GjWi9GdlOpTzBa6QwZ8vfIihjYnbQFlPhZC0DlswmDQPrDbC2+QPXArsCDKK9SUIKnY/Mi12NvMN2iyGTUaQXhnJVwcYpuHVdcEnzm2EHF4bs7mf9C0lLKm4A+ZGUKcUmY4WWGgdHFdrHLatE+hWg7ixkOOYXBheWRzeggaRQ+l3SF77h7k3qxT+FvNzCJhCIr+OrAxcXcnvzEAil3x5OJZNZ2Q1EoQN4pGqB8yDGLll8KTAMww8+lg/GCrKnQni1Z56Znzi4ZcDk0rddebg== X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230025)(4636009)(39860400002)(136003)(346002)(396003)(376002)(451199018)(46966006)(36840700001)(40470700004)(7696005)(40480700001)(2616005)(41300700001)(186003)(40460700003)(316002)(82310400005)(8676002)(70586007)(54906003)(70206006)(26005)(1076003)(81166007)(6916009)(47076005)(82740400003)(426003)(83380400001)(86362001)(4326008)(336012)(5660300002)(36756003)(36860700001)(478600001)(107886003)(2906002)(6666004)(44832011)(8936002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2023 14:53:07.2707 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7ad26a9b-f657-4af9-89e9-08db20adfe78 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VI1EUR03FT031.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB5572 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230309_065313_752314_2F14D8E7 X-CRM114-Status: GOOD ( 10.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now that KVM context switches the appropriate registers, expose ID_AA64MMFR3_EL1 to guests to allow them to use the new features. Signed-off-by: Joey Gouly Cc: Marc Zyngier Cc: Oliver Upton Cc: James Morse Cc: Suzuki K Poulose Cc: Zenghui Yu Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/kvm/sys_regs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c index 53749d3a0996..db68841f3441 100644 --- a/arch/arm64/kvm/sys_regs.c +++ b/arch/arm64/kvm/sys_regs.c @@ -1851,7 +1851,7 @@ static const struct sys_reg_desc sys_reg_descs[] = { ID_SANITISED(ID_AA64MMFR0_EL1), ID_SANITISED(ID_AA64MMFR1_EL1), ID_SANITISED(ID_AA64MMFR2_EL1), - ID_UNALLOCATED(7,3), + ID_SANITISED(ID_AA64MMFR3_EL1), ID_UNALLOCATED(7,4), ID_UNALLOCATED(7,5), ID_UNALLOCATED(7,6),