From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751889AbdITHjd (ORCPT ); Wed, 20 Sep 2017 03:39:33 -0400 Received: from mx2.suse.de ([195.135.220.15]:58734 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751595AbdITHjb (ORCPT ); Wed, 20 Sep 2017 03:39:31 -0400 Date: Wed, 20 Sep 2017 09:39:31 +0200 From: Borislav Petkov To: Brijesh Singh , Tom Lendacky Cc: linux-kernel@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Andy Lutomirski , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [Part1 PATCH v4 16/17] X86/KVM: Unencrypt shared per-cpu variables when SEV is active Message-ID: <20170920073930.GB26073@nazgul.tnic> References: <20170916123418.37807-1-brijesh.singh@amd.com> <20170916123418.37807-17-brijesh.singh@amd.com> <20170919110611.GN4733@nazgul.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 19, 2017 at 09:00:39AM -0500, Brijesh Singh wrote: > Yes, we can revisit it later to optimize it. Yeah, it will become pretty fugly if we need to do more decrypted pages sharing between hv and guest. And if they have to be perCPU, it becomes nastier. So we definitely should think about having a proper design for this page-sized sharing. For example, if you do a single shared page and then you copy the actual data between host and guest, the former becomes a bounce buffer of sorts which adds that additional copying penalty. Yuck. So we really should think about this more... -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --