From patchwork Mon Apr 12 13:29:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12198055 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_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,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 26F3DC43462 for ; Mon, 12 Apr 2021 13:30:35 +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 BAC806128C for ; Mon, 12 Apr 2021 13:30:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BAC806128C 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.109090.208179 (Exim 4.92) (envelope-from ) id 1lVwdm-0008Sv-K2; Mon, 12 Apr 2021 13:30:10 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 109090.208179; Mon, 12 Apr 2021 13:30:10 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lVwdm-0008So-Gf; Mon, 12 Apr 2021 13:30:10 +0000 Received: by outflank-mailman (input) for mailman id 109090; Mon, 12 Apr 2021 13:30:09 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lVwdl-0008Sj-Pv for xen-devel@lists.xenproject.org; Mon, 12 Apr 2021 13:30:09 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 07fc2fe3-f9ad-4395-8bb5-1e20967ca581; Mon, 12 Apr 2021 13:30:08 +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: 07fc2fe3-f9ad-4395-8bb5-1e20967ca581 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1618234208; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=SEhjqU5Fjs4qWLmiy+foXvDMNT/NhTSiDpRYi7ybHoQ=; b=TrXN0cpcPpNRnFpWjBqQadncQ/basvSQe/VJtx2j7U8RLrMWko/0vKMf 72Eg7GvlkAc1z6Lkxz2dyouxKj8M0Y0BiD2dmTbrU/cBGPBxVjwjihUx8 4U9Uby4qhJAURqN73FPAyxuQnU/+NCW+Cr+EStmIUGZt8fuHzWVkpevqG E=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: J9wtclQeZNsFoPL8LnC9yUg/SiCbWXdfGqT0dR75vVERw3Aot+DbaiA/4mwF2f3y27u7UsSaEh PsMyMlxlUxjyfmcSCwICLNYWZwf6h+6ElRAZAMWbCLnR02ZCuHhQOugOGJGLcN3H/nmEz9AuL0 N5jU8AUQpbZI9K3kxmrhiok7yvaHXZDx/nUrVgoT50xMXyJCyJs1diKhrllCi5ZuInH7Ina35P 6b3uG78qYgtoshMCw0q/lhUHrYK7hX0s917sy/X47efrs4PJuqpzZOHMBhnpnk+8noMkPBQW/V oZ0= X-SBRS: 4.0 X-MesageID: 41232825 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:vSPTFqCL8J965uDlHegktseALOonbusQ8zAX/mhLY1h8btGYm8 eynP4SyB/zj3IrVGs9nM2bUZPsfVr1zrQwxYUKJ7+tUE3duGWuJJx/9oeK+VfdMgXE3Kpm2a 9kGpIUNPTZEUV6gcHm4AOxDtYnx529/Lq1gPrFpk0CcShDd7xg4wBlCgySD01xQ018CYAkEY eHouxdpzShfnwTB/7LZEUtde7FutHNidbacQcLbiRXlDWmoDu05NfBYmGl9zgEVTcn+8ZYzU HgsyjUopquqOu6zBi07R6v071zlMH6wtVOQOyA4/JlTQnEsQqjaIR/V7DqhllczI7OmTVa9a ipnz4aM85+62zccyWOmDSF4Wjd+Q0j9mP4zhugiWbjyPaJMQ4SMdZLho5Sb3LimjAdlex7uZ g7p16xht58KCKFpyjm/t7OTR0CrDvEnVMS1cQ3vjhkUIMSZKU5l/1uwGplVLsnJQrm9ZsmG/ VyAMz56OxNeV2XBkqpylVH8ZiBeE0PEhCPRVUrp9GP0zNLgXx160cD3sQQkh47heUAYqgByO LePqtykrZSCucQcKJmHe8EBfC6E2rXXHv3QSGvCGWiMYxCAmnKoZLs+rk5jdvaM6Ag/d8Xtr yESk9SsW4pYULpDqS1rft22yGIZF/4cSXmy8lY6ZQ8kKb7XqDTKiGGSEojiY+JpOgeGNTSX7 KIMppQKfnlMGf+BO9yrl3DcqgXDUNbfNweu949VV7LiNnMMJfSreDecOzePv7EDSskcnmXOA pcYBHDYOF7qmy7UH7xhxbcH1n3fFbkxIl9FKjB8/JW4JQRN7dLrhMehT2Cl562AAwHlpZzUF p1IbvhnK/+j3Kx53zw9Gls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N9yaNvMnCxQXfhbHOMPlTw1rYpMxReeCgS4tRuqBrINK8QkJ+ii0JisDQgGy A1qovbV1r3eHG3FdfqKiqtG8nwKNluY+xJMm5GC3KtLhzLltARSR3PEe0RlimEqzMrBaKUPL mhbx/YJJ4R/LYIM6iperWgv671p0Vk3kBXidil1Vq4oZtRnI+mDz85l8kye69oKQ+2/CF+89 eaUA7VJbEN7DvYtHPs5E1jVYsr6jVQ51IbqycWED6vHPWpSCha1Xs74q6sfTYfz8mZT9ZTrC PunX6N0UOmSzy8AQ2UQLsK7Gsu9AHdBKTgn3b/VYbQGnlpiY+ROJb8rDH90QDCodWHkX3lrx tolU5RWB00zh39ZqViN17mi3kANRxiDxVtlxfn5aoH/mEiukM+aDwWQ6A4jVbUNSw= X-IronPort-AV: E=Sophos;i="5.82,216,1613451600"; d="scan'208";a="41232825" From: Anthony PERARD To: CC: Laszlo Ersek , Jordan Justen , Ard Biesheuvel , , Anthony PERARD , Julien Grall Subject: [PATCH v3 0/7] OvmfXen: Set PcdFSBClock at runtime Date: Mon, 12 Apr 2021 14:29:56 +0100 Message-ID: <20210412133003.146438-1-anthony.perard@citrix.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Patch series available in this git branch: git://xenbits.xen.org/people/aperard/ovmf.git br.apic-timer-freq-v3 Changes in v3: - typos and codying style Changes in v2: - main change is to allow mapping of Xen pages outside of the RAM see patch: "OvmfPkg/XenPlatformPei: Map extra physical address" - that new function allows to map the Xen shared info page (where we can find information about tsc frequency) at the highest physical address allowed. Hi, OvmfXen uses the APIC timer, but with an hard-coded frequency that may change as pointed out here: https://edk2.groups.io/g/devel/message/45185 <20190808134423.ybqg3qkpw5ucfzk4@Air-de-Roger> This series changes that so the frequency is calculated at runtime. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2490 There is also one cleanup patch that has nothing to do with the rest. Cheers, Anthony PERARD (7): OvmfPkg/XenResetVector: Silent a warning from nasm MdePkg: Allow PcdFSBClock to by Dynamic OvmfPkg/IndustryStandard/Xen: Apply EDK2 coding style to XEN_VCPU_TIME_INFO OvmfPkg/IndustryStandard: Introduce PageTable.h OvmfPkg/XenPlatformPei: Map extra physical address OvmfPkg/XenPlatformPei: Calibrate APIC timer frequency OvmfPkg/OvmfXen: Set PcdFSBClock MdePkg/MdePkg.dec | 8 +- OvmfPkg/OvmfXen.dsc | 4 +- OvmfPkg/XenPlatformPei/XenPlatformPei.inf | 4 + .../IndustryStandard/PageTable.h} | 117 +------- OvmfPkg/Include/IndustryStandard/Xen/xen.h | 17 +- .../BaseMemEncryptSevLib/X64/VirtualMemory.h | 143 +--------- OvmfPkg/XenPlatformPei/Platform.h | 10 + OvmfPkg/XenPlatformPei/Platform.c | 1 + OvmfPkg/XenPlatformPei/Xen.c | 252 ++++++++++++++++++ OvmfPkg/XenResetVector/Ia32/XenPVHMain.asm | 2 +- 10 files changed, 287 insertions(+), 271 deletions(-) copy OvmfPkg/{Library/BaseMemEncryptSevLib/X64/VirtualMemory.h => Include/IndustryStandard/PageTable.h} (60%)