From: Michael Roth <michael.roth@amd.com>
To: qemu-devel@nongnu.org
Cc: "Connor Kuehl" <ckuehl@redhat.com>,
"Philippe Mathieu-Daudé" <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>,
"Daniel P . Berrangé" <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 02/12] linux-header: add the SNP specific command
Date: Thu, 26 Aug 2021 17:26:17 -0500 [thread overview]
Message-ID: <20210826222627.3556-3-michael.roth@amd.com> (raw)
In-Reply-To: <20210826222627.3556-1-michael.roth@amd.com>
From: Brijesh Singh <brijesh.singh@amd.com>
Sync the kvm.h with the kernel to include the SNP specific commands.
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Michael Roth <michael.roth@amd.com>
---
| 50 +++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
--git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
index bcaf66cc4d..486c12b4f7 100644
--- a/linux-headers/linux/kvm.h
+++ b/linux-headers/linux/kvm.h
@@ -1712,6 +1712,12 @@ enum sev_cmd_id {
/* Guest Migration Extension */
KVM_SEV_SEND_CANCEL,
+ /* SNP specific commands */
+ KVM_SEV_SNP_INIT,
+ KVM_SEV_SNP_LAUNCH_START,
+ KVM_SEV_SNP_LAUNCH_UPDATE,
+ KVM_SEV_SNP_LAUNCH_FINISH,
+
KVM_SEV_NR_MAX,
};
@@ -1808,6 +1814,50 @@ struct kvm_sev_receive_update_data {
__u32 trans_len;
};
+struct kvm_snp_init {
+ __u64 flags;
+};
+
+struct kvm_sev_snp_launch_start {
+ __u64 policy;
+ __u64 ma_uaddr;
+ __u8 ma_en;
+ __u8 imi_en;
+ __u8 gosvw[16];
+ __u8 pad[6];
+};
+
+#define KVM_SEV_SNP_PAGE_TYPE_NORMAL 0x1
+#define KVM_SEV_SNP_PAGE_TYPE_VMSA 0x2
+#define KVM_SEV_SNP_PAGE_TYPE_ZERO 0x3
+#define KVM_SEV_SNP_PAGE_TYPE_UNMEASURED 0x4
+#define KVM_SEV_SNP_PAGE_TYPE_SECRETS 0x5
+#define KVM_SEV_SNP_PAGE_TYPE_CPUID 0x6
+
+struct kvm_sev_snp_launch_update {
+ __u64 start_gfn;
+ __u64 uaddr;
+ __u32 len;
+ __u8 imi_page;
+ __u8 page_type;
+ __u8 vmpl3_perms;
+ __u8 vmpl2_perms;
+ __u8 vmpl1_perms;
+};
+
+#define KVM_SEV_SNP_ID_BLOCK_SIZE 96
+#define KVM_SEV_SNP_ID_AUTH_SIZE 4096
+#define KVM_SEV_SNP_FINISH_DATA_SIZE 32
+
+struct kvm_sev_snp_launch_finish {
+ __u64 id_block_uaddr;
+ __u64 id_auth_uaddr;
+ __u8 id_block_en;
+ __u8 auth_key_en;
+ __u8 host_data[KVM_SEV_SNP_FINISH_DATA_SIZE];
+ __u8 pad[6];
+};
+
#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)
#define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1)
#define KVM_DEV_ASSIGN_MASK_INTX (1 << 2)
--
2.25.1
next prev parent reply other threads:[~2021-08-26 22:27 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-26 22:26 [RFC PATCH v2 00/12] Add AMD Secure Nested Paging (SEV-SNP) support Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 01/12] i386/sev: introduce "sev-common" type to encapsulate common SEV state Michael Roth
2021-09-01 14:18 ` Markus Armbruster
2021-09-03 15:11 ` Michael Roth
2021-08-26 22:26 ` Michael Roth [this message]
2021-09-03 20:36 ` [RFC PATCH v2 02/12] linux-header: add the SNP specific command Dov Murik
2021-09-03 20:36 ` Dov Murik
2021-09-07 14:27 ` Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 03/12] i386/sev: introduce 'sev-snp-guest' object Michael Roth
2021-09-01 14:29 ` Markus Armbruster
2021-09-03 15:15 ` Michael Roth
2021-09-03 21:12 ` Dov Murik
2021-09-03 21:12 ` Dov Murik
2021-09-07 14:20 ` Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 04/12] i386/sev: initialize SNP context Michael Roth
2021-09-05 7:07 ` Dov Murik
2021-09-05 7:07 ` Dov Murik
2021-09-05 13:58 ` Brijesh Singh
2021-09-05 17:09 ` Dov Murik
2021-09-05 17:09 ` Dov Murik
2021-09-05 9:19 ` Dov Murik
2021-09-05 9:19 ` Dov Murik
2021-09-05 14:05 ` Brijesh Singh
2021-09-05 17:03 ` Dov Murik
2021-09-05 17:03 ` Dov Murik
2021-08-26 22:26 ` [RFC PATCH v2 05/12] i386/sev: add the SNP launch start context Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 06/12] i386/sev: add support to encrypt BIOS when SEV-SNP is enabled Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 07/12] i386/sev: populate secrets and cpuid page and finalize the SNP launch Michael Roth
2021-09-03 20:24 ` Dov Murik
2021-09-03 20:24 ` Dov Murik
2021-09-07 16:18 ` Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 08/12] target/i386: set SEV-SNP CPUID bit when SNP enabled Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 09/12] target/i386: allow versioned CPUs to specify new cache_info Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 10/12] target/i386: add new EPYC CPU versions with updated cache_info Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 11/12] i386/sev: sev-snp: add support for CPUID validation Michael Roth
2021-09-05 10:02 ` Dov Murik
2021-09-05 10:02 ` Dov Murik
2021-09-07 16:50 ` Michael Roth
2021-09-07 17:44 ` Dov Murik
2021-09-07 17:44 ` Dov Murik
2021-08-26 22:26 ` [RFC PATCH v2 12/12] i386/sev: update query-sev QAPI format to handle SEV-SNP Michael Roth
2021-09-01 14:14 ` Markus Armbruster
2021-09-03 15:13 ` Michael Roth
2021-09-03 15:30 ` Daniel P. Berrangé
2021-09-03 15:30 ` Daniel P. Berrangé
2021-09-03 15:43 ` Michael Roth
2021-09-03 15:43 ` Michael Roth via
2021-09-03 15:58 ` Daniel P. Berrangé
2021-09-03 15:58 ` Daniel P. Berrangé
2021-09-03 16:01 ` Daniel P. Berrangé
2021-09-03 16:01 ` Daniel P. Berrangé
2021-09-04 5:41 ` Markus Armbruster
2021-09-07 11:52 ` Dr. David Alan Gilbert
2021-09-07 11:52 ` Dr. David Alan Gilbert
2021-09-07 14:33 ` Michael Roth
2021-09-07 14:33 ` Michael Roth via
2021-09-03 15:27 ` Daniel P. Berrangé
2021-09-03 15:27 ` Daniel P. Berrangé
2021-11-16 9:23 ` [RFC PATCH v2 00/12] Add AMD Secure Nested Paging (SEV-SNP) support Daniel P. Berrangé
2021-11-16 9:23 ` Daniel P. Berrangé
2021-11-16 11:54 ` Brijesh Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210826222627.3556-3-michael.roth@amd.com \
--to=michael.roth@amd.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=brijesh.singh@amd.com \
--cc=ckuehl@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=dgilbert@redhat.com \
--cc=dovmurik@linux.ibm.com \
--cc=eblake@redhat.com \
--cc=ehabkost@redhat.com \
--cc=jejb@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thomas.lendacky@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.