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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74CC5C433EF for ; Tue, 29 Mar 2022 00:04:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231325AbiC2AGG (ORCPT ); Mon, 28 Mar 2022 20:06:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231297AbiC2AGD (ORCPT ); Mon, 28 Mar 2022 20:06:03 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AB0F5596 for ; Mon, 28 Mar 2022 17:04:21 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id s72so13397791pgc.5 for ; Mon, 28 Mar 2022 17:04:21 -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=A0rER6zqi+3Tv1MrFCrwK8+dnQkUKWzjT4JTBb7fztF83ewBazwe+1qRnTpDwtX1zp B9ZnaqN30LVKjHev/NTsc0OwGkjIK1QQKoWRM1muQszw92lGHFZ3bnGjz0EwIc62vKHT qH3JeIbnFSJ62iiQiJgMZdWkCZv7Kls6h0sBXm7/gTvHaB3W++xNemIJBV0f9qXt4pjx 0HqzyH4x5uHZBu4lUM73zHbnlSx0c12qWEBtxg80BQWpNzVPWB/386BxG7jcL7A4U+Fr Uq3L/m83uRoUI6iL6gOwg3118R+NTLkQFQlPHCWSKUBhow0ql7KAYPq5xtz2x4UPX7Y9 RaoA== X-Gm-Message-State: AOAM530v2DoXm/MrejoTGD+ltSjvE22TrqWctH+wz3V7igvIMNWDucBN orHG/SqPazbHI9RYNQhG5bfzcw== 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> Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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.