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=-4.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 8420FC43461 for ; Fri, 4 Sep 2020 20:34:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E1EF0208C7 for ; Fri, 4 Sep 2020 20:34:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=amacapital-net.20150623.gappssmtp.com header.i=@amacapital-net.20150623.gappssmtp.com header.b="1N7M5pHR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E1EF0208C7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amacapital.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0BC046B0002; Fri, 4 Sep 2020 16:34:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 06B736B0003; Fri, 4 Sep 2020 16:34:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E9A806B0037; Fri, 4 Sep 2020 16:34:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0142.hostedemail.com [216.40.44.142]) by kanga.kvack.org (Postfix) with ESMTP id D21776B0002 for ; Fri, 4 Sep 2020 16:34:16 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 80712362A for ; Fri, 4 Sep 2020 20:34:16 +0000 (UTC) X-FDA: 77226531312.11.ant57_200790f270b5 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id 436BB180F8B82 for ; Fri, 4 Sep 2020 20:34:16 +0000 (UTC) X-HE-Tag: ant57_200790f270b5 X-Filterd-Recvd-Size: 5395 Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Fri, 4 Sep 2020 20:34:15 +0000 (UTC) Received: by mail-pf1-f193.google.com with SMTP id z19so3063839pfn.8 for ; Fri, 04 Sep 2020 13:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:mime-version:subject:from:in-reply-to:cc :date:message-id:references:to; bh=kqY1zbvJIdcS3k1CRT2WeBjod3BmevNfAT/msz2WAyw=; b=1N7M5pHRondOJ1rVX5cHyTUEza0iy8R/V7/N5f3eUIcTSjl/oX6t0HcFrbp+KvjzgP wxs40SnVXgc3yypZlOTO8bKnzPV2NQyEY9obVObQezshwodz13tcEkpEiMCebjxJ0Qdh eDKJa+LHvC+E1YUs/Et0CNDPuB8/90E0qXDQsAWojm+Tb9ZHEQEPUctu0HFdFgifXL8T JjM6RQijruFfhA+929Cjz8QOQH/KyueoJSU2bOONkS6jYCqp7ztJmomCaz8snaiyahtn IsdN3/BHx+qtJDflG0dtZIHcz3SDrUCBnyE9SgYVXnklJ+7nZmeKhkzUf/0bRCUL7ynF 9EJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:mime-version:subject :from:in-reply-to:cc:date:message-id:references:to; bh=kqY1zbvJIdcS3k1CRT2WeBjod3BmevNfAT/msz2WAyw=; b=hYgjxUsxtZDonQenuYXAhEZJ4775L2G4DHW7A6jl0stwJuXXgoa7qwBjWdR8va/Zjs HLnGdyvpiXghDrTs9ohPYHiYA6cPRuUQF6anj9N61wGlOAnoocMhfjvzJ+apqNWHOspf CbvTtoP0GyGqZyqNObKi8dS9+mOAKF3MmLtkVRscgQBBT1WRq8J7cfYCgSVlg55FKre6 IH0ss1S6nccyOb82ur09fHNVwuPlzaK4rnHkNwq/inxaJmqYRmDskl16xSpXblzz3wJK P7sQBvyprlg2W5worXeYjFDDjLwsxwAQLrTDpajH0cEtdD6v455kBiDcSd8qX63R967O pMlw== X-Gm-Message-State: AOAM532e4oqrltyuoJU+7upkB5iIpSLfFxKu6ir9cOw9FFddMhX6se6I qMmeY61ExQ5Yu2YkcCsjoJj+FA== X-Google-Smtp-Source: ABdhPJxw9SbgEx6xa6sj3S0oRThNURxowXBBpD0rSQoVTxoc+yhppxHHQ5NAwGlpNRWE7etTN3m5Vw== X-Received: by 2002:a63:2f02:: with SMTP id v2mr8483422pgv.369.1599251654135; Fri, 04 Sep 2020 13:34:14 -0700 (PDT) Received: from ?IPv6:2600:1010:b003:ad53:ddbf:74c3:7dc7:4b93? ([2600:1010:b003:ad53:ddbf:74c3:7dc7:4b93]) by smtp.gmail.com with ESMTPSA id j9sm7434354pfe.170.2020.09.04.13.34.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Sep 2020 13:34:13 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Subject: Re: [RESEND RFC PATCH 0/5] Remote mapping From: Andy Lutomirski In-Reply-To: Cc: Andy Lutomirski , =?utf-8?Q?Adalbert_Laz=C4=83r?= , Linux-MM , Linux API , Andrew Morton , Alexander Graf , Stefan Hajnoczi , Jerome Glisse , =?utf-8?Q?Mihai_Don=C8=9Bu?= , Mircea Cirjaliu , Arnd Bergmann , Sargun Dhillon , Aleksa Sarai , Oleg Nesterov , Jann Horn , Kees Cook , Matthew Wilcox , Christian Brauner Date: Fri, 4 Sep 2020 13:34:11 -0700 Message-Id: <70D23368-A24D-4A15-8FC7-FA728D102475@amacapital.net> References: To: Paolo Bonzini X-Mailer: iPhone Mail (17G80) X-Rspamd-Queue-Id: 436BB180F8B82 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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 Sep 4, 2020, at 1:09 PM, Paolo Bonzini wrote: >>=20 >> =EF=BB=BFOn 04/09/20 21:39, Andy Lutomirski wrote: >> I'm a little concerned that it's actually too clever and that maybe a >> more straightforward solution should be investigated. I personally >> rather dislike the KVM model in which the guest address space mirrors >> the host (QEMU) address space rather than being its own thing. In >> particular, the current model means that extra-special-strange >> mappings like SEV-encrypted memory are required to be present in the >> QEMU page tables in order for the guest to see them. >> (If I had noticed that last bit before it went upstream, I would have >> NAKked it. I would still like to see it deprecated and ideally >> eventually removed from the kernel. We have absolutely no business >> creating incoherent mappings like this.) >=20 > NACK first and ask second, right Andy? I see that nothing has changed > since Alan Cox left Linux. NACKs are negotiable. And maybe someone can convince me that the SEV mappin= g scheme is reasonable, but I would be surprised. Regardless, you seem to be suggesting that you want to have enclave VMs in w= hich the enclave can see some memory that the parent VM can=E2=80=99t see. H= ow does this fit into the KVM mapping model? How does this remote mapping m= echanism help? Do you want QEMU to have that memory mapped in its own paget= ables? As it stands, the way that KVM memory mappings are created seems to be conve= nient, but it also seems to be resulting in increasing bizarre userspace map= pings. At what point is the right solution to decouple KVM=E2=80=99s mappin= gs from QEMU=E2=80=99s?=