Message ID | 20210826222627.3556-9-michael.roth@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=y7hJ=NR=nongnu.org=qemu-devel-bounces+qemu-devel=archiver.kernel.org@kernel.org> 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=-18.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,USER_AGENT_GIT 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 164A3C432BE for <qemu-devel@archiver.kernel.org>; Thu, 26 Aug 2021 22:33:05 +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 977B960FE6 for <qemu-devel@archiver.kernel.org>; Thu, 26 Aug 2021 22:33:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 977B960FE6 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:49582 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org>) id 1mJNvj-0002MP-PC for qemu-devel@archiver.kernel.org; Thu, 26 Aug 2021 18:33:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Michael.Roth@amd.com>) id 1mJNqV-0000u2-7A for qemu-devel@nongnu.org; Thu, 26 Aug 2021 18:27:39 -0400 Received: from mail-bn8nam12hn2249.outbound.protection.outlook.com ([52.100.165.249]:63574 helo=NAM12-BN8-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 <Michael.Roth@amd.com>) id 1mJNqS-0005Vm-P7 for qemu-devel@nongnu.org; Thu, 26 Aug 2021 18:27:38 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cctLzdmHPqutwuAvujwXr1xq2G5SOsxS7dHbQs4NfQt1uGuJxCnOCNmHWmE2KMCTwOcp7SAE3jXn1jaB/KJYmRiPk7efM3qCs+NlWdy6vSCoN7oBF7NImdzy3HyoF+ledeab2Sm1crZBbqjZe2ZdjmTCmkr2H4ssGnFKiJU2fdCD0Aw5wLuSRS+LT1P5I0qpYDGjINem9nB9alwGFKO8QLoiIDFHUbtZ86mGeiP2+S32j6+QSTte5zyLMEpLsY1q6Zntfoe9h3FCdqx8AWoGRgCiPt3iDkVOLrHZaC7C8JCh5dCosbnenZG2kW1f3j7BuU4NRj0+CCw3zTGmVg4vaw== 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=oCIF4V+DyRUxL1XZ+BPubHZ0R8xCProyq9AHNkHqtqQ=; b=FvPrm/KIn21bzMatgDLdxyVAwF2pz6auc/OXSeuOXqF/wLsmzyqc34UfsGBK/NKWTzNP9tZcZ4kI/OQVMNxSSHwVaODhVECwKwISE2RVsTC8dl6Sf0zlIjHjQFtlbJVirqIXkXagfObmfwSDdUjg10xivYDf6Cr/ReXa7EewR5HnJ0ZdwiKVce4JK77kjL1Hu3cJ5esigpoAooev6xWCOYcjdHGiyp9DUs+dPgX56n3XbM74HKu9Z2tY/fNO8H29M94V0baYZ62L8CUcQp/zdtkcRLpbCV/OP55Z4PQBoU3YgckUHwdK9eMGDr+gobf7/kNfybdddYBQVPOWqyKtrQ== 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=oCIF4V+DyRUxL1XZ+BPubHZ0R8xCProyq9AHNkHqtqQ=; b=JU0MTIbmGjFQFcveFTTUEGs7TDjIRgdNudjFiVALTd6dMzkgi9Vd6onbBFN5lgiROelrxDml6vDzZrPLoQAywXtXUwEVo/YFD4GkN5bGept2UEKP+Hk6bKYi1Ermw/FRViAvlh6G79Exasy7sTXkPPL5Y9icFRqCFAfE6VT7TX4= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4133.namprd12.prod.outlook.com (2603:10b6:610:7a::13) by CH2PR12MB3925.namprd12.prod.outlook.com (2603:10b6:610:21::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.22; Thu, 26 Aug 2021 22:27:29 +0000 Received: from CH2PR12MB4133.namprd12.prod.outlook.com ([fe80::d19e:b657:5259:24d0]) by CH2PR12MB4133.namprd12.prod.outlook.com ([fe80::d19e:b657:5259:24d0%8]) with mapi id 15.20.4436.019; Thu, 26 Aug 2021 22:27:29 +0000 From: Michael Roth <michael.roth@amd.com> To: qemu-devel@nongnu.org Cc: Connor Kuehl <ckuehl@redhat.com>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@redhat.com>, "Michael S . Tsirkin" <mst@redhat.com>, James Bottomley <jejb@linux.ibm.com>, "Dr . David Alan Gilbert" <dgilbert@redhat.com>, Tom Lendacky <thomas.lendacky@amd.com>, Paolo Bonzini <pbonzini@redhat.com>, Dov Murik <dovmurik@linux.ibm.com>, David Gibson <david@gibson.dropbear.id.au>, =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= <berrange@redhat.com>, kvm@vger.kernel.org, Eduardo Habkost <ehabkost@redhat.com>, Brijesh Singh <brijesh.singh@amd.com>, Markus Armbruster <armbru@redhat.com>, Eric Blake <eblake@redhat.com> Subject: [RFC PATCH v2 08/12] target/i386: set SEV-SNP CPUID bit when SNP enabled Date: Thu, 26 Aug 2021 17:26:23 -0500 Message-Id: <20210826222627.3556-9-michael.roth@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210826222627.3556-1-michael.roth@amd.com> References: <20210826222627.3556-1-michael.roth@amd.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SA0PR11CA0074.namprd11.prod.outlook.com (2603:10b6:806:d2::19) To CH2PR12MB4133.namprd12.prod.outlook.com (2603:10b6:610:7a::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (165.204.77.1) by SA0PR11CA0074.namprd11.prod.outlook.com (2603:10b6:806:d2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.17 via Frontend Transport; Thu, 26 Aug 2021 22:27:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f8e7c910-bed2-47d5-9a28-08d968e0b04d X-MS-TrafficTypeDiagnostic: CH2PR12MB3925: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <CH2PR12MB39256DB8C5D8B0385E58197695C79@CH2PR12MB3925.namprd12.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:457; X-MS-Exchange-SenderADChe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TipJx6oY7aqPdGCp44Hkagw3B3k++5TFF8zhS8Iwao1VJYDLXbZL99L/RcsBVtY0T99U29LaFN9M= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:5; SRV:; IPV:NLI; SFV:SPM; H:CH2PR12MB4133.namprd12.prod.outlook.com; PTR:; CAT:OSPM; SFS:(4636009)(376002)(396003)(346002)(136003)(39860400002)(366004)(8676002)(38350700002)(66476007)(38100700002)(4744005)(956004)(2616005)(6666004)(66556008)(186003)(6916009)(478600001)(36756003)(316002)(4326008)(44832011)(54906003)(66946007)(52116002)(6496006)(2906002)(86362001)(1076003)(6486002)(5660300002)(7416002)(8936002)(26005)(23200700001); DIR:OUT; SFP:1501; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: lJ2V4nvRSN6OwagZwWQFit9e6sMMv4fqbXq4cDTjUlHeyT/ff7/XcEpVA60MrSm12ZbhC/SaFxBUOrewkYF8EvzOG7bwZesox5BDYGg194E0z6A/Wx8K4ulhhW4MiPDOfBjCoCNprNoS6MxbkZTSwPAhK/xwS3+Xs6Q/2xQhwrSHrJ8X704ite/OW1RVF/HUOeFNR/BsAy5miDAZZjIJBbyidEY+yIAb5eeQepaztg0nyjYfbnSifpgvppctBcBrR2ENlAdDQ+sFRmdgR3SHJJRvfRTAsV47dn0GIZCxaevrW+eKsYYQubkbiH50sqMyJ+UX9e+bCrBSQJrabspZT+rzAL5vNorQEQSn7Q+WDndabW/Q0wqHWEk8VUu47YsXpRSQKFvG01jOgJQqOl2yQLZQNCPOepN8iQN14BLS7NzvJPcZlsBaXpPaHefYBTQBp2sEhWjp46GB8gW8AL64QhqEctmVQpQX76/wRK7aWDprqgS6rlrc2cXgNnp9bLWx73Sgu9DX6RzIHVFetUXQEac9lh4N3c8nKx9VkS1nMaNHhCReBSW/3UGnshKpPAqxg2QcKyJZ4O1QFAEbV+lbfODK01AgluOM7aOhF4eNXDjIjBsgX/sxZHVXc3i81EH6cDhoejv8g+JK7844VkS5CIidIVNJBgaLicMYNrDvQuh6QV0LnYssassuxkBvPiWZvHiUfwgk/TqkOAr4BQbGfJ1dKOfUS2sR5kf9B1amn6BQ5pWqzDvL5LhS9weIQ3L0NximJa+4HOHZibh3tZMW6al5u4OdgyrG9ZQl4QKaE2Ep+k7Dw+VXwLM65DsiNiama0CirX8SjfAGT7TR318QMfmhkGi3fcaS61y5dCARs5LHNFvWkXz7wio6mI6cfFKyC5trIz9RWPrndBDhfOoJ9ybSCT91ec6GnlyD/dpqfzGgZe9/yfCjpA8baO5vmPtJhrpJsNLRjY0AwcHZbQYtLBCt8Hjg8cHEVDKbwklhZaXsuDExP2/t75+h2fSzEUvRAT0VTKkCroMm9tLNRPOJRf2aemNDMwCh5gqAzH9s57v7geWZfAzoLj0IdetLocQIWeN8pwIdaH721jJDzVcbwehEUpjQizn7XM+ggKD05GJ4rgnmXW3ffY2LpU1+vR8i1D2jFX12oXm830DrglyVL7CWNLoh0y7vrasZaRV6efHvs1L5SsUvx3FDeoKR6Zt0H7KZJrJA3wtOfkFjHdDEVDVXXWrHuTe7bkF0dTDVwqSHxYOgJpnSTBADdnHW3rXyMyc7Q5dhQ+vPcB3RFSf0aeX9qhHV207grKeAa/HnxAfYTfkxjpi1VgzWhRztHyL4 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: f8e7c910-bed2-47d5-9a28-08d968e0b04d X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4133.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2021 22:27:29.0818 (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: U5Vmw4OJD7jfCj/U2eGwQJbjdzrAX52+EyH7WVFP0lvYgC8V4w/LnjCHSOKi6MwcJD5YCVzk2TfRAo+xCtD9iA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB3925 Received-SPF: softfail client-ip=52.100.165.249; envelope-from=Michael.Roth@amd.com; helo=NAM12-BN8-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_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org> |
Series |
Add AMD Secure Nested Paging (SEV-SNP) support
|
expand
|
diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 97e250e876..f0b441f692 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -5619,6 +5619,7 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, case 0x8000001F: *eax = sev_enabled() ? 0x2 : 0; *eax |= sev_es_enabled() ? 0x8 : 0; + *eax |= sev_snp_enabled() ? 0x10 : 0; *ebx = sev_get_cbit_position(); *ebx |= sev_get_reduced_phys_bits() << 6; *ecx = 0;
SNP guests will rely on this bit to determine certain feature support. Signed-off-by: Michael Roth <michael.roth@amd.com> --- target/i386/cpu.c | 1 + 1 file changed, 1 insertion(+)