Message ID | 38989f30c7243296111352d769e4e184f3036cbb.1610665956.git.thomas.lendacky@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=LYIK=GR=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.8 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=unavailable 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 CBD01C433E0 for <qemu-devel@archiver.kernel.org>; Thu, 14 Jan 2021 23:18:37 +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 409D623A59 for <qemu-devel@archiver.kernel.org>; Thu, 14 Jan 2021 23:18:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 409D623A59 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]:50814 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 1l0Bsx-0000t6-WC for qemu-devel@archiver.kernel.org; Thu, 14 Jan 2021 18:18:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37420) 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 1l0Bp7-0005gn-DJ for qemu-devel@nongnu.org; Thu, 14 Jan 2021 18:14:39 -0500 Received: from mail-bn7nam10on2061.outbound.protection.outlook.com ([40.107.92.61]:29001 helo=NAM10-BN7-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 1l0Bp1-0006Y2-Kr for qemu-devel@nongnu.org; Thu, 14 Jan 2021 18:14:37 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l58y2zBBdQIQ6BDh2ccuigLQPxDXWZ05bqNFg2ljWfH0Tdq0vEauqBIhn63cTD60fWcmYngzKFGstoGXMOLHJ3mOpVIQY+3LlBG0rmdoWdQeWj6zVhKOgztaZTaqqu0rYDRLyUPmzs5Sh73N+WiaH9tNbLJuKKWb6oKk19T72APDd5NfMveuI9VXAGHJPLX2n/l6eJj9Gcfvoct2KdzjbWVh6ypfqpBrzgJDTl8KfuaXc5eqzEI+xuZqVsjoWteil0H4Fy6FGiy2GP7b+80ZhnBqql6Id/LCGQ9KDFGyePOa9csx41mBO9BbPR6uoIDyajWbPIoDBUSdnx/Tp9o3dQ== 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=KKQ2AFj1Awh5vMga7xFbR5E6oW+S17lEDQCj0VgyeTKr/B5EZF3QzAa2QwTmudEefjHTbUd+AW+LXDV/qzg9ogXGyQO5q+XVSarZSZ3uFy1OgDy19SDKlSBg5fQaK4o0gLqcGePuDcW9CkmYyZrn8lfhoyE7gHpTr6Y984eYY/Vjm9kH07jYMVBR7NAwdzZik/ixKbwz7lLPm8rGMnBr9QkyFm0FgIc319ZWlM/ij35wYh2ML4Le/vpyoab+K1SsP6uGCC20HZSP4BughYKxsUq10RX1hpMcBcAKZBYkMeHoHkSLO+2XELzGRWQ8gE4p21YEViVe1MbfIt6cKfPaVg== 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=FOmdjW3a3iECjkBdxeO09AsGxMv6EcsKcyW9AXaroVMZKIPTZS10WX205/97k7RfIGZ+t9Cd0RyBvdk6yIpxbha6lrZhpSHcduZJi44tGyOn6aXoGRbK3FqE9vyx0iwjZNi3oeoVvyeAoD96HNICJ9Q4VzX7A47ZyeI5+cHU1kU= 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 DM5PR12MB2503.namprd12.prod.outlook.com (2603:10b6:4:b2::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.9; Thu, 14 Jan 2021 23:13:55 +0000 Received: from DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::d95e:b9d:1d6a:e845]) by DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::d95e:b9d:1d6a:e845%12]) with mapi id 15.20.3763.011; Thu, 14 Jan 2021 23:13:55 +0000 From: Tom Lendacky <thomas.lendacky@amd.com> To: qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: [PATCH v5 6/6] sev/i386: Enable an SEV-ES guest based on SEV policy Date: Thu, 14 Jan 2021 17:12:36 -0600 Message-Id: <38989f30c7243296111352d769e4e184f3036cbb.1610665956.git.thomas.lendacky@amd.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <cover.1610665956.git.thomas.lendacky@amd.com> References: <cover.1610665956.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: SN4PR0201CA0067.namprd02.prod.outlook.com (2603:10b6:803:20::29) 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 SN4PR0201CA0067.namprd02.prod.outlook.com (2603:10b6:803:20::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10 via Frontend Transport; Thu, 14 Jan 2021 23:13:54 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 4d511acf-fcc4-4521-a258-08d8b8e2109b X-MS-TrafficTypeDiagnostic: DM5PR12MB2503: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <DM5PR12MB25031F8771319970ECDBDE28ECA80@DM5PR12MB2503.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: /aelx9WzHq/74XZiYITgIYqHGwdpkLuv0i6zQ7OYb2xK2iJJjfLZxHU5IA6XleIEJ0DUcw4n5gveDp65jMKGl1NAIWxYp6rE6/M9g3EGpRjxl2HgXb4z9fJhG4JOAOuKRv3A7BEpdxyeZI1US86jaL5S/ak5rUalw3SFtRXQBPrunx/COtFzsfqvtIotXAccuDZm/wSAZuZ6CEGWBsmkuNIEjvG5lD0PaM1/FAJ90OK87A9XINXuOO+erTEQc6MR73nEaQiTg0+mKiAQN9Y8J5js+d75/kljIioCiz9VWbQi1gINc4DwVPy6wtH0tk3BhBs0Oq/mKa89lTlMTY9vbUxp+/xLcIeqCWz8d2XroXBPmckKHB/gjoUxh3rEPpfqZ3MbEFZS1CawmRvkv5JdCw== 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)(136003)(366004)(346002)(376002)(396003)(39860400002)(8936002)(54906003)(186003)(6666004)(6486002)(16526019)(86362001)(4744005)(7696005)(956004)(66476007)(66556008)(52116002)(316002)(5660300002)(7416002)(2616005)(4326008)(36756003)(26005)(478600001)(83380400001)(2906002)(66946007)(8676002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: PHhcUXa+218O0hsX/8tK5ePsjgCOKMgF6VOXHpIEtUzarV6SCUR5jQ+4LWhhE/MpE52wCGpSbq0yX6mcXoeIIGXX7Mzu7ft5crg6MSgh4z95QJzfLE5NT/XPBExeGsyt66zAa+ZOCXT2cdHQo8m/Ji+LWaehZy+eEx3tdhHusBa38kjuR/qU5ZhGx+UsfA2gBx2TxGyRo3loxjoHLxvhbkXH602yI6JYkZVktYwXXG24uouwN5g4dt7HU02VPNkIxC23uwdtR7Sb3a5/cTReIpR4It3nDC843qIhxR8Pu4o9Q27TvkkXWCltPgy1480mckYWJDx4rkDaH87U2Faw/wamibOPhg/9KHVCi6clGQYLnh0y/F9/SqR+euTJw6rQPAxuZa1kUveWYbgrA1QEvySRbPcXU9Wi4apo+pRaSC2LoP5ltwoazeHP7+cJnMyfKzjTTDS6A2OjMS5ysX3ZcWyxibPkUJxT04srcox0OsWax9JMesH0ppgSHL+blhYiX3cOjyRDV8spsoARuoOxBaCurDBFnwlTwBwY/wCig3znAxFhdFXY2erOMO7gmih1KqCvc25tRuN1bgPzEGG/up7zYrIgPzPoM3PYdvdAbrXrrjW4z15Vl+tSBL73KqdWbX2CYCUvc5PuxBgGDC3GdlWftkKXivyt1JapghsoIafSyI4p0CC7YbT1ffpgMj92LuT5lxK+JGGojkUKY8g9U5kfGGGfuHNkzrYyc3N+OURg2Myr21Y713vL1VD2a2D1sDLqxEviBoz/GEYrhS9fCckDiCC9V+XR8okNSysiHM7vOFvmMTdb93yt5q7cyZ+lZiaLkAAeUmARXIdkEOl8JFxX1A175966ykPFTbQLjYmxyAP+6T/EmrxY6g/Isi6ISDkd2sZoaEoaab3C6TbE/KG2CsHyVhM5tBE4DOE/rb6oupNcQzwn93wYnM7WcDYjPsKp29Vd8RhGoX11FBxVahUePINYVyCVy1wbj1gMoMhYSMnqc5q5wEZmrcayGV7Y X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB1355.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jan 2021 23:13:55.2400 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-Network-Message-Id: 4d511acf-fcc4-4521-a258-08d8b8e2109b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9hI7DBP9zfZhWRuhXx1BomP1qT2Yuwv8TxfwLwZ7j2aPFTkC23ynZb4PbabMz+JmO7pTyEwQ5+OCSwoGBffRlA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB2503 Received-SPF: softfail client-ip=40.107.92.61; envelope-from=Thomas.Lendacky@amd.com; helo=NAM10-BN7-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: <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
|
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