From patchwork Wed Sep 13 17:59:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 112462 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp1226544qgf; Wed, 13 Sep 2017 11:02:21 -0700 (PDT) X-Google-Smtp-Source: AOwi7QC7z9yimUgWWSNEX3FapBmoTAieLd6ror94G98BJhHe+3VE5UBoDhfe4UFpcInRNHTKhqqb X-Received: by 10.36.14.87 with SMTP id 84mr5900567ite.71.1505325741495; Wed, 13 Sep 2017 11:02:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505325741; cv=none; d=google.com; s=arc-20160816; b=gs5rJVt49oJsvGr3LjMazP4o9PnAtI0Fy45/V1U+xkQsc716kRHFn5XUl2+U9luJN1 vLmPbcHLYzeyIbTYfb/U66QqtoKJ6JCqtCLB016sWxhk73W0amxT3zxIPjS5B2f3jjuU m3EZZhJecGOmg68ga9cX+HG9JhxnElpLYIjk4535KUyfy2PIQgfpO3/FoOoT3xAJer4C mAB66NyAjplVlXnt5dYlsnl4p8dgIgs5apQKclaVeUf1bSmz7MFUv/FLuZ+pBdXft+GD 4BFRJNt79Ag7BqqlCQ/AarG9aHkLYj6bHt8QaVdxDnv5NfjzVy03xTDssVCVmj08/CHg wSjg== 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=DgKPGt0OqEULxUniER+NsixFrVhU+Ik+szO+rh2VBh8=; b=TadztjGr5yKqe2qPHgZPdec58Im+pkL5+FGlUYxJA/JZ3/sHMm6FCFoPwwi7EXLu78 O8BIAGIUH3HKdkdcXdcEytE/HwaPeTBd5N93SdmBrQLI3oxth0BJB4/ITVzhlXcKVuul AxWfjeXfqJkSPYhAZnvVuYeUHMgYCYeRtq88eOZzFT106J6P8tcwNniZv3NcEZCwiI1w MAk1B2QTUbwt/BEwim487XlLWu8d9cJ7xdqVhRnZVY2c8CsBNq6tzv3ACe4UZ9zXRTD8 9a3nMIpbnRD33BPfN1Q6g/ksnDzHHKe85BAfuX4jz+MSrfB5iXHJOBVCaoBxfX5Mcqot VmIg== 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 y68si2954424iod.214.2017.09.13.11.02.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Sep 2017 11:02:21 -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 1dsBxH-0007pP-5x; Wed, 13 Sep 2017 18:00:07 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dsBxF-0007fT-24 for xen-devel@lists.xen.org; Wed, 13 Sep 2017 18:00:05 +0000 Received: from [85.158.139.211] by server-13.bemta-5.messagelabs.com id 27/79-01754-42279B95; Wed, 13 Sep 2017 18:00:04 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrILMWRWlGSWpSXmKPExsVysyfVTVexaGe kwdf7KhZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8ajgx/YC6YIVnzawdnA+IS3i5GLQ0hgM6PE 1551jBDOaUaJX2f+sXUxcnKwCWhK3Pn8iQnEFhGQlrj2+TJYEbPAUSaJ6UuXghUJC5hKPP94D 6yIRUBV4va6ecwgNq+ApcTv72sYQWwJAXmJXW0XWScwci5gZFjFqFGcWlSWWqRrZKGXVJSZnl GSm5iZo2toYKqXm1pcnJiempOYVKyXnJ+7iRHosXoGBsYdjH2r/A4xSnIwKYny7tXdGSnEl5S fUpmRWJwRX1Sak1p8iFGGg0NJgnd2AVBOsCg1PbUiLTMHGDowaQkOHiUR3rcgad7igsTc4sx0 iNQpRmOOY5su/2Hi6Lh59w+TEEtefl6qlDjvepBSAZDSjNI8uEGwkL7EKCslzMvIwMAgxFOQW pSbWYIq/4pRnINRSZh3K8gUnsy8Erh9r4BOYQI65czpHSCnlCQipKQaGNWuvL2TmvbTRXCWx0 zvH00v/6zZYel4VPmBsDYrc3aomWLVfInzexuOLstk+r2jIniVU4b2n9c1pV/mKp6utBG8Ne1 a/ofCyMQ5GmUn4hhUUxjF7jpdO7uXn3OTwqKjyS+LctZfyJUv79y2Z/nHirVNf7a5TdvqNot9 STSzw8SsO/ZCq+tXMCuxFGckGmoxFxUnAgCb49v8ZAIAAA== X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-15.tower-206.messagelabs.com!1505325601!97385510!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 44697 invoked from network); 13 Sep 2017 18:00:01 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-15.tower-206.messagelabs.com with SMTP; 13 Sep 2017 18:00:01 -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 AB06D1435; Wed, 13 Sep 2017 11:00:00 -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 081873F483; Wed, 13 Sep 2017 10:59:58 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 13 Sep 2017 18:59:38 +0100 Message-Id: <20170913175953.16942-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 00/15] 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 version 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 (15): 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/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 | 19 +- 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, 370 insertions(+), 312 deletions(-) Acked-by: Andrew Cooper (with either my