[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/3] xen/vpci: Remove __hwdom_init for vpci_add_handlers


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Tue, 19 Oct 2021 13:43:37 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OfF4aGzbao5s2QskKfQB8lsOjZ3y/bfjYyciZvbA2rY=; b=Nk3hAozjSJL0i3h8cXxMU8dmCVrcT9/B+KCn54PwLeW8PRmLdSicU75ZaqdOqxwBO7jURyNpSu68uhhS70oNPJ1CPZ1dHjhOzQZ6n7NkKCXaV4Lvf695uvdruDz20EZlU6lcwAIHgw33wf7uuVJiDc2LCkpWZ8+ozMmKk14je5VsZ2OcklRjq2wcsTvgLOc13aLUBBZDcEXlljF5MmWQ+xKiL4s5IuTnt5BWnHAFQ6mHCYQxwGXHFneL3O5S7N3RvyRcG/3SCzxvQ0zrUIXTcEA3Gv7ps2REnADE2ELJSr476T99Dhb0+lBef2Vf6lCNbugp2BmgkCMrSTePToR0OQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YfJNdKV7C7rdLFAXGssU+VezxhdFyqAr7Q2IGDwKeU21N9J0Pq13K75EvuT8i4dEQ/VmZ5vMRLLUDlib1vCrGaNulbOsM5Vq2hKL0i0AT8GKd1S2bvau1pypPjifgCsMuAp/OpDPxjKeLBYmBzcTtPPVJ5zbp6uIFpRv0/5sCAnhTReRYUXLs4Oy6iC4/kzipCanGiaXHicHIinjCXyG5lXWhCIVPBmDYXgUk5iH9APR+vTrT8lOhoqjUEP1Oji0W5/8MTnx1DEPbAbj1qqNAVJKVp+gPFW8ecnx/iEqN7PjWb11LNGbEA8WxJN7gaChkaySS/bxFtylbnE8MTwEbg==
  • Authentication-results-original: citrix.com; dkim=none (message not signed) header.d=none;citrix.com; dmarc=none action=none header.from=arm.com;
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, "iwj@xxxxxxxxxxxxxx" <iwj@xxxxxxxxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "Oleksandr_Andrushchenko@xxxxxxxx" <Oleksandr_Andrushchenko@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 19 Oct 2021 13:43:53 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: citrix.com; dkim=none (message not signed) header.d=none;citrix.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXxNXruySz06Rv/0aNVGzqN8rSbavaQv2AgAAKnwCAAAdagA==
  • Thread-topic: [PATCH 2/3] xen/vpci: Remove __hwdom_init for vpci_add_handlers

Hi,

> On 19 Oct 2021, at 14:17, Roger Pau Monné <roger.pau@xxxxxxxxxx> 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.


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.