Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp368856imn; Wed, 3 Aug 2022 07:21:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR6C6oRjIASj2K0aP7wYwsRzHi7rLVwTVH6zsOwPbjHR1J6FeIfTwOPUI83iv2n3FtQCNTq9 X-Received: by 2002:a17:902:ebcb:b0:168:e3ba:4b5a with SMTP id p11-20020a170902ebcb00b00168e3ba4b5amr26466315plg.11.1659536461083; Wed, 03 Aug 2022 07:21:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659536461; cv=none; d=google.com; s=arc-20160816; b=l2L4kUxk7tzt5XVk5ZOw9EJrNtyRH8v07JEbAwdt5s1VPJEgE5i6eXzBqYm1lSy0ew G/cNQMI1EAazpZUidNZbk5E9CUM1nS+lNKCjOINVNLlF172i/pGJrnLx2tHFjAwXYFGT s3YYRciE3zYbEinGaE5UTfe7WR558/bH9ZklLYFzjr/zgYPIPvV2LT1mwCZ2MdZFWyPQ 3UQ64lyTLx3JE3XshxQX2xqB+Op1HFPyMP6Wz4jE8bsxtiUbNWXkDrH+lXQrfmeRgOZg vKc0a5XctFKmBU3Ki+opAKVS7kNyx1okobYMHQ9QFh86szSST8qgknpXLK5dYNiWeo+H TJeA== 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=UhUjnL8jffpBRvdK+83caHcfCkV1B7jouem6M9M/8vA=; b=JSCfJBPmX/v0VIDvG0BUXKKALATlyaM4MowSOcn71YbYtucvWMZrrlyXVJPkqUBwG8 SUzweY9+6TfQd3dDbvPoo07EqxTrl/bgJlR6HhkWVCNfJkgD+Bi/jGH9D4Ol4sXIWv8r yQtcDMojxDG/7w79wxuf9Zpi1Z7Yy+QA8oW5ZMAAOTT4HaqJiv0QocaAjSASh10po8hn 8PmAzOj3bSAegKFdRbD4CQpZXSv6LTwBsZ4KtXJDEZ0/8VTrWGiLoccRHWQaqn2tNwUJ cAXCDBiseynewmMmx7EViDohcvUfN0u9GpUfF/NJd5rmqmFArb10QHCks97yMEuVk5f6 g9Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="K/7Hg32y"; 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 n18-20020a634d52000000b0041aee1c2913si18744902pgl.5.2022.08.03.07.20.46; Wed, 03 Aug 2022 07:21:01 -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="K/7Hg32y"; 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 S238587AbiHCNtE (ORCPT + 99 others); Wed, 3 Aug 2022 09:49:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238529AbiHCNse (ORCPT ); Wed, 3 Aug 2022 09:48:34 -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 ESMTP id 13ABF1C917 for ; Wed, 3 Aug 2022 06:47:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659534420; 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=UhUjnL8jffpBRvdK+83caHcfCkV1B7jouem6M9M/8vA=; b=K/7Hg32yOUjBe4BzY4q1u265slQw0PKuBf+9q4KR67du7A9O1EKYdnLoLOtGh8AOoWE5D4 XO9UgAI1Q6xxpdWz0swgByvgcsFW2WLSDcgcJyE8ibjVCgVDBTNub0C42RAN8Nu/l149y3 F4sRhch0hPtdeIGF918Hp692xh/qVE0= 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-454-G36okjgdPZCuCkls8KJnOQ-1; Wed, 03 Aug 2022 09:46:57 -0400 X-MC-Unique: G36okjgdPZCuCkls8KJnOQ-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 14B02108C0A1; Wed, 3 Aug 2022 13:46:57 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.40.195.93]) by smtp.corp.redhat.com (Postfix) with ESMTP id 010E91121314; Wed, 3 Aug 2022 13:46:53 +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 v9 33/40] KVM: selftests: Sync 'struct hv_vp_assist_page' definition with hyperv-tlfs.h Date: Wed, 3 Aug 2022 15:46:53 +0200 Message-Id: <20220803134653.399519-1-vkuznets@redhat.com> In-Reply-To: <20220803134110.397885-1-vkuznets@redhat.com> References: <20220803134110.397885-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=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 367e027cd2a4..721e119783a5 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