Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp836450pxb; Wed, 1 Sep 2021 10:57:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzee803eB6aQtKs3KpKn3Ddc1tFIrHXWxFqEslKsS7OhagqWQxmuE60an3667/1wFp2xUB5 X-Received: by 2002:a17:906:6d85:: with SMTP id h5mr737039ejt.305.1630519044152; Wed, 01 Sep 2021 10:57:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630519044; cv=none; d=google.com; s=arc-20160816; b=Qld0fkGpYmRBKB5x28SoEcRQrGtSasmxh/BUn5uu5SDu9ZoDTOX5dea9QGqkp8rQGW TJ3195lFGYAwQIDstZhqTS8GiTJJivTaTJcsW5nAzNcxlVP5suKxmbHz38rE3+NjJ3SH FRoNK413GDYlNfyiivI29hS0Ai2PkNcJ8qsDG699nzZJym3IHasxihoiscRz3tP9xP4V dttwfdN/z5blezYorFaZPrGMMr6W7YUMpTq1nGDziSyTqpyMtO9m3SgDsOebuNAawcsI 4rzkKdZFI9LfdPUmXfPbrJcIRUejyQTrLYqM4dNdr8Aw9PHYSfmj1DgslhI8lMjuH26z X4rA== 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=GiGBsFuqRCBAADb2SjkWOZz2ABAMuafv28YaxO7HPu8=; b=tEqWOLRtZyCFiA7E1BeXlgWbpA7jubNeTMFNNlbyEF+4VrUHT4wL7FpQB7QV2QhU7D TA/Net8KtK6t4bRMgW5jqQKTYR6BG6zE8kuqZx1SydksYxnH5/hiPuJ/vSNp3bRYe++S 5eNTtv+34DCBaeXE5uDBKCISGg8q9Ijyx9blGWHN0CNwwhZNmfmnsa49ot/AQmjk6AmX mL++In0jHkzTSX9V5GeobSZnu1wwrKgc7PzDGON6MBIH23aGGOGqEVD1u+BGe/+ITviQ T/Y8k1HztStr+9TTFMgp60PEWwWDA8sthkt1ZO4NTVD9D2iykzaIM2ofhhhrNZxe5Kp7 f0Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Y+EqcuQo; 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 i15si492361ejo.289.2021.09.01.10.56.40; Wed, 01 Sep 2021 10:57:24 -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=Y+EqcuQo; 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 S1344462AbhIARyx (ORCPT + 99 others); Wed, 1 Sep 2021 13:54:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:38357 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230007AbhIARyw (ORCPT ); Wed, 1 Sep 2021 13:54:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630518834; 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=GiGBsFuqRCBAADb2SjkWOZz2ABAMuafv28YaxO7HPu8=; b=Y+EqcuQoQDB9DHPb4hvPP3kknmNJ/60ZTTPELczR1dwcTt2BvmeOmXz1ViyggnzL/kL9c7 58wo+f5S+EDs7YEePWxmfM+N2oLLnu+s3IYsPDBGWRo5mZ1IIJL04CCHwVxfOgFHYphOLO fIWEoo8S5Le/PvuOzQyGQNB07jAmewI= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-361-ZV-vdDmLNdesneW86zCglA-1; Wed, 01 Sep 2021 13:53:53 -0400 X-MC-Unique: ZV-vdDmLNdesneW86zCglA-1 Received: by mail-wm1-f71.google.com with SMTP id p5-20020a7bcc85000000b002e7563efc4cso112701wma.4 for ; Wed, 01 Sep 2021 10:53:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=GiGBsFuqRCBAADb2SjkWOZz2ABAMuafv28YaxO7HPu8=; b=NMQgOc98wVybzaXoF6UT2q7dVe+tklI/gvfVT443IBCaYK49i4zkdLi8EYFJY0c0O3 Un0oPYNHz5OqQiO2lqe8o0Pxcnm8lyWUQ7YApXSfJlAL3/YstYBfEDT0G7+lD5n+3gGN iydPdKe30AnL0AbE/glzpvVLit03GVh6AoazbOzZcIcetV5bK+6nhJhP9Or6xhIy23lR aTuqOTsiBpVC5nxo7fxEU0zjaLnW59SOzUTqyBUubuLmydq8MydMbMRe+to6u3o+zyRA dvyn8N3sChSM8Jn3b+gZxRoA5gQHEHgF1J+9WziBC3SQ4bW/iW4AKtLxJTjAR9/6n342 B6xQ== X-Gm-Message-State: AOAM532KcnoqZUHVqAP6Zp55ZPYCSA0+M+6FPrwcUpEZDDx6BtmsKRwa 9xLDfPhtkkSE6V4/hOZG5sOD0UJ6R78UlUn7ZMJCs8Mc/ZLWxbx2cVpNa+v/fuFKVDRC8SS2yI/ lR92ppXSqf8sW9jE/nwQZBi/1 X-Received: by 2002:a1c:20d7:: with SMTP id g206mr717775wmg.153.1630518832800; Wed, 01 Sep 2021 10:53:52 -0700 (PDT) X-Received: by 2002:a1c:20d7:: with SMTP id g206mr717764wmg.153.1630518832630; Wed, 01 Sep 2021 10:53:52 -0700 (PDT) Received: from [192.168.3.132] (p4ff23f71.dip0.t-ipconnect.de. [79.242.63.113]) by smtp.gmail.com with ESMTPSA id r10sm127194wrc.85.2021.09.01.10.53.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Sep 2021 10:53:52 -0700 (PDT) Subject: Re: [RFC] KVM: mm: fd-based approach for supporting KVM guest private memory To: Sean Christopherson Cc: jejb@linux.ibm.com, Andy Lutomirski , Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm list , Linux Kernel Mailing List , Borislav Petkov , Andrew Morton , Joerg Roedel , Andi Kleen , David Rientjes , Vlastimil Babka , Tom Lendacky , Thomas Gleixner , "Peter Zijlstra (Intel)" , Ingo Molnar , Varad Gautam , Dario Faggioli , the arch/x86 maintainers , linux-mm@kvack.org, linux-coco@lists.linux.dev, "Kirill A. Shutemov" , "Kirill A . Shutemov" , Sathyanarayanan Kuppuswamy , Dave Hansen , Yu Zhang References: <61ea53ce-2ba7-70cc-950d-ca128bcb29c5@redhat.com> <9ec3636a-6434-4c98-9d8d-addc82858c41@www.fastmail.com> <0d6b2a7e22f5e27e03abc21795124ccd66655966.camel@linux.ibm.com> <1a4a1548-7e14-c2b4-e210-cc60a2895acd@redhat.com> <4b863492fd33dce28a3a61662d649987b7d5066d.camel@linux.ibm.com> <214ca837-3102-d6d1-764e-6b4cd1bab368@redhat.com> From: David Hildenbrand Organization: Red Hat Message-ID: <3b63a5d9-30e4-2ae8-2f01-a92b758e81de@redhat.com> Date: Wed, 1 Sep 2021 19:53:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01.09.21 19:50, Sean Christopherson wrote: > On Wed, Sep 01, 2021, David Hildenbrand wrote: >>>>> Well not necessarily, but it depends how clever we want to get. If >>>>> you look over on the OVMF/edk2 list, there's a proposal to do guest >>>>> migration via a mirror VM that invokes a co-routine embedded in the >>>>> OVMF binary: >>>> >>>> Yes, I heard of that. "Interesting" design. >>> >>> Heh, well what other suggestion do you have? The problem is there >>> needs to be code somewhere to perform some operations that's trusted by >>> both the guest and the host. The only element for a confidential VM >>> that has this shared trust is the OVMF firmware, so it seems logical to >>> use it. >> >> >> >> Let me put it this way: I worked with another architecture that doesn't >> fault on access of a secure page, but instead automatically exports/encrypts > > I thought s390 does fault on insecure accesses to secure pages, and it's the > kernel's fault handler that "automatically" converts the page? E.g. trap 0x3d > -> do_secure_storage_access() -> arch_make_page_accessible(). "automatic" as in "the kernel can do it easily automatically under the hood when accessing such memory", yes that's what I meant :) -- Thanks, David / dhildenb