Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp225849iof; Mon, 6 Jun 2022 02:03:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysQF+O4q6N+dxyz7mh2JyGabLDZn/tbM0xe8xqLbi214Xn8wH+laIrnZzKK4s34qMs1E16 X-Received: by 2002:a17:902:d48d:b0:167:53e2:3dc5 with SMTP id c13-20020a170902d48d00b0016753e23dc5mr13960346plg.105.1654506238800; Mon, 06 Jun 2022 02:03:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654506238; cv=none; d=google.com; s=arc-20160816; b=smJ0llzsS8U+VaLbxkYjWfzhW5303htTXQc5FhyqYq8lH4zNZ+93sY2pSrEYmur/Rr bFQgBq0RBRe/5wXL9zn2BnDaz8G7L/eymVEhhX34D5e5JAOuGXX5p4cKDGNOlT0xtP4P VZ3eEP+HrlMqG02mA71c4YzGhoTR20KaMW89Oug67QYeomjo2fmpq5IV2eUPzeBKHVa6 f0iC2FaojRGWuewPRZkd7AuDjaUQetYhgCVMFQaCcwVTMEFR0q79IgaLr2VW2A6h3Dtd MSowhnzb9mAjwztuyxFLdOdZ24G14eN1h057L2xwJBdks9pQGAFQCPWaWyRDXTWPLfbI NgFQ== 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=CY4apJS2z1cKUFJKMHfQr4ItLc6osQFAwRlPYuJ6Rzs=; b=TyU74I5iga8s9QpwKMKETFNqT9cF8lxqxV0cJB64owmcfJV7pvMl1Sd1jAo/gokniV QtLZahFN0Sg6bk+JTo6+TSZexCRM10bkB+4vVxzrgFT1YMO35+rF2XHWjHrjEdJM9AJ8 rl05V9gY+XA37PsaCFQ4Dhtcjz1SZQ87rkMGjRsYtRWdFCpyKmB3wI9N2eW6ED1KpJZy NtwchZgDb8ePC7Ym1UbM8vYt+dAws2m3ce5PRdqVHVHAOtMlbi4EemAR5swTaszDYMIi QS8C1eYq7551siYYPkHsHsgT1skdItCymN+/XkX2eIC5q5d9C6UKN93y43F1uMw5RyvL nePw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Q98nq4qG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id p23-20020a170902a41700b001675c90c8e9si10064001plq.359.2022.06.06.02.03.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 02:03:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Q98nq4qG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 69876DD0CD; Mon, 6 Jun 2022 01:41:49 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232468AbiFFIlH (ORCPT + 99 others); Mon, 6 Jun 2022 04:41:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232017AbiFFIi3 (ORCPT ); Mon, 6 Jun 2022 04:38:29 -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 ESMTP id 42D793207B for ; Mon, 6 Jun 2022 01:38:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654504704; 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=CY4apJS2z1cKUFJKMHfQr4ItLc6osQFAwRlPYuJ6Rzs=; b=Q98nq4qGip0cIZkMqhK6ANWS7qZ/ggDzsZOg6AqXT6U9OIK7+DcTtVihsouGRAVak/xIxI jAC/fXpj9y6v8drFi7HpsPuGODfstY6HCRwu5laGszuezKun8NKmzRYZtGe0pSdv+p5fNY yJ7vYkfuAj8BXLHfYcyjMhHVMWWbsVg= 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-63-TlCJKFxUMYqrdQkNgNjLUQ-1; Mon, 06 Jun 2022 04:38:22 -0400 X-MC-Unique: TlCJKFxUMYqrdQkNgNjLUQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 58EF4185A7BA; Mon, 6 Jun 2022 08:38:21 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.40.193.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3EECC1121314; Mon, 6 Jun 2022 08:38:19 +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 v6 35/38] KVM: selftests: Sync 'struct hv_vp_assist_page' definition with hyperv-tlfs.h Date: Mon, 6 Jun 2022 10:36:52 +0200 Message-Id: <20220606083655.2014609-36-vkuznets@redhat.com> In-Reply-To: <20220606083655.2014609-1-vkuznets@redhat.com> References: <20220606083655.2014609-1-vkuznets@redhat.com> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 b6067b555110..9c965ba73dec 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.35.3