Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp14191rwb; Wed, 21 Sep 2022 16:35:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4zoHdWpzIvn32vP8g8cUtQMr0IiH9CL5jXGayC36F+YEGRSqQXc32GxCHyP8bAfA6erCAD X-Received: by 2002:a05:6402:5212:b0:451:6301:593e with SMTP id s18-20020a056402521200b004516301593emr509863edd.119.1663803308310; Wed, 21 Sep 2022 16:35:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663803308; cv=none; d=google.com; s=arc-20160816; b=oDKdnH903XqlCzOyOOi3whkqL/+MP5GCHL9Rsv/Sn+u0t8Bjs8JehY8UA0lnUeIG5V RfujgCRpq1bWKTtCH1zracE9oWiR9BCOEhib0CHPup0Oy/xq/nrLQjKAwGo0Fes/MfAf S0tvdiA5BB8TPm21SSRpQibQ4tQLgtlsEHuyLG3svPQGVmUThZ+ItVjLZ67Jg6PnAmrU Zg0rMGf827qUSTbyyD/ZOGKrIn5+PO9ZZ9lWQFHr/cfSyQevVSDvByLZE7u2+IdUKNnJ EzswwPastQPZuYp0K+aRFzXzQhvNajmBMeMQWZJ5Ej0wnyuirIIOe/9d/rKpUgT5dpuB yJuA== 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=gT7v+Iphr5H7tbmIRZ4mb0BW+PQRNn3bGFIrWMufP+Y=; b=VzMZgUQ8iZ+CRBLAyClepCW7dpi6Y5jjbp2H6Cq1C7iNGkcjr2mVBnI7HVZXvbbCNh JnsAKbjNca7TURM80LvsNyZtUJMdmhbapa5gdsw6WjsnTp/Xh2SBRvc5gRNkzaMrBXIp GdiF1P+yT3AvfxFu/KkNthf7YrQ4d0jVOBjgPKr8O95GROHoJJmg/v56FF1BNRVXcL0d 69XUYOUxOIlmeW7GXpcGB9O3Om/1YfkapDChFgJVKJzItyekr1C02XgepuAyQV3+MRb2 xBefdYwAUga3hZRyd00U/sPH7eIxNBS5qZIT2Cn3BWQcI2Kw9rjy1H0eBm39DFoFHVTO 71Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=AnZtDAdv; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sz15-20020a1709078b0f00b007820d1e7fecsi2288602ejc.201.2022.09.21.16.34.09; Wed, 21 Sep 2022 16:35:08 -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=@google.com header.s=20210112 header.b=AnZtDAdv; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230192AbiIUW7c (ORCPT + 99 others); Wed, 21 Sep 2022 18:59:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230171AbiIUW73 (ORCPT ); Wed, 21 Sep 2022 18:59:29 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98CA0A8977 for ; Wed, 21 Sep 2022 15:59:27 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id rt12so5510777pjb.1 for ; Wed, 21 Sep 2022 15:59:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=gT7v+Iphr5H7tbmIRZ4mb0BW+PQRNn3bGFIrWMufP+Y=; b=AnZtDAdv0bZ0a4j3wmHXs2IGZ2XGolBmvh/uAryz0wb0qyg0YKv05CwUHlOIJmSy81 JEAFibFTRKJSyAD++DWRxrnN40ZiOtmQr912AeYe7tnxIhVbIFcSGz3/tc8Tdqeqf7gu DodA7UsbwIyRsIJWoTaGk4/hBJAIdRMPoBZboj7cjulmHO5XMZr4v0WtEOxrJ6ju+Sc5 hiyjmCK8Old/VWOe8FAEYzD95Pri41i3lZyvL63R6QwrM2yRJxH0jq9pQajlec5juX8S 3cMfmVYrjiZibrH1RR/Fd8WdEMQ1r0MxzykqTuTzX+PsOhp2XLOYBhAn1rwFgf5P392R grxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=gT7v+Iphr5H7tbmIRZ4mb0BW+PQRNn3bGFIrWMufP+Y=; b=ZsIW8bFGQ0M1/pBlOs7cDDpk1b4X2ZtJb2Q6ty/S9/AvBe24J0Fq3Epw7dhHCEeezj glLJlHOgNasMI1tgRlJVYdeyqmCZWWWvzXKvIIFW7A7I/LWcZlAo8LfOFvBEKBOIz92w NdN0kfJTJpO5u+r8espRUjPQZeEbCdPJ5j2Jnzl0B9QHAN8tnh+3jr4bQy9U2NH1KJVG 1nLSnUbYz9vdqneMZUid/sJY5yJ5+8KYSniIfr/QP0Or7j2uaIuBQ21LlEOdkIbSYsx7 0mUcZ5YMPQ9nipVcGQ94xoYOKh3gOEBJnsKoo8nJpJtMCOHINQHLnYmYySCXzu4TG3/z AYJw== X-Gm-Message-State: ACrzQf0u8EFIMv7LHavYyTUK2BFPt40BpEfni3b2BB8V8FQWQLGja1mi 9CZ7vsycVcd70EwA3HX45dVBig== X-Received: by 2002:a17:90b:3883:b0:203:214d:4272 with SMTP id mu3-20020a17090b388300b00203214d4272mr11888667pjb.101.1663801166762; Wed, 21 Sep 2022 15:59:26 -0700 (PDT) Received: from google.com (7.104.168.34.bc.googleusercontent.com. [34.168.104.7]) by smtp.gmail.com with ESMTPSA id m1-20020a17090a7f8100b002008ba3a74csm2356714pjl.52.2022.09.21.15.59.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Sep 2022 15:59:26 -0700 (PDT) Date: Wed, 21 Sep 2022 22:59:22 +0000 From: Sean Christopherson To: Vitaly Kuznetsov Cc: kvm@vger.kernel.org, Paolo Bonzini , Wanpeng Li , Jim Mattson , Michael Kelley , Siddharth Chandrasekaran , Yuan Yao , Maxim Levitsky , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v10 35/39] KVM: selftests: Create a vendor independent helper to allocate Hyper-V specific test pages Message-ID: References: <20220921152436.3673454-1-vkuznets@redhat.com> <20220921152436.3673454-36-vkuznets@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220921152436.3673454-36-vkuznets@redhat.com> X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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, Sep 21, 2022, Vitaly Kuznetsov wrote: > diff --git a/tools/testing/selftests/kvm/include/x86_64/hyperv.h b/tools/testing/selftests/kvm/include/x86_64/hyperv.h > index 42213f5de17f..e00ce9e122f4 100644 > --- a/tools/testing/selftests/kvm/include/x86_64/hyperv.h > +++ b/tools/testing/selftests/kvm/include/x86_64/hyperv.h > @@ -265,4 +265,19 @@ extern struct hv_vp_assist_page *current_vp_assist; > > int enable_vp_assist(uint64_t vp_assist_pa, void *vp_assist); > > +struct hyperv_test_pages { > + /* VP assist page */ > + void *vp_assist_hva; > + uint64_t vp_assist_gpa; > + void *vp_assist; > + > + /* Enlightened VMCS */ > + void *enlightened_vmcs_hva; > + uint64_t enlightened_vmcs_gpa; > + void *enlightened_vmcs; FYI (in case you or someone else is tempted to do further cleanup), at some point there will be a patch to wrap these triplets[*] to cut down on the copy+paste. [*] https://lore.kernel.org/all/YwznLAqRb2i4lHiH@google.com > +}; > + > +struct hyperv_test_pages * > +vcpu_alloc_hyperv_test_pages(struct kvm_vm *vm, vm_vaddr_t *p_hv_pages_gva); Please don't wrap before the function name.