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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2F9AC3DA78 for ; Tue, 17 Jan 2023 14:33:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 002FB6B0073; Tue, 17 Jan 2023 09:33:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F1C7D6B0074; Tue, 17 Jan 2023 09:33:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DE3EB6B0075; Tue, 17 Jan 2023 09:33:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id CFBF76B0073 for ; Tue, 17 Jan 2023 09:33:00 -0500 (EST) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 9F4CF160321 for ; Tue, 17 Jan 2023 14:33:00 +0000 (UTC) X-FDA: 80364532920.14.C82B3E6 Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by imf17.hostedemail.com (Postfix) with ESMTP id DBC7E40014 for ; Tue, 17 Jan 2023 14:32:58 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=BWKfON0O; spf=pass (imf17.hostedemail.com: domain of tabba@google.com designates 209.85.167.48 as permitted sender) smtp.mailfrom=tabba@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673965979; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=7yhLGsprr4iGbKzba+JN1VXXF3TeC3cedN8+F9epKwY=; b=7tqBgYcLeDcNUz0rTqP6c2UllVvW7DTGYgZqgrt1NDHkPx6AbcGJBgREPBt7BLmVDf3X70 sXtFFztaGb2InualgClmru0R8ZKNQQhnADuvDNAjRyEc6Jnmke3CJHxPtNUR5peYkjn9K8 2d57BgO7dhfkaXnWcCLpaJgcOAYcvKE= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=BWKfON0O; spf=pass (imf17.hostedemail.com: domain of tabba@google.com designates 209.85.167.48 as permitted sender) smtp.mailfrom=tabba@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1673965979; a=rsa-sha256; cv=none; b=zDeUPCBT0yDGXIn7Nnl9N10kD8JWRzqVQVOLCo5XeUn9CYQ4hfIE9NbAYntpGVK0FHfw1/ HsOpjlBiBzdJJuU4RjfCtfU88Al9guAOmvGDIai7geU8DiMsb0Xom0Tjw11I6kvGSPE+1U 5/lBgQIBcbNHTfPxkdXfA+jOpJy9kx0= Received: by mail-lf1-f48.google.com with SMTP id bp15so47336554lfb.13 for ; Tue, 17 Jan 2023 06:32:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=7yhLGsprr4iGbKzba+JN1VXXF3TeC3cedN8+F9epKwY=; b=BWKfON0ONcZ0E/73kUupX7eOFbsTtnf5zb0RLvmJL0YAhZl6oEvSZL3c/NoN0rNReU TIh5gjrwA6Bj/3YkDzJiL+Gls11L2i8ze76yowGZvwzeuvcwTzbo+PdTF5RRopZcOu67 rqK/5DXAz0Cu8iK48baqurCP3Q8SHLQ3+La3MGi7OSiOLM50rap2pv9+NepuA7fvXVkZ JbAIYTYmlyf3SaXzCtregYhzAezlqMgzZgLa7aRWrX3Ls8Vi1NxO2mSedec1z7gAhtZm CjRS/N1ff7V0fQ/RSJMzu/O50kqFBmQcx8Ep1MMWXZfAdBITG7gqeNKqSuVwb7ryK8UD 4kmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7yhLGsprr4iGbKzba+JN1VXXF3TeC3cedN8+F9epKwY=; b=JvcIDryWxd6j7LG143r3Tg3sXG4sb1NDNQ6/buh+psdCJ/YH0cJzYwi/5y0/y9D9El DEYu4W0/Jqf5GQAZx1pVgPSrMGJtZRzGWOk2dFZt8eWqLTUQTe37MEz5Rm5U4hQaFfBp h9EB2N88j2TnbSPQ3L9p3NtuNmbfhvCCpymY2YWEoqVmsnvpa2GXBlBBSw3k4l9BMY8L goB0G2EXkaRzGm4UuY01urdH20j8LYgK7wmUTGdZ24Ennk58jVVBzZQ/rlkVoTlRKm0l Kkp7bv6OEABy42tdjK8paEOZ9KpwJsFNcs5ToCKWM2k868ioLsy9fOmEHPSAyWERZahX zMvg== X-Gm-Message-State: AFqh2kosG8PJo/QtcozZDnb3urxhsilNnInsspUHV4u8GdoMb7GpZA6P X0SFZGhoyu1fBrAkakM0pxikEq8grv5QVyiZ2cvojw== X-Google-Smtp-Source: AMrXdXsPS/EHa9ll4sjoGtdooNfVuEuQvNaydQDhDfaDKMnyvvZ6mWGGNpzl0ThBONl2d+/I1rYOtZu/xqsiIx9Cz3Y= X-Received: by 2002:a05:6512:3b9b:b0:4d5:850a:8330 with SMTP id g27-20020a0565123b9b00b004d5850a8330mr128086lfv.665.1673965976657; Tue, 17 Jan 2023 06:32:56 -0800 (PST) MIME-Version: 1.0 References: <20221202061347.1070246-1-chao.p.peng@linux.intel.com> In-Reply-To: From: Fuad Tabba Date: Tue, 17 Jan 2023 14:32:19 +0000 Message-ID: Subject: Re: [PATCH v10 0/9] KVM: mm: fd-based approach for supporting KVM To: Sean Christopherson Cc: Chao Peng , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, linux-doc@vger.kernel.org, qemu-devel@nongnu.org, Paolo Bonzini , Jonathan Corbet , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Arnd Bergmann , Naoya Horiguchi , Miaohe Lin , x86@kernel.org, "H . Peter Anvin" , Hugh Dickins , Jeff Layton , "J . Bruce Fields" , Andrew Morton , Shuah Khan , Mike Rapoport , Steven Price , "Maciej S . Szmigiero" , Vlastimil Babka , Vishal Annapurve , Yu Zhang , "Kirill A . Shutemov" , luto@kernel.org, jun.nakajima@intel.com, dave.hansen@intel.com, ak@linux.intel.com, david@redhat.com, aarcange@redhat.com, ddutile@redhat.com, dhildenb@redhat.com, Quentin Perret , Michael Roth , mhocko@suse.com, wei.w.wang@intel.com Content-Type: text/plain; charset="UTF-8" X-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: kp6xan6np49uz6d37hp6kncfkufe9396 X-Rspamd-Queue-Id: DBC7E40014 X-HE-Tag: 1673965978-966905 X-HE-Meta: U2FsdGVkX1822wyBveVgwEHp1C1tmjBa9l2/zkTiwFywwRUUl9oXufn5M1Xh0kK7j7GkITEHtYpmE3DX1q5BdtYCIwWrSKrOY7x68M1g3QruA+s2Cs4dEBXt5dvVo1F/niq8EXGzel0F0H2mvgI/t7rFBbU6cXmU1G0wSO9s3ZcaHNzE35hDNK7UO7FY5UKhRike51USgUGczjYyHPHL19TytHEkzPYgcFdqtrOi6QLIPsgZRytkjEQB6Wum3WF9Ms7WQvc/ybDkRuT0/Ockg1iZ27LWZnq/WS7Ck3s60KyXQ8z0wtVIGRv2ihR249kPyt1UPB/8Xa/DqxZG40hXalqt4VIH5wph0cTMq26fPUVqHV4b5Vr6Kb5fggE0H+Z+vSTAJVFbBp7P6/oOFZ82o11YTwI2PgVCNwCpJRsscKPLj7Tj1n+1iavgtZJZyzaMISD34ziTQOJVnqRhGl4AIOrVx/5LSHChVON2lN9qqgF+b9pWg4+gvsIJ4Xsh2yykTWYmj9sPX/jmVBZNRPE4ARucSe9iFRXbi4FvOKfT2RaAkore50CoveMpeg9QQp3yAG9LiznRh/dZC/3K1b6vxWHG1bMnmN83Bk7xe02vHc6zRs87Rk+vbOSYk3fWRHANDMU8s2w+td8PAtLiJbSobkYen/Dd4isWbFBSvfJI6WbyBxW8/sZGM/Tj0GjJTkbJa1lMSre8pkfjxxLU4fiCDQcs1dv7S/rOMj+kPjEGLyXT6B5a39y/4N/mtUXi9GWlkP8cd+g6GrbV7Ky8UUTUcajRCJGhQRINSuNFtWwNBHXVV6qfGtfhTR3QZEliocpJCiX/h7QRgkRMZUannrnrJctavtD0Nzh5lP5Bq29FSHXd3CAFph8hx3/szbxzBx/mKhJIUy8ewUZgc3Idw+qcN0pCLkTQ37EH6rAsGIKfERMQgQ7DzCzSc+nJAgWUcXeNtlrL1Z5NP8wk8n2x4QM f1iXOyY2 wFKkKQCeRPKuPEXA= 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: Hi Sean, On Sat, Jan 14, 2023 at 12:38 AM Sean Christopherson wrote: > > On Fri, Dec 02, 2022, Chao Peng wrote: > > This patch series implements KVM guest private memory for confidential > > computing scenarios like Intel TDX[1]. If a TDX host accesses > > TDX-protected guest memory, machine check can happen which can further > > crash the running host system, this is terrible for multi-tenant > > configurations. The host accesses include those from KVM userspace like > > QEMU. This series addresses KVM userspace induced crash by introducing > > new mm and KVM interfaces so KVM userspace can still manage guest memory > > via a fd-based approach, but it can never access the guest memory > > content. > > > > The patch series touches both core mm and KVM code. I appreciate > > Andrew/Hugh and Paolo/Sean can review and pick these patches. Any other > > reviews are always welcome. > > - 01: mm change, target for mm tree > > - 02-09: KVM change, target for KVM tree > > A version with all of my feedback, plus reworked versions of Vishal's selftest, > is available here: > > git@github.com:sean-jc/linux.git x86/upm_base_support > > It compiles and passes the selftest, but it's otherwise barely tested. There are > a few todos (2 I think?) and many of the commits need changelogs, i.e. it's still > a WIP. > > As for next steps, can you (handwaving all of the TDX folks) take a look at what > I pushed and see if there's anything horrifically broken, and that it still works > for TDX? > > Fuad (and pKVM folks) same ask for you with respect to pKVM. Absolutely no rush > (and I mean that). Thanks for sharing this. I've had a look at the patches, and have ported them to work with pKVM. At a high level, the new interface seems fine and it works with the arm64/pKVM port. I have a couple of comments regarding some of the details, but they can wait until v11 is posted. Cheers, /fuad > On my side, the two things on my mind are (a) tests and (b) downstream dependencies > (SEV and TDX). For tests, I want to build a lists of tests that are required for > merging so that the criteria for merging are clear, and so that if the list is large > (haven't thought much yet), the work of writing and running tests can be distributed. > > Regarding downstream dependencies, before this lands, I want to pull in all the > TDX and SNP series and see how everything fits together. Specifically, I want to > make sure that we don't end up with a uAPI that necessitates ugly code, and that we > don't miss an opportunity to make things simpler. The patches in the SNP series to > add "legacy" SEV support for UPM in particular made me slightly rethink some minor > details. Nothing remotely major, but something that needs attention since it'll > be uAPI. > > I'm off Monday, so it'll be at least Tuesday before I make any more progress on > my side. > > Thanks!