Re: [PATCH v8 6/7] xen/riscv: page table handling

2024-10-01 Thread oleksii . kurochko
On Mon, 2024-09-30 at 17:30 +0200, Jan Beulich wrote: > > + */ > > +static int pt_next_level(bool alloc_tbl, pte_t **table, unsigned > > int offset) > > +{ > > +    pte_t *entry; > > +    mfn_t mfn; > > + > > +    entry = *table + offset; > > + > > +    if ( !pte_is_valid(*entry) ) > > +    { > > +

Re: [PATCH v8 6/7] xen/riscv: page table handling

2024-09-30 Thread Jan Beulich
On 27.09.2024 18:33, Oleksii Kurochko wrote: > +static bool pt_check_entry(pte_t entry, mfn_t mfn, unsigned int flags) > +{ > +/* Sanity check when modifying an entry. */ > +if ( (flags & PTE_VALID) && mfn_eq(mfn, INVALID_MFN) ) > +{ > +/* We don't allow modifying an invalid ent

Re: [PATCH v8 6/7] xen/riscv: page table handling

2024-09-30 Thread oleksii . kurochko
Missed to add revision log: --- Changes in V8: - drop PTE_LEAF_MASK. - update the comment above pte_is_table(): drop table number and use just "the encoding of the permission bits". - declare pte_is_table() as static. - drop const from the argument of pte_is_table - drop the "const" commen

[PATCH v8 6/7] xen/riscv: page table handling

2024-09-27 Thread Oleksii Kurochko
Implement map_pages_to_xen() which requires several functions to manage page tables and entries: - pt_update() - pt_mapping_level() - pt_update_entry() - pt_next_level() - pt_check_entry() To support these operations, add functions for creating, mapping, and unmapping Xen tables: - create_table()