lkml.org 
[lkml]   [2022]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH Part2 v6 10/49] x86/fault: Add support to dump RMP entry on fault
Date
[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

\
 
 \ /
  Last update: 2022-06-22 20:09    [W:0.199 / U:1.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site