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

Re: [PATCH v2.1 8/7] x86/IOMMU: Use altcall, and __initconst_cf_clobber


  • To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 22 Feb 2022 12:06:02 +0100
  • 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=dFtFAO7JUprpOdWh9zZbXNzXCr8f+xnCmz3TMEOS+UY=; b=ZVa9b3VLh0MyWKjUGF/WgqjEBY8fBAp67l9py2MLHP5zkCnUh7iYkc9f60zmOOJbfOrAd4M9I2yncW3BzAtyel86DEM2h/9CdttUEX7EP7na5CuObU6RRYtuHu1xBbtgT7glJs1zXa/bPW3wzxcIED4pa2etQwPaNIeGDW1qW+Mdpewu7cEDgsajszaK2ZPIqprsa+Mbe5OuD4O8ESAc/bVlvGVrT7lZ0qvWdhlltt7aEPXszY7P06DQwyhBgzdBpDwFQLhteJEtIIRGq5Hs+UsqNdiG6jfNI+YxvawzXjfrEVYO0wDrDEw6Os2lTq9t8e3Vf3J6o4CHE5bznO4g+g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NmnEMerGkWh5DzpX1wYitapUly0N25vQmn1NxxXwqvuww4xiGGl5IESn0+CkKkoo3f9ZSKM5bxzKyFfG0WIVpHtN8n7QvLopXuAK6mRVoB6EIJY77EWz+yt/COFKbJGlhP+IdslHecMe/esvQa2+5sUOButIKEXhA+pUmAyUkrVTnpqO6wGkA5qFHcBQW3cmrmZsCjyvCWNZhBlfQowawrnHOMleCAWnrWjld20SiaDlw0xzTogu0q9C0YtBg0YKbOF0LEAOoPHbCPv4sMGsEloxd5L0loCp6HlaptWmRG07QpPk5DE6rH3vxiWYu00JCgEgDO8Xy0V525Uah1bH8A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 22 Feb 2022 11:06:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 22.02.2022 12:02, Andrew Cooper wrote:
> On 22/02/2022 10:54, Andrew Cooper wrote:
>> On 22/02/2022 09:29, Jan Beulich wrote:
>>> On 21.02.2022 19:03, Andrew Cooper wrote:
>>>> @@ -106,7 +104,7 @@ int iommu_setup_hpet_msi(struct msi_desc *);
>>>>  static inline int iommu_adjust_irq_affinities(void)
>>>>  {
>>>>      return iommu_ops.adjust_irq_affinities
>>>> -           ? iommu_ops.adjust_irq_affinities()
>>>> +           ? iommu_call(iommu_ops, adjust_irq_affinities)
>>> While this (and other instances below) is x86-only code, where - with
>>> the removal of the #ifdef above - we now know the first argument is
>>> always ignored, I think it would still better be of the correct type
>>> (&iommu_ops). Perhaps the "(void)(ops)" in the macro definitions would
>>> better become "ASSERT((ops) == &iommu_ops)", which would check both
>>> type (compile time) and value (runtime).
>> I'm happy to fold that change if you want.  It ought to optimise out
>> completely for being
> 
> Bah - sent too early.  "for being tautological."

It's tautological here, but not everywhere. But imo the ASSERT() is
good to have anyway, i.e. even if it leaves traces elsewhere in debug
builds.

Jan




 


Rackspace

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