Messages in this thread | | | From | "Kalra, Ashish" <> | Subject | RE: [PATCH Part2 v6 10/49] x86/fault: Add support to dump RMP entry on fault | Date | Wed, 22 Jun 2022 18:08:09 +0000 |
| |
[AMD Official Use Only - General]
>> > +void dump_rmpentry(u64 pfn) >> > +{ >> > + unsigned long pfn_end; >> > + struct rmpentry *e; >> > + int level; >> > + >> > + e = __snp_lookup_rmpentry(pfn, &level); >> > + if (!e) { >> >> __snp_lookup_rmpentry may return -errno so this should be: >> >> if (e != 1)
>Sorry, actually it should be:
> if (IS_ERR_OR_NULL(e)) {
I will fix this accordingly.
>> > + >> > + while (pfn < pfn_end) { >> > + e = __snp_lookup_rmpentry(pfn, &level); >> > + if (!e) >> >> if (e != 1) >>
>and this too:
> if (IS_ERR_OR_NULL(e))
Same here.
Thanks, Ashish
| |