[v13,39/48] KVM: selftests: Sync 'struct hv_vp_assist_page' definition with hyperv-tlfs.h
Message ID | 20221101145426.251680-40-vkuznets@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3024185wru; Tue, 1 Nov 2022 08:03:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6aflE3bYPJfAIZ0zNyF4StdZfrPqc4wnejD9ZL3usTiBUURDKH7OlnZn0wVGf00V7xHyHq X-Received: by 2002:a17:907:74a:b0:77e:9455:b4e3 with SMTP id xc10-20020a170907074a00b0077e9455b4e3mr19051382ejb.471.1667315000524; Tue, 01 Nov 2022 08:03:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667315000; cv=none; d=google.com; s=arc-20160816; b=tHoHXt+d8A149hjSVrSC6uWXAY44bAnj+fi2AICqRbgRLbWud/XviyrrvWwht1C9P+ L9RYy+PedPoDOnHvZXyy1QZsvaVyR2Ilh5hRF/PexwZ3lA1yxtP/m7j1JGsmTmQEvjoR 6MesHUeBUOr+h6nj0j5GvopJ5BJZGx6YnYL310hOMbAn9vvciJtyB1y7MyT0alF0Q4LS Psd6xRkclsvVxMs516mPgeLVVGJjKF3YUf1FHqLhDbPO5G2IbJAPHOoPWXQTku3IHx37 93w73FP0pI6isMG799JysgR+eiUgtZGNYJ9ZPJWHqSd1ogJQr5LMQ4qQAAXn1/5BCWp2 BPnQ== 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=X90HdBpZHRlpEK78X14jzV2xZFPi7hDj+jPQpLmDwa4=; b=aqPpy+KLQvzfm3j6bS8a56uKdlWMsuiGjafWtMaOgpatjVCqCDgoIyEotN00yqrd9w XA8v9L67VeWcPfbuSqwLE4/l4+XDeJpkB7Q2CBLmrNMRGk4IiprGLLJpeisL/Mq7YzIX dPUTJtTim7EXM/RLEZLCy3pI9ZzwXOB4E7vhCNKEWHA5j+bke+3seAJWqqez/0HPhy+A +fTGbsiYKOMkCY9wVdVQDzAGBFxAh9pSAcSCouurhN+RNao+Unjgr7bO3kqhM09nofx6 DWeIxA5KfvQI5S5/2UrztJW+9E6XlZ4IPnzeMMFi5xqLpWzbLE3SQLjQ5IrqZVoxXkWi kLVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DTt9jmhH; 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 g16-20020a1709065d1000b007adadfc97c7si11060340ejt.918.2022.11.01.08.02.47; Tue, 01 Nov 2022 08:03: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=DTt9jmhH; 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 S230233AbiKAPCX (ORCPT <rfc822;kartikey406@gmail.com> + 99 others); Tue, 1 Nov 2022 11:02:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231282AbiKAPBt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 1 Nov 2022 11:01:49 -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 8B0561CFD4 for <linux-kernel@vger.kernel.org>; Tue, 1 Nov 2022 07:57:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667314606; 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=X90HdBpZHRlpEK78X14jzV2xZFPi7hDj+jPQpLmDwa4=; b=DTt9jmhHUFlstmiz5Gd64ndWc7iS875xOcU+guvEWa6BKLftqcI4TGTRF6ZEvERDPQzTQb etSLJVslEjFIL/SNfrriPiqfw2OBJI//3AzUj37in95vHVJx3+mlj7W6miSAM+iZ9g0pCx MD2jqhmC9pcWdeLYesPTbFMJCTBmRSA= 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-630-1UUHtVpaN869W--wioRrpg-1; Tue, 01 Nov 2022 10:56:40 -0400 X-MC-Unique: 1UUHtVpaN869W--wioRrpg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5A7B587B2AF; Tue, 1 Nov 2022 14:56:40 +0000 (UTC) Received: from ovpn-194-149.brq.redhat.com (ovpn-194-149.brq.redhat.com [10.40.194.149]) by smtp.corp.redhat.com (Postfix) with ESMTP id 16443C2C8D8; Tue, 1 Nov 2022 14:56:37 +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 v13 39/48] KVM: selftests: Sync 'struct hv_vp_assist_page' definition with hyperv-tlfs.h Date: Tue, 1 Nov 2022 15:54:17 +0100 Message-Id: <20221101145426.251680-40-vkuznets@redhat.com> In-Reply-To: <20221101145426.251680-1-vkuznets@redhat.com> References: <20221101145426.251680-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.8 X-Spam-Status: No, score=-3.1 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?1748306493994200280?= X-GMAIL-MSGID: =?utf-8?q?1748306493994200280?= |
Series |
KVM: x86: hyper-v: Fine-grained TLB flush + L2 TLB flush features
|
|
Commit Message
Vitaly Kuznetsov
Nov. 1, 2022, 2:54 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> Reviewed-by: Sean Christopherson <seanjc@google.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;