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

Re: [PATCH v8 02/13] vpci: use per-domain PCI lock to protect vpci structure


  • To: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 20 Jul 2023 18:03:49 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=RVS9GkmxxyRXh5ZBd7SBuJ0ypvXW562UpVnNEbMpIzE=; b=fNPdP+Ml41lxdVnffjDmg/feNaqLWSa0Nelp8b/bDvCQwBe9NlNFSZjiHEXcG6m+HB9di/wNz3RHpPXCah2ByltdHPPfBhrHiKAeKzxyBuinYrTMwbUczYuTZv9WPHWpipwJag8IKSuEuvY0S8FmpEs66kz2mI7IMV9YKS5a9P3hg8h0exSGeeS6P8BRRwNsQztAAO1nNrcAHtCgRk2azXmmw37a4xp2rMGo3CHDBAfOHXkGhAX03UUk9GBQYdzvD3cl9zbqXuTC15TUukCkwuYIFEQuI/h9gBw997IlqYDARwuuJabb2NVpjfWgFehrXI76ZHu2zwiSZp+EsMy3fQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KiUUydj2yQhUK1kBH7AM00xArgxyMsgUAqU6gV9o1slynhOiNXEQH13pLqrvOn7ee3EK81VjmHXMl7Ix534QXQb33sn7I3129eEE+bfXQnYo1bEzOVcPMfEhgmqzlg9VEVABsseJEApilh+BffYIhwNK2eh97AiK6zAxpoJjnTGqAlvIA2WMYKSA68SU3JB2gbUZsOB9Hff7oQkSs8qwZ/k3qxn4+VKyRtAThXSlV+9DxadiRB9BEZspGLW8ldLJEkkaj4Xy8LsaWMZ5UAeQIZuUU4dYjJxhtsqqrDCQ7K3oKot27+wr4DYlC4sSkFumo2jeT/+US/3ahIVvpeJk7Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 20 Jul 2023 16:04:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 20.07.2023 02:32, Volodymyr Babchuk wrote:
> --- a/xen/drivers/vpci/msi.c
> +++ b/xen/drivers/vpci/msi.c
> @@ -190,6 +190,8 @@ static int cf_check init_msi(struct pci_dev *pdev)
>      uint16_t control;
>      int ret;
>  
> +    ASSERT(rw_is_write_locked(&pdev->domain->pci_lock));

I'm afraid I have to ask the opposite question, compared to Roger's:
Why do you need the lock held for write here (and in init_msix())?
Neither list of devices nor the pdev->vpci pointer are being altered.

Jan



 


Rackspace

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