From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82F7BC433DF for ; Tue, 20 Oct 2020 12:18:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0D1E722253 for ; Tue, 20 Oct 2020 12:18:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="W+wZU3uq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394289AbgJTMS4 (ORCPT ); Tue, 20 Oct 2020 08:18:56 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:47744 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394170AbgJTMSz (ORCPT ); Tue, 20 Oct 2020 08:18:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603196334; h=from:from:reply-to:subject:subject: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=pRFnW5gWRuNF8oIJWmD5GYqoHTlkBEqfo58HkD0f8TY=; b=W+wZU3uqsZjbO3V+Tg5z1dVevAvzbTE0HiWu+RH4HGSf1QwfTASbse8iGyEFZ9I5AkTeOJ oNVBZRKcd92r+4nWHPjq24Xp/xWCsG+FNv3gl1Uu2WFrkqxmgk9yBjX8x9SExmOoVmSPd7 kwoaBOwoVVbw6vxp+M89vn7no0pbj2c= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-271-2PWSTa4ePPS2qoetoKllmg-1; Tue, 20 Oct 2020 08:18:52 -0400 X-MC-Unique: 2PWSTa4ePPS2qoetoKllmg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 74C3F8049DB; Tue, 20 Oct 2020 12:18:49 +0000 (UTC) Received: from [10.36.114.141] (ovpn-114-141.ams2.redhat.com [10.36.114.141]) by smtp.corp.redhat.com (Postfix) with ESMTP id A3C896EF44; Tue, 20 Oct 2020 12:18:43 +0000 (UTC) Subject: Re: [RFCv2 15/16] KVM: Unmap protected pages from direct mapping To: "Kirill A. Shutemov" , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Mike Rapoport Cc: David Rientjes , Andrea Arcangeli , Kees Cook , Will Drewry , "Edgecombe, Rick P" , "Kleen, Andi" , Liran Alon , Mike Rapoport , x86@kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" References: <20201020061859.18385-1-kirill.shutemov@linux.intel.com> <20201020061859.18385-16-kirill.shutemov@linux.intel.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: Date: Tue, 20 Oct 2020 14:18:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <20201020061859.18385-16-kirill.shutemov@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20.10.20 08:18, Kirill A. Shutemov wrote: > If the protected memory feature enabled, unmap guest memory from > kernel's direct mappings. Gah, ugly. I guess this also defeats compaction, swapping, ... oh gosh. As if all of the encrypted VM implementations didn't bring us enough ugliness already (SEV extensions also don't support reboots, but can at least kexec() IIRC). Something similar is done with secretmem [1]. And people don't seem to like fragmenting the direct mapping (including me). [1] https://lkml.kernel.org/r/20200924132904.1391-1-rppt@kernel.org -- Thanks, David / dhildenb