Hi,

On 04/02/2022 09:47, Oleksandr Andrushchenko wrote:
Could you please help me with the exact message you would like to see?

Here a summary of the discussion (+ some my follow-up thoughts):

is_memory_hole() was recently introduced on x86 (see commit 75cc460a1b8c "xen/pci: 
detect when BARs are not suitably positioned") to check whether the BAR are 
positioned outside of a valid memory range. This was introduced to work-around quirky 
firmware.

In theory, this could also happen on Arm. In practice, this may not happen but it sounds 
better to sanity check that the BAR contains "valid" I/O range.

On x86, this is implemented by checking the region is not described is in the 
e820. IIUC, on Arm, the BARs have to be positioned in pre-defined ranges. So I 
think it would be possible to implement is_memory_hole() by going through the 
list of hostbridges and check the ranges.

But first, I'd like to confirm my understanding with Rahul, and others.

If we were going to go this route, I would also rename the function to be 
better match what it is doing (i.e. it checks the BAR is correctly placed). As 
a potentially optimization/hardening for Arm, we could pass the hostbridge so 
we don't have to walk all of them.
It seems this needs to live in the commit message then? So, it is easy to find
as everything after "---" is going to be dropped on commit
I expect the function to be fully implemented before this is will be merged.

So if it is fully implemented, then a fair chunk of what I wrote would not be necessary to carry in the commit message.

Cheers,

--
Julien Grall

Reply via email to