Hi Jan,

> On 19 Aug 2022, at 7:07 am, Jan Beulich <jbeul...@suse.com> wrote:
> 
> On 18.08.2022 16:58, Rahul Singh wrote:
>>> On 17 Aug 2022, at 4:18 pm, Jan Beulich <jbeul...@suse.com> wrote:
>>> On 17.08.2022 16:45, Rahul Singh wrote:
>>>> @@ -363,6 +373,42 @@ int __init pci_host_bridge_mappings(struct domain *d)
>>>>    return 0;
>>>> }
>>>> 
>>>> +static int is_bar_valid(const struct dt_device_node *dev,
>>>> +                        u64 addr, u64 len, void *data)
>>> 
>>> s/u64/uint64_t/g please.
>> 
>> Ack. 
>>> 
>>>> +{
>>>> +    struct pdev_bar *bar_data = data;
> 
> const?

Ack.
> 
>>>> +    unsigned long s = mfn_x(bar_data->start);
>>>> +    unsigned long e = mfn_x(bar_data->end);
>>>> +
>>>> +    if ( (s < e) && (s >= PFN_UP(addr)) && (e <= PFN_UP(addr + len - 1)) )
>>> 
>>> Doesn't this need to be s >= PFN_DOWN(addr)? Or else why is e checked
>>> against PFN_UP()?
>> 
>> Ack. I will modify as if ( (s < e) && (s >= PFN_DOWN(addr)) && (e <= 
>> PFN_UP(addr + len - 1)) )
> 
> Hmm, doesn't it further need to be s <= e, seeing that the range passed
> to pci_check_bar() is an inclusive one?

Agree, I will do the modification in next version.


Regards,
Rahul

Reply via email to