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 lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AB70CC433F5 for ; Tue, 29 Mar 2022 00:07:34 +0000 (UTC) Received: from localhost ([::1]:54268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nYzOX-0003Tc-AM for qemu-devel@archiver.kernel.org; Mon, 28 Mar 2022 20:07:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYzLU-0002eZ-K0 for qemu-devel@nongnu.org; Mon, 28 Mar 2022 20:04:24 -0400 Received: from [2607:f8b0:4864:20::536] (port=44558 helo=mail-pg1-x536.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nYzLS-0002Gc-SY for qemu-devel@nongnu.org; Mon, 28 Mar 2022 20:04:24 -0400 Received: by mail-pg1-x536.google.com with SMTP id c11so13375756pgu.11 for ; Mon, 28 Mar 2022 17:04:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=etgjqyAwbvR6Km5d+2cDKN373f0iHJRr9ymO9u+KgK4=; b=G5YIvVl22ePZITTXQy7vowBlWgCkZizGIGOI6pI2XX9x6vtJv/N8rYqMnVC1NBJmDl Xi+sHsYUIN+SJvKP8OhZ+TiWYKsB4cnA6blgTh8kV07ztljdTDT58Zz7wNd5brW8jMKi MeGC0zhst3Ze45rOieg8y/L1qR1ehb0uYXPOVkW1do58sPgFqUFnszIPRO9ZxP9E/VDu Hg6Vj8ktwcYNsYL0mPC653HM7uXxVOtZT2l2L6hyenJnUzEd16GnIxOc9EHXvkyvvGnf OmD5GfIZ3n5oGbfX95H+OgOqSCiAjQRN+aczvRBQ7z8EFIt+C0RkUgE4xiw6oc4aMGhH c2MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=etgjqyAwbvR6Km5d+2cDKN373f0iHJRr9ymO9u+KgK4=; b=2np/SUMnM8D9wKIrqaHF6HAiQkb2T26xh7p3uqc+a6nOlfANKIemlCk6XoqHnqrYxP WsYV0cLxNYLP6dkq2DTtYDLNiHqiQErvic8qBqVzBhVVuH+UB2STykLzayre+kQLsWXi Co/zpsra/X8KKXAFiI8v6o/OldcB/Tjx+4VH6/EUJeITqWqDfYLOzXJEIY9OIDOsdL8c mGM8vdAAQiOzoF+ScpRjJRZkTWbe5JkU2RKIzLj2fI7bWZxT8lMcXLhqDeGirLLT12V2 HdDvL8NVEMJAGkndaIeRMfnhzgLI7E86ZL7x5VTQRyAFkvgoImyzvBM+IKNlwP4AptRp fxbg== X-Gm-Message-State: AOAM531RB6sS/YPxJIyXoCU6DSMePdAwp/MC9YKzBMfLc6vxb9WDcsIq K+CxUuwu0PhnHmnMWI5XWhJiew== X-Google-Smtp-Source: ABdhPJx8yKtkbTnvKDhEF6CrTpFMthUus1w5B4uh8qOQh+zUkITN5OLbQQgaCn3E+3ynmkMH71yJkQ== X-Received: by 2002:a63:e545:0:b0:382:8dd9:a870 with SMTP id z5-20020a63e545000000b003828dd9a870mr11790668pgj.621.1648512260958; Mon, 28 Mar 2022 17:04:20 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id 204-20020a6302d5000000b00385f29b02b2sm14336170pgc.50.2022.03.28.17.04.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 17:04:20 -0700 (PDT) Date: Tue, 29 Mar 2022 00:04:16 +0000 From: Sean Christopherson To: "Nakajima, Jun" Cc: "Lutomirski, Andy" , Chao Peng , KVM list , LKML , Linux Memory Management List , "linux-fsdevel@vger.kernel.org" , "linux-api@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 , "x86@kernel.org" , "H . Peter Anvin" , Hugh Dickins , Jeff Layton , "J . Bruce Fields" , Andrew Morton , Mike Rapoport , Steven Price , "Maciej S . Szmigiero" , Vlastimil Babka , Vishal Annapurve , Yu Zhang , "Kirill A . Shutemov" , "Hansen, Dave" , "ak@linux.intel.com" , "david@redhat.com" Subject: Re: [PATCH v5 00/13] KVM: mm: fd-based approach for supporting KVM guest private memory Message-ID: References: <20220310140911.50924-1-chao.p.peng@linux.intel.com> <7CCE5220-0ACF-48EE-9366-93CABDA91065@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7CCE5220-0ACF-48EE-9366-93CABDA91065@intel.com> X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::536 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=seanjc@google.com; helo=mail-pg1-x536.google.com X-Spam_score_int: -161 X-Spam_score: -16.2 X-Spam_bar: ---------------- X-Spam_report: (-16.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Mon, Mar 28, 2022, Nakajima, Jun wrote: > > On Mar 28, 2022, at 1:16 PM, Andy Lutomirski wrote: > > > > On Thu, Mar 10, 2022 at 6:09 AM Chao Peng wrote: > >> > >> This is the v5 of this series which tries to implement the fd-based KVM > >> guest private memory. The patches are based on latest kvm/queue branch > >> commit: > >> > >> d5089416b7fb KVM: x86: Introduce KVM_CAP_DISABLE_QUIRKS2 > > > > Can this series be run and a VM booted without TDX? A feature like > > that might help push it forward. > > > > —Andy > > Since the userspace VMM (e.g. QEMU) loses direct access to private memory of > the VM, the guest needs to avoid using the private memory for (virtual) DMA > buffers, for example. Otherwise, it would need to use bounce buffers, i.e. we > would need changes to the VM. I think we can try that (i.e. add only bounce > buffer changes). What do you think? I would love to be able to test this series and run full-blown VMs without TDX or SEV hardware. The other option for getting test coverage is KVM selftests, which don't have an existing guest that needs to be enlightened. Vishal is doing work on that front, though I think it's still in early stages. Long term, selftests will also be great for negative testing.