From patchwork Mon Oct 2 12:59:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 114601 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp653604qgn; Mon, 2 Oct 2017 06:02:00 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDjnkxhvSuaolOgCc3VxpQDFMHGCvwKdvlWlKa7fuYI635HvpFmyTzc5bafahwB5Nbc2Xcc X-Received: by 10.202.239.138 with SMTP id n132mr5845728oih.301.1506949318586; Mon, 02 Oct 2017 06:01:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506949318; cv=none; d=google.com; s=arc-20160816; b=QPkj9/fC3wgX6siS7RAfdbv8nxG72+C1cSgUk8wJRAipmDF1xhOTgXNyc5UOiaea7A JUuj2SrLW9o6Wii5o+TTu+YiOFxk8tSMDaaa7BKKxWauZ+B8/zEfaHc201Tkxlht9LPy YcCIeM2Ji35uS2Q+cYb6/wTA/bLGZ6pRaIjcT3jARxB/FCB+skTj3F6R/2ecip7irR9G gSFwyHTH8FQ1dlhzNrtQvsVQMCF3detS0lwpgj66oyZIccTsIyN2wIv1KT8uEGM+1NHX sJGwGOBnd4WlGOmyoxNwGfrnAooWs/78iH4xCWhlLBufBSk7W1MxNDVMkIMBYj8+uCHK wgRA== 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=h2I/l80nYm+EbDsL0gIbV4bqo1oy2g6Xmlf7JjTPPcY=; b=hrXNHl3Ue0hLURJ7PYFEpXCVI4EKvUOVwKfubpgNcIH2rg6U6eLQPJqjPcMecsP7Sm RhBXy4XPfgFmgyv5U8Zd0J+CEyExBisdDenInVtzIBLRxvpcQwwlNMf9CTXokOWrRRT9 vp7HqqyeT0ypGPaguZ0D3D6iez9/2XJuDnjiMmqtl0msYgqUiYh4fnksZRAge6iu5GJk s/LMOPKjN6aQGiqz93WDsRkFMEuM1c+V0WZIjn2KUuf9eVQw/aOknSNbwUIN10rJEge7 WXNXvPNOjeeXM+37eaoesJ4iz6sQMnv3fY6mnLfyyIrnNb8CCCBREBCoAMeIkkZ/WTlp +jTw== 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 q64si9046374iof.60.2017.10.02.06.01.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Oct 2017 06:01:58 -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 1dz0KC-0003bv-0D; Mon, 02 Oct 2017 12:59:56 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dz0KA-0003bd-JJ for xen-devel@lists.xen.org; Mon, 02 Oct 2017 12:59:54 +0000 Received: from [193.109.254.147] by server-5.bemta-6.messagelabs.com id 3E/BA-03454-94832D95; Mon, 02 Oct 2017 12:59:53 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrILMWRWlGSWpSXmKPExsVysyfVTdfN4lK kwY0eQYslHxezODB6HN39mymAMYo1My8pvyKBNePsqW/sBdMEK3p2X2BrYHzG28XIxSEksIlR Ytanh+wQzmlGiX9Lm9m6GDk52AQ0Je58/sQEYosISEtc+3yZEaSIWeAok8T0pUvBioQFLCSO9 v4Hs1kEVCXmzjrACmLzClhKXDu5gBHElhCQl9jVdpF1AiPnAkaGVYzqxalFZalFuuZ6SUWZ6R kluYmZObqGBmZ6uanFxYnpqTmJScV6yfm5mxiBHmMAgh2MMy/7H2KU5GBSEuVlNrwUKcSXlJ9 SmZFYnBFfVJqTWnyIUYaDQ0mCV8McKCdYlJqeWpGWmQMMHZi0BAePkgivKUiat7ggMbc4Mx0i dYrRmOPYpst/mDg6bt79wyTEkpeflyolzvvfDKhUAKQ0ozQPbhAspC8xykoJ8zICnSbEU5Bal JtZgir/ilGcg1FJmLcWZCFPZl4J3L5XQKcwAZ0yp+sCyCkliQgpqQZGZ+OfIuVZUn2POFO77x 9Tlpxgr3xyLb/JdLZghp5Lp5qKPkrl9fAV2GRdtu48vsz7Y0rGjpurYvLd93ovj4u6Eqj4U/D 57lUugXMY1gYHXf4TJVEW2c35uOT2vSNfkvkTRRjmbOvPP/B61tRUjyaRf9dmNG858f/FKW4r 9yUPjH76molqSjoosRRnJBpqMRcVJwIAKDAN2GQCAAA= X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-13.tower-27.messagelabs.com!1506949189!110010693!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 11444 invoked from network); 2 Oct 2017 12:59:50 -0000 Received: from usa-sjc-mx-foss1.foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-13.tower-27.messagelabs.com with SMTP; 2 Oct 2017 12:59:50 -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 306B280D; Mon, 2 Oct 2017 05:59:49 -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 865C53F53D; Mon, 2 Oct 2017 05:59:47 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Mon, 2 Oct 2017 13:59:26 +0100 Message-Id: <20171002125941.11274-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 v3 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 has 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(-)