Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26097C433EF for ; Wed, 24 Nov 2021 16:03:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229961AbhKXQGz (ORCPT ); Wed, 24 Nov 2021 11:06:55 -0500 Received: from smtp-out1.suse.de ([195.135.220.28]:52948 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241205AbhKXQGv (ORCPT ); Wed, 24 Nov 2021 11:06:51 -0500 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> 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> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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