Hi Ayan,

> On 2 Jul 2025, at 14:11, Ayan Kumar Halder <ayank...@amd.com> wrote:
> 
> 
> On 01/07/2025 15:56, Hari Limaye wrote:
>> 
>> Hi Ayan,
>> 
> Hi Hari,
>> 
>> Thank you for the review. I have just a couple of clarifications before I
>> 
>> re-spin the series to address all the comments:
>> 
>> > > -    if ( flags & _PAGE_PRESENT )
>> 
>> > > +    if ( (flags & _PAGE_PRESENT) && (MPUMAP_REGION_NOTFOUND == rc) )
>> 
>> >
>> 
>> > Same question in this patch , why do we need to check for _PAGE_PRESENT.
>> 
>> > Can't we just rely on MPUMAP_REGION_XXX ?
>> 
>> The _PAGE_PRESENTflag indicates intent - whether the caller intends to create
>> 
>> or remove a region.
>> 
> If so, then I misunderstood the code. However, looking at 
> xen_pt_check_entry(), it seems _PAGE_PRESENTindicates if the page table entry 
> exists. If so, using _PAGE_PRESENTis not making sense  to me atleast. May be 
> others can chime in.

But it seems to me that _PAGE_PRESENT is used in the MPU code in the same way 
as the MMU code, to check
if the caller has intention to add/modify a region if it’s set, otherwise to 
delete it.

I’m not sure why you say it’s different, can you point out which line in case, 
because I’ve had a look on xen_pt_check_entry
but I didn’t get your point.

Cheers,
Luca


Reply via email to