Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp26582iob; Thu, 12 May 2022 17:32:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4JyEVQ/9cAGIOpXZxH/QR7vagxjGC9WgSoo1E2jpgPuWfwV2drYUuLI1JFoHlUq08bjpY X-Received: by 2002:a17:906:e87:b0:6df:8602:5801 with SMTP id p7-20020a1709060e8700b006df86025801mr2167473ejf.140.1652401949130; Thu, 12 May 2022 17:32:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652401949; cv=none; d=google.com; s=arc-20160816; b=uiZdGzG1eqEGhC5IRTL7vIH9DjHOm7AgjDBktjDnWx5SIms0W8nGSHnGLBP3aoRqe7 nDaOvZpmz9yH/156xgTst9dtt5iO6ukklU/UdtvodLTXRlwFT8ac4I/l6laJXHgSPl2r DOQXujp5SDLaMzUIK98OimMCgJqVc9XxdE8zeb6xDAJOvYScMfacrwZb49RXC3qR9mK+ 3DWMLpkHWcSal+CivtDTMR2UwLVx2lcneKqdiOqvvadaCfBE8iOeEBOwtqoPhHy0JkFe s/wM3B8lhmMLXZOhetCHmchHKgQB+sglM6Kfg5xhFLx7jGsQihq1ooaVu9BNEh3FIbD5 qVPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=zDtS3yYiac007Tq16HyIgANNZvP5Mc1ckKft1G2x8rg=; b=KRZpPBVNQAz8chu8E+1otx+vcuIcKJfSJd+FZeGJv0MYifeuGyO9wNCoyXVOuteYpC kKihdUi0RjvMtR4OVOvaPJk0vz0S3FWeUBY2G1kRAJRxrZ2nAo45RlUiWEWZ2HR7jX3e QUbnxCGQmZdBgdyOG04O9Pj8y374czp4Q3jC3p2kI06UgIczrvUcjvk/8Q3T+qOuEYEQ 09Pd7TT6MA7C4q+6GBlGcZCvU/ETfEUMJDScJzu3IVZ+MfbFM+0U2jOXkStVScnTYbje AdgpkKx+0tOMarZeejapbefm/yvOPmeQ2T4Y4HgetUGvG60zGZBYiY1RD0PIQBTU2W9k jNbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=EPpUcNHx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sb39-20020a1709076da700b006e8d12994c7si727544ejc.395.2022.05.12.17.31.59; Thu, 12 May 2022 17:32:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=EPpUcNHx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357041AbiELR3O (ORCPT + 99 others); Thu, 12 May 2022 13:29:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347624AbiELR3M (ORCPT ); Thu, 12 May 2022 13:29:12 -0400 Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4147726BC81 for ; Thu, 12 May 2022 10:29:11 -0700 (PDT) Received: by mail-io1-xd36.google.com with SMTP id e194so6098094iof.11 for ; Thu, 12 May 2022 10:29:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=zDtS3yYiac007Tq16HyIgANNZvP5Mc1ckKft1G2x8rg=; b=EPpUcNHxPhcz5hSlEDa9z2K9TJYgjabImG/SE7YzphxDkTSDjkI1Pf5lkLWuydHVej wsSCiVndDr8Plm/gSezwdepsxOasS14AAI9UWHmmtS5jOLIAloeKoY7kRmZ9xSSbIcpS 8JwVd6YQV++q6V1FMWiX/WVZApJueKMCvqceI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zDtS3yYiac007Tq16HyIgANNZvP5Mc1ckKft1G2x8rg=; b=mZYk+kZ/MDsA3/B8WGThQXeBXhgFzDlO28d8i57pPB0w2yuF2D0zQR0POyxqobBF9v X3FtOYpDbVkKHXulTsq35qCgaGskxxs++tDnBtykDB8H4b1YIyO1qabFoBBtHMP1zQHk hGuea/MQzUBpv8ROKreAmt8JxR39whPUWFHNgeKObKwLdrnUtc3OtyPH+APZwwzNeoOW Spobkb/gXxlJ6QOZBaKpqiOJPGMJBrlmLou9otfaJFlYbKNARqoxDRKYF4tSRDPvHAZ7 dUSeqfMJBPBF2Dpy1nuSJdBSvjWkL/HNrDayZ94GSjSsUxR3S6ERivk1JBsdfqbky+oO I8/g== X-Gm-Message-State: AOAM533Pr0PEGkEJdr6AagnB5a8MdV+M6utkoAgNzYRZkyhs4c+kF4Kl 8muzhKlF1423NrkNTHLAkaQT0Q== X-Received: by 2002:a05:6638:d01:b0:32b:b9f8:38c4 with SMTP id q1-20020a0566380d0100b0032bb9f838c4mr578797jaj.236.1652376550541; Thu, 12 May 2022 10:29:10 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id p14-20020a056e0206ce00b002cde6e352ebsm7245ils.53.2022.05.12.10.29.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 May 2022 10:29:10 -0700 (PDT) Subject: Re: [RFC V2 PATCH 2/8] selftests: kvm: Add a basic selftest to test private memory To: Vishal Annapurve , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: pbonzini@redhat.com, vkuznets@redhat.com, wanpengli@tencent.com, jmattson@google.com, joro@8bytes.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, shauh@kernel.org, yang.zhong@intel.com, drjones@redhat.com, ricarkol@google.com, aaronlewis@google.com, wei.w.wang@intel.com, kirill.shutemov@linux.intel.com, corbet@lwn.net, hughd@google.com, jlayton@kernel.org, bfields@fieldses.org, akpm@linux-foundation.org, chao.p.peng@linux.intel.com, yu.c.zhang@linux.intel.com, jun.nakajima@intel.com, dave.hansen@intel.com, michael.roth@amd.com, qperret@google.com, steven.price@arm.com, ak@linux.intel.com, david@redhat.com, luto@kernel.org, vbabka@suse.cz, marcorr@google.com, erdemaktas@google.com, pgonda@google.com, nikunj@amd.com, seanjc@google.com, diviness@google.com, Shuah Khan References: <20220511000811.384766-1-vannapurve@google.com> <20220511000811.384766-3-vannapurve@google.com> From: Shuah Khan Message-ID: <7245d147-6e0e-8df2-be8e-549b3216e576@linuxfoundation.org> Date: Thu, 12 May 2022 11:29:08 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20220511000811.384766-3-vannapurve@google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/10/22 6:08 PM, Vishal Annapurve wrote: > Add KVM selftest to access private memory privately > from the guest to test that memory updates from guest > and userspace vmm don't affect each other. > > Signed-off-by: Vishal Annapurve > --- > tools/testing/selftests/kvm/Makefile | 1 + > tools/testing/selftests/kvm/priv_memfd_test.c | 283 ++++++++++++++++++ > 2 files changed, 284 insertions(+) > create mode 100644 tools/testing/selftests/kvm/priv_memfd_test.c > > diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile > index 21c2dbd21a81..f2f9a8546c66 100644 > --- a/tools/testing/selftests/kvm/Makefile > +++ b/tools/testing/selftests/kvm/Makefile > @@ -97,6 +97,7 @@ TEST_GEN_PROGS_x86_64 += max_guest_memory_test > TEST_GEN_PROGS_x86_64 += memslot_modification_stress_test > TEST_GEN_PROGS_x86_64 += memslot_perf_test > TEST_GEN_PROGS_x86_64 += rseq_test > +TEST_GEN_PROGS_x86_64 += priv_memfd_test Add this new exexcutable to .gitignore - Also make sure if there any error paths that should return skip and not fail in case of unmet dependencies. Looks good otherwise. Reviewed-by: Shuah Khan thanks, -- Shuah