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 EE3EDC433EF for ; Tue, 29 Mar 2022 00:04:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231334AbiC2AGJ (ORCPT ); Mon, 28 Mar 2022 20:06:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231299AbiC2AGD (ORCPT ); Mon, 28 Mar 2022 20:06:03 -0400 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B70E14090 for ; Mon, 28 Mar 2022 17:04:21 -0700 (PDT) Received: by mail-pg1-x533.google.com with SMTP id o13so13378078pgc.12 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=pF2UWWhLXmUHFE1EpXbMvWdx+Q5ChG1mfeGqmIFp5BWUCgiPFLuR4pXQwAHinlpvR3 aT2/EbY+ah5JIPxwM2gvJ6r5YqCXVdGhvVlOt3H5CVJs8Omw7fICXgFSMwp5xiyY79MS +Gj7m9+1vTaR/71GhRC0GllWY17ZN80/8oCDqDxuE4tLI5SJS2y3AOiDgbKetRgmOjJj ESUX5Bx/feFkaFcccIXz8kv35ooTvZ8YTud7fA1Wg46IGDJgg0zp8FA7B4ItnRVVFYw3 xyH1kcH5XQwo15S+hNwemYqwUVBtVoTOqrSKsOML+NNE3K79haDWZqJBqxQNUkpwEDW/ QbmA== X-Gm-Message-State: AOAM5325LvCzfUunnCZupglVVWn4pDKWqzUQt1xnMxikkFHEzFpeKBtC oBM7Qzd9vf3VbdqEA1NIvg4d9A== 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: linux-kernel@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.