|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 6/8] xen/riscv: introduce generic Xen page table handling
Hi Julien,
On Sun, 2024-07-21 at 10:02 +0100, Julien Grall wrote:
> Hi,
>
> On 12/07/2024 17:22, Oleksii Kurochko wrote:
> > At least, between Arm and RISC-V most of the code related to Xen
> > page
> > table handling are common.
> >
> > This GENERIC_PT code is based on Arm's arm/mmu/pt.c except some
> > minor
> > changes such as introduction of the following functions:
> > * get_root_page()
> > * xen_pt_check_contig()
> > * set_pte_table_bit()
> > * sanity_arch_specific_pte_checks()
> > * get_contig_bit()
> > * set_pte_permissions()
> > * flush_xen_tlb_range_va()
> > It was done because not every functions has the generic pte_flags
> > and
> > it could be a different positions of the PTE bits in a PTE.
> While I am always in favor of trying to avoid code duplication, I am
> not
> sure the page-tables are one that should be.
Probably it wasn't the best one abstraction provided. But I think that
there are still some function which could be generic:
- xen_{un}map_table()
- map_pages_to_xen
- probably some page table walking?
But I am okay, if not to abstract that, I just wanted to here an
opinion if it is a sense to work in this direction or not.
I will then move everything to RISC-V specific folder and clean up some
places related to Arm.
~ Oleksii
>
> For instance, you don't have the concept of contiguous page in RISC-V
> (I
> see you introduce dummy flags, but IMHO this is a bit of a hack). All
> the code was also written in a way to avoid temporary conflict
> mappings.
> This is to avoid using Break-Before-Make. But on newer hardware this
> could be relaxed.
>
> I am interested to know what the others thinks.
>
> Cheers,
>
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |