[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 3/5] p2m: change write_p2m_entry to return an error code
>>> On 21.02.19 at 17:50, <roger.pau@xxxxxxxxxx> wrote: > @@ -202,13 +204,14 @@ p2m_next_level(struct p2m_domain *p2m, void **table, > new_entry = l1e_from_mfn(mfn, P2M_BASE_FLAGS | _PAGE_RW); > > p2m_add_iommu_flags(&new_entry, level, > IOMMUF_readable|IOMMUF_writable); > - p2m->write_p2m_entry(p2m, gfn, p2m_entry, new_entry, level + 1); > + rc = p2m->write_p2m_entry(p2m, gfn, p2m_entry, new_entry, level + 1); > + if ( rc ) > + ASSERT_UNREACHABLE(); Why not simply ASSERT(!rc)? Also further down then. > --- a/xen/arch/x86/mm/shadow/none.c > +++ b/xen/arch/x86/mm/shadow/none.c > @@ -60,11 +60,12 @@ static void _update_paging_modes(struct vcpu *v) > ASSERT_UNREACHABLE(); > } > > -static void _write_p2m_entry(struct p2m_domain *p2m, unsigned long gfn, > - l1_pgentry_t *p, l1_pgentry_t new, > - unsigned int level) > +static int _write_p2m_entry(struct p2m_domain *p2m, unsigned long gfn, > + l1_pgentry_t *p, l1_pgentry_t new, > + unsigned int level) > { > ASSERT_UNREACHABLE(); > + return -ENOSYS; -EOPNOTSUPP or basically anything else, but not -ENOSYS please. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |