Message ID | c69f81c6029f31fc4c52a9f35f1bd704362476a5.1611682609.git.thomas.lendacky@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=xoS3=G5=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 53541C433DB for <qemu-devel@archiver.kernel.org>; Tue, 26 Jan 2021 17:44:01 +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 EB18321919 for <qemu-devel@archiver.kernel.org>; Tue, 26 Jan 2021 17:44:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EB18321919 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]:47006 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 1l4SNk-0008IA-1g for qemu-devel@archiver.kernel.org; Tue, 26 Jan 2021 12:44:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40978) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Thomas.Lendacky@amd.com>) id 1l4SJE-0003tg-3H for qemu-devel@nongnu.org; Tue, 26 Jan 2021 12:39:20 -0500 Received: from mail-co1nam11on2049.outbound.protection.outlook.com ([40.107.220.49]:30816 helo=NAM11-CO1-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 <Thomas.Lendacky@amd.com>) id 1l4SJC-0007VU-8N for qemu-devel@nongnu.org; Tue, 26 Jan 2021 12:39:19 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BhdQGfKWwjShXtY/eHYRQqevGJlNn4e74kK+y7E6z2YImauvIfkCY5FTrG2KifQIFB8wx4picobM+HY4QhNjU3Y6D56HnngNW/8US48ACoTfe9sdUc57BcqyYJtID3jP2afzaTaxIrO5q9hOxVNw22OOzVmTPnRqHdvUO5CHozN6tpTGaShrz9oeFDge33SjkHsQziw3EaM3AuXL5zwNiSJBz31EwXkhDxLVssLn+HIy9ctabxHyU0mVCNVNdDAzcVHsYWwZ8/wh/G4L3wO+fbGo8gq4+q0tRT/xI6L+pATxlcJWhvisL2pabFKUQAxdMLyGr0VVG11/1vqH0c/YGw== 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=a7yg6pbXOjy6pWpK7qw208nKUA0YEOXcTqQdNTJlFaU=; b=bIfuL6SaYz9K83EQGRHG3BeFNg3MYsKIVGAse8b2ROYA67wqjg2RnBOIezGxypnsqsETvYl/fyxsfiVDK7iDKr9EpvkV96447DudzzUf6W6e7d17nI2XqI+9Qvo2ICxfrXL12FQKOtCVEOKMaVdPGoy0hi2XwakIXkjgQR2gJGTLoPRRaErsH7H334QNG5CA7MYFuFZ/NgVcAXBDK9cc7owGWDb4TgZ+LxaU3jNvPfe9Db/LnfocDn6vYOpPtL2EX46X9QyidGXnXytu+Pklab6ser+ourhlOrDbaB2hvMsne7G8BDhqvSzp3W7NUeEWQjJDojUsmNKDJId+l+ajhA== 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=a7yg6pbXOjy6pWpK7qw208nKUA0YEOXcTqQdNTJlFaU=; b=KAAUsqf9G0MAw+MV/9y4tVA3tGLRpZiMVQjJKDRQ/uCbb0g0VT5p9Lvsm0FPA7RF0bVlqqTEzynhCCBV1Gwnlr4GKBS4Ut6yH/9dUGtn4M0MiP90dHZ4xy29FdidFsIy8VcRXer7j8tLytfMqvoXtTQ+sZ59gMk0u5/I15tWU3w= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=amd.com; Received: from DM5PR12MB1355.namprd12.prod.outlook.com (2603:10b6:3:6e::7) by DM6PR12MB4153.namprd12.prod.outlook.com (2603:10b6:5:212::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.13; Tue, 26 Jan 2021 17:39:14 +0000 Received: from DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::cc15:4b1f:9f84:6914]) by DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::cc15:4b1f:9f84:6914%4]) with mapi id 15.20.3784.019; Tue, 26 Jan 2021 17:39:14 +0000 From: Tom Lendacky <thomas.lendacky@amd.com> To: qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: [PATCH v6 6/6] sev/i386: Enable an SEV-ES guest based on SEV policy Date: Tue, 26 Jan 2021 11:36:49 -0600 Message-Id: <c69f81c6029f31fc4c52a9f35f1bd704362476a5.1611682609.git.thomas.lendacky@amd.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <cover.1611682609.git.thomas.lendacky@amd.com> References: <cover.1611682609.git.thomas.lendacky@amd.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: CH2PR10CA0002.namprd10.prod.outlook.com (2603:10b6:610:4c::12) To DM5PR12MB1355.namprd12.prod.outlook.com (2603:10b6:3:6e::7) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from tlendack-t1.amd.com (165.204.77.1) by CH2PR10CA0002.namprd10.prod.outlook.com (2603:10b6:610:4c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.16 via Frontend Transport; Tue, 26 Jan 2021 17:39:13 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a33a47c9-4a22-4be1-b574-08d8c2214c67 X-MS-TrafficTypeDiagnostic: DM6PR12MB4153: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <DM6PR12MB4153D8DEF5A65F3EC2B864CAECBC9@DM6PR12MB4153.namprd12.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XqXp4gUmnUzwedlbxkHFNbBe2t0wyXcpMBZ2paB0R+5EK1Kuq5oqiN1+gCDV4ujfA+NwYYSvtsnZVSL33SJfixZtXFpKLhjnqkfciZjzHJZKsXxq9261Wyf0y36TfEdu/LU8UE5f2KlPEupgTpdQXjjeGkQb7MEmkPtrZGoe8q0tCCv2o2kqNicRqdYUrWoVz+e3e38ZsbHhufZXo6A9WqLsmBp69gGHTUTEWCmTWLjHjj+4+9YDKCnc8KHqWUHdcKxtiKy137OGHQd9/FuEM52fFkmTExW3p+4YCMLFogthpXtMMS8d7SPXHXEtDCyfxCrtQEgT13ip0OyTAhGSyIhxgKS9D5hTvUm8OBlrZpEQWGo4pW6gsSiN7f9lFTbh/9UDDap6NlkQDEbGGhbnCg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR12MB1355.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(39860400002)(376002)(396003)(346002)(136003)(8676002)(7696005)(52116002)(478600001)(6666004)(7416002)(4326008)(2906002)(4744005)(66476007)(316002)(54906003)(5660300002)(26005)(2616005)(956004)(86362001)(83380400001)(36756003)(186003)(16526019)(6486002)(66946007)(8936002)(66556008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: NIKoCjFgZMV397EHj9Y9vTC88ncpV2QTR8Z633axwBCzJ7VGQCFKZSC0X6bKJiyVKv91MxnNDXP1flHJbNksFxfC1cG3cxefV44mXr4TqxH0lyq6/ZnsuspeXVsHbW9ToEXKtDzsiwCPosDOGeeFp+E2zAMqxu5CXvSc+etpffUG/8wAGzR/BzYV7XGI1I+jaVZmu5UKRG6gY9Vr2iQd1UbD+VrAD+xdvrkRgbd9zQTUtb2ibmg0gYa12e1ud/r/HNgHAnY4bm+r+2h6CAPk+p1OPMfOjPGaE6kfV4GE2o1j2kTy2XHXYgg5fiJ5/vfovi5hgqltPlwq0dUIV4RAua580Dd4nRRQx9P1aszATDzDVIyKArPMfuMIqrseIQiIa3DP3a9hltRuq22E4NAcxQCVS9sOVlOgDVOSF2B98Eqa6VryMQvhJkAVmuKZwinCGUR5dYA5jRMRTBI/MCBYskX2IhxK2/NrnWPAzFYTL0y6tsgpDJVu+4odVtIEXi/EhCBSDRHR/ILmKLm/oXu+3In5wSWx+weVCDNRAJ4r6jzEjKyNNuvTXC8wQenLJEKR6dJNARq/k0A7Z0XyK/skdyNrhpdd0sbSmAKduYMpsmvM68C1iGVdT6IRibVZNtbvWWRnDbmnlLq453+p38N3o5Pr2tEdDtoUwqdbYAPN2czT84+H2otWHEoAaItOF/esjSJCkIUvN7OYf+EPnXcP/URb2TY7e+3+2eyJ74m1oEKORfmHtbw5TQz6PB5oHYIsjd4XlBkFL6i2Uohcr3hf8u9NgU07grOICLxPbWRXrof4XhnlEfjtZS+ZHwStEiKT+1w4TZzrVKS7jN2zVFXPv1Opmhm0NEWrWss+tTFl2y+laF74dDoolepVDPSOR8MluZHxN2sDfH94ok7//HITKXnsSdVhRrfWOtsP57Ju7H+2GxqbTe4svS2gWml96EZMmRUsJyWDJoY9PIwz5Fx43G88nhW5JZAG3sG6yPBnHtv6L/1qxwGEgAqa/iUeDmitMbovLEMuG/KPEvSgoTVNfE4oGhEmTXgzE6KAEqEGQ2gjGrKktpfNXOhkgO8ozqV8 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: a33a47c9-4a22-4be1-b574-08d8c2214c67 X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB1355.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2021 17:39:14.5998 (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: NINDInyFVg1sSbriq2EKCGMNxsNirkD+U1vPovIL8i5JsfnVAfOr7HOfA5PgfTwJCYuvYaKWU4kQb2yEUqlHOA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4153 Received-SPF: softfail client-ip=40.107.220.49; envelope-from=Thomas.Lendacky@amd.com; helo=NAM11-CO1-obe.outbound.protection.outlook.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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> Cc: Brijesh Singh <brijesh.singh@amd.com>, Eduardo Habkost <ehabkost@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Connor Kuehl <ckuehl@redhat.com>, Sean Christopherson <seanjc@google.com>, Marcelo Tosatti <mtosatti@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Jiri Slaby <jslaby@suse.cz>, Richard Henderson <rth@twiddle.net> 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 |
Qemu SEV-ES guest support
|
expand
|
On 2021-01-26 11:36:49 -0600, Tom Lendacky wrote: > From: Tom Lendacky <thomas.lendacky@amd.com> > > Update the sev_es_enabled() function return value to be based on the SEV > policy that has been specified. SEV-ES is enabled if SEV is enabled and > the SEV-ES policy bit is set in the policy object. > > Cc: Paolo Bonzini <pbonzini@redhat.com> > Cc: Richard Henderson <richard.henderson@linaro.org> > Cc: Eduardo Habkost <ehabkost@redhat.com> > Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> > Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Reviewed-by: Venu Busireddy <venu.busireddy@oracle.com> > --- > target/i386/sev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/i386/sev.c b/target/i386/sev.c > index badc141554..62ecc28cf6 100644 > --- a/target/i386/sev.c > +++ b/target/i386/sev.c > @@ -371,7 +371,7 @@ sev_enabled(void) > bool > sev_es_enabled(void) > { > - return false; > + return sev_enabled() && (sev_guest->policy & SEV_POLICY_ES); > } > > uint64_t > -- > 2.30.0 >
diff --git a/target/i386/sev.c b/target/i386/sev.c index badc141554..62ecc28cf6 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -371,7 +371,7 @@ sev_enabled(void) bool sev_es_enabled(void) { - return false; + return sev_enabled() && (sev_guest->policy & SEV_POLICY_ES); } uint64_t