From patchwork Thu Mar 25 15:47:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12164497 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,MIME_BASE64_TEXT, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B041DC433DB for ; Thu, 25 Mar 2021 15:47:53 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 65C77619A3 for ; Thu, 25 Mar 2021 15:47:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 65C77619A3 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.101430.194066 (Exim 4.92) (envelope-from ) id 1lPSCs-0007nK-NP; Thu, 25 Mar 2021 15:47:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 101430.194066; Thu, 25 Mar 2021 15:47:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lPSCs-0007nA-JT; Thu, 25 Mar 2021 15:47:34 +0000 Received: by outflank-mailman (input) for mailman id 101430; Thu, 25 Mar 2021 15:47:33 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lPSCr-0007aB-F3 for xen-devel@lists.xenproject.org; Thu, 25 Mar 2021 15:47:33 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 91115468-f32f-492c-94d9-9f0247d5b79e; Thu, 25 Mar 2021 15:47:21 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 91115468-f32f-492c-94d9-9f0247d5b79e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1616687241; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4G0liXTRoDoxxIpwz1j4AW2gX9FwMKi9LjHo2rv5814=; b=UFmXr3e+um0gQHcr6EYuUUR3wJ/DwqqAIX7cUKtC/i4WriTFs6eMSA5D VBuTfzcP4mv5bASl/rewfgwzTUgsljlaEgM9YibipzxOmTBLvwOykEdxV thJQRGFlKSSSgP0G/fW4NgEPmX4CCjtusJxsQ3uHBcYGLyyfESxoCYYFZ U=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: d5zVYAoBaPH2rc92zSFHnUOB+hyEuPfKp1nE0rWC6EKm1OIMuGPyJsJZyqI1QpTcbxsGN+idti 1hIfE8DfuOh3zPTFz4dXZ03ImCfsKDfxOSRLCvqtDV4EAv+ICVgXsnoqM8gALRXMMc9fAJa7po 5j1cDUWWU2F8z5a3kODXlAv2G/yYic+Dvv2KrrVl4z25JUUML4YGpNIJ7HeRt+TjmADGxXa8uw SZhvxAsp+B9kdKZuOTT6eP+29qqOyfJ+6/LLcnq1YG6S3LEf4GSE9grPaWKgRQcNcxPk3Pe4vE vBc= X-SBRS: 5.1 X-MesageID: 40500442 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:tWIFRqDV8spf94blHeh+sceALOonbusQ8zAX/mhsVB1YddGZnc iynPIdkST5kioVRWtIo729EYOLKEm9ybde544NMbC+GDT3oWfAFvAH0aLO4R3FXxf/+OlUyL t6f8FFYuHYIFBmga/BjzWQPM0nxLC8npyAocf74zNTQRpxa6dmhj0JbzqzNkFtXgFJCd4YOf Onl6l6jgGtc3gWcci3b0NtN4T+jubGiY78Zlo+DwMngTPksRqT9LX4HxKEty1uMQ9n/LFKyw n4uj283IqPmbWRyhjQ12jchq4m5efJ+594K+GnzuQQIjXooA60aIpmQK3qhkFInMifrGwEvf OJjxA8P9liy365RBDLnTLdnzPO/Rxry3j+xUSWiXHuyPaJOg4SOo56qq9yNj76gnBQ2+1U4e Zw8E+y86dzN1fmmh/w4tDZPisa7XackD4ZvsM4y0BEXZB2Us42kaUvuHl7Pb0nByzA5IUuAI BVfbvhzccTS1+cYnzD11MfueCEbzA2FheCdEAIptaY5ThQhGx41EsV3qUk7w89yK4= X-IronPort-AV: E=Sophos;i="5.81,277,1610427600"; d="scan'208";a="40500442" From: Anthony PERARD To: CC: , Jordan Justen , Anthony PERARD , "Ard Biesheuvel" , Laszlo Ersek , Julien Grall Subject: [PATCH v2 3/7] OvmfPkg/IndustryStandard/Xen: Apply EDK2 coding style to XEN_VCPU_TIME_INFO Date: Thu, 25 Mar 2021 15:47:09 +0000 Message-ID: <20210325154713.670104-4-anthony.perard@citrix.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210325154713.670104-1-anthony.perard@citrix.com> References: <20210325154713.670104-1-anthony.perard@citrix.com> MIME-Version: 1.0 We are going to use new fields from the Xen headers. Apply the EDK2 coding style so that the code that is going to use it doesn't look out of place. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2490 Signed-off-by: Anthony PERARD Reviewed-by: Laszlo Ersek --- Notes: v2: - fix case of Tsc* field OvmfPkg/Include/IndustryStandard/Xen/xen.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/OvmfPkg/Include/IndustryStandard/Xen/xen.h b/OvmfPkg/Include/IndustryStandard/Xen/xen.h index e55d93263285..79a4e212e7c2 100644 --- a/OvmfPkg/Include/IndustryStandard/Xen/xen.h +++ b/OvmfPkg/Include/IndustryStandard/Xen/xen.h @@ -183,10 +183,10 @@ struct vcpu_time_info { * The correct way to interact with the version number is similar to * Linux's seqlock: see the implementations of read_seqbegin/read_seqretry. */ - UINT32 version; + UINT32 Version; UINT32 pad0; - UINT64 tsc_timestamp; /* TSC at last update of time vals. */ - UINT64 system_time; /* Time, in nanosecs, since boot. */ + UINT64 TscTimestamp; /* TSC at last update of time vals. */ + UINT64 SystemTime; /* Time, in nanosecs, since boot. */ /* * Current system time: * system_time + @@ -194,11 +194,11 @@ struct vcpu_time_info { * CPU frequency (Hz): * ((10^9 << 32) / tsc_to_system_mul) >> tsc_shift */ - UINT32 tsc_to_system_mul; - INT8 tsc_shift; + UINT32 TscToSystemMultiplier; + INT8 TscShift; INT8 pad1[3]; }; /* 32 bytes */ -typedef struct vcpu_time_info vcpu_time_info_t; +typedef struct vcpu_time_info XEN_VCPU_TIME_INFO; struct vcpu_info { /* @@ -234,7 +234,7 @@ struct vcpu_info { #endif /* XEN_HAVE_PV_UPCALL_MASK */ xen_ulong_t evtchn_pending_sel; struct arch_vcpu_info arch; - struct vcpu_time_info time; + struct vcpu_time_info Time; }; /* 64 bytes (x86) */ #ifndef __XEN__ typedef struct vcpu_info vcpu_info_t; @@ -250,7 +250,7 @@ typedef struct vcpu_info vcpu_info_t; * of this structure remaining constant. */ struct shared_info { - struct vcpu_info vcpu_info[XEN_LEGACY_MAX_VCPUS]; + struct vcpu_info VcpuInfo[XEN_LEGACY_MAX_VCPUS]; /* * A domain can create "event channels" on which it can send and receive @@ -299,6 +299,7 @@ struct shared_info { }; #ifndef __XEN__ typedef struct shared_info shared_info_t; +typedef struct shared_info XEN_SHARED_INFO; #endif /* Turn a plain number into a C UINTN constant. */