From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751579AbdGYJvg convert rfc822-to-8bit (ORCPT ); Tue, 25 Jul 2017 05:51:36 -0400 Received: from smtp-out4.electric.net ([192.162.216.195]:57519 "EHLO smtp-out4.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751553AbdGYJvd (ORCPT ); Tue, 25 Jul 2017 05:51:33 -0400 From: David Laight To: "'Brijesh Singh'" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "linux-efi@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "kvm@vger.kernel.org" CC: Fenghua Yu , Matt Fleming , David Howells , "Paul Mackerras" , "H . Peter Anvin" , "Christoph Lameter" , Jonathan Corbet , =?iso-8859-2?Q?Radim_Krcm=E1r?= , Piotr Luc , Ingo Molnar , Dave Airlie , Borislav Petkov , Tom Lendacky , Kees Cook , Arnd Bergmann , Konrad Rzeszutek Wilk , Reza Arbab , Andy Lutomirski , "Thomas Gleixner" , Laura Abbott , Tony Luck , Ard Biesheuvel , "Eric Biederman" , Tejun Heo , Paolo Bonzini , Andrew Morton , "Kirill A . Shutemov" , Lu Baolu Subject: RE: [RFC Part1 PATCH v3 13/17] x86/io: Unroll string I/O when SEV is active Thread-Topic: [RFC Part1 PATCH v3 13/17] x86/io: Unroll string I/O when SEV is active Thread-Index: AQHTBMr+maW+IBZqtEeA2Vfkk/FXraJkTNGg Date: Tue, 25 Jul 2017 09:51:13 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6DD003FB85@AcuExch.aculab.com> References: <20170724190757.11278-1-brijesh.singh@amd.com> <20170724190757.11278-14-brijesh.singh@amd.com> In-Reply-To: <20170724190757.11278-14-brijesh.singh@amd.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Outbound-IP: 156.67.243.126 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuExch.aculab.com X-TLS: TLSv1:AES128-SHA:128 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Brijesh Singh > Sent: 24 July 2017 20:08 > From: Tom Lendacky > > Secure Encrypted Virtualization (SEV) does not support string I/O, so > unroll the string I/O operation into a loop operating on one element at > a time. > > Signed-off-by: Tom Lendacky > Signed-off-by: Brijesh Singh > --- > arch/x86/include/asm/io.h | 26 ++++++++++++++++++++++---- > 1 file changed, 22 insertions(+), 4 deletions(-) > > diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h > index e080a39..2f3c002 100644 > --- a/arch/x86/include/asm/io.h > +++ b/arch/x86/include/asm/io.h > @@ -327,14 +327,32 @@ static inline unsigned type in##bwl##_p(int port) \ > \ > static inline void outs##bwl(int port, const void *addr, unsigned long count) \ > { Is it even worth leaving these as inline functions? Given the speed of IO cycles it is unlikely that the cost of calling a real function will be significant. The code bloat reduction will be significant. David From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Laight Subject: RE: [RFC Part1 PATCH v3 13/17] x86/io: Unroll string I/O when SEV is active Date: Tue, 25 Jul 2017 09:51:13 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6DD003FB85@AcuExch.aculab.com> References: <20170724190757.11278-1-brijesh.singh@amd.com> <20170724190757.11278-14-brijesh.singh@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 8BIT Return-path: In-Reply-To: <20170724190757.11278-14-brijesh.singh@amd.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: 'Brijesh Singh' , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "linux-efi@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "kvm@vger.kernel.org" Cc: Fenghua Yu , Matt Fleming , David Howells , Paul Mackerras , "H . Peter Anvin" , Christoph Lameter , Jonathan Corbet , =?iso-8859-2?Q?Radim_Krcm=E1r?= , Piotr Luc , Ingo Molnar , Dave Airlie , Borislav Petkov , Tom Lendacky , Kees Cook , Arnd Bergmann , Konrad Rzeszutek Wilk , Reza Arbab , Andy Lutomirski , Thomas Gleixner , Laura Abbott , Ton List-Id: linux-efi@vger.kernel.org From: Brijesh Singh > Sent: 24 July 2017 20:08 > From: Tom Lendacky > > Secure Encrypted Virtualization (SEV) does not support string I/O, so > unroll the string I/O operation into a loop operating on one element at > a time. > > Signed-off-by: Tom Lendacky > Signed-off-by: Brijesh Singh > --- > arch/x86/include/asm/io.h | 26 ++++++++++++++++++++++---- > 1 file changed, 22 insertions(+), 4 deletions(-) > > diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h > index e080a39..2f3c002 100644 > --- a/arch/x86/include/asm/io.h > +++ b/arch/x86/include/asm/io.h > @@ -327,14 +327,32 @@ static inline unsigned type in##bwl##_p(int port) \ > \ > static inline void outs##bwl(int port, const void *addr, unsigned long count) \ > { Is it even worth leaving these as inline functions? Given the speed of IO cycles it is unlikely that the cost of calling a real function will be significant. The code bloat reduction will be significant. David From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out4.electric.net (smtp-out4.electric.net [192.162.216.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xGtml3xkwzDqm1 for ; Tue, 25 Jul 2017 19:51:34 +1000 (AEST) From: David Laight To: 'Brijesh Singh' , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "linux-efi@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "kvm@vger.kernel.org" CC: Fenghua Yu , Matt Fleming , David Howells , "Paul Mackerras" , "H . Peter Anvin" , "Christoph Lameter" , Jonathan Corbet , =?iso-8859-2?Q?Radim_Krcm=E1r?= , Piotr Luc , Ingo Molnar , Dave Airlie , Borislav Petkov , Tom Lendacky , Kees Cook , Arnd Bergmann , Konrad Rzeszutek Wilk , Reza Arbab , Andy Lutomirski , "Thomas Gleixner" , Laura Abbott , Tony Luck , Ard Biesheuvel , "Eric Biederman" , Tejun Heo , Paolo Bonzini , Andrew Morton , "Kirill A . Shutemov" , Lu Baolu Subject: RE: [RFC Part1 PATCH v3 13/17] x86/io: Unroll string I/O when SEV is active Date: Tue, 25 Jul 2017 09:51:13 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6DD003FB85@AcuExch.aculab.com> References: <20170724190757.11278-1-brijesh.singh@amd.com> <20170724190757.11278-14-brijesh.singh@amd.com> In-Reply-To: <20170724190757.11278-14-brijesh.singh@amd.com> Content-Type: text/plain; charset="iso-8859-2" MIME-Version: 1.0 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Brijesh Singh > Sent: 24 July 2017 20:08 > From: Tom Lendacky >=20 > Secure Encrypted Virtualization (SEV) does not support string I/O, so > unroll the string I/O operation into a loop operating on one element at > a time. >=20 > Signed-off-by: Tom Lendacky > Signed-off-by: Brijesh Singh > --- > arch/x86/include/asm/io.h | 26 ++++++++++++++++++++++---- > 1 file changed, 22 insertions(+), 4 deletions(-) >=20 > diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h > index e080a39..2f3c002 100644 > --- a/arch/x86/include/asm/io.h > +++ b/arch/x86/include/asm/io.h > @@ -327,14 +327,32 @@ static inline unsigned type in##bwl##_p(int port) = \ > \ > static inline void outs##bwl(int port, const void *addr, unsigned long c= ount) \ > { Is it even worth leaving these as inline functions? Given the speed of IO cycles it is unlikely that the cost of calling a real function will be significant. The code bloat reduction will be significant. David