Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp5585875rwb; Wed, 21 Sep 2022 09:39:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7eT3ECeHyGKz7bXKdjVyQ10tS0Mz2G044hnnL1FZj/sPyQ/g81rc00kTjeaOdgZjSmXXpt X-Received: by 2002:aa7:c255:0:b0:44e:f425:43ab with SMTP id y21-20020aa7c255000000b0044ef42543abmr26121057edo.374.1663778352362; Wed, 21 Sep 2022 09:39:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663778352; cv=none; d=google.com; s=arc-20160816; b=kNdv8qcVWzUW/sSk99yE65sJxUnsbM/Oodw0j+WIZHCfYpeUyG1/ybYC+kp02vj5sG ZlMjWsoNfgyFvGQJG830LZ+EGxILN9Svc+jv5RBCfGb5ctF+OhBCZtw8TIm/uqTOugTI 8g//6xFKB7uyd+FtYb+UJuwdWQwDB3+a9Lym7uWYWhcQ1HDt7EgnPTyJaXtOWmdQpL6j O0Zg6jYfPw3puP8Mj3WY5FLOIYYGj3C5I12e854xaubb8B5PHc1xQ1u3TJrslo02oyqU fvZZd1sYUcJmgDmzkAuCMxBywZo1kFhDegmdtDyod/cZU3Lq3cD6OFz3JaG942Q73qQo sXHw== 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=do08Z1LJCnMIdPE6877z7A/CAulKFiA8DUPr2yOYVH7tBunf7zjlp/wQOWFFhBVLy6 uKt3VqgCxQbSCKH/3JWkQ8tBEkvN2zyAiQVCHbk5lVLSYI6E0DXDUa0H+ESfjlXdbznz 9ekP5IWieTfPzpzJn3Vv9VRAEDrkAxdWa3EaicCFKmAZQ7oBG6hSbVNpLFhExHU1suWP R4MME0XfgSKHDuzsHeoPVcw+TbyaoQxR2EBDqu3NVz/znvJkoPHQ7OGQxw57cu9D74t3 R7tbRdOfOvS1zbLvCBBzgYcnH3kLC17NKm201uV7PBxiBEwEtZSOwb2/kDp0OpZeZTYm g+7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=h0MaxVr6; 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 oz18-20020a1709077d9200b0078237b00285si507658ejc.442.2022.09.21.09.38.46; Wed, 21 Sep 2022 09:39:12 -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=h0MaxVr6; 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 S231560AbiIUP3A (ORCPT + 99 others); Wed, 21 Sep 2022 11:29:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231423AbiIUP2H (ORCPT ); Wed, 21 Sep 2022 11:28:07 -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 474EA9A69C for ; Wed, 21 Sep 2022 08:26:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663773966; 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=h0MaxVr6lqqFDhbbSpY0CB07VzN4uLKwCsdTrbvNA7R0a+UQaagTATnVfBHRgN7m2NhkgQ gECPDJ4HKleUXGdxP1KVBOS4khOFk4VhtMkbY5++VCalWE/fl/RvBeQuBSztsjkco9YS/Y P1Nah4KewogHKE8FEXkeoMN2SBkXDTU= 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-228-1ozKUswlO1qclo02bdRyVQ-1; Wed, 21 Sep 2022 11:26:03 -0400 X-MC-Unique: 1ozKUswlO1qclo02bdRyVQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A3AC185542F; Wed, 21 Sep 2022 15:26:02 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.40.194.159]) by smtp.corp.redhat.com (Postfix) with ESMTP id 88EA72166B26; Wed, 21 Sep 2022 15:26:00 +0000 (UTC) From: Vitaly Kuznetsov To: kvm@vger.kernel.org, Paolo Bonzini Cc: Sean Christopherson , Wanpeng Li , Jim Mattson , Michael Kelley , Siddharth Chandrasekaran , Yuan Yao , Maxim Levitsky , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v10 32/39] KVM: selftests: Sync 'struct hv_vp_assist_page' definition with hyperv-tlfs.h Date: Wed, 21 Sep 2022 17:24:29 +0200 Message-Id: <20220921152436.3673454-33-vkuznets@redhat.com> In-Reply-To: <20220921152436.3673454-1-vkuznets@redhat.com> References: <20220921152436.3673454-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.6 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, 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 '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 Signed-off-by: Vitaly Kuznetsov --- .../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; -- 2.37.3