From patchwork Thu Sep 21 12:40:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 113243 Delivered-To: patch@linaro.org Received: by 10.80.163.150 with SMTP id s22csp1845948edb; Thu, 21 Sep 2017 05:42:52 -0700 (PDT) X-Google-Smtp-Source: AOwi7QC1a2DwcwcUM+46EZFXIMNjAcnkxZzMe+4z31AJ3RVxytMLx6sxftqn5X1iXwb6z+18F7Z4 X-Received: by 10.107.139.215 with SMTP id n206mr2842604iod.155.1505997772419; Thu, 21 Sep 2017 05:42:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505997772; cv=none; d=google.com; s=arc-20160816; b=cfj24WZImzM2trISCLs8AHF53mdgD2bAAN/3LXtbW9aWvcb/yNZheyJqC50JIWW42X 2TbezjdjCDwul3gB1TrX8Gh13Eh3mZ16Du4qe1YtghB64B5hWRJKN275mAD+kWNbpHfL xHGHh5S57eIgD49OME8djwFglTK54IadfU34+bx26Rpww40jix/N3fF0D57QnbWncMs/ uX7E1DLcVkcKYlsjMkx9Nzs0LtT/T2vOaR6t6pGoJ4rJ98nSP1cSSnO+jaGeVKV5enRU 8UVjy2PY04WoU56Y0m56T6A5r+sTIDdGtaHiZkndzw3lZdSexrOJ+deGyMntuCDzw235 l9tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:message-id:date:to:from :arc-authentication-results; bh=/50Cc0zCcSurz3lu9E+qYJM/BfB0WPQ8fIRox9Qqhpw=; b=d1rp/dLkHsUencnC6IyQ00uA2wCvjDMXgQP1+HhfnLwh6PYBUDs5t5QXzJKvP0cuFy LbtzbWvpoObM+g8xHccx2UoDjQg0ULMnruAr10ECX3n+FFoJo2GoaugSSNppTo56L+pR WKWgwviXaE6Fcb/0769aXQDOQ5mAlEqO9h5JKjitBZkYN7X0Osung+y5SVbQUrFxQO3F vSgjrCPOd5Fu8q2gazsN9mqKONQOC5MDsinTy2CRag/NgInvM1zo4ebuwtZQGmuH9aGu bRXSclJohJw3N5qy0ztvtFAEORpAFCi5DIXEPU6zcm85PHXLTOYP5y9otcuWkt2FOXtu Q+hw== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id l22si1479218ita.21.2017.09.21.05.42.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Sep 2017 05:42:52 -0700 (PDT) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dv0mg-0001D2-2D; Thu, 21 Sep 2017 12:40:50 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dv0me-0001Cj-LP for xen-devel@lists.xen.org; Thu, 21 Sep 2017 12:40:48 +0000 Received: from [193.109.254.147] by server-11.bemta-6.messagelabs.com id 4B/92-03616-053B3C95; Thu, 21 Sep 2017 12:40:48 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrELMWRWlGSWpSXmKPExsVysyfVTdd78+F Ig+OHrCyWfFzM4sDocXT3b6YAxijWzLyk/IoE1ow/Fz8yFhwRrPj/6zpbA2MvXxcjF4eQwCZG iXkTZ7NCOKcZJZ6t/83WxcjJwSagKXHn8ycmEFtEQFri2ufLjCBFzAJHmSSmL10KViQsYCFx7 PdHdhCbRUBVYvWiDhYQmxcoPmXnQrBmCQF5iV1tF1knMHIuYGRYxahRnFpUllqka2ihl1SUmZ 5RkpuYmaNraGCml5taXJyYnpqTmFSsl5yfu4kR6DMGINjBeHNjwCFGSQ4mJVHed+sORwrxJeW nVGYkFmfEF5XmpBYfYpTh4FCS4OXcBJQTLEpNT61Iy8wBBg9MWoKDR0mEtwkkzVtckJhbnJkO kTrFaMxxbNPlP0wcHTfv/mESYsnLz0uVEuc1BykVACnNKM2DGwQL6kuMslLCvIxApwnxFKQW5 WaWoMq/YhTnYFQS5o0FmcKTmVcCt+8V0ClMQKdkbzgAckpJIkJKqoExJbic7Xi63pKcx2mW6z 4Vnbfof5V58Kjmr/ccVR59iRX2vy8I3l16bb30brdJTyvde299/mN7yffzn//pu27drZsTKf5 Rqp696bjk37cfNnHWzfK8kpt/0uzeWheT51el+NnaX56K7lm4eb7qTBetP1YvN31ZMfPv/o7v HUKhVYUNvCsc+OdOV2Ipzkg01GIuKk4EAE/c/NZlAgAA X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-9.tower-27.messagelabs.com!1505997643!117953498!1 X-Originating-IP: [217.140.101.70] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 7743 invoked from network); 21 Sep 2017 12:40:43 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-9.tower-27.messagelabs.com with SMTP; 21 Sep 2017 12:40:43 -0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BF38F80D; Thu, 21 Sep 2017 05:40:42 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.206.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 20DFC3F58C; Thu, 21 Sep 2017 05:40:40 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Thu, 21 Sep 2017 13:40:19 +0100 Message-Id: <20170921124035.2410-1-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 Cc: Kevin Tian , Tamas K Lengyel , Jan Beulich , Razvan Cojocaru , George Dunlap , Andrew Cooper , Julien Grall , Jun Nakajima Subject: [Xen-devel] [PATCH v2 00/16] xen/x86: Clean-up the PoD code X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" Hi all, I have been attempting to use the PoD code on Arm (it will be sent in a separate series) and spent sometimes to clean-up and switch to typesafe gfn the current code. The PoD code has been tested on Arm (the vervision is slightly different, mostly renaming) and the x86 part as only been built test it. Cheers, Cc: Andrew Cooper Cc: George Dunlap Cc: Jan Beulich Cc: Jun Nakajima Cc: Kevin Tian Cc: Razvan Cojocaru Cc: Tamas K Lengyel Julien Grall (16): xen/x86: p2m-pod: Clean-up includes xen/x86: p2m-pod: Remove trailing whitespaces xen/x86: p2m-pod: Fix coding style for comments xen/x86: p2m-pod: Fix coding style xen/x86: p2m-pod: Avoid redundant assignments in p2m_pod_demand_populate xen/x86: p2m-pod: Clean-up use of typesafe MFN xen/x86: p2m-pod: Use typesafe gfn in p2m_pod_decrease_reservation xen/x86: p2m: Use typesafe gfn for the P2M callbacks get_entry and set_entry xen/x86: p2m: Use typesafe GFN in p2m_set_entry xen/x86: p2m-pod: Use typesafe GFN in pod_eager_record xen/x86: p2m-pod: Clean-up p2m_pod_zero_check xen/x86: p2m-pod: Use typesafe gfn in p2m_pod_zero_check xen/x86: p2m-pod: Use typesafe gfn in p2m_pod_demand_populate xen/x86: p2m-pod: Use typesafe gfn for the fields reclaim_single and max_guest xen/x86: p2m-pod: Rework prototype of p2m_pod_demand_populate xen/x86: mem_access: Fix mis-indented line xen/arch/arm/p2m.c | 3 +- xen/arch/x86/hvm/hvm.c | 2 +- xen/arch/x86/mm/hap/nested_hap.c | 2 +- xen/arch/x86/mm/mem_access.c | 21 +- xen/arch/x86/mm/mem_sharing.c | 7 +- xen/arch/x86/mm/p2m-ept.c | 11 +- xen/arch/x86/mm/p2m-pod.c | 435 +++++++++++++++++++++------------------ xen/arch/x86/mm/p2m-pt.c | 12 +- xen/arch/x86/mm/p2m.c | 139 +++++++------ xen/common/memory.c | 3 +- xen/include/asm-arm/p2m.h | 13 -- xen/include/asm-x86/p2m.h | 23 +-- xen/include/xen/p2m-common.h | 13 ++ 13 files changed, 371 insertions(+), 313 deletions(-)