All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hao Feng <fenghao@hygon.cn>
To: "'Paolo Bonzini '" <pbonzini@redhat.com>,
	"' Radim Krčmář '" <rkrcmar@redhat.com>
Cc: "'Zhaohui Du '" <duzhaohui@hygon.cn>,
	"'Zhiwei Ying '" <yingzhiwei@hygon.cn>,
	"'Wen Pu '" <puwen@hygon.cn>, Hao Feng <fenghao@hygon.cn>,
	<kvm@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH 4/6] KVM: Define Hygon SEV commands
Date: Mon, 15 Apr 2019 20:04:26 +0800	[thread overview]
Message-ID: <1555329868-17895-5-git-send-email-fenghao@hygon.cn> (raw)
In-Reply-To: <1555329868-17895-1-git-send-email-fenghao@hygon.cn>

1. KVM_SEV_GM_GET_DIGEST
------------------------
The command is used to get the key digest from SEV firmware, guest
owner will check the key digest to see if the key negotiation is
successful or not.

2. KVM_SEV_GM_VERIFY_DIGEST
---------------------------
The command is used to send guest owner's key digest to SEV firmware,
firmware will check the key digest to see if the key negotiation is
successful or not.

Signed-off-by: Hao Feng <fenghao@hygon.cn>
---
 include/uapi/linux/kvm.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 6d4ea4b..3eb8858 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -1469,6 +1469,10 @@ enum sev_cmd_id {
 	/* Guest certificates commands */
 	KVM_SEV_CERT_EXPORT,
 
+	/* GM specific commands */
+	KVM_SEV_GM_GET_DIGEST,
+	KVM_SEV_GM_VERIFY_DIGEST,
+
 	KVM_SEV_NR_MAX,
 };
 
@@ -1520,6 +1524,16 @@ struct kvm_sev_dbg {
 	__u32 len;
 };
 
+struct kvm_sev_gm_get_digest {
+	__u64 uaddr;
+	__u32 len;
+};
+
+struct kvm_sev_gm_verify_digest {
+	__u64 uaddr;
+	__u32 len;
+};
+
 #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.7.4


  parent reply	other threads:[~2019-04-15 12:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15 12:04 [PATCH 0/6] Add Hygon SEV support Hao Feng
2019-04-15 12:04 ` [PATCH 1/6] crypto: ccp: Add Hygon Dhyana support Hao Feng
2019-04-15 12:04 ` [PATCH 2/6] crypto: ccp: Define Hygon SEV commands Hao Feng
2019-04-15 12:04 ` [PATCH 3/6] crypto: ccp: Implement SEV_GM_PUBKEY_GEN ioctl command Hao Feng
2019-04-15 12:04 ` Hao Feng [this message]
2019-04-15 12:04 ` [PATCH 5/6] KVM: SVM: Add support for KVM_SEV_GM_GET_DIGEST command Hao Feng
2019-04-15 15:09   ` Borislav Petkov
     [not found]     ` <896956377bf441c3bfd911716418ce7e@hygon.cn>
2019-04-16  8:15       ` Borislav Petkov
2019-04-16 11:47         ` Hao Feng
2019-04-15 12:04 ` [PATCH 6/6] KVM: SVM: Add support for KVM_SEV_GM_VERIFY_DIGEST command Hao Feng
2019-04-15 15:32 ` [PATCH 0/6] Add Hygon SEV support Lendacky, Thomas
2019-04-15 15:37 ` Paolo Bonzini
2019-04-15 15:51   ` Pascal Van Leeuwen
2019-04-15 16:04     ` Paolo Bonzini
2019-04-16  6:58       ` Pascal Van Leeuwen
2019-04-16  8:09         ` Paolo Bonzini
2019-04-16  9:08           ` Pascal Van Leeuwen
2019-04-16 10:28           ` Hao Feng

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=1555329868-17895-5-git-send-email-fenghao@hygon.cn \
    --to=fenghao@hygon.cn \
    --cc=duzhaohui@hygon.cn \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=puwen@hygon.cn \
    --cc=rkrcmar@redhat.com \
    --cc=yingzhiwei@hygon.cn \
    /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.