From patchwork Wed Mar 3 15:45:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Babu Moger X-Patchwork-Id: 12113733 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DA89C433E6 for ; Wed, 3 Mar 2021 15:46:43 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 94C6964EC4 for ; Wed, 3 Mar 2021 15:46:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 94C6964EC4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56636 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHThx-00059A-Ee for qemu-devel@archiver.kernel.org; Wed, 03 Mar 2021 10:46:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56182) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHTgv-0004Oy-5o for qemu-devel@nongnu.org; Wed, 03 Mar 2021 10:45:37 -0500 Received: from mail-dm6nam10on2045.outbound.protection.outlook.com ([40.107.93.45]:34049 helo=NAM10-DM6-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHTgs-0004mf-V8 for qemu-devel@nongnu.org; Wed, 03 Mar 2021 10:45:36 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XAnI/z5uf3h1esDT88EsLNKQIJlsJeOYOFTB+J80Tqy/5Xk3Woq0IqrpGP9NM7FRPeuWOAnQ8u+3rgdz7TVVtxX/uyIaBIEsY2cVtuM8EyifPHbmJbK3yPHzMz7mJymgKk9nhZrfLXGjXg2RIvS6piY17zLvYLoPCBlpLq+ex5gF4f8NPPg4Whknx2fYq/wvrBz7EUE1XaAg9Bm15tHtyCrjVtWTqvyOZCitOD4pWZzj/tSw3SkUNaYQAcEf/LXVQfCu4GxHqAFXyAQcarTZ98leSSkwlxnS/O5WHxmY3NbrJE5gAvuMmRvvQRwwsys87QsgSXlCepX2iP2IQoXSQg== 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-SenderADCheck; bh=V5tjS0Awli1sH0rhzGIFads3eI+zbVeVDMB3h8GiPe0=; b=UNn57Rw0iYHdqpsUaEVK/f+CpK+zYU7PgukQbN4MnVLkCcfgjwjaip6t8NRmyiLowVvUxbS9Ar4IV6zOJThU9XArRx1HTR7PUnD/PR/Ptv/C2bbeiAlbHJfdt7edl/7WTp1raiDMQo8OMAGmmiTcFWT3OkmY4havvFYKZEFOqOMCTCuK/NRUccrIzAd8pgLB6PZr6KHDc1wkHxcHNNukgWNHqHx68wqYI5P3jPMxrjTJvpw+PbmOZT2TlvddHcNPeR7NaQlUAQl08Xniau5loD0g5a8+D0s7UuFzCuz7oG5nn+QkNdKgIsVsLcynBcyyY0OjdU4s/BZ5alMGI+Z/EQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=V5tjS0Awli1sH0rhzGIFads3eI+zbVeVDMB3h8GiPe0=; b=2zcJwf3QED36ALxVfo8FrezwPKc9F6dwVEKoaD8mD0CksY/E65oUxhZmY0CMU58yLC9dzbBn6HqBcBhbI7b0gBdPu58LHgDgZAn0Y9trHq6lV3KjZWU/IS6MBvAE7abEqKRMv2q5VFipY5lxjVgLVsvWDKXHaoP9DhU98Q58/Ic= Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=amd.com; Received: from SN1PR12MB2560.namprd12.prod.outlook.com (2603:10b6:802:26::19) by SN1PR12MB2462.namprd12.prod.outlook.com (2603:10b6:802:28::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17; Wed, 3 Mar 2021 15:45:31 +0000 Received: from SN1PR12MB2560.namprd12.prod.outlook.com ([fe80::8c0e:9a64:673b:4fff]) by SN1PR12MB2560.namprd12.prod.outlook.com ([fe80::8c0e:9a64:673b:4fff%5]) with mapi id 15.20.3825.040; Wed, 3 Mar 2021 15:45:31 +0000 Subject: [PATCH v2] i386: Add missing cpu feature bits in EPYC-Rome model From: Babu Moger To: pbonzini@redhat.com, richard.henderson@linaro.org, ehabkost@redhat.com Date: Wed, 03 Mar 2021 09:45:30 -0600 Message-ID: <161478622280.16275.6399866734509127420.stgit@bmoger-ubuntu> User-Agent: StGit/0.17.1-dirty X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: SA0PR11CA0004.namprd11.prod.outlook.com (2603:10b6:806:d3::9) To SN1PR12MB2560.namprd12.prod.outlook.com (2603:10b6:802:26::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [127.0.1.1] (165.204.77.1) by SA0PR11CA0004.namprd11.prod.outlook.com (2603:10b6:806:d3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17 via Frontend Transport; Wed, 3 Mar 2021 15:45:30 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c2cfc3d9-20f0-4f44-d7ec-08d8de5b6029 X-MS-TrafficTypeDiagnostic: SN1PR12MB2462: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: R8zEZXkpXT6lbwCROPKRglGSgoda2/TMn5njjSwN6JGxpdg/fv7ByozPjFAfR/CrmhDeR1AmKHtB4czGHmoo7OZ7r3ppUkGMD5HRz0m5YdIkXhU5FTHt1o9JePGRKCGpRLc1gKBqu/hnwSZmmx2xsTdK6BM0k8IECLyK86u4Z8nqDY89B1GNO+TaFPuz2yS6nHV1XEG+MGfnadT2fCpBHd+w6rrKGXyp8TlAcpQ9QXr9OqwItWK94wGkbTESqsA8Q6qe3iqwI4gI5+PS0AJHkSswqYX74l440jFCP9CgtSTFeDO7VRnUVI04ByjuYCV7UZp+1QEdIoYdAjQHBcgR2GPRw60QIwQvHps7gTdYbnqawjhEAMPpoDlSkyIpMYg5tUZ9EnWBXNm+ANTTO9g8cjNaalsa8BxsW0WO5/RqbnyCczXXBP2l0+xCCqqxOFsy9eez1G95pL+/oTNkfaUa9txECbhPqVvKAKD+oLm0pyAQkM5Xfz39Ki/rjml3bpMOLnLjSkSop7SGGgTZzeVCGA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN1PR12MB2560.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(7916004)(39860400002)(396003)(136003)(366004)(376002)(346002)(16526019)(316002)(52116002)(4326008)(186003)(9686003)(8936002)(66946007)(6486002)(5660300002)(478600001)(66476007)(8676002)(2906002)(66556008)(956004)(103116003)(44832011)(33716001)(86362001)(26005)(16576012); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?pqOe9Ql2aN8glOLBkBL6oqcdXrk8Fa?= =?utf-8?q?ez6EX5ukNk1wlpF6PcjJdwOoS5tUVVSSc8/z/10S5Ix9iSqZ/R2lRkwyOzVKryTub?= =?utf-8?q?gQyQrcGta6O3KJ5iWP0e8dzeBo9EWeoBwX4KH1xiRyfbX5u3hTjz7gUQHV64B+9a5?= =?utf-8?q?e6bvOD2ACVSD7JTcTL93f1pwjrSr5VhO3KeW1MgSt9GODoN95bkhuZ94JUUV0y0sB?= =?utf-8?q?pSMm+j14sWqw5Xz3RzIqBNUJrFB4Je5+h/ebRQ2l3F6Yocduu3EEMVVmm9nbwXOnF?= =?utf-8?q?kl6UKto1WBNeR81NKMgZTPUM7C5Kn7DSH2KUuvJ20pgRtCQNEc3DQpTF0udBnBFVR?= =?utf-8?q?XEBsfORSvJ4xq6KqHyiN5j4wRKf83tC+8zbiLHjLZiMAzFU2qGK0Z82yBySfd5/lB?= =?utf-8?q?RNjRVCwopes7+MTyb7jVRCZqkHgH0I22o4vToEH+LdaaComKMx9JSbYnCzhR371m1?= =?utf-8?q?Ht8sESA0k5elf6Mp8caq0BtWW0T8XZ2uy8KG8Rh4Fuf2E6FkAEN562+Fvc60U1SnL?= =?utf-8?q?95OrbOFf+0ssUfL7oCfDj750vA0WytVmoAtGF9qqauy6lLIj4MiPKTQIzxHVCY3kN?= =?utf-8?q?M5A0VAGEgsTkEPPT8uBjJvwPt0/vbze7GVjXfvyDiB4ektTBuuMDOHfK61AmVVJQe?= =?utf-8?q?VmxzLE3V8lfUfIXM9VaXMzS93SY3Y2bJ/M//aXzeslDkx4B6CFOLt+fa/Q5+EZeQL?= =?utf-8?q?qMO8Qul0N5ca69nVka+etv3mwPdQrfeBYFMTBrOTO7cL0lPzhoecxzbx1zSbz3M5D?= =?utf-8?q?gm0PMTsFBd0e20R9IYIdJvNQEkE+HA79fmfH7qdZe3KrmmbaLgpKrRv50yWYnYKjf?= =?utf-8?q?8lltTJEtzkwtFXJaoauI7mj040wnpNuYE2miNxyCzaDnePVkRe0VmdqE2m/xvJKma?= =?utf-8?q?6sgq84HQicpZnUagbZxsYSb1O2/etPcjyx41MC0l/cfZUwqjXPSw3VL6K8R//pXga?= =?utf-8?q?Pn2GzaNZeV34xBDGXPO/84+GW54h1bw4Lna84dK/N7Sz32PDkHRC0BnxmX3at+lyB?= =?utf-8?q?5GLYLj707bQtEHRnuTK52KL8TxRqe93EPwtro3XsGOdsfPZhwHCshPkjOo0XWG0ps?= =?utf-8?q?fHhANXBh/e4j+TU7LNrVn+jtNepk6qmaDxF5979Xptw3XD8QZGJ3At2eeSscqw3UO?= =?utf-8?q?al0lLruGxZ9KLNJX9nTETqm1BtShPChnPxbAiw07wB76b5vCE79QixO3NVZTHeRBK?= =?utf-8?q?ohUm1eRw7Cr3jLnKcl+sWObKAv3kLRuzJ7u0WNZQE1IOzMytleVaL9YiWt6b5PogE?= =?utf-8?q?vgd0Dbh9oD0pGA?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c2cfc3d9-20f0-4f44-d7ec-08d8de5b6029 X-MS-Exchange-CrossTenant-AuthSource: SN1PR12MB2560.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2021 15:45:31.2628 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WhamE9M1x77jh4Qz1pJbDz1aBRXaL2S8EQKOgTntNhQRErC3Zb0nuFeS3uxIv0cC X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB2462 Received-SPF: softfail client-ip=40.107.93.45; envelope-from=Babu.Moger@amd.com; helo=NAM10-DM6-obe.outbound.protection.outlook.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: babu.moger@amd.com, pankaj.gupta@cloud.ionos.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Found the following cpu feature bits missing from EPYC-Rome model. ibrs : Indirect Branch Restricted Speculation ssbd : Speculative Store Bypass Disable These new features will be added in EPYC-Rome-v2. The -cpu help output after the change. x86 EPYC-Rome (alias configured by machine type) x86 EPYC-Rome-v1 AMD EPYC-Rome Processor x86 EPYC-Rome-v2 AMD EPYC-Rome Processor Reported-by: Pankaj Gupta Signed-off-by: Babu Moger Signed-off-by: Pankaj Gupta Reviewed-by: David Edmondson --- v2: Model-id remains same between EPYC-Rome-v1 and EPYC-Rome-v2. Removed model-id in the patch. target/i386/cpu.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 6a53446e6a..30e7188b0e 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -4179,6 +4179,18 @@ static X86CPUDefinition builtin_x86_defs[] = { .xlevel = 0x8000001E, .model_id = "AMD EPYC-Rome Processor", .cache_info = &epyc_rome_cache_info, + .versions = (X86CPUVersionDefinition[]) { + { .version = 1 }, + { + .version = 2, + .props = (PropValue[]) { + { "ibrs", "on" }, + { "amd-ssbd", "on" }, + { /* end of list */ } + } + }, + { /* end of list */ } + } }, { .name = "EPYC-Milan",