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

Re: [PATCH 2/6] xen/arm: fix math in add_hwdom_free_regions


  • To: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Thu, 8 May 2025 08:56:59 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=+fkPwAMOp4RrlCimDfX482BQVD3/fdFEG27YxMCYuPc=; b=QBTtJbRh4+NyE5Bvu+GolnvS4KkHOcjp42X+7VKf9jX7MbO+npM+ylK1pNxJbXoA/8QuOx6vamWy4y54kC/nDB1Kqgp7LEl4TNqs3CZwzy9TzGi3d9UXKCHOSqbWPb6MBwCltrZS1JxBX9n1cdYk8dlKjy7Jr00RdL1aiOjk2xtqy9FRUTqyaOgUcSl1+Jxc6/gZEo4fhdqFNFw5nCnPyLdfT2dLqmIhGnJdJUNmfD3kQJhr/WXGqslAiOYCiHN0JBVWP3Hb/k/6fA7V6URLlPdupx0pN1PEWGBU7qdzvpQw1Gmuu2ns4/OGvjtT2Afv9NNR+xp9kd1ZYAW8xfcXFg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xeespZwsHXly5dvdO5PYQLOKT6iVfQ5ua2XQ4NVOppXGSUEZK3CHdOF06zzDBAvA+rtOnvR9OfEecHA4YRejJqc8ieds9A1DY26lYpvN7F/0I1MO9cDFabJNP/xSpj57qX3ZQVjaD7Z1t0FRF80Cb4rURAzZjhQqnR94aDF8g+S0gbfwHW97ykPDaIT6SnixuL8XBEN538S0wTIgopHOrcGDpoCsth8hqdt6LxdXlyqVBC/Du3bxLhsU/np2eXDcvV6IVhDRL6+agKP22JLw0zV3qgp3bdUo/tYSGQOlJyAvDEbmczLbnbmjRXeW52PQz0aAZlqngn2Ox18TOY+hWQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 08 May 2025 06:57:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 05/05/2025 09:52, Orzel, Michal wrote:
> 
> 
> On 05/05/2025 04:56, Stewart Hildebrand wrote:
>> Erroneous logic was duplicated from add_ext_regions() into
>> add_hwdom_free_regions(). Frame numbers are converted to addresses, but
>> the end address (e) is rounded down to page size alignment. The logic to
>> calculate the size assumes e points to the last address, not page,
>> effectively leading to the region size being erroneously calculated to
>> be 2M smaller than the actual size of the region.
>>
>> Fix by adding 1 to the frame number before converting back to address.
>>
>> Fixes: 02975cc38389 ("xen/arm: permit non direct-mapped Dom0 construction")
>> Signed-off-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
> Acked-by: Michal Orzel <michal.orzel@xxxxxxx>

I wanted to commit your fixes but rebase is required after recent dom0less code
movement. Please do.

~Michal




 


Rackspace

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