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

Re: [PATCH v3 3/3] xen/iommu: cleanup iommu related domctl handling


  • To: Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 19 Apr 2022 18:11:34 +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=vilVxsJ+tP9LA+TwxYNqiVL7yWsVR68kFLREE+H37Rk=; b=Ip52erZispz/GD6wxQI03uVUfElVe9pdnzxsgjNDIjOMMCWq6do+atszgk2AhY0GaKJz+x85R6QFSIZTurYmxQnWdvVUnHqgb7307lCJ1/FiUplPTyKGvCunOKjLTg8jw691oZlxZxih0rWe3qJwkltUo6PR0RAp9yI31SvNwVQohFchFupxqA8q7aA1Cs6KNDMW9shp+qECfnItCSvKbd5SyK2s9GLVusiZyOurNPYFalpcfOZQzlxuv5WuKyDHSMmDrblNGUfvUksQeOcpyMPfPeAc17PeLsvOxWHX7/zsSNdaca1Dkab0HohQyNFtW+Rt64BhDm5FCVgXwfRFKw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hs6AHmNvjG+SmkqrhfHKD2n+FPWyWSWeXVW2II8yE4VlOKM756VjerMH0/gSbZFDDX+CwgSEN0FPnrRHL2Y3wuXrTJ+qRh/ZrtseQeRKw+WjgHjLIzwEzK60WsSuNJYv2jPjTejSe8anew6VfhEpukd3SkuLkmObSwohnJ64DxOi6zvziRCZO62kZb2qukVJDMLinbxy05YfVe4J5hMI2uOkOJgp7xCmZwYdDhceoD9oX2xkxoQRl8RTYDHxL5VGz8Q4S9m8dXsv60rgYkSKxCP0LR8BCdU9jnMr2OOCyDf15iKbpfEAlZq7H8cSNBd1CeEvVkyRJrBeVaIfPMfuMA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 19 Apr 2022 16:11:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 19.04.2022 16:56, Juergen Gross wrote:
> On 19.04.22 16:51, Andrew Cooper wrote:
>> On 19/04/2022 14:52, Juergen Gross wrote:
>>> Today iommu_do_domctl() is being called from arch_do_domctl() in the
>>> "default:" case of a switch statement. This has led already to crashes
>>> due to unvalidated parameters.
>>>
>>> Fix that by moving the call of iommu_do_domctl() to the main switch
>>> statement of do_domctl().
>>>
>>> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
>>> ---
>>> Another possibility would even be to merge iommu_do_domctl() completely
>>> into do_domctl(), but I wanted to start with a less intrusive variant.
>>> V3:
>>> - new patch
>>
>> I definitely prefer this approach, thanks.  In addition to being
>> clearer, it's also faster because there isn't a long line of "do you
>> understand this subop?" calls when we know exactly what it is.
>>
>> However, I think we need stub for the !HAS_PASSTHROUGH case now that it
>> is being called from common code.
> 
> Okay, I'll add it. Jan, are you fine with a stub?

Sure.

Jan




 


Rackspace

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