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

RE: [PATCH 1/8] IOMMU/x86: drop locking from quarantine_init() hooks


  • To: "Beulich, Jan" <JBeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
  • Date: Wed, 20 Apr 2022 06:22:42 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.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=i6tJ708GVSj0+gSZc2TeKfsPoF1n6uzLCmI3y/n+rNU=; b=Th+pxJwgPrYsQRFm/auU8gljafu8+xMkoiy8w6S6uwng/0bTmcXrGX6j624XttAfYYWlaG8tPxi9AWkD6sEfHryA6c+GFusur5zdxIYprUgR4mcIwQejjynviYVRx4PA8WdPsZ2Npb7wdu4siQc6bx0H5XxGhtf5fgvgZNZzIkAoHkD/+5RC8CUfeAl0Ul1EO8QVdGDIBj03urJ2KEBxmpwlaBSAjscgN7xvd9cwv2xp1QxJdPgSVn/w5PRSm4ha2v78KrFhKMlTyiXijrfUfQVwwkImdNocKz9c0XPDua4To0jNwXHAa75WMU3RXf7oM10eCAPmLb631znahE7sDg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DnzjhNO9kVhLPEWMcQ6cB+Lc93BmB9WxXuECj2uM6Hk+NAFltqapGRVlKH0VxOiljAtAqfFusritS9/Y+WjwDSNBzTwm6Vpa7dZPbbXWAjVV5avmIUfvLSdzDv2L4Ecih+LV/QrKp4wxZnme2KoekQo4afq6FcTLUA0nY96FNAsedxw5wFmqef/NQ5EPO1UZHVaFNDsKHG8MGPEWDBdea/XgmHqffC+r2UFNaqZRObr+FKi4r/CCTT3k8QJd0E1bCml6nHlCXYJEm/MHGygExUDYKFT/33BTpgz7mJXHgauqZTMIB/roe8g3Ta9XTSQdRSIjPo6/guFrB+QrhbVAjg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com;
  • Cc: Paul Durrant <paul@xxxxxxx>, "Cooper, Andrew" <andrew.cooper3@xxxxxxxxxx>, Pau Monné, Roger <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 20 Apr 2022 06:22:54 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHYTYeTB5xLKnU08E+muTG4n+sN9qz4W6FQ
  • Thread-topic: [PATCH 1/8] IOMMU/x86: drop locking from quarantine_init() hooks

> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Monday, April 11, 2022 5:36 PM
> 
> Prior extension of these functions to enable per-device quarantine page
> tables already didn't add more locking there, but merely left in place
> what had been there before. But really locking is unnecessary here:
> We're running with pcidevs_lock held (i.e. multiple invocations of the
> same function [or their teardown equivalents] are impossible, and hence
> there are no "local" races), while all consuming of the data being
> populated here can't race anyway due to happening sequentially
> afterwards. See also the comment in struct arch_pci_dev.

Better add some explanation (as you explained in other replies)
why above rationale around pcidevs_lock leads to the drop of
a different lock (mapping_lock).

> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 

Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>

 


Rackspace

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