[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: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Thu, 20 Jul 2023 17:53:46 +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=B7kGzGcFIqLmLK/uDdDsCu01j/IB8V3sWF3dtRJ328s=; b=jf8bteC7aONJhYdslw8V0EwQqzZ/leg5ydq6hX7OyWJvfh0tE1Wy2C59WBHx/QwHH4Y+H11tZ5bhFz78AeScepPAcp+T7l0DJAVCUu9xrBwGfqrA3A7t6ZN3LTCwIfevX72QZL3SInwI4+UczhpoTcrwWAmhEDKJP9HwtGBamH9M04kTz3wwRegucWZktXCrZ3cz/glHI5oUAw8NvKVzYJuufcGE77BMf+d2SQ6TEq6bV0DQ3wHl/Ox89pF/MqgLAFCix0jCNww4Pdf1NdVGZIpQADwJ+ymg1RjVS/i8v+wMqqwR6TZDcWhiGU1Folp8984zvef6iOtcw1mKGE5YCg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GKghWQShmhqpq+6B9514u/yyueJCD4kRrPdRtLXKmm5KPjHz/dAXrYMcoWE8VV23081kvoAUlZF5UF3+Zma9WMCEB/eLybcgH5Z31kEtQekKmGfHFwwdQepovGy8C3ts1uwiTAbBu/1faTL2/tL1BJxi03AB8jQb0O40zyCJ6SebE0DMYKgYgp5GPpTt97PdkI17OIvwTBEEAeOUY8ZzeAWgZk7rRRrDX32JNLRb55gak/231eXyxCLR9V3jgvA06txFLCbjoxlKpaX5TBJd/i1mRwY2jeBkt9RrKDRrYxM5pMyVUpwEJLpMY6xe6NECCmKUBNDgqnuGo1z16oaCiA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
- Delivery-date: Thu, 20 Jul 2023 15:54:09 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 20.07.2023 13:20, Roger Pau Monné wrote:
> On Thu, Jul 20, 2023 at 12:32:31AM +0000, Volodymyr Babchuk wrote:
>> @@ -318,14 +323,17 @@ void vpci_dump_msi(void)
>> * holding the lock.
>> */
Note the comment here.
>> printk("unable to print all MSI-X entries: %d\n", rc);
>> - process_pending_softirqs();
>> - continue;
>> + goto pdev_done;
>> }
>> }
>>
>> spin_unlock(&pdev->vpci->lock);
>> + pdev_done:
>> + read_unlock(&d->pci_lock);
>> process_pending_softirqs();
>> + read_lock(&d->pci_lock);
>
> read_trylock().
Plus the same scheme as with the spin lock wants following imo:
vpci_msix_arch_print() returns an error only with (now) both locks
dropped. This then wants reflecting in the comment pointed out
above.
Jan
|