On 27.09.2024 13:32, oleksii.kuroc...@gmail.com wrote: > Just to be sure. Do you mean the following: > > diff --git a/xen/arch/riscv/pt.c b/xen/arch/riscv/pt.c > index d7eb207ddc..6cd2e595b6 100644 > --- a/xen/arch/riscv/pt.c > +++ b/xen/arch/riscv/pt.c > @@ -209,24 +209,15 @@ static int pt_update_entry(mfn_t root, unsigned > long virt, > for ( ; level > target; level-- ) > { > rc = pt_next_level(alloc_tbl, &table, offsets[level]); > - if ( rc == XEN_TABLE_MAP_FAILED ) > + if ( rc == XEN_TABLE_MAP_NOMEM ) > { > - rc = 0; > - > - /* > - * We are here because pt_next_level has failed to map > - * the intermediate page table (e.g the table does not > exist > - * and the pt couldn't be allocated). It is a valid case > when > - * removing a mapping as it may not exist in the page > table. > - * In this case, just ignore it. > - */ > - if ( flags & (PTE_VALID | PTE_POPULATE) ) > - { > - dprintk(XENLOG_ERR, > - "%s: Unable to map level %u\n", __func__, > level); > - rc = -ENOMEM; > - } > + rc = -ENOMEM; > + goto out; > + } > > + if ( rc == XEN_TABLE_MAP_NONE ) > + { > + rc = 0; > goto out; > }
Yes. Jan