Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3965146pxu; Tue, 20 Oct 2020 05:20:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLibFjrX1tZwscZ12lE1lWv2NJvG6kS7X9peAciOP7stno8hZsXrGESyxH2P/Evm0lJaPY X-Received: by 2002:a17:906:4306:: with SMTP id j6mr2946402ejm.523.1603196425038; Tue, 20 Oct 2020 05:20:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603196425; cv=none; d=google.com; s=arc-20160816; b=C5CIUmJheGqfaqF5RClZcvge8v2T/FR0dRfGAQPtX7TmYtEW0lgze9Cx6InO3If3OD 8hFf9FZ5BH2L2aUNWVOVB6DJJYJzouRse+JT/GkJ03BUrqqJjddFYi4A4stgoqnT39+o NpMWaZSE7Q0ThCG8WSwnvgGPlNFW2bpZHRBtftzqbgE6TQbzbtxCj7wKpDCXc4sLCUYY zdfhiMx0pHaFA/CJOHzLWf8efhTl7CtWDWlD3fvGd3+CIkdszc14WI0eLyGJ9D0W77lq EmOREU8xnoyJ50J/VmNkG5kqo6hRKnjJWDa3Z1Ieqb4AyM/lxU0wF+tvlJuryIRE6Qqw NhMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=pRFnW5gWRuNF8oIJWmD5GYqoHTlkBEqfo58HkD0f8TY=; b=Re9X5f11bBQ4QHbFjm9ByyVLbpe53ylIG9pKlRoWMbwEhEB2g6xd5I5V90lkblkZYm GVZr9v5N53+uhi7xPL5E5PZa2T9ISpz5w4pQGDkCH22+eHdR0u8/SnFtClWzqvGVRdsH 3NNrdp7n/2eqKXk1d8Nuy7AdkW2BEOMIcbRH2LiIgOyjslovMGBWD3iaMULoxjde7K7r Eoy7W4bS1SPkZiNdw9ez8QQcxyLCZYfcbMRxNFoorFujp5dMdqDqHnI6lcPGFR1SU7dr y/tPDrtKY9TEsscIZy1G91NX1rQGRXkIG6WzzQfHJVdiJxeBh/rMGR+nGIjffU6Z73JT 5iKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=W+wZU3uq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o24si1166662eje.62.2020.10.20.05.20.02; Tue, 20 Oct 2020 05:20:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=W+wZU3uq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394178AbgJTMSz (ORCPT + 99 others); Tue, 20 Oct 2020 08:18:55 -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