From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752332AbdJDOuc (ORCPT ); Wed, 4 Oct 2017 10:50:32 -0400 Received: from mx2.suse.de ([195.135.220.15]:43358 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752085AbdJDOua (ORCPT ); Wed, 4 Oct 2017 10:50:30 -0400 Date: Wed, 4 Oct 2017 16:50:07 +0200 From: Borislav Petkov To: Brijesh Singh Cc: x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Joerg Roedel , Tom Lendacky Subject: Re: [Part2 PATCH v5 07/31] KVM: Introduce KVM_MEMORY_ENCRYPT_OP ioctl Message-ID: <20171004145007.dqn7edkcrg2y234j@pd.tnic> References: <20171004131412.13038-1-brijesh.singh@amd.com> <20171004131412.13038-8-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20171004131412.13038-8-brijesh.singh@amd.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 04, 2017 at 08:13:48AM -0500, Brijesh Singh wrote: > If hardware supports memory encryption then KVM_MEMORY_ENCRYPT_OP ioctl can > be used by qemu to issue a platform specific memory encryption commands. Minor issues: "If the hardware supports memory encryption then the KVM_MEMORY_ENCRYPT_OP ioctl can be used by qemu to issue platform specific memory encryption commands." > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: "H. Peter Anvin" > Cc: Paolo Bonzini > Cc: "Radim Krčmář" > Cc: Joerg Roedel > Cc: Borislav Petkov > Cc: Tom Lendacky > Cc: x86@kernel.org > Cc: kvm@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Brijesh Singh > Reviewed-by: Paolo Bonzini > --- > Documentation/virtual/kvm/api.txt | 16 ++++++++++++++++ > arch/x86/include/asm/kvm_host.h | 2 ++ > arch/x86/kvm/x86.c | 12 ++++++++++++ > include/uapi/linux/kvm.h | 2 ++ > 4 files changed, 32 insertions(+) > > diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt > index e63a35fafef0..cc1aa76ee6cd 100644 > --- a/Documentation/virtual/kvm/api.txt > +++ b/Documentation/virtual/kvm/api.txt > @@ -3390,6 +3390,22 @@ invalid, if invalid pages are written to (e.g. after the end of memory) > or if no page table is present for the addresses (e.g. when using > hugepages). > > +4.109 KVM_MEMORY_ENCRYPT_OP > + > +Capability: basic > +Architectures: x86 > +Type: system > +Parameters: a opaque platform specific structure (in/out) ^ s/a/an/ > +Returns: 0 on success; -1 on error > + > +If platform supports creating encrypted VMs then this ioctl can be used for "If the platform... " > +issuing a platform specific memory encryption commands to manage the encrypted change that line to: "issuing platform-specific memory encryption commands to manage those encrypted" > +VMs. > + > +Currently, this ioctl is used for issuing Secure Encrypted Virtualization (SEV) > +commands on AMD Processors. The SEV commands are defined in > +Documentation/virtual/kvm/amd-memory-encryption.txt. > + Nice. With those addressed: Reviewed-by: Borislav Petkov -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --