From patchwork Wed Oct 4 18:15: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: 114789 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp3428571qgn; Wed, 4 Oct 2017 11:17:37 -0700 (PDT) X-Received: by 10.36.22.84 with SMTP id a81mr20674454ita.55.1507141057765; Wed, 04 Oct 2017 11:17:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507141057; cv=none; d=google.com; s=arc-20160816; b=VmvliJ12SbdcGWnh+KwEEV+fPQhM7WaJmXgnSx8KFRRUV5qE7wwVFhcGKxcyF07z4S mla25CrxmIK2om6+1Xnzw/JAAeaNQueXQbeV2ioQFMZlWu4jNm+Oyb9MxW22MD25KjU5 5qh7Drn+flDgroNVKuSOWAGBNnPTdtVthlluPFi2jtZdMmrU/LDM3vEiVgRNFGfojkl4 bk+75MyLrn5X4HYAC9nutsm1YjdBYHbDbD+Wf3rwHB2JdwDEHFZJPH5kUtOFp3TYocg9 yp8qE4xHEKO1jtsXO8GVdCyEB0dMf7gcM9svTwDZMlxTq30nqFDypTjUHMOz1lOTY2Ek VWcw== 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:dkim-signature :arc-authentication-results; bh=4GnTX8Eo3PystqIYhgR8OagjHK0mMWKGvyO6suHf3sM=; b=R83GKWqx4Jh5wXE3VxoPMBPKtM52eRzMzMfbc+K33/ti8NSWZDkbHftmj54ihP0I7E LgX+6+/LmQc2oJSJACviGxiOhVmMU/KIeC/zT/+RAL1VgPy+dwQyIwukV8XY+YDkFSAf nJb+IfpvGkEC7LACvlEk6St2KZ3jQqj92Uc3Vc72QWuRaznfTMmxQzENcfB2d2OB3oB6 /k58NY5LAMg1cTmeBqbNHqOaqSazEVomcfjyBXh//84uq6IlVPHMWgQ6s/Fx95zMVBbe XyBaWiuPVxKJNKvPZqCyjOQKpIMJv75H9ONlxlXqxwAlAI7b08DyyVWjFZtLDRldu6Sd D8Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=PjiYRmHn; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id n187si11533295ite.149.2017.10.04.11.17.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Oct 2017 11:17:37 -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; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=PjiYRmHn; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.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 1dzoCm-0001yh-Kk; Wed, 04 Oct 2017 18:15:36 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzoCm-0001yb-BD for xen-devel@lists.xen.org; Wed, 04 Oct 2017 18:15:36 +0000 Received: from [193.109.254.147] by server-9.bemta-6.messagelabs.com id 24/F6-03422-74525D95; Wed, 04 Oct 2017 18:15:35 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCIsWRWlGSWpSXmKPExsVyMfTGFl031au RBreeWlks+biYxYHR4+ju30wBjFGsmXlJ+RUJrBln3psUzNSqePvzJXsD4zXZLkYuDiGBSYwS z3++YwVxWATamSWufV8J5HBySAi8Y5F40WYHYRdJnNg2gQ3CTpPYunUWM4RdJTG75yhjFyMH0 CQ1iTVvoiCG9jNJzL3QwAYSZxPQkVg3oxakXERAWuLa58uMIDXMAo/ZJKb9XsoIkhAWCJX40r KcBcRmEVCV2Ln7NJjNK2At8fj+KhaIXfISu9ousk5g5F/AyLCKUaM4tagstUjXyFgvqSgzPaM kNzEzR9fQwEwvN7W4ODE9NScxqVgvOT93EyMwfBiAYAfjn/mBhxglOZiURHlnyV+NFOJLyk+p zEgszogvKs1JLT7EKMPBoSTBG6QClBMsSk1PrUjLzAEGMkxagoNHSYQ3BSTNW1yQmFucmQ6RO sVoz3HhzqU/TBzHNl0Gkgf23AKSHTfv/mESYsnLz0uVEudtBWkTAGnLKM2DGwqLvEuMslLCvI xAZwrxFKQW5WaWoMq/YhTnYFQS5t2pDDSFJzOvBG73K6CzmIDOmtN0BeSskkSElFQDo9V5g8v XzVI1bF81/9toV3mMq0l1yoWGDj39+X58qrMPCLj8FWzniD7KNKeI18S36MpDIb/Ssx2Fv7Nv mDe//NL645r6mfVHu3IqZ7HsUlvdpemmbryC36Jn70NN0zWSt803lZ+4+e1R0U7Dd8vW/Axla 7lT+F3p8p/X8yQ4L6vPtVc8M1tZWImlOCPRUIu5qDgRAA/xEsG3AgAA X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-11.tower-27.messagelabs.com!1507140934!88128606!1 X-Originating-IP: [209.85.216.180] 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 2007 invoked from network); 4 Oct 2017 18:15:34 -0000 Received: from mail-qt0-f180.google.com (HELO mail-qt0-f180.google.com) (209.85.216.180) by server-11.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 4 Oct 2017 18:15:34 -0000 Received: by mail-qt0-f180.google.com with SMTP id o52so20888771qtc.9 for ; Wed, 04 Oct 2017 11:15:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=PVq+1wjV/PA0k5JZsuLlRtWrBSuHdyFxYCZ286KPhxI=; b=PjiYRmHnK5GRsvhUK2y6DGSdcQOAnMIL50MqXKRnXh56JsGDR5O0EizetRAQcr6jLU hqugdbh5wurMxFa+/UIl9e2SCx6zgm4LN8+zeZSKdBYWmUfGs9/E0JRrzVbO+Tz4JEB+ wYZPfm7ouAH+PeWwRJFKIZnfsl27Jt74ZYN0k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=PVq+1wjV/PA0k5JZsuLlRtWrBSuHdyFxYCZ286KPhxI=; b=Ldb25aaRXMTWwkfXYY7OnTvux3gvrC/iAsNslSPrSGxjjFuRyZWGp2C7jfNUqzbEwl fVC4w5LtXF/vRErGoCwBdU0z/1n3esx4MjbLNkvvWugIO/7lwBILUVvZ9qxnREXUZEtl byULz7bczVOktTJMRUwj8r/OnfmQxsXNUzm8suNRW2846vEjeePot+1lZHZS7SQQ9Ijz +T53kp1mb8SWlzaxYd3jfeMttNHMWphjqERlxEtFSUS4+TpaUXe0Fn/r+F0ru/x3sYBV 5RfJncSJyfNxayD/DCSXe30Mn6n3OxOZOtCfeHjnPM+OcUMbswNC3dZP0ySXvjOazisw fb6g== X-Gm-Message-State: AMCzsaVrdpQmROuxW8OPUJEGtwWd6ptUYhTD6LwDV+TeNnBz5ufaMBq7 GuMrjqvOwaUEZLYkNE7PNkmlpp18QS0MDA== X-Google-Smtp-Source: AOwi7QBl6qHT2cJUOdKTQapJ1/qoO/qrn1WGnN/x7iHSnh8hRsWLdyA+Zouv0owJStOM94QC1v4eUw== X-Received: by 10.237.63.180 with SMTP id s49mr28415354qth.43.1507140933672; Wed, 04 Oct 2017 11:15:33 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com ([2001:41d0:1:6c23::1]) by smtp.gmail.com with ESMTPSA id l188sm10210622qkd.43.2017.10.04.11.15.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Oct 2017 11:15:32 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 4 Oct 2017 19:15:19 +0100 Message-Id: <20171004181526.9405-1-julien.grall@linaro.org> X-Mailer: git-send-email 2.11.0 Cc: Elena Ufimtseva , Kevin Tian , Stefano Stabellini , Wei Liu , Jun Nakajima , Razvan Cojocaru , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Julien Grall , Ian Jackson , Tim Deegan , Julien Grall , Paul Durrant , Tamas K Lengyel , Jan Beulich , Shane Wang , Suravee Suthikulpanit , Boris Ostrovsky , Gang Wei Subject: [Xen-devel] [PATCH 0/7] xen: Convert __page_to_mfn and __mfn_to_page to use typesafe MFN 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, Most of the users of page_to_mfn and mfn_to_page are either overriding the macros to make them work with mfn_t or use mfn_x/_mfn becaue the rest of the function use mfn_t. So I think it is time to make __page_to_mfn and __mfn_to_page using typesafe MFN. The first 6 patches will convert of the code to use typesafe MFN, easing the tree-wide conversion in patch 7. Cheers, Cc: Andrew Cooper Cc: Boris Ostrovsky Cc: Elena Ufimtseva Cc: Gang Wei Cc: George Dunlap Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Julien Grall Cc: Jun Nakajima Cc: Kevin Tian Cc: Konrad Rzeszutek Wilk Cc: Paul Durrant Cc: Razvan Cojocaru Cc: Shane Wang Cc: Stefano Stabellini Cc: Suravee Suthikulpanit Cc: Tamas K Lengyel Cc: Tim Deegan Cc: Wei Liu Julien Grall (7): xen/arm: domain_build: Clean-up insert_11_bank xen/arm32: mm: Rework is_xen_heap_page to avoid nameclash xen/x86: Use maddr_to_page and maddr_to_mfn to avoid open-coded >> PAGE_SHIFT xen/kimage: Remove defined but unused variables xen/xenoprof: Convert the file to use typesafe MFN xen/tmem: Convert the file common/tmem_xen.c to use typesafe MFN xen: Convert __page_to_mfn and __mfn_to_page to use typesafe MFN xen/arch/arm/domain_build.c | 15 ++++++++------- xen/arch/arm/kernel.c | 2 +- xen/arch/arm/mem_access.c | 2 +- xen/arch/arm/mm.c | 2 +- xen/arch/arm/p2m.c | 8 +------- xen/arch/x86/cpu/vpmu.c | 6 +++--- xen/arch/x86/debug.c | 2 +- xen/arch/x86/domain.c | 21 +++++++++++---------- xen/arch/x86/domctl.c | 2 +- xen/arch/x86/hvm/dm.c | 2 +- xen/arch/x86/hvm/dom0_build.c | 6 +++--- xen/arch/x86/hvm/hvm.c | 16 ++++++++-------- xen/arch/x86/hvm/ioreq.c | 6 +++--- xen/arch/x86/hvm/stdvga.c | 2 +- xen/arch/x86/hvm/svm/svm.c | 4 ++-- xen/arch/x86/hvm/viridian.c | 8 ++++---- xen/arch/x86/hvm/vmx/vmcs.c | 2 +- xen/arch/x86/hvm/vmx/vmx.c | 10 +++++----- xen/arch/x86/hvm/vmx/vvmx.c | 2 +- xen/arch/x86/mm.c | 6 ------ xen/arch/x86/mm/guest_walk.c | 6 +++--- xen/arch/x86/mm/hap/guest_walk.c | 2 +- xen/arch/x86/mm/hap/hap.c | 6 ------ xen/arch/x86/mm/hap/nested_ept.c | 2 +- xen/arch/x86/mm/mem_sharing.c | 9 ++------- xen/arch/x86/mm/p2m-ept.c | 4 ++++ xen/arch/x86/mm/p2m-pod.c | 6 ------ xen/arch/x86/mm/p2m.c | 6 ------ xen/arch/x86/mm/paging.c | 6 ------ xen/arch/x86/mm/shadow/common.c | 2 +- xen/arch/x86/mm/shadow/multi.c | 6 +++--- xen/arch/x86/mm/shadow/private.h | 16 ++-------------- xen/arch/x86/numa.c | 2 +- xen/arch/x86/physdev.c | 2 +- xen/arch/x86/pv/callback.c | 6 ------ xen/arch/x86/pv/descriptor-tables.c | 6 ------ xen/arch/x86/pv/dom0_build.c | 6 ++++++ xen/arch/x86/pv/domain.c | 6 ------ xen/arch/x86/pv/emul-gate-op.c | 6 ------ xen/arch/x86/pv/emul-priv-op.c | 10 ---------- xen/arch/x86/pv/grant_table.c | 6 ------ xen/arch/x86/pv/ro-page-fault.c | 6 ------ xen/arch/x86/smpboot.c | 6 ------ xen/arch/x86/tboot.c | 4 ++-- xen/arch/x86/traps.c | 2 +- xen/arch/x86/x86_64/mm.c | 6 ++++++ xen/common/domain.c | 4 ++-- xen/common/event_fifo.c | 2 +- xen/common/grant_table.c | 6 ++++++ xen/common/kimage.c | 25 +++++++++++-------------- xen/common/memory.c | 6 ++++++ xen/common/page_alloc.c | 6 ++++++ xen/common/tmem.c | 2 +- xen/common/tmem_xen.c | 24 ++++++++++++------------ xen/common/trace.c | 6 ++++++ xen/common/vmap.c | 9 +++++---- xen/common/xenoprof.c | 17 +++++++++++------ xen/drivers/passthrough/amd/iommu_map.c | 6 ++++++ xen/drivers/passthrough/iommu.c | 2 +- xen/drivers/passthrough/x86/iommu.c | 2 +- xen/include/asm-arm/mm.h | 22 ++++++++++++---------- xen/include/asm-arm/p2m.h | 4 ++-- xen/include/asm-x86/mm.h | 12 ++++++------ xen/include/asm-x86/p2m.h | 2 +- xen/include/asm-x86/page.h | 32 ++++++++++++++++---------------- xen/include/xen/domain_page.h | 4 ++-- xen/include/xen/tmem_xen.h | 2 +- 67 files changed, 206 insertions(+), 258 deletions(-)