From nobody Tue Feb 10 02:49:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1633179256; cv=none; d=zohomail.com; s=zohoarc; b=gC900bp4bzlvXnZszdDPuxeIIW2DutmuoPtUs6QsKNsHLKLXzWmcCeW9oGdQmNkQxgH+Xwf25XsjS1aFUQh76EHJvOpVj18Q3uQY6XsO6SgcUKu6xT9do6NG/MPlwfp+iPUg6YelUsM9lhl8uG1/tDIMhSc6inIuKS7dpGnjPkA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633179256; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=PLN18Kg90p6yE/kKbVk7ZeNbapKw0JC8XYHCCSL7Hxc=; b=fMldhAbt4ihrYMwmI6ZEXS1Mf+5soicpRbtT5ixkFgXlr7LMscW1lPf50OOqXtcFeCNf5iQt7ZMUMesX7gjF0tIuFuIKxKBU9q/2CYIp9dTNG6S9WamkXKbfKovj9JIVCQvGillTRCNq+MnB5Cffe0I8dwzHQ1m00GSSHGtIX30= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1633179256792634.6663684680522; Sat, 2 Oct 2021 05:54:16 -0700 (PDT) Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-286-p2W17XewO4Gp_s3tQBWURQ-1; Sat, 02 Oct 2021 08:54:14 -0400 Received: by mail-wm1-f72.google.com with SMTP id z137-20020a1c7e8f000000b0030cd1800d86so6075793wmc.2 for ; Sat, 02 Oct 2021 05:54:14 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.. (118.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.118]) by smtp.gmail.com with ESMTPSA id f3sm4714202wmb.12.2021.10.02.05.54.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Oct 2021 05:54:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633179255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PLN18Kg90p6yE/kKbVk7ZeNbapKw0JC8XYHCCSL7Hxc=; b=etXpZTMhtcxlTAj/aUjMyRJvSMwZi8XEXT+dywoWVH/u+ime8yP46KiIeDgck1MZXCcBc9 BC6ei2NB0K6NTxZ3G1IzN2eGoislqAWRc8QUk2rSpt9voHHsCA1Y5HI9aICN6jF0nzMSYI ekZ8gtirTLv4bAZaCddD6Oqr+rE0isM= X-MC-Unique: p2W17XewO4Gp_s3tQBWURQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PLN18Kg90p6yE/kKbVk7ZeNbapKw0JC8XYHCCSL7Hxc=; b=ve4xUiv2YS/eImge0VxN0mtLntUCI3c/Igj/f5CVujeuGMAXqy4JVXyZXe0mS+W2X/ Bu/29o5So5CQOyZfox9Q4mLje/gqkqvT8dd1E0ASkCvYtAfPQ/dED6x3Rf4mUa6Vk8Zr ErGQHEdgUuiZY1TQe8fmzH7r8RyCln+oP/6RbrgDF5O6bdCYpb2S1OJGJhw5QdvMsysj 71YVTS1L7JdHR9MxarMv9rN+MdiBSynyweMyqhZhE3djAF5GuHiFdBvAOPkGU4NEGxL4 4RmXb0WWcWdKoKvOeGkocE+MKjjKXyyDktCDpztGfX3/cljulZplAE+8JhEVUyRk8AEL I3AQ== X-Gm-Message-State: AOAM532GK629yXxHCEHYC7tI/5oW/nFPc0lNhkR41wSzCXvlVOJySnGU DHsxUDQAuR/zHtP0aQLcEUJoXjQwQ7FP39slKKqCXaplTz7BA/SE5xPNUBBVgOgfeu32tMe3CQr or0PgW3WWa8lP5A== X-Received: by 2002:a1c:451:: with SMTP id 78mr9420864wme.158.1633179253569; Sat, 02 Oct 2021 05:54:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvcuP74ApKFXkJudhkd8SG4XnSX9kLVw5i9VtVFVZpVk56S2QPWclGVjksHGgaC8beyVsBGA== X-Received: by 2002:a1c:451:: with SMTP id 78mr9420859wme.158.1633179253445; Sat, 02 Oct 2021 05:54:13 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr . David Alan Gilbert" , Dov Murik , Sergio Lopez , kvm@vger.kernel.org, James Bottomley , Eduardo Habkost , Paolo Bonzini , Brijesh Singh , "Daniel P . Berrange" Subject: [PATCH v3 12/22] target/i386/sev: Declare system-specific functions in 'sev_i386.h' Date: Sat, 2 Oct 2021 14:53:07 +0200 Message-Id: <20211002125317.3418648-13-philmd@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211002125317.3418648-1-philmd@redhat.com> References: <20211002125317.3418648-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1633179258094100001 While prefixed with sysemu, 'sysemu/sev.h' contains the architecture specific declarations. The system specific parts are declared in 'sev_i386.h'. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Paolo Bonzini --- include/sysemu/sev.h | 6 ------ target/i386/sev_i386.h | 7 +++++++ hw/i386/pc_sysfw.c | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/sysemu/sev.h b/include/sysemu/sev.h index 94d821d737c..a329ed75c1c 100644 --- a/include/sysemu/sev.h +++ b/include/sysemu/sev.h @@ -18,11 +18,5 @@ =20 bool sev_enabled(void); int sev_kvm_init(ConfidentialGuestSupport *cgs, Error **errp); -int sev_encrypt_flash(uint8_t *ptr, uint64_t len, Error **errp); -int sev_inject_launch_secret(const char *hdr, const char *secret, - uint64_t gpa, Error **errp); - -int sev_es_save_reset_vector(void *flash_ptr, uint64_t flash_size); -void sev_es_set_reset_vector(CPUState *cpu); =20 #endif diff --git a/target/i386/sev_i386.h b/target/i386/sev_i386.h index afa19a0a161..0798ab3519a 100644 --- a/target/i386/sev_i386.h +++ b/target/i386/sev_i386.h @@ -33,4 +33,11 @@ extern SevCapability *sev_get_capabilities(Error **errp); extern SevAttestationReport * sev_get_attestation_report(const char *mnonce, Error **errp); =20 +int sev_encrypt_flash(uint8_t *ptr, uint64_t len, Error **errp); +int sev_inject_launch_secret(const char *hdr, const char *secret, + uint64_t gpa, Error **errp); + +int sev_es_save_reset_vector(void *flash_ptr, uint64_t flash_size); +void sev_es_set_reset_vector(CPUState *cpu); + #endif diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c index 68d6b1f783e..0b202138b66 100644 --- a/hw/i386/pc_sysfw.c +++ b/hw/i386/pc_sysfw.c @@ -37,7 +37,7 @@ #include "hw/qdev-properties.h" #include "hw/block/flash.h" #include "sysemu/kvm.h" -#include "sysemu/sev.h" +#include "sev_i386.h" =20 #define FLASH_SECTOR_SIZE 4096 =20 --=20 2.31.1