Hi, > On 19 Oct 2021, at 14:17, Roger Pau Monné <roger....@citrix.com> wrote: > > On Tue, Oct 19, 2021 at 02:39:17PM +0200, Jan Beulich wrote: >> On 19.10.2021 12:40, Bertrand Marquis wrote: >>> --- a/xen/drivers/vpci/vpci.c >>> +++ b/xen/drivers/vpci/vpci.c >>> @@ -54,7 +54,7 @@ void vpci_remove_device(struct pci_dev *pdev) >>> pdev->vpci = NULL; >>> } >>> >>> -int __hwdom_init vpci_add_handlers(struct pci_dev *pdev) >>> +int vpci_add_handlers(struct pci_dev *pdev) >> >> A fundamental requirement when altering section attributes is to >> also check that all referenced entities are appropriately placed. >> Afaict this is not the case for __start_vpci_array[], and you'll >> need to also adjust linker scripts to deal with that. > > Indeed, we need to just keep the CONFIG_LATE_HWDOM placement in > .rodata.
I will also need to remove the test for CONFIG_LATE_HWDOM in there and only test for CONFIG_HAS_VPCI. This will be applied to both arm and x86 linker script. > >> Further >> you'd have to check that all functions referenced by that array >> aren't __hwdom_init. In taking an example (init_msi()) I'm >> actually surprised to find it's not marked __hwdom_init. So >> maybe all is fine as far as these are concerned. > > My bad, I've forgot to mark the initializers used by > REGISTER_VPCI_INIT as __hwdom_init. I think there's no need for a > change there. Thanks for the confirmation here. I checked in the code and did not find anything and was looking again. But I definitely missed the linker script. I will send a v2 squashing the 3 patches together and modifying the linker scripts. Thanks Bertrand > > Thanks, Roger.