Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp369903imn; Wed, 3 Aug 2022 07:23:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR5I07E/ZtvcBBb5crqWg3j1dwo6+x9lZSyWe1C2wsNHqlhjRv/Jdh1sVpH21vjhITESu1SS X-Received: by 2002:aa7:9e4f:0:b0:52d:548f:e272 with SMTP id z15-20020aa79e4f000000b0052d548fe272mr15396608pfq.33.1659536612483; Wed, 03 Aug 2022 07:23:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659536612; cv=none; d=google.com; s=arc-20160816; b=bZndC9R2f1bTSe+tI979pd2TInJ7zgW/xgXvclQAxZdaODKbvhBUCqwiVPzDdqxAtQ LpsMMSrkRHy6KqUcFD+kH6KWZFtlTVdWAG0AEWtovqZAaSmzyIpbhxv0xQQ23sYsESCf j7qqLHoznElhPEbrN8ZO7AEPXQYZo/GJKx+q30WdbXqgpSWtRgkfs7L5uPznkbFNCxKA YNqx6UPR4C7lcb2eJwh2sbyLnTrrguvB8ra55frNp2LhDCMl218sD00AKyGmXoawm/ca yxsK8mad0yWLpx013CO1tXBFFqenXLOYDm4qmzM12ptzamC6jUJ90z2L5h4wTXc57YRq uxYA== 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=JHq20kSDJO5bsZhLlnG0u9m0y9DgMaW90WbaAuowc+I=; b=a01z1+nYjN8yWt7KvImjvVN8es+VR8VK4dHMCiyecwNm4cfNy1OehuJw+KDVysRaIl TqZHty16EXt9YVd4kz6/t4mKp9FmBwUjm1YEH+QKjM/FrC19a3y3ubGUF2IPmmzj8SZf B6xYkJka1cgFulXr53188vR2KP+P6mB6nOikd754Xpd725iHQt5b4rnUaVaogtH8YKri cfqyz79jxTnAHIqMJSZ0YQuHu3AYwuKKwM/eUGpuaKe+npmRzoXx8V7CH2eQCAxKL9Cw 8gTbPHGJIBf0sCvKQaBFzynHMHK/gz4YyEhkgZhMtRb84BNMuzYrtPIcZUWKhciag16E oQzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YlOVJrBY; 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 l6-20020a17090270c600b0016cd5dd8ab9si2223249plt.267.2022.08.03.07.23.18; Wed, 03 Aug 2022 07:23:32 -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=YlOVJrBY; 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 S238373AbiHCNtg (ORCPT + 99 others); Wed, 3 Aug 2022 09:49:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238350AbiHCNtB (ORCPT ); Wed, 3 Aug 2022 09:49:01 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B328248CB3 for ; Wed, 3 Aug 2022 06:47:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659534437; 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=JHq20kSDJO5bsZhLlnG0u9m0y9DgMaW90WbaAuowc+I=; b=YlOVJrBY7GpX5NIUasb3E+fblhFC9TvOdn1W1Y4J/6zlNTEx97xQnT4IQLgrgj8u8cMreg CyAikRarcFTAwflqz+b1mrcyyMJ6e7lDXDSy7rRCJM2i7pYpGiYnVxTSg5Rt4d1Zk+A/NA p6UozgOnpyP3AvkaktY1M5GawTAzkLY= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-648-p2EGM2WGPwW8vaL2vnrMKw-1; Wed, 03 Aug 2022 09:47:13 -0400 X-MC-Unique: p2EGM2WGPwW8vaL2vnrMKw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 841D83C0F36F; Wed, 3 Aug 2022 13:47:12 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.40.195.93]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8FDC11415116; Wed, 3 Aug 2022 13:47:09 +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 v9 37/40] KVM: selftests: Allocate Hyper-V partition assist page Date: Wed, 3 Aug 2022 15:47:08 +0200 Message-Id: <20220803134708.399568-1-vkuznets@redhat.com> In-Reply-To: <20220803134110.397885-1-vkuznets@redhat.com> References: <20220803134110.397885-1-vkuznets@redhat.com> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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. 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 e00ce9e122f4..e0c0dc4b3d5c 100644 --- a/tools/testing/selftests/kvm/include/x86_64/hyperv.h +++ b/tools/testing/selftests/kvm/include/x86_64/hyperv.h @@ -271,6 +271,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 e44bb5cc8566..e222db65a188 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 @@ vcpu_alloc_hyperv_test_pages(struct kvm_vm *vm, vm_vaddr_t *p_hv_pages_gva) 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.35.3