Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2675614iof; Wed, 8 Jun 2022 09:40:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+cqQVO+la6DkuSmvWgu8NPrI0yeD8vvwJLA3Ok0/SKS9uBtYI37h/H42qgXXV9tIsZbCf X-Received: by 2002:a17:90b:224e:b0:1e6:8ae1:8e1a with SMTP id hk14-20020a17090b224e00b001e68ae18e1amr60565pjb.59.1654706450857; Wed, 08 Jun 2022 09:40:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654706450; cv=none; d=google.com; s=arc-20160816; b=rcm989T9fK7xjAKMesmRSj9NcTWzxyL/RnxqvM0Gl+Gmtj+y3xoyjMSDpa8b1gnBXv sNWhvK0e974lUoaJ2sR79coWg27c6t36UZgS/A9k/XG5SvaISMVDU/tXOSViz3r4mH9g h5OHFNqs3OSTIuFGtFH0z1xNyicAVJ9uOTgFi8ohZZuVZmQH+NL3KQtJH8mN8jvwHcd8 uB8QErcGvJpW2rS4FFKBXYjxthqLGEBOp5HDlzlqafZfwkmlSxWmAZWPfF7UKSswqAoH EdMZyeNmwmbDRH5pvxbbq9TL+hqagHQ1bImgrjxyQ3JZJjuRlqP/Yv7tlASQIUyeeqJy 4nFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=m3kvIC6WtUXKswj3UwH3plLtsrpkEWhat3U9xjuNqBo=; b=zY65usff7LVjKG7KrUxImJ1dvP3BuJlQ2glGTGNTOo7AmL47iegcpL/QetxrL9YpOg LYd06Ia7WdvIiNikIsywcgwz0WXnfeE5dD1bxFH4Xse6b3Bt+G5hfGmIqbKmA9CqC1x+ R5ME8/JsiRkprzwIy26x4WxNYsXQy+viMUeBevKLY//6u3w4A0xmqtau5b1guXxrC/a5 zHW7FGlw51BmYCvpQC7SSKaoBfBzWNYXB+mdbYSNMpgs9dO743+7HQjTIBO1/jLPLKul v3Yf324G+ZGLGqj7kpjj42aFc+k6PU8xwgD3YV1rEDJuiILjXKE9v/By0Wef98S1UCJW PKvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=RmIxWJ96; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id a38-20020a056a001d2600b0050ddce187edsi24282561pfx.331.2022.06.08.09.40.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 09:40:50 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=RmIxWJ96; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 141493D1C6; Wed, 8 Jun 2022 09:14:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245202AbiFHQNj (ORCPT + 99 others); Wed, 8 Jun 2022 12:13:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245178AbiFHQNh (ORCPT ); Wed, 8 Jun 2022 12:13:37 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D9E0CEBA0 for ; Wed, 8 Jun 2022 09:13:36 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id mh16-20020a17090b4ad000b001e8313301f1so10171583pjb.1 for ; Wed, 08 Jun 2022 09:13:36 -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:in-reply-to; bh=m3kvIC6WtUXKswj3UwH3plLtsrpkEWhat3U9xjuNqBo=; b=RmIxWJ96SN3ImjN70MGPV27c47ydh94sIUUauXreF5C+cSBd+X4FRvthrtgfFUlCXu Evqq83wGsKYpMlwU98dlDm931xvSNTJPiyXNeuWU7y2B5CyeXlCaR/o1frdBxqX21xSK l3y1K9S+HDkgCRhnpEjV/d8Mxxv9otaTU15g+jBuLtzJYmy9vnlrs65QMEAE433XYbY2 8XSGnYoNDufVGMmKPdvnECWM3LH4k4Rx22P3yz60xdjr9JFWrvK+BUsTGRU35v8lqz02 TZ3JqxgaVXBJtVWVcJl/XkGCFlsQKOLR6u9+856KMYt3cm1+HSxxEXJKGsosbl4uNoAl Tlww== 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:in-reply-to; bh=m3kvIC6WtUXKswj3UwH3plLtsrpkEWhat3U9xjuNqBo=; b=MlIxMzccU+t6O27v+E4V1M0uw83NZx+wfmy6H/hW8+vuNyVqZs7Myfqj5T7behR9HI y1/zcwsJjfg37P/XcHjF18o20uNxo4kiBVQ40soNqgcDCDfQmx9Pr949rbFuBBrQL29Y ja+0Ufde9T9f20TbaLE7fCCz9GwDKxlPvGjrSezvtk670u8ImW5kmn4wb7u7Llcqe9Zq bn16ebh8VVAFq8xYrJTyAsWB5nrK/xZSkvOlplCjgTPZ65PgoFTYluKDnx7k1UwO2W1M Agx6l9V1lc1cz/LAEfyEB42p4kgtuBAHjMbY/CL1qY2Vw52AKUSv26L6PJv3m56WWKuT 6Ccw== X-Gm-Message-State: AOAM530PPUmHNPnwSe79e6zv+jzJ/wOptq8qrMjTPZOnMbQGMrYe2bWF 7fEV6GFXUTvqmfggsoNer7rJOQ== X-Received: by 2002:a17:90b:4d8a:b0:1e6:87ad:bfd3 with SMTP id oj10-20020a17090b4d8a00b001e687adbfd3mr36970045pjb.138.1654704815423; Wed, 08 Jun 2022 09:13:35 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id i3-20020a170902eb4300b00161ccdc172dsm14756186pli.300.2022.06.08.09.13.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 09:13:34 -0700 (PDT) Date: Wed, 8 Jun 2022 16:13:31 +0000 From: Sean Christopherson To: Andrew Jones Cc: Paolo Bonzini , kvm@vger.kernel.org, Vitaly Kuznetsov , David Matlack , Ben Gardon , Oliver Upton , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 045/144] KVM: selftests: Make vm_create() a wrapper that specifies VM_MODE_DEFAULT Message-ID: References: <20220603004331.1523888-1-seanjc@google.com> <20220603004331.1523888-46-seanjc@google.com> <20220608150142.nnhiyp5svrrkenxv@gator> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220608150142.nnhiyp5svrrkenxv@gator> X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=no 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 Wed, Jun 08, 2022, Andrew Jones wrote: > On Fri, Jun 03, 2022 at 12:41:52AM +0000, Sean Christopherson wrote: > ... > > +/* > > + * ____vm_create() does KVM_CREATE_VM and little else. __vm_create() also > > + * loads the test binary into guest memory and creates an IRQ chip (x86 only). > > + */ > > +struct kvm_vm *____vm_create(enum vm_guest_mode mode, uint64_t nr_pages); > > +struct kvm_vm *__vm_create(enum vm_guest_mode mode, uint64_t nr_pages); > > + > > static inline struct kvm_vm *vm_create_barebones(void) > > { > > - return __vm_create(VM_MODE_DEFAULT, 0); > > + return ____vm_create(VM_MODE_DEFAULT, 0); > > +} > > + > > I don't [overly] mind the "____helperhelper" naming style, but in this > case wouldn't __vm_create_barebones() also be a reasonable name? I don't love the four underscores, but I want to use the "barebones" name only for cases where the intent is to truly create a barebones VM, i.e. I want to avoid the common path taking a dependency on "barebones".