Hi, Roger! On 13.10.21 16:51, Roger Pau Monné wrote: > On Thu, Sep 30, 2021 at 10:52:15AM +0300, Oleksandr Andrushchenko wrote: >> From: Oleksandr Andrushchenko <[email protected]> >> >> This is in preparation for dynamic assignment of the vPCI register >> handlers depending on the domain: hwdom or guest. >> The need for this step is that it is easier to have all related functionality >> put at one place. When the subsequent patches add decisions on which >> handlers to install, e.g. hwdom or guest handlers, then this is easily >> achievable. > Won't it be possible to select the handlers to install in init_bars > itself? It is possible > > Splitting it like that means you need to iterate over the numbers of > BARs twice (one in add_bar_handlers and one in init_bars), which makes > it more likely to introduce errors or divergences. > > Decoupling the filling of vpci_bar data with setting the handlers > seems slightly confusing. Ok, I won't introduce add_bar_handlers, thus rendering this patch useless. I'll drop it and re-work the upcoming patches with this respect
Thank you, Oleksandr
