From: Julien Grall <julien.grall@arm.com>
To: xen-devel@lists.xen.org
Cc: Kevin Tian <kevin.tian@intel.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Wei Liu <wei.liu2@citrix.com>,
Jun Nakajima <jun.nakajima@intel.com>,
Razvan Cojocaru <rcojocaru@bitdefender.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
Julien Grall <julien.grall@arm.com>,
Paul Durrant <paul.durrant@citrix.com>,
Tamas K Lengyel <tamas@tklengyel.com>,
Jan Beulich <jbeulich@suse.com>,
Shane Wang <shane.wang@intel.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Gang Wei <gang.wei@intel.com>
Subject: [PATCH v4 00/16] xen: Convert page_to_mfn and mfn_to_page to use typesafe MFN
Date: Wed, 21 Feb 2018 14:02:43 +0000 [thread overview]
Message-ID: <20180221140259.29360-1-julien.grall@arm.com> (raw)
Hi all,
This series is a rework of "xen: Convert __page_to_mfn and __mfn_to_page to use
typesafe MFN" sent a couple of months ago (see [1]). In this new approach,
the macros __page_to_mfn and __mfn_to_page are completely dropped.
To avoid the last patch (#16) to be a huge patch some files are converted to
use typesafe upfront. I have tried my best to push _mfn/mfn_x as down as
possible in the callers. Some of them was not feasible without major rework,
so I left them aside for now. Contribution to switch Xen code base to MFN
typesafe are more than welcomed.
Note that changes have only been build test it on x86 so far.
Cheers,
[1] https://lists.xen.org/archives/html/xen-devel/2017-11/msg00027.html
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Gang Wei <gang.wei@intel.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Julien Grall <julien.grall@arm.com>
Cc: Jun Nakajima <jun.nakajima@intel.com>
Cc: Kevin Tian <kevin.tian@intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Paul Durrant <paul.durrant@citrix.com>
Cc: Razvan Cojocaru <rcojocaru@bitdefender.com>
Cc: Shane Wang <shane.wang@intel.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: Tamas K Lengyel <tamas@tklengyel.com>
Cc: Tim Deegan <tim@xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>
Julien Grall (16):
xen/tmem: Convert the file common/tmem_xen.c to use typesafe MFN
xen/arm: setup: use maddr_to_mfn rather than _mfn(paddr_to_pfn(...))
xen/arm: mm: Use gaddr_to_gfn rather than _gfn(paddr_to_pfn(...))
xen/arm: mm: Remove unused M2P code
xen/arm: mm: Remove unused relinquish_shared_pages
xen/x86: Remove unused override of page_to_mfn/mfn_to_page
xen/x86: mm: Switch x86/mm.c to use typesafe for virt_to_mfn
xen/mm: Drop the parameter mfn from populate_pt_range
xen/pdx: Introduce helper to convert MFN <-> PDX
xen/mm: Switch map_pages_to_xen to use MFN typesafe
xen/mm: Switch page_alloc.c to typesafe MFN
xen/mm: Switch common/memory.c to use typesafe MFN
xen/grant: Switch {create, replace}_grant_p2m_mapping to typesafe MFN
xen/grant: Switch common/grant_table.c to use typesafe MFN
xen/x86: Switch mfn_to_page in x86_64/mm.c to use typesafe MFN
xen: Convert page_to_mfn and mfn_to_page to use typesafe MFN
xen/arch/arm/domain_build.c | 2 -
xen/arch/arm/kernel.c | 2 +-
xen/arch/arm/mem_access.c | 2 +-
xen/arch/arm/mm.c | 33 ++++----
xen/arch/arm/p2m.c | 10 +--
xen/arch/arm/setup.c | 4 +-
xen/arch/x86/cpu/vpmu.c | 4 +-
xen/arch/x86/domain.c | 21 ++---
xen/arch/x86/domain_page.c | 6 +-
xen/arch/x86/hvm/dm.c | 2 +-
xen/arch/x86/hvm/dom0_build.c | 6 +-
xen/arch/x86/hvm/emulate.c | 6 +-
xen/arch/x86/hvm/grant_table.c | 14 ++--
xen/arch/x86/hvm/hvm.c | 12 +--
xen/arch/x86/hvm/ioreq.c | 4 +-
xen/arch/x86/hvm/stdvga.c | 2 +-
xen/arch/x86/hvm/svm/svm.c | 4 +-
xen/arch/x86/hvm/viridian.c | 6 +-
xen/arch/x86/hvm/vmx/vmcs.c | 2 +-
xen/arch/x86/hvm/vmx/vmx.c | 10 +--
xen/arch/x86/hvm/vmx/vvmx.c | 6 +-
xen/arch/x86/mm.c | 70 ++++++++---------
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/hap/nested_hap.c | 3 -
xen/arch/x86/mm/mem_sharing.c | 5 --
xen/arch/x86/mm/p2m-ept.c | 8 +-
xen/arch/x86/mm/p2m-pod.c | 6 --
xen/arch/x86/mm/p2m-pt.c | 6 --
xen/arch/x86/mm/p2m.c | 6 --
xen/arch/x86/mm/paging.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 | 14 ++--
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 | 16 ++--
xen/arch/x86/pv/iret.c | 6 --
xen/arch/x86/pv/mm.c | 6 --
xen/arch/x86/pv/ro-page-fault.c | 6 --
xen/arch/x86/pv/shim.c | 4 +-
xen/arch/x86/pv/traps.c | 6 --
xen/arch/x86/setup.c | 14 ++--
xen/arch/x86/smpboot.c | 8 +-
xen/arch/x86/tboot.c | 15 ++--
xen/arch/x86/traps.c | 4 +-
xen/arch/x86/x86_64/mm.c | 67 ++++++++--------
xen/arch/x86/x86_64/mmconfig_64.c | 4 +-
xen/common/domain.c | 4 +-
xen/common/efi/boot.c | 2 +-
xen/common/grant_table.c | 131 +++++++++++++++++---------------
xen/common/kimage.c | 6 --
xen/common/memory.c | 66 +++++++++-------
xen/common/page_alloc.c | 58 +++++++-------
xen/common/tmem.c | 2 +-
xen/common/tmem_xen.c | 26 ++++---
xen/common/trace.c | 4 +-
xen/common/vmap.c | 10 +--
xen/common/xenoprof.c | 2 -
xen/drivers/acpi/apei/erst.c | 2 +-
xen/drivers/acpi/apei/hest.c | 2 +-
xen/drivers/passthrough/amd/iommu_map.c | 12 +--
xen/drivers/passthrough/iommu.c | 2 +-
xen/drivers/passthrough/vtd/dmar.c | 2 +-
xen/drivers/passthrough/x86/iommu.c | 2 +-
xen/include/asm-arm/grant_table.h | 11 ++-
xen/include/asm-arm/mm.h | 45 +++--------
xen/include/asm-arm/numa.h | 8 +-
xen/include/asm-arm/p2m.h | 4 +-
xen/include/asm-x86/grant_table.h | 6 +-
xen/include/asm-x86/hvm/grant_table.h | 8 +-
xen/include/asm-x86/mm.h | 12 +--
xen/include/asm-x86/p2m.h | 2 +-
xen/include/asm-x86/page.h | 32 ++++----
xen/include/asm-x86/pv/grant_table.h | 8 +-
xen/include/xen/domain_page.h | 8 +-
xen/include/xen/mm.h | 10 +--
xen/include/xen/pdx.h | 3 +
xen/include/xen/tmem_xen.h | 2 +-
85 files changed, 429 insertions(+), 571 deletions(-)
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next reply other threads:[~2018-02-21 14:02 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 14:02 Julien Grall [this message]
2018-02-21 14:02 ` [PATCH v4 01/16] xen/tmem: Convert the file common/tmem_xen.c to use typesafe MFN Julien Grall
2018-02-21 14:02 ` [PATCH v4 02/16] xen/arm: setup: use maddr_to_mfn rather than _mfn(paddr_to_pfn(...)) Julien Grall
2018-02-21 14:02 ` [PATCH v4 03/16] xen/arm: mm: Use gaddr_to_gfn rather than _gfn(paddr_to_pfn(...)) Julien Grall
2018-02-21 14:02 ` [PATCH v4 04/16] xen/arm: mm: Remove unused M2P code Julien Grall
2018-02-21 14:02 ` [PATCH v4 05/16] xen/arm: mm: Remove unused relinquish_shared_pages Julien Grall
2018-02-21 14:02 ` [PATCH v4 06/16] xen/x86: Remove unused override of page_to_mfn/mfn_to_page Julien Grall
2018-03-01 11:20 ` George Dunlap
2018-03-02 14:42 ` Jan Beulich
2018-03-02 14:44 ` Julien Grall
2018-03-02 15:11 ` Jan Beulich
2018-03-05 13:29 ` Julien Grall
2018-02-21 14:02 ` [PATCH v4 07/16] xen/x86: mm: Switch x86/mm.c to use typesafe for virt_to_mfn Julien Grall
2018-03-02 14:45 ` Jan Beulich
2018-03-02 14:46 ` Julien Grall
2018-02-21 14:02 ` [PATCH v4 08/16] xen/mm: Drop the parameter mfn from populate_pt_range Julien Grall
2018-02-22 16:35 ` Wei Liu
2018-02-22 16:40 ` Julien Grall
2018-02-22 16:51 ` Wei Liu
2018-02-22 16:55 ` Julien Grall
2018-02-22 17:10 ` Wei Liu
2018-03-02 14:55 ` Jan Beulich
2018-03-05 13:43 ` Julien Grall
2018-03-05 14:00 ` Jan Beulich
2018-03-05 14:11 ` Julien Grall
2018-03-05 14:38 ` Jan Beulich
2018-03-09 17:29 ` Wei Liu
2018-03-11 19:30 ` Julien Grall
2018-03-12 6:36 ` Jan Beulich
2018-03-14 15:22 ` Julien Grall
2018-02-21 14:02 ` [PATCH v4 09/16] xen/pdx: Introduce helper to convert MFN <-> PDX Julien Grall
2018-02-22 16:39 ` Wei Liu
2018-02-21 14:02 ` [PATCH v4 10/16] xen/mm: Switch map_pages_to_xen to use MFN typesafe Julien Grall
2018-02-23 4:59 ` Tian, Kevin
2018-02-23 17:21 ` Wei Liu
2018-03-02 15:06 ` Jan Beulich
2018-03-02 15:08 ` Jan Beulich
2018-03-05 14:07 ` Julien Grall
2018-03-05 14:39 ` Jan Beulich
2018-03-05 14:44 ` Julien Grall
2018-02-21 14:02 ` [PATCH v4 11/16] xen/mm: Switch page_alloc.c to typesafe MFN Julien Grall
2018-02-23 17:21 ` Wei Liu
2018-03-02 15:18 ` Jan Beulich
2018-03-02 15:57 ` Julien Grall
2018-02-21 14:02 ` [PATCH v4 12/16] xen/mm: Switch common/memory.c to use " Julien Grall
2018-02-23 17:26 ` Wei Liu
2018-02-23 17:46 ` Julien Grall
2018-02-23 18:05 ` Wei Liu
2018-02-23 18:06 ` Julien Grall
2018-02-23 18:10 ` Wei Liu
2018-03-02 15:34 ` Jan Beulich
2018-03-05 14:18 ` Julien Grall
2018-03-05 14:41 ` Jan Beulich
2018-03-09 17:33 ` Wei Liu
2018-03-11 19:44 ` Julien Grall
2018-03-12 6:39 ` Jan Beulich
2018-03-14 16:08 ` Julien Grall
2018-02-21 14:02 ` [PATCH v4 13/16] xen/grant: Switch {create, replace}_grant_p2m_mapping to " Julien Grall
2018-02-23 17:29 ` Wei Liu
2018-03-02 15:38 ` Jan Beulich
2018-02-21 14:02 ` [PATCH v4 14/16] xen/grant: Switch common/grant_table.c to use " Julien Grall
2018-02-23 17:30 ` Wei Liu
2018-03-02 15:54 ` Jan Beulich
2018-03-02 15:59 ` Julien Grall
2018-03-02 16:12 ` Jan Beulich
2018-02-21 14:02 ` [PATCH v4 15/16] xen/x86: Switch mfn_to_page in x86_64/mm.c " Julien Grall
2018-03-02 15:57 ` Jan Beulich
2018-02-21 14:02 ` [PATCH v4 16/16] xen: Convert page_to_mfn and mfn_to_page " Julien Grall
2018-02-21 14:25 ` Razvan Cojocaru
2018-02-21 14:59 ` Paul Durrant
2018-02-21 23:20 ` Boris Ostrovsky
2018-02-23 4:59 ` Tian, Kevin
2018-02-23 17:31 ` Wei Liu
2018-03-02 16:08 ` Jan Beulich
2018-03-14 17:02 ` Julien Grall
2018-03-15 7:07 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180221140259.29360-1-julien.grall@arm.com \
--to=julien.grall@arm.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=gang.wei@intel.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=paul.durrant@citrix.com \
--cc=rcojocaru@bitdefender.com \
--cc=shane.wang@intel.com \
--cc=sstabellini@kernel.org \
--cc=suravee.suthikulpanit@amd.com \
--cc=tamas@tklengyel.com \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).