Message ID | 20221021153521.1216911-44-vkuznets@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp766747wrr; Fri, 21 Oct 2022 08:42:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6k14OEaTj0V5tCoFks06sbwKBNMds9Et13+HICL33FBdT0CM/5fseD1YDw2uhQmsFFy/aW X-Received: by 2002:a05:6402:d75:b0:459:fad8:fbf with SMTP id ec53-20020a0564020d7500b00459fad80fbfmr17678487edb.0.1666366927676; Fri, 21 Oct 2022 08:42:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666366927; cv=none; d=google.com; s=arc-20160816; b=pYmEmM/v4fxDX6hbc27wQAqs+j9Z5IjDO38rf7zbuWzyE5paXDQrv7xDineKB6D4Da WJBKAYPVQkgOgyA3qChX8K1f+4ruZggmJmSpt+lyhnllS3wnmdoQwg7jrB3yFySl8l/c EiR/mf6TFg2jUkYUbDkDqnK9laU5N8OZmdeGPpkvvPfho6Ut9/cFplzGcvSeJcfkCc4t 5CBv/nTg8YOmcanQ0zBuglskW/JSxQ7GBcwwpZsO4XdkQMc19z04SBA8Kwxo1AaD3FyW CD0CDAv+8x8gchwyOSUPbRBboy/zXjR4Ph2M+W/PlIyXGN3G/i0Ky8e+kD7h12vumCnj Z0LA== 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=q/mBUp5om8+lhF+564fXSbS6jTR1Ky4c+482nYxEp3g=; b=ClUrsJ0gPbwYkerq2LpqXBhvwZ0K9WfUjTZPSLtbHLrj/N2vacySXd7/aN1WyIpuN5 sRTLNVB7P18CoZDsIpyTfcKC+lwdEiEztIO3wCQ5Y4ZnvG0g0xa2212DWTMrCGGvqUHh 4jAIYb5Ac0rTDnSXdmlun1zzCYKIYrSxehwtNptVEQdr7Zl9HxDhQKz4jlH7gPdwNICJ CEO/FZ6gsNJB3BUgzyfnGu8lsXfMBp3LwDfOn8XbrB/YkuT3En/uFizm56FEbPydzJEF N8LpXGoNeHT+mm8PO8o5az10qP8RoJXG1uVTPvHDaxQN1bmNv7mk4jNB4jQXfvqAmVx5 EuDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CLzFjPni; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b2-20020aa7d482000000b00459060fcde3si18207686edr.202.2022.10.21.08.41.42; Fri, 21 Oct 2022 08:42:07 -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=CLzFjPni; 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 S230334AbiJUPkZ (ORCPT <rfc822;mntrajkot1@gmail.com> + 99 others); Fri, 21 Oct 2022 11:40:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231379AbiJUPj0 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 21 Oct 2022 11:39:26 -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 ESMTPS id 2619326FF8E for <linux-kernel@vger.kernel.org>; Fri, 21 Oct 2022 08:37:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666366637; 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=q/mBUp5om8+lhF+564fXSbS6jTR1Ky4c+482nYxEp3g=; b=CLzFjPnicJ/QZYxjR80SWqlElcFfWFowAH7ESUH4dydKm7muTHTW7MLHHd0JixSAMLpggQ sZ3Ma1lZZQ3h62wRWiSvQHemHsp0c+gGTZtO38X/fZ0kem8h05+WCzTPHf+7+bKDk0t4Xk e0D1mF8gzOIbdOGCxwFh0eyCELkIg6Q= 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-550-yanqtzHwMVmfD6eT6zYdHA-1; Fri, 21 Oct 2022 11:37:14 -0400 X-MC-Unique: yanqtzHwMVmfD6eT6zYdHA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B1D793814944; Fri, 21 Oct 2022 15:37:13 +0000 (UTC) Received: from ovpn-192-65.brq.redhat.com (ovpn-192-65.brq.redhat.com [10.40.192.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4BF4840CA41F; Fri, 21 Oct 2022 15:37:11 +0000 (UTC) From: Vitaly Kuznetsov <vkuznets@redhat.com> To: kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>, Sean Christopherson <seanjc@google.com> Cc: Wanpeng Li <wanpengli@tencent.com>, Jim Mattson <jmattson@google.com>, Michael Kelley <mikelley@microsoft.com>, Siddharth Chandrasekaran <sidcha@amazon.de>, Yuan Yao <yuan.yao@linux.intel.com>, Maxim Levitsky <mlevitsk@redhat.com>, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v12 43/46] KVM: selftests: Allocate Hyper-V partition assist page Date: Fri, 21 Oct 2022 17:35:18 +0200 Message-Id: <20221021153521.1216911-44-vkuznets@redhat.com> In-Reply-To: <20221021153521.1216911-1-vkuznets@redhat.com> References: <20221021153521.1216911-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.1 X-Spam-Status: No, score=-2.3 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=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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747312367603173985?= X-GMAIL-MSGID: =?utf-8?q?1747312367603173985?= |
Series |
KVM: x86: hyper-v: Fine-grained TLB flush + L2 TLB flush features
|
|
Commit Message
Vitaly Kuznetsov
Oct. 21, 2022, 3:35 p.m. UTC
In preparation to testing Hyper-V L2 TLB flush hypercalls, allocate
so-called Partition assist page.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
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);