Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp474841rwb; Tue, 4 Oct 2022 06:39:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ufXZwrEhydZFYRXFix2r9ojnN7dwlXUD7GXB3lkz5BSC58NyZ1oNxz1k8aWVE9KBLWopD X-Received: by 2002:a17:907:a068:b0:78d:20ea:c1a0 with SMTP id ia8-20020a170907a06800b0078d20eac1a0mr694309ejc.614.1664890799579; Tue, 04 Oct 2022 06:39:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664890799; cv=none; d=google.com; s=arc-20160816; b=ozcvnkDV99PV3ED4iB1HhBflys2Eh19xxPZ2Yp/8EQZDHN90c+DePseR9KNF49qWvg wCfs2+bxuASl5KsGZj7+6AdGIPzDCXOCRVzR477XJ1e6LeQBO71LwBdm2DKsL0Lde6N4 DlpKpfSHif/rUo2RoZYaKNs3o7OeBd1awE6iNxC/g+oJ60Gv8WjQSx72+MblkXglzw+c q7LivBKPKUDqbts21CQJILLy3O+mHyxSqr6swctdfxIGZdwMUMzi1j1V9uyIVZi9GD7u /gRPXVnENjcCFJRbmngACzr5Xy+XhoHxbdJokJKmZcFhF2o2xVUZCxfUxjuY0BXX4Z7P aLaw== 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=ZPLnE/G9my/YKmzY+ZBYzTQOYyVWap+M4GJgygz436B4MU6Phd95/1mBpQ8TN/eBKE CDLYpKv797ixtVgRGzEHfu+h26OyKzsre72ohhMsrA0YGNm2luyAGmFjaKh8LouvY/ml Jh2ASfXrhibV19qiBdLU8GLH3CLr59EMMBj3UD688sC8hG10rtqiyon31MPPqVRu+uQJ uITcLz4ebypDzuija6eWAtAuzplPFr3PlNSSUW4PUPwJGY0reU2vAiKitdMUt+9oPPMo T366gLplNZsYmNCrS+4bR3Gbw1bM32T1TgD8iZPU6F/vbxWjZz7rIkrQJD6+Au2uSJHu a+cQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="CzD1xdg/"; 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 dr13-20020a170907720d00b00779a69067afsi11219367ejc.830.2022.10.04.06.39.34; Tue, 04 Oct 2022 06:39:59 -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="CzD1xdg/"; 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 S230199AbiJDMzl (ORCPT + 99 others); Tue, 4 Oct 2022 08:55:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230263AbiJDMzM (ORCPT ); Tue, 4 Oct 2022 08:55:12 -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 178815EDE7 for ; Tue, 4 Oct 2022 05:52:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664887929; 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=CzD1xdg/e77NiQ9AgRplgi+w37c+vHsQfeDa/Pl99+nE0uvo24s6YCAlHXcSkNNqoDlWnr tvbagAJcTcRSNXK8fVxtv5/4TQfb9pOEgf8KdQ8HEOcH5TXoqAB1hrCO6Z+Hs9BzFdd0NH s2ctrJPanws84DYhZudODFDn42NCuuQ= 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-45-EQvP3zicOdemBAkJU1Xf7w-1; Tue, 04 Oct 2022 08:41:38 -0400 X-MC-Unique: EQvP3zicOdemBAkJU1Xf7w-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4FA2785530D; Tue, 4 Oct 2022 12:41:37 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.40.192.255]) by smtp.corp.redhat.com (Postfix) with ESMTP id 147AA7AE5; Tue, 4 Oct 2022 12:41:34 +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 v11 39/46] KVM: selftests: Sync 'struct hv_vp_assist_page' definition with hyperv-tlfs.h Date: Tue, 4 Oct 2022 14:39:49 +0200 Message-Id: <20221004123956.188909-40-vkuznets@redhat.com> In-Reply-To: <20221004123956.188909-1-vkuznets@redhat.com> References: <20221004123956.188909-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.5 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