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 22766C54EBE for ; Sat, 14 Jan 2023 00:38:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7A45E8E0003; Fri, 13 Jan 2023 19:38:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 72D668E0001; Fri, 13 Jan 2023 19:38:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5A70F8E0003; Fri, 13 Jan 2023 19:38:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 46E778E0001 for ; Fri, 13 Jan 2023 19:38:08 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 1AA55AAA7E for ; Sat, 14 Jan 2023 00:38:08 +0000 (UTC) X-FDA: 80351542656.09.1D12257 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by imf03.hostedemail.com (Postfix) with ESMTP id 7149C20004 for ; Sat, 14 Jan 2023 00:38:06 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=fZz4bsSG; spf=pass (imf03.hostedemail.com: domain of seanjc@google.com designates 209.85.216.53 as permitted sender) smtp.mailfrom=seanjc@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=1673656686; 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=MgBnQ26ItOkyYKiu1oV6JX0ska5GpfEn/0b8SeFBGOs=; b=DU/lhH7VulFX1uAMA/n4FxLL4dV1gK4x5TT2ZVEFlQoUc3TKJHKKinsanmfZUfz6gCx9Qg BFHQrlZ1CElaIZpjSac6Z6cbgm9s4ao/NnN2qXIuYDfNRBUDp7pI4AV9VAvyDVpLK9v5dG F4m3hKKz8XAMgNxL4GDT2Xu5CYu4ONE= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=fZz4bsSG; spf=pass (imf03.hostedemail.com: domain of seanjc@google.com designates 209.85.216.53 as permitted sender) smtp.mailfrom=seanjc@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1673656686; a=rsa-sha256; cv=none; b=s16WoW5BJp7UkdB01VYDcVqleLYmKNt3Ed2RciTiDnOe+EMj1IkCESrr09pTFq7qLrT/cA vJSEhk6TMvfyB/eXy0YOsR/q+Rw+fAFnT6OLoSzZSvD8yTeyybWxxtXjTzlJVtGuBmbpNo qG1BW86ml6AMtrHt341afJlaxxD1Zwc= Received: by mail-pj1-f53.google.com with SMTP id o7-20020a17090a0a0700b00226c9b82c3aso25992575pjo.3 for ; Fri, 13 Jan 2023 16:38:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=MgBnQ26ItOkyYKiu1oV6JX0ska5GpfEn/0b8SeFBGOs=; b=fZz4bsSG6rplxu+/+bbAGu03TpfBRqzSERj11fI9gPC3YiJL/UeAPW98CKZYKTN7Ws j53XSFyQZNUTcXaOijVfFvsqXEfJGx6cLcfKMLjiLO/bW7eqi7LulykqxZENOBL1WwJN RayxBQjRABfgAcBUTV5MtEdBlwhGdejOfhp+6x1ylwnSaQw5/5CItg/TVLAvnSFoGFQD lbGhWsb6A9IEcn0SbTi5gMac6RtBt94MErdTeqH8q/FrYZ43WZq9AALzNfaHFxf2mxJm 5DgARQXIRLPhEsnlbzOh8dlw4D9+iPLKzKCIvdG2Ml019sB1Ej5N2/v0hQswCEcOzBeL 65NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=MgBnQ26ItOkyYKiu1oV6JX0ska5GpfEn/0b8SeFBGOs=; b=LpoPcTSKKAO76R89GJwWjOMvnR0ca62yd4SLHJwcajy9k7Hf4nwHSKbAZ175YVFwcp F7j9pBp+fO1MMoRu0W+TfQmsY38yf3WkB70rJKwHY9yz+jCrYsh7qUNxWKEQCuaqnGKY M3Z/HOzoMjL387ENH4gyB4c4p9vA3aRRWEsVKw+yO7NBLU31IFltGHA9NmWGBU49ICOx Aij9AbcgMBzqM/MU0FAHmgNQv9UjMxW6qHjGDqRlOy47Iov23DRr/eAsj7KAdAvEhSvL A/Pdsjgisu4oPV4RnssmN1IOHT/gSKPIxffeyFRB78xyV3tKzmQDT0lrkyh6o/80syzG vyTg== X-Gm-Message-State: AFqh2krRy7+axjvOAZcNCPLMRCCWQrKUmH5L6synGHpzlnNEes2A5ZGj EFMBn4r1mpLidQ28Nr2HV0XDNw== X-Google-Smtp-Source: AMrXdXvO5lr0leGyzGM7js7Dp/RGVdcEkNK6lyE8EJsgzKqjTO8ro2/W2YgLE7h5m81d74tyNSIgGA== X-Received: by 2002:a05:6a20:1394:b0:b5:a970:8d5a with SMTP id w20-20020a056a20139400b000b5a9708d5amr2026776pzh.0.1673656683660; Fri, 13 Jan 2023 16:38:03 -0800 (PST) Received: from google.com (7.104.168.34.bc.googleusercontent.com. [34.168.104.7]) by smtp.gmail.com with ESMTPSA id d12-20020a634f0c000000b0047829d1b8eesm9871303pgb.31.2023.01.13.16.38.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 16:38:03 -0800 (PST) Date: Sat, 14 Jan 2023 00:37:59 +0000 From: Sean Christopherson To: Chao Peng Cc: 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 , tabba@google.com, Michael Roth , mhocko@suse.com, wei.w.wang@intel.com Subject: Re: [PATCH v10 0/9] KVM: mm: fd-based approach for supporting KVM Message-ID: References: <20221202061347.1070246-1-chao.p.peng@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221202061347.1070246-1-chao.p.peng@linux.intel.com> X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 7149C20004 X-Stat-Signature: hfwf8denuqeoqf6ig1ddejebnumappco X-HE-Tag: 1673656686-345323 X-HE-Meta: U2FsdGVkX18VU0Fz7cgdgbWXTHaGVboWK1bEXCPGHaCOMQrhGGQk2Y+j42JuSgzGFgjnvuChiqYWmqOw7JbLuLg587AeTG141j/okdGckAzg+29rbNpw8AHoHT2d4KUYP0jCnX6InjWwqMv1usroWBPWQnEuOW/rP/htHe7Oc2n/0UBmPGrxH7faOf6Y1Otxpfj1tBd8klHljaHTLL4kBaleJdFXsQnDXAnOfPG+J1srlyJLjSQ1msima9rq71AQHRbhhPAVLT6l/+WvtmsWVTKAB/WoJ7vKnV/vCJoxvqiRbA4m/aTI+TOu1pWoZM3ecxTx+W+IYuNv0iVNNnOvu4wDiCN7Ez9reBH2OafnV3d5B4SCSrM8cxOg6drs4u4VkVdV914wRd0KhDY8PwGvhXjv6DA0ZqQ2gqeEOitSPjgrfMTXSWTdpZNwZZq4bjyEbkd3qlfB0i8VbI2x7EMzcheEJBa7xWby7k9b/rgv59TbWq8SQvy1CAba524Rb1og2TfrsuJTWKzrrlXMQhkhjrEUprfCyKy+Z5qGIvuwKnWrqwo2uiaErNNAJwKy7Chw2eAbMedt1g2QOXf7Tra0dHW4ItNlaSpvPboknh/c8q7oS1bOC0XPyPjcE0n17kV3WQu8R+OdGXXJETNIbXriqRt07PnGHHuEjBGSWqZJizVMC+8R1yz8Bfcmeb+1wLTMJ3Gkl5E806t6W08m+T6UkzPWxJ48vP3VhiPULnLIpo0a5xPO03ufek+7PH8ZEn4Kg3sewyBXIEkw1Uz2jNBVgxplcWZHRc1HJF2mT8mWAiAeNGSHEU2gk+FexGYKamKAfu0wprllrrViHa95EXxzrlFMHJFrbqgCUa2bmQrOANVfWqGqnJ27Jpu6z2Dl3JzySmmoy6SsJPMi7QhvNvoG7P6S9lKp68RP3ZMinFx0fo+I4SZxpgGYFExN52MWrBE8JtWQO9KCuY/Ylw4IaOS xR4TcN8d /spFTbztc7yZrK+lt0DbPrtfZkqL++pnTq2o9Mc2dstaaqcSaXC3dEy4i2mv/JZUHQIZg0yqsOSsuxsf4sK0dlFC9KA1ArNPhufrH 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 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). 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!