From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751182AbdIOQXP (ORCPT ); Fri, 15 Sep 2017 12:23:15 -0400 Received: from mx2.suse.de ([195.135.220.15]:40922 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751211AbdIOQXM (ORCPT ); Fri, 15 Sep 2017 12:23:12 -0400 Date: Fri, 15 Sep 2017 18:22:56 +0200 From: Borislav Petkov To: Brijesh Singh Cc: Tom Lendacky , "H. Peter Anvin" , Arnd Bergmann , David Laight , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "linux-efi@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "kvm@vger.kernel.org" , Fenghua Yu , Matt Fleming , David Howells , Paul Mackerras , Christoph Lameter , Jonathan Corbet , Radim =?utf-8?Q?Krcm=C3=A1r?= , Piotr Luc , Ingo Molnar , Dave Airlie , Kees Cook , Konrad Rzeszutek Wilk , Reza Arbab , Andy Lutomirski , Thomas Gleixner , Laura Abbott , Tony Luck , Ard.Biesheuvel@zytor.com Subject: Re: [RFC Part1 PATCH v3 13/17] x86/io: Unroll string I/O when SEV is active Message-ID: <20170915162256.7l4vyy4ee5zeqbir@pd.tnic> References: <063D6719AE5E284EB5DD2968C1650D6DD003FB85@AcuExch.aculab.com> <201707261927.v6QJR228008075@mail.zytor.com> <589d65a4-eb09-bae9-e8b4-a2d78ca6b509@amd.com> <20170822165248.rkbluikdgduu7ucy@pd.tnic> <20170915122430.pnroy6vsg53warel@pd.tnic> <95314c89-2620-8bb7-cbe8-cd9bc3adabb0@amd.com> <20170915143935.6vtfp5rtj5h324fi@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 Fri, Sep 15, 2017 at 09:48:53AM -0500, Brijesh Singh wrote: > I see the similar issue with non SEV guest with my simple patch below. > Guest will reboot as soon as it tries to enable the key. Can't do it there as the pagetable is not setup yet and you're probably getting a #PF on any of the derefs down the static_key_enable() path. I guess one possible place to enable the static key would be in mem_encrypt_init() where everything should be set up already. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) -- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [RFC Part1 PATCH v3 13/17] x86/io: Unroll string I/O when SEV is active Date: Fri, 15 Sep 2017 18:22:56 +0200 Message-ID: <20170915162256.7l4vyy4ee5zeqbir@pd.tnic> References: <063D6719AE5E284EB5DD2968C1650D6DD003FB85@AcuExch.aculab.com> <201707261927.v6QJR228008075@mail.zytor.com> <589d65a4-eb09-bae9-e8b4-a2d78ca6b509@amd.com> <20170822165248.rkbluikdgduu7ucy@pd.tnic> <20170915122430.pnroy6vsg53warel@pd.tnic> <95314c89-2620-8bb7-cbe8-cd9bc3adabb0@amd.com> <20170915143935.6vtfp5rtj5h324fi@pd.tnic> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Brijesh Singh Cc: Tom Lendacky , "H. Peter Anvin" , Arnd Bergmann , David Laight , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org" , "linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org" , "kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Fenghua Yu , Matt Fleming , David Howells , Paul Mackerras , Christoph Lameter , Jonathan Corbet , Radim =?utf-8?Q?Krcm=C3=A1r?= , Piotr Luc , Ingo Molnar , Dave Airlie List-Id: linux-efi@vger.kernel.org On Fri, Sep 15, 2017 at 09:48:53AM -0500, Brijesh Singh wrote: > I see the similar issue with non SEV guest with my simple patch below. > Guest will reboot as soon as it tries to enable the key. Can't do it there as the pagetable is not setup yet and you're probably getting a #PF on any of the derefs down the static_key_enable() path. I guess one possible place to enable the static key would be in mem_encrypt_init() where everything should be set up already. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --