All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: xen-devel@lists.xenproject.org
Cc: Oleksandr_Tyshchenko@epam.com,
	Julien Grall <julien.grall@arm.com>,
	sstabellini@kernel.org, Andrii_Anisov@epam.com
Subject: [PATCH 00/12] xen/arm: Provide a generic function to update Xen PT
Date: Wed, 24 Apr 2019 17:59:43 +0100	[thread overview]
Message-ID: <20190424165955.23718-1-julien.grall@arm.com> (raw)

Hi all,

This is the third part of the boot/memory rework for Xen on Arm. At the
moment, the update to Xen PT is scattered all around mm.c. This makes
difficult to rework Xen memory layout or even ensuring we are following the
Arm Arm properly (and we are not so far!).

This part contains code to provide a generic function to update Xen PT.
While I could have started from scratch, I decided to base the new function
on create_xen_entries() (now renamed xen_pt_update()). This makes slightly
easier to follow the changes.

In this series, the new generic function will only support 3rd-level update
and cannot be used in early boot (i.e because xenheap is initialized).
This will be extended in follow-up patch to allow more use within mm.c.

There are probably some optimization possible around the TLBs flush. I haven't
looked at it so far.

The last two patches of this series is to show how existing callers can be
converted. There are more conversion to come in follow-up series.

Cheers,

Julien Grall (12):
  xen/arm: lpae: Add a macro to generate offsets from an address
  xen/arm: mm: Rename create_xen_entries() to xen_pt_update()
  xen/arm: mm: Move out of xen_pt_update() the logic to update an entry
  xen/arm: mm: Introduce _PAGE_PRESENT and _PAGE_POPULATE
  xen/arm: mm: Only increment mfn when valid in xen_pt_update
  xen/arm: mm: Sanity check any update of Xen page tables
  xen/arm: mm: Rework xen_pt_update_entry to avoid use xenmap_operation
  xen/arm: mm: Remove enum xenmap_operation
  xen/arm: mm: Use {, un}map_domain_page() to map/unmap Xen page-tables
  xen/arm: mm: Rework Xen page-tables walk during update
  xen/arm: mm: Don't open-code Xen PT update in {set, clear}_fixmap()
  xen/arm: mm: Remove set_pte_flags_on_range()

 xen/arch/arm/mm.c          | 421 ++++++++++++++++++++++++++++++---------------
 xen/arch/arm/p2m.c         |  23 +--
 xen/include/asm-arm/lpae.h |   9 +
 xen/include/asm-arm/page.h |   9 +-
 4 files changed, 305 insertions(+), 157 deletions(-)

-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

WARNING: multiple messages have this Message-ID (diff)
From: Julien Grall <julien.grall@arm.com>
To: xen-devel@lists.xenproject.org
Cc: Oleksandr_Tyshchenko@epam.com,
	Julien Grall <julien.grall@arm.com>,
	sstabellini@kernel.org, Andrii_Anisov@epam.com
Subject: [Xen-devel] [PATCH 00/12] xen/arm: Provide a generic function to update Xen PT
Date: Wed, 24 Apr 2019 17:59:43 +0100	[thread overview]
Message-ID: <20190424165955.23718-1-julien.grall@arm.com> (raw)
Message-ID: <20190424165943.z9IlgHxmEJhGlk6LQjpLNF2lE07zCJNW6gjs2X7vJKU@z> (raw)

Hi all,

This is the third part of the boot/memory rework for Xen on Arm. At the
moment, the update to Xen PT is scattered all around mm.c. This makes
difficult to rework Xen memory layout or even ensuring we are following the
Arm Arm properly (and we are not so far!).

This part contains code to provide a generic function to update Xen PT.
While I could have started from scratch, I decided to base the new function
on create_xen_entries() (now renamed xen_pt_update()). This makes slightly
easier to follow the changes.

In this series, the new generic function will only support 3rd-level update
and cannot be used in early boot (i.e because xenheap is initialized).
This will be extended in follow-up patch to allow more use within mm.c.

There are probably some optimization possible around the TLBs flush. I haven't
looked at it so far.

The last two patches of this series is to show how existing callers can be
converted. There are more conversion to come in follow-up series.

Cheers,

Julien Grall (12):
  xen/arm: lpae: Add a macro to generate offsets from an address
  xen/arm: mm: Rename create_xen_entries() to xen_pt_update()
  xen/arm: mm: Move out of xen_pt_update() the logic to update an entry
  xen/arm: mm: Introduce _PAGE_PRESENT and _PAGE_POPULATE
  xen/arm: mm: Only increment mfn when valid in xen_pt_update
  xen/arm: mm: Sanity check any update of Xen page tables
  xen/arm: mm: Rework xen_pt_update_entry to avoid use xenmap_operation
  xen/arm: mm: Remove enum xenmap_operation
  xen/arm: mm: Use {, un}map_domain_page() to map/unmap Xen page-tables
  xen/arm: mm: Rework Xen page-tables walk during update
  xen/arm: mm: Don't open-code Xen PT update in {set, clear}_fixmap()
  xen/arm: mm: Remove set_pte_flags_on_range()

 xen/arch/arm/mm.c          | 421 ++++++++++++++++++++++++++++++---------------
 xen/arch/arm/p2m.c         |  23 +--
 xen/include/asm-arm/lpae.h |   9 +
 xen/include/asm-arm/page.h |   9 +-
 4 files changed, 305 insertions(+), 157 deletions(-)

-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

             reply	other threads:[~2019-04-24 17:00 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24 16:59 Julien Grall [this message]
2019-04-24 16:59 ` [Xen-devel] [PATCH 00/12] xen/arm: Provide a generic function to update Xen PT Julien Grall
2019-04-24 16:59 ` [PATCH 01/12] xen/arm: lpae: Add a macro to generate offsets from an address Julien Grall
2019-04-24 16:59   ` [Xen-devel] " Julien Grall
2019-05-06 12:47   ` Andrii Anisov
2019-05-06 12:47     ` [Xen-devel] " Andrii Anisov
2019-04-24 16:59 ` [PATCH 02/12] xen/arm: mm: Rename create_xen_entries() to xen_pt_update() Julien Grall
2019-04-24 16:59   ` [Xen-devel] " Julien Grall
2019-05-06 12:48   ` Andrii Anisov
2019-05-06 12:48     ` [Xen-devel] " Andrii Anisov
2019-04-24 16:59 ` [PATCH 03/12] xen/arm: mm: Move out of xen_pt_update() the logic to update an entry Julien Grall
2019-04-24 16:59   ` [Xen-devel] " Julien Grall
2019-05-06 12:48   ` Andrii Anisov
2019-05-06 12:48     ` [Xen-devel] " Andrii Anisov
2019-04-24 16:59 ` [PATCH 04/12] xen/arm: mm: Introduce _PAGE_PRESENT and _PAGE_POPULATE Julien Grall
2019-04-24 16:59   ` [Xen-devel] " Julien Grall
2019-05-06 12:48   ` Andrii Anisov
2019-05-06 12:48     ` [Xen-devel] " Andrii Anisov
2019-04-24 16:59 ` [PATCH 05/12] xen/arm: mm: Only increment mfn when valid in xen_pt_update Julien Grall
2019-04-24 16:59   ` [Xen-devel] " Julien Grall
2019-05-06 12:48   ` Andrii Anisov
2019-05-06 12:48     ` [Xen-devel] " Andrii Anisov
2019-04-24 16:59 ` [PATCH 06/12] xen/arm: mm: Sanity check any update of Xen page tables Julien Grall
2019-04-24 16:59   ` [Xen-devel] " Julien Grall
2019-05-06 12:48   ` Andrii Anisov
2019-05-06 12:48     ` [Xen-devel] " Andrii Anisov
2019-05-06 17:01     ` Julien Grall
2019-05-06 17:01       ` [Xen-devel] " Julien Grall
2019-05-07  7:38       ` Andrii Anisov
2019-05-07  7:38         ` [Xen-devel] " Andrii Anisov
2019-04-24 16:59 ` [PATCH 07/12] xen/arm: mm: Rework xen_pt_update_entry to avoid use xenmap_operation Julien Grall
2019-04-24 16:59   ` [Xen-devel] " Julien Grall
2019-05-06 12:48   ` Andrii Anisov
2019-05-06 12:48     ` [Xen-devel] " Andrii Anisov
2019-04-24 16:59 ` [PATCH 08/12] xen/arm: mm: Remove enum xenmap_operation Julien Grall
2019-04-24 16:59   ` [Xen-devel] " Julien Grall
2019-05-06 12:48   ` Andrii Anisov
2019-05-06 12:48     ` [Xen-devel] " Andrii Anisov
2019-04-24 16:59 ` [PATCH 09/12] xen/arm: mm: Use {, un}map_domain_page() to map/unmap Xen page-tables Julien Grall
2019-04-24 16:59   ` [Xen-devel] " Julien Grall
2019-05-06 12:48   ` Andrii Anisov
2019-05-06 12:48     ` [Xen-devel] " Andrii Anisov
2019-04-24 16:59 ` [PATCH 10/12] xen/arm: mm: Rework Xen page-tables walk during update Julien Grall
2019-04-24 16:59   ` [Xen-devel] " Julien Grall
2019-05-06 12:49   ` Andrii Anisov
2019-05-06 12:49     ` [Xen-devel] " Andrii Anisov
2019-04-24 16:59 ` [PATCH 11/12] xen/arm: mm: Don't open-code Xen PT update in {set, clear}_fixmap() Julien Grall
2019-04-24 16:59   ` [Xen-devel] " Julien Grall
2019-05-06 12:49   ` Andrii Anisov
2019-05-06 12:49     ` [Xen-devel] " Andrii Anisov
2019-04-24 16:59 ` [PATCH 12/12] xen/arm: mm: Remove set_pte_flags_on_range() Julien Grall
2019-04-24 16:59   ` [Xen-devel] " Julien Grall
2019-05-06 12:49   ` Andrii Anisov
2019-05-06 12:49     ` [Xen-devel] " Andrii Anisov

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=20190424165955.23718-1-julien.grall@arm.com \
    --to=julien.grall@arm.com \
    --cc=Andrii_Anisov@epam.com \
    --cc=Oleksandr_Tyshchenko@epam.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.