[v12,39/46] KVM: selftests: Sync 'struct hv_vp_assist_page' definition with hyperv-tlfs.h
Message ID | 20221021153521.1216911-40-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 s2csp766303wrr; Fri, 21 Oct 2022 08:41:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7V7ahKtyMpBj/tExZyCIGN1EVqxKmZLjQCc0twpV1jnoQPut+PMpXoFTaBJIZw0FmFB4zv X-Received: by 2002:a05:6402:1cc1:b0:45c:3a90:9499 with SMTP id ds1-20020a0564021cc100b0045c3a909499mr18231374edb.61.1666366880622; Fri, 21 Oct 2022 08:41:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666366880; cv=none; d=google.com; s=arc-20160816; b=pScdPKY7edZT+cMcxEpgdNJiNObqLy7XsNsbJ5Ksxh21mH59IqyEn+xsHNj7d+FoYd Mklp87KlCA702iwx784LbF9rAjfRHdNJldtMyOGMFw9y5J0H5iPtePiiJvIhQ25aPka3 gZhwU7JQggpRHhyNwAym1JVAgy7/ypbFOp2LAzds7SlcfvHohUyz/A4bdJNo0pp0Ye6m PnSmIWOXrwVHuvbHjYklGJI3m16RwSvj9loWCMe+OVyEOoEXQCoiVfWV5sAgspKEMG2K ZxYNf8XhEj4NDiXLJYWs4LNBWzaXO+apGHsPOO6HSKI4Y+/fQ/Sz+FRcPfwmwya+//vz 6woA== 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=7evZ3cneIVA3ka/guJeRCXIPte+gUSH9Y7WxEpbh/Ao=; b=VZturlyUkhcciMPNbpBEt99FkI7GRXLzqJksnzq8s8jikV48gHzCCnRpxyz2mlj650 mnyS4MLu7pa7g2JazrbZoV+Or09z2j17c2cwpDYH6WiBRWBESMPaTtdhOaiMRW6G3Tqn aydqLIKt98QvapKigPsg43M9RZnNstKhXTIruxRVAD6yE72VKZqgsDMqGh+DfhN7UQFx e3oj+cDOZDCpHF2RG1oHbER6DarlpqJwKv3aBcgwOMZEXcyBmhrvkt085aE2Meeoa/Hx +g9+7G7gMLI9qv2oXfuM+7VA8AZdmiXee3q3HijK4GaDAEPMD7fXk+OhrvKvwdDjXTZW JCUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RujrcUZU; 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 gg20-20020a170906e29400b0073d6c0facdcsi17601845ejb.259.2022.10.21.08.40.56; Fri, 21 Oct 2022 08:41:20 -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=RujrcUZU; 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 S231344AbiJUPkP (ORCPT <rfc822;mntrajkot1@gmail.com> + 99 others); Fri, 21 Oct 2022 11:40:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231346AbiJUPjU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 21 Oct 2022 11:39:20 -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 359F127E046 for <linux-kernel@vger.kernel.org>; Fri, 21 Oct 2022 08:37:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666366629; 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=7evZ3cneIVA3ka/guJeRCXIPte+gUSH9Y7WxEpbh/Ao=; b=RujrcUZUhGQCIPoKqnEwyM4+JFUGzyULGAMX6oywvwB5qlA14kOi3QtPYDJNLnLOBRgrpb LVTqFYPWSyUW2kSC5B3TlpBz9GDTosnl3pi8A1l0UkiNG7Dia9uSgo6sqVA3qTMWAlBrQd WInqdi6EER/eU3EZPtCtbnmY6ar+0u4= 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-392-lepAD9CYNkyoNFdfP0ACJg-1; Fri, 21 Oct 2022 11:37:03 -0400 X-MC-Unique: lepAD9CYNkyoNFdfP0ACJg-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 2BEFB185A7AE; Fri, 21 Oct 2022 15:37:03 +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 B6A5640CA41F; Fri, 21 Oct 2022 15:37:00 +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 39/46] KVM: selftests: Sync 'struct hv_vp_assist_page' definition with hyperv-tlfs.h Date: Fri, 21 Oct 2022 17:35:14 +0200 Message-Id: <20221021153521.1216911-40-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=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: <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?1747312318231938259?= X-GMAIL-MSGID: =?utf-8?q?1747312318231938259?= |
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
'struct hv_vp_assist_page' definition doesn't match TLFS. Also, define 'struct hv_nested_enlightenments_control' and use it instead of opaque '__u64'. Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> --- .../selftests/kvm/include/x86_64/evmcs.h | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/kvm/include/x86_64/evmcs.h b/tools/testing/selftests/kvm/include/x86_64/evmcs.h index 4b6840df2979..efdc62704f27 100644 --- a/tools/testing/selftests/kvm/include/x86_64/evmcs.h +++ b/tools/testing/selftests/kvm/include/x86_64/evmcs.h @@ -20,14 +20,26 @@ extern bool enable_evmcs; +struct hv_nested_enlightenments_control { + struct { + __u32 directhypercall:1; + __u32 reserved:31; + } features; + struct { + __u32 reserved; + } hypercallControls; +} __packed; + +/* Define virtual processor assist page structure. */ struct hv_vp_assist_page { __u32 apic_assist; - __u32 reserved; - __u64 vtl_control[2]; - __u64 nested_enlightenments_control[2]; - __u32 enlighten_vmentry; + __u32 reserved1; + __u64 vtl_control[3]; + struct hv_nested_enlightenments_control nested_control; + __u8 enlighten_vmentry; + __u8 reserved2[7]; __u64 current_nested_vmcs; -}; +} __packed; struct hv_enlightened_vmcs { u32 revision_id;