Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2524762rwi; Tue, 1 Nov 2022 08:37:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6tHl1CppaHSwYu9hktkOgOmjtQdpG43bHP92hu9gK/ji09w5jN+FRj3dotvsOPsOSoDNza X-Received: by 2002:a63:185c:0:b0:46f:4a36:9a6f with SMTP id 28-20020a63185c000000b0046f4a369a6fmr17233459pgy.22.1667317041925; Tue, 01 Nov 2022 08:37:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667317041; cv=none; d=google.com; s=arc-20160816; b=SB9puPKiLv2oKT+utIUz/v6ltG7/Zb7x63ReEsy/ldzn3jBYiHtxXdDhLJ7V5gs8Qs ksnpe8b5YDLoC+sj5UtshVR3BYqwmvkjiLWhxm/I038hQQZ0VVIW2U1UHveToCTbZ2Q0 U2bhVW38aU1dbyjIBmPP5+TzEFe4GCOF1G3XLfM0snlQ73rwN4TiPhVCXaAa5GwM2MSO HhuWuyJyzeT5hO4DptXxIJj5WvpEECcSEtV49FUJK8cup5rhY6HfdYIMieSKOOU03Ueu GwPGUijfDQs08mH06aWvcFJ+4MpXHXiJSCM6RJCtDINBLtahmcw/MhCQLHbcyzoZpJjE j8eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=H93EuFioGoH2ZsQF5X90By2s+Kt4RtOqDovJ8OaPPR8=; b=lVwzDh956CU4l2/F+sc8dlzsOnE0ERXbS+xtkjHIm1FU42rutZ0c03NqFwUlPmUjsr i3TA7EhZxvXEpND1Kxw+vx6fQ8WUvEPonaFNfGyC74SDkQ7Oa0/6LSBzcnbS6HLLb9HJ xDV/RBsgxdXGUaEYidVOeKnGXVntjxJZe5iOLk9BmLiW0oeHcgrlzJcdd8eJXmA8PDrV wVsqntBfliwLJAyvjF2bSFcMNwgJpqWyd7gJHmtNZGqXuOEf3YdCYGgBfBOrCiTDlyVp +2mPHUJ5W+LsdpA83a0Ksmp02OSOjQ4ZDQGLH4Uwcj84b+Oa9n1HxzW4BNR3sZ5JRjSc jJkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XWMyUrnK; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u9-20020a170902e80900b00184306292a5si14574472plg.229.2022.11.01.08.37.09; Tue, 01 Nov 2022 08:37:21 -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=@redhat.com header.s=mimecast20190719 header.b=XWMyUrnK; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230175AbiKAPMM (ORCPT + 96 others); Tue, 1 Nov 2022 11:12:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231208AbiKAPLx (ORCPT ); Tue, 1 Nov 2022 11:11:53 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F079186C6 for ; Tue, 1 Nov 2022 08:04:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667315049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H93EuFioGoH2ZsQF5X90By2s+Kt4RtOqDovJ8OaPPR8=; b=XWMyUrnK6UtZfqXoMF7bCFlnbv7gEFFH3nBjc9aCp/qeXYAo1AW/mMV8MXA9H8Ll0OoVpy ptNPfscGPpPMpJ3WrUMSL6YIR8sGC+XjMaBjw42pz3jsNWBxu/2iCIuKA6HVbCTwrkr1fu OrwXSYv9lWhpOEeE5X0x38V9bhNSOmM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-477-u0M_goN8NT2D0kWiw2eVOg-1; Tue, 01 Nov 2022 10:56:51 -0400 X-MC-Unique: u0M_goN8NT2D0kWiw2eVOg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C10F387B2A1; Tue, 1 Nov 2022 14:56:50 +0000 (UTC) Received: from ovpn-194-149.brq.redhat.com (ovpn-194-149.brq.redhat.com [10.40.194.149]) by smtp.corp.redhat.com (Postfix) with ESMTP id 08A14C15BA5; Tue, 1 Nov 2022 14:56:47 +0000 (UTC) From: Vitaly Kuznetsov To: kvm@vger.kernel.org, Paolo Bonzini , Sean Christopherson Cc: Wanpeng Li , Jim Mattson , Michael Kelley , Siddharth Chandrasekaran , Yuan Yao , Maxim Levitsky , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v13 43/48] KVM: selftests: Allocate Hyper-V partition assist page Date: Tue, 1 Nov 2022 15:54:21 +0100 Message-Id: <20221101145426.251680-44-vkuznets@redhat.com> In-Reply-To: <20221101145426.251680-1-vkuznets@redhat.com> References: <20221101145426.251680-1-vkuznets@redhat.com> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 In preparation to testing Hyper-V L2 TLB flush hypercalls, allocate so-called Partition assist page. Reviewed-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov --- tools/testing/selftests/kvm/include/x86_64/hyperv.h | 5 +++++ tools/testing/selftests/kvm/lib/x86_64/hyperv.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tools/testing/selftests/kvm/include/x86_64/hyperv.h b/tools/testing/selftests/kvm/include/x86_64/hyperv.h index 186f3aab888f..ffe28a78c8a3 100644 --- a/tools/testing/selftests/kvm/include/x86_64/hyperv.h +++ b/tools/testing/selftests/kvm/include/x86_64/hyperv.h @@ -273,6 +273,11 @@ struct hyperv_test_pages { uint64_t vp_assist_gpa; void *vp_assist; + /* Partition assist page */ + void *partition_assist_hva; + uint64_t partition_assist_gpa; + void *partition_assist; + /* Enlightened VMCS */ void *enlightened_vmcs_hva; uint64_t enlightened_vmcs_gpa; diff --git a/tools/testing/selftests/kvm/lib/x86_64/hyperv.c b/tools/testing/selftests/kvm/lib/x86_64/hyperv.c index a2fc083c65ef..efb7e7a1354d 100644 --- a/tools/testing/selftests/kvm/lib/x86_64/hyperv.c +++ b/tools/testing/selftests/kvm/lib/x86_64/hyperv.c @@ -19,6 +19,11 @@ struct hyperv_test_pages *vcpu_alloc_hyperv_test_pages(struct kvm_vm *vm, hv->vp_assist_hva = addr_gva2hva(vm, (uintptr_t)hv->vp_assist); hv->vp_assist_gpa = addr_gva2gpa(vm, (uintptr_t)hv->vp_assist); + /* Setup of a region of guest memory for the partition assist page. */ + hv->partition_assist = (void *)vm_vaddr_alloc_page(vm); + hv->partition_assist_hva = addr_gva2hva(vm, (uintptr_t)hv->partition_assist); + hv->partition_assist_gpa = addr_gva2gpa(vm, (uintptr_t)hv->partition_assist); + /* Setup of a region of guest memory for the enlightened VMCS. */ hv->enlightened_vmcs = (void *)vm_vaddr_alloc_page(vm); hv->enlightened_vmcs_hva = addr_gva2hva(vm, (uintptr_t)hv->enlightened_vmcs); -- 2.37.3