From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 553C872 for ; Wed, 24 Nov 2021 16:03:46 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 0DED12193C; Wed, 24 Nov 2021 16:03:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1637769819; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+K9X0gnKgAVGvjlnxJQwG5HJjl9FzPuLLZJhp/rDicQ=; b=TjZVpHr9twy3p2Y6wNd56k9PHBwLZ/ZwTJcdY5ck7SQC6QEFdmOB4fP7mqMyJh4Ghd/s9x oXYxD2FTZuUY5Mf8Gba2dcolshwOfCtr0a3a94gACWGcxWy+Ws87hC9rnGdoOtHGhpYX2p qs7i1nsaNkE2+nxUpjCfNXjcS9QXdwc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1637769819; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+K9X0gnKgAVGvjlnxJQwG5HJjl9FzPuLLZJhp/rDicQ=; b=/EU59iTj2EaHMP94a0Q2XP7zqwHQjqdwjcOzxkGdeGbZaNwurBRsabWvcMiJH1fbVskYZx 63iV1KbmQrrX4iDw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E5DC513F2A; Wed, 24 Nov 2021 16:03:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id uNpjNllinmHoGAAAMHmgww (envelope-from ); Wed, 24 Nov 2021 16:03:37 +0000 Date: Wed, 24 Nov 2021 17:03:36 +0100 From: Joerg Roedel To: Dave Hansen Cc: Brijesh Singh , Peter Gonda , x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, linux-crypto@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Tom Lendacky , "H. Peter Anvin" , Ard Biesheuvel , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Andy Lutomirski , Dave Hansen , Sergio Lopez , Peter Zijlstra , Srinivas Pandruvada , David Rientjes , Dov Murik , Tobin Feldman-Fitzthum , Borislav Petkov , Michael Roth , Vlastimil Babka , "Kirill A . Shutemov" , Andi Kleen , tony.luck@intel.com, marcorr@google.com, sathyanarayanan.kuppuswamy@linux.intel.com Subject: Re: [PATCH Part2 v5 00/45] Add AMD Secure Nested Paging (SEV-SNP) Hypervisor Support Message-ID: References: <20210820155918.7518-1-brijesh.singh@amd.com> <5f3b3aab-9ec2-c489-eefd-9136874762ee@intel.com> <38282b0c-7eb5-6a91-df19-2f4cfa8549ce@intel.com> Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <38282b0c-7eb5-6a91-df19-2f4cfa8549ce@intel.com> On Mon, Nov 22, 2021 at 02:51:35PM -0800, Dave Hansen wrote: > My preference would be that we never have SEV-SNP code in the kernel > that can panic() the host from guest userspace. If that means waiting > until there's common guest unmapping infrastructure around, then I think > we should wait. Can you elaborate how to crash host kernel from guest user-space? If I understood correctly it was about crashing host kernel from _host_ user-space. I think the RMP-fault path in the page-fault handler needs to take the uaccess exception tables into account before actually causing a panic. This should solve most of the problems discussed here. Maybe we also need the previously suggested copy_from/to_guest() interfaces. Regards, -- Jörg Rödel jroedel@suse.de SUSE Software Solutions Germany GmbH Maxfeldstr. 5 90409 Nürnberg Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev