From patchwork Mon Apr 12 13:29:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12198051 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.0 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 61141C43460 for ; Mon, 12 Apr 2021 13:30:33 +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 E775461288 for ; Mon, 12 Apr 2021 13:30:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E775461288 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.109091.208191 (Exim 4.92) (envelope-from ) id 1lVwdp-0008Ty-TB; Mon, 12 Apr 2021 13:30:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 109091.208191; Mon, 12 Apr 2021 13:30:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lVwdp-0008Tr-PS; Mon, 12 Apr 2021 13:30:13 +0000 Received: by outflank-mailman (input) for mailman id 109091; Mon, 12 Apr 2021 13:30:12 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lVwdo-0008Ti-K4 for xen-devel@lists.xenproject.org; Mon, 12 Apr 2021 13:30:12 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 27ee8b5d-b582-442c-b466-945de4eadc47; Mon, 12 Apr 2021 13:30:11 +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: 27ee8b5d-b582-442c-b466-945de4eadc47 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1618234211; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4G0liXTRoDoxxIpwz1j4AW2gX9FwMKi9LjHo2rv5814=; b=GjvIbaKj1nJHGZIrrRt6ENx5DQ1kJDQnk89Ul5a0cPFGnWmleOpZdlrz 0IJyC3tRy31fm3ijItg/K+fACOBwxb2RMbZNcxgER5y1C6Z4zu5gi2PGT gj8v0l8jcY0kE+UiscTmC/HwYwvwP09K7dw/yHzSbCsHw+0AgVD1iWbgO 4=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 2F3sBJWOu/g2rgQckHxWIr4DiDKUxjDWwXZQZ/oS7/dorTqiH1kfmf72VPIe1lzKCePoH1YyAh qG9nCqSXOTBDBWwyR1yytlnZRU2rfU2UyvOsF/1yjWpFHGDU9I1pcliEdkzSsaD9iplAcPxsYR HTvwaKUWi1F1y7CVh79nXY/d5c0dWC7ugQ9ligUov1+JC4XwrWrxvVZgHYuqhOZprvLJdL0ZOM +nsIaEdbn6YPNRNMoU9u89+a/IO1Geh353YV4Ow7aI5AM3IlSRrPtMCvZ/LS7wWJ9/v9Vyjtkq Xeg= X-SBRS: 4.0 X-MesageID: 41522596 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:YvfPLa5MyhXGyDZlUgPXwEvXdLJzesId70hD6mlaY3VuHfCwvc aogfgdyFvIkz4XQn4tgpStP6OHTHPa+/dOkO4sFJ2lWxTrv3btEZF64eLZskTdMgD36+I178 ZdWodkDtmYNzVHpOb8pDK1CtMxhOSAmZrY59v261dIYUVUZ7p77wF/YzzrdnFeYAVdH5I2GN 69y6N8xwaIQngcYsSlCnRtZYGqzLf2vanrbhIcCxks5BPmt0LM1JfAHwWFxRBbajtTwN4ZgA 74ujbk7aauuezT8HHh/lLUhq47pPLRjv9KBMmBkaEuW1bRtjo= X-IronPort-AV: E=Sophos;i="5.82,216,1613451600"; d="scan'208";a="41522596" From: Anthony PERARD To: CC: Laszlo Ersek , Jordan Justen , Ard Biesheuvel , , Anthony PERARD , Julien Grall Subject: [PATCH v3 3/7] OvmfPkg/IndustryStandard/Xen: Apply EDK2 coding style to XEN_VCPU_TIME_INFO Date: Mon, 12 Apr 2021 14:29:59 +0100 Message-ID: <20210412133003.146438-4-anthony.perard@citrix.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412133003.146438-1-anthony.perard@citrix.com> References: <20210412133003.146438-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. */