From nobody Mon Feb 9 19:41:30 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1613395186; cv=none; d=zohomail.com; s=zohoarc; b=JsMYxs0q5PsB0GViTakFO0i2pFdVXe7Vl6as/4ZzH28baqHeDGqdRzh4+rfgQurJ+JViPDEKnIwQSoYEGARb7L1EI7plq1jPjcO9k/xIFUqGPeZBzzOgAuKAGOShD684x0IwdCqfl7WV29oghnSieJE3ScQ8bIBjyVZ8gCShMcM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613395186; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pJZ2UzBf4qDMvnMPIQu0goRmI82r4LnUGUSIEIbHu28=; b=BYhlTzrVXWvyPGD+MkSlEb5lPDMxLi+8kKDKsgMnd6P3bRuZglzQKBUE/K8UAr2qoe2SoR2LSTnwC5kwCmoQbK2R7AMwu7kN96/9PVe8Fc9Xtp5J1cPlHSj5QuDSY4u1GGgiJteJw3K4dR/W7wSeKAgvbPbOtfwy1+IQajsBanE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1613395185863991.4369591795177; Mon, 15 Feb 2021 05:19:45 -0800 (PST) Received: from localhost ([::1]:53622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lBdmy-0007LC-Ip for importer@patchew.org; Mon, 15 Feb 2021 08:19:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBdjw-0005X4-It for qemu-devel@nongnu.org; Mon, 15 Feb 2021 08:16:36 -0500 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]:34188) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lBdjv-0005W2-4q for qemu-devel@nongnu.org; Mon, 15 Feb 2021 08:16:36 -0500 Received: by mail-ej1-x633.google.com with SMTP id hs11so11110220ejc.1 for ; Mon, 15 Feb 2021 05:16:34 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o4sm9950184edw.78.2021.02.15.05.16.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Feb 2021 05:16:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pJZ2UzBf4qDMvnMPIQu0goRmI82r4LnUGUSIEIbHu28=; b=prGqWKlb+KXC+JiAqDfHZWjVxNpZagjIosLfj6WE6d/+MgT09/8VVb91ZnovWVX1dB 9tFYGd86ygFMOAAuCnLWhKFzzUk2+taxHyBWrV5Rz0g/JrFaTqbzWKO0QAepWQ205+tH HqNr0HHDQhhoRwM2O7+R8uua6IQe5lSvTRpEruDC6zgfyH8odAsxjb4MFascOzsRW+nt Dlcg5eVuN/0IdMC4dEcH0P7+TEgiXaySfcbha55iGvVKfdK++CeMGLHQZXik45plukzl kTqb2ZcEfStQbGi0pc2MOHnndZ5HG67Tek1GWOHpP7YQa7ZJt85dD5ub05m8lEfSliND 6LCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=pJZ2UzBf4qDMvnMPIQu0goRmI82r4LnUGUSIEIbHu28=; b=dnNUx/TJbDMPSebMIMlf63H/LufA1MD82Vu+8M4wZ/dr6WqhoDWMp3PjbecyenPsR6 13R62ma4EDp0rKoAaJna3Ts6nug5h00LrBCf9RbGtgf8JtY9H7WI7GpeNAUnAqHsrv1d m4SwwA9W6AHApLpliHwgJssEQBV0/QugtSYRHUzujP36iH8Nm7bzuw5IRFrH2m9B0A4n i8rlatSRvYo4PGhHUXZhW2P3TUFLeNTGwFp7aezFIjpR0Ueby7R8PscvgF3yFFuo97LI x6vMbgcC9qV6kpMyLvUfsw2je9O/yaXWa+VqyW02wzzWsWRutjf9x2ZkTVhIzXiPvv8R 6Mqg== X-Gm-Message-State: AOAM532rGQf1SVI60lVrORIEv4AOPjoBkY5M/eBnXiwY+ynk7iaKKytq D46n1jo/z3bIym2GFHts+wKoFR8JDN0= X-Google-Smtp-Source: ABdhPJzoM9+bja1FDbf4YAg9+EriQnQ8JRPknyas5GQmF6zQm8olF/slNmlnSy8jfHUUUCIkjlkMHA== X-Received: by 2002:a17:907:35cb:: with SMTP id ap11mr15709405ejc.459.1613394993877; Mon, 15 Feb 2021 05:16:33 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 08/19] sev/i386: Enable an SEV-ES guest based on SEV policy Date: Mon, 15 Feb 2021 14:16:15 +0100 Message-Id: <20210215131626.65640-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210215131626.65640-1-pbonzini@redhat.com> References: <20210215131626.65640-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x633.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Lendacky , Venu Busireddy , Richard Henderson , Eduardo Habkost , "Dr . David Alan Gilbert" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Tom Lendacky 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 Cc: Richard Henderson Cc: Eduardo Habkost Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Tom Lendacky Reviewed-by: Venu Busireddy Message-Id: Signed-off-by: Paolo Bonzini --- 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 4b70d4284f..0f414df02f 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -356,7 +356,7 @@ sev_enabled(void) bool sev_es_enabled(void) { - return false; + return sev_enabled() && (sev_guest->policy & SEV_POLICY_ES); } =20 uint64_t --=20 2.29.2