[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 03/11] vpci/header: Move register assignments from init_bars
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Mon, 25 Oct 2021 16:28:20 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=h+vmYW3W+r5oYDmBhfopIfv3ufDChDKH04CHssxa3rQ=; b=CT7KlVEavczvnxJsT42oW97YF1ZoVVIk8JAKbs7EcT4AkEKF1XVq/iAPr3BDV5135BGGxw0PMTrwuLnsIpTJKvmPLVzfvmD4gVq1olt3H4Mvu1hMD5qP5EvHoXSo/btabSeAHmes7qMhP5rjDAR/TUMuld82ZyAfZyXjo7zjOZyk95GaegpJv1NkN+MYrRUsSsMZzp5p5Vzxi5nkFFjzzvPdXn6wjkQt5igqjFv6aprfkwB+CleYMHhjGZDcxcivFHNVOhkba11TrWm8dL3Y6eKfE2FVHeq1oqjlfxVW2BHcltNN9IZO/yk6pgJ2sjp6qG8NKMJ38PB0Kq3TrakAOg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dV/5fUcBqNpV1forc07pJN1B0HRbDXsxAXJfMbTrDr0Ggzc0ykY0jV9KoBfr35T/GNz0ifCAx9Oe3NgGQOer18TJEBrfRPRCnYSG0Jn48f+RWH+aoD7yXl8mgu9RcRRY3kfBdiuW7IkaBcHnTT0EMd8silDFk3Avd4zaEBA1BmDXMgQvAhdbuvdwoeJogbgnDxWuQK2aC/xH5xgAOopqQKHkvqjWVmXDMjJRcd/dGPnbRGjWcQaERwdc5N7/7qw9AM/XfiQUvsqQX3IwmnEh3Xb6T9T9bI6Y6rsP24UuTlvDM5E+AHr/CpoTmPQlNdKgi/+Z7OgsTU4l8LeVRD3xxg==
- Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <julien@xxxxxxx>, <sstabellini@xxxxxxxxxx>, <oleksandr_tyshchenko@xxxxxxxx>, <volodymyr_babchuk@xxxxxxxx>, <Artem_Mygaiev@xxxxxxxx>, <bertrand.marquis@xxxxxxx>, <rahul.singh@xxxxxxx>, Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>, Oleksandr Andrushchenko <andr2000@xxxxxxxxx>
- Delivery-date: Mon, 25 Oct 2021 14:28:38 +0000
- Ironport-data: A9a23:77QQnagqNGAw1PQsWjrpk8EZX161SBYKZh0ujC45NGQN5FlHY01je htvCDiPOPyDN2PxKt4nbI2w9R4Bu5CHxtJnQAs+rnsxFywb9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oAMKRCQ7InQLlbGILes1htZGEk0F0/NtTo5w7Rg29Yy3IDga++wk YiaT/P3aQfNNwFcagr424rbwP+4lK2v0N+wlgVWicFj5DcypVFMZH4sDfjZw0/DaptVBoaHq 9Prl9lVyI97EyAFUbtJmp6jGqEDryW70QKm0hK6UID66vROS7BbPg/W+5PwZG8O4whlkeydx /1Tvo7rZgokMJTKid86YzZiDBhBbYZJreqvzXiX6aR/zmXDenrohf5vEFs3LcsT/eMf7WNmr KJCbmpXN1ba2rzwkOnTpupE36zPKOHxO4wSoDd4xCzxBvc6W5HTBa7N4Le02R9t2JseR6iBP KL1bxJ2dQ7nbA9hM2wIGb0hzcOwqHvNXmBH/Qf9Sa0fvDGIkV0ZPKLWGNDYYMCQTMNZ2EORv Hvb/n/RCwsfcteYzFK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XL0e5Mvrg0uUhHnA0YOlCEutvZnftrjhdfxis6E1ZOxRJd3uMtZ mUybx9pJb+D9itDjdRYWzz+ABlIARCU9xCjy1YNk2GFHUCkWnaUcT84MOeJuksY73hdbn5Q+ 7TBkDTpVjPjfcfQ2CouWBE696y/HIIprgCSytq6G8mlHoUhZWu3i6CjUmMEth/7DJ5jn0bAv +RroL59ZKCT2fT8eEHn5112DYgtdS0=
- Ironport-hdrordr: A9a23:5rekYK8np9YI6mIFdL9uk+DYI+orL9Y04lQ7vn2ZKCY/TiX2ra +TdZggtCMc6wxhOk3I++rvBEDoexq1n/MY3WB4B8bGYOCMghrKEGgN1+vf6gylMSv46eJHyK tsTq5bCNn9ZGIK6frH3A==
- Ironport-sdr: wfQ+yC/Ezc3pZlg3n535ht1Csr2W2Gv/4wmSRRhyMoooG4IHHaF/xWPu1KqEGnnA1GEYK/LwQA emZEhFCW2736op3lPQFX24qvjWHzNP5ZGW1gCfTQRO8z44qa8qhZb028+JcmqqArDWytOxBkq7 luwSI5CcjBK95G8cuwKspjcyQbgiA1Moe4e+6SbKraXJKsKct3kjw+wVoasbZhEO8fuEd0kQLe YvfEFhcD72c8BtcdQEoky7cONjQ79OtmkNQdWRPrVc2X8Ox3K5HKX6kJU0wVLeO8Cwa0DmxPQ4 yyzU7SwT343jMuMyKkJaHKg4
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Fri, Oct 15, 2021 at 08:04:56AM +0200, Jan Beulich wrote:
> On 13.10.2021 15:51, Roger Pau Monné wrote:
> > On Thu, Sep 30, 2021 at 10:52:15AM +0300, Oleksandr Andrushchenko wrote:
> >> --- a/xen/drivers/vpci/header.c
> >> +++ b/xen/drivers/vpci/header.c
> >> @@ -445,6 +445,55 @@ static void rom_write(const struct pci_dev *pdev,
> >> unsigned int reg,
> >> rom->addr = val & PCI_ROM_ADDRESS_MASK;
> >> }
> >>
> >> +static int add_bar_handlers(const struct pci_dev *pdev)
> >
> > Making this const is again misleading IMO, as you end up modifying
> > fields inside the pdev, you get away with it because vpci data is
> > stored in a pointer.
>
> I think it was me who asked for const to be added in places like this
> one. vpci data hanging off of struct pci_dev is an implementation
> artifact imo, not an unavoidable connection. In principle the vpci
> data corresponding to a physical device could also be looked up using
> e.g. SBDF.
I was considering vPCI part an intrinsic part of the pci_dev, but I
can see you thinking otherwise. We similarly have other pieces of data
hanging off pci_dev, so I think it's hard to tell which ones as fine
to have as part of the struct vs as pointer references.
> Here the intention really is to leave the physical device unchanged;
> that's what the const documents (apart from enforcing).
Ack. I wouldn't have asked for those myself, but as said above I can
see your point.
Regards, Roger.
|