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=-8.7 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=unavailable 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 6D2D2C43214 for ; Wed, 1 Sep 2021 17:53:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 176CB61075 for ; Wed, 1 Sep 2021 17:53:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 176CB61075 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 88E5E8D0005; Wed, 1 Sep 2021 13:53:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 83F228D0001; Wed, 1 Sep 2021 13:53:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 706D28D0005; Wed, 1 Sep 2021 13:53:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0145.hostedemail.com [216.40.44.145]) by kanga.kvack.org (Postfix) with ESMTP id 635658D0001 for ; Wed, 1 Sep 2021 13:53:58 -0400 (EDT) Received: from smtpin40.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 232551801E688 for ; Wed, 1 Sep 2021 17:53:58 +0000 (UTC) X-FDA: 78539752956.40.4559B32 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf18.hostedemail.com (Postfix) with ESMTP id A9F6B4002093 for ; Wed, 1 Sep 2021 17:53:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630518837; 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=LOoEzeF+DIygP+XIu9SyO6Fbs1QdT4Tlo1yNLuSPG1I2RBGtH9XJEQcezUIo2NOCbSysG9 GmTRPFaeyRrmGPtvnNCq3smIMMSkB9vxn1etp2JzSQsq/IpoB7qBYlDrygiLNi+Zcm12uX lcDjTRKcszFVPgxem+FfwCXTdTmXmtQ= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-42-B_fOCVldPGe3UpsMvLcrSg-1; Wed, 01 Sep 2021 13:53:54 -0400 X-MC-Unique: B_fOCVldPGe3UpsMvLcrSg-1 Received: by mail-wm1-f72.google.com with SMTP id o20-20020a05600c379400b002e755735eedso131130wmr.0 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=FoIlNfat/dSpSJmMjRKYQ7eUdexHKazRUrV0A8Vu0U3HD2Xqt8/CfdCaDMh+4pMjj6 ASatl8uU4xDEj/fDnD8c0bGOEL68Im04Y14HTwRUMwfkaE3zNtiD0E/C4ZCvCQ1SAPqO gYGUPGa0bT0ZhvZxbJTRzKdmDvrFsuR0v98otwaNiagMrokvl0HI5H0lbwcmguW2CT9e eOIkl0lRuAKEaC25Qi8xpc9i1kfjJIMukvgVHSFEPQsgq6hVtFEsjwidkNIBpx9IZgcH 9VukvFG/hlM4XjxWMZ/sszWu5t9hAu3hKY0A0qvo8N1VKYhmIWT2TCBK+br3CHNZbqaB cWMQ== X-Gm-Message-State: AOAM532SrP5J7UWRi/uOm1aiRGiFIrGGw6v+E0zFzk0N7Kj47fzRh3Ux 1L/hc+AKpiGyQtVsDTE2pjPa1zc/64gskuuoucz51svu85mlZdXivGBZ3ZZXuKrai9bV6K6K3rg yhouLfwa8lJs= X-Received: by 2002:a1c:20d7:: with SMTP id g206mr717790wmg.153.1630518832802; Wed, 01 Sep 2021 10:53:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzId1EJQWuCXd4wDXaMAQVTM5bqXfZadYfJq5hfT4+k85e5baXrLRntNgIiFg9LFycxTroBXw== 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: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=LOoEzeF+; spf=none (imf18.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: A9F6B4002093 X-Stat-Signature: n6bmgxg3m91pz7gsdmkbhxbzzdf4rbsj X-HE-Tag: 1630518837-230913 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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