[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 12:31:25 +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=BLJSAeSEkFj08J/5xstB9W4q1+Zy/X/z15JAixrIQSo=; b=kHUCRCzFgS5zpWFeJXQBE8x1CM4Kg3/4OOqKp6JcnEpLNweG0i0X60KayohOsi0qIdRGTBcD+WN/gxmCdPzBS0cCHYDh1Hz00SlMdwW0MpOWG/LvXUdYzMSYVihXTAR/66G2yh/OT6z+QABmNjuPHgfQOmv0xjrKQWPXyzDoI/5nWOdLwDTaFuSpZ6TqKY0ST9C1irBi3fyEwg1EW8UfJJgCtcM2vsuRia/KdY522EN3G9S7HRAcXRkwSNYPEd6HgMiUqcLzhAeCf3GYdTgO+KpXsIUnWYh3KwU+465l/ksLgJGm6lZgzffmnvVkOcQ8wmfTWsM9QF5uGfV29uex+g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=REzgv6u9G2RNQtZYZzF59zOklK2IMaqcC0LQVSb/XiaO8sSI+VDBJS++2gzMPQdBusPCUJjZon7QNr9Nu/xGvDHAbxs7B6rq0mOAE90vW2Qh77vrym/9b1R/llQ3syjwj05V1Tn3iZaZUbpzv4TguK607VYQIXxF4WEwtKMsN2Hli//FE+xY/cgm904atlhyh/T5GGnvKjVC5V4uwtvtvdoY3yi1p0LjtsbqPdtN20lpEOHqyGlLJs9aMtXLyRvY50olAaBLOGaBj4Oj9Is7tmI41EFZY/qbOFF7uDEDL5q4lWQzrTjpES1u39mL7KH4GFqTH2jtjzxz744dNZuteQ==
- 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 10:31:43 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 08/05/2025 12:30, Stewart Hildebrand wrote:
> On 5/8/25 02:56, Orzel, Michal wrote:
>> 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.
>
> Yes, I have already rebased locally. I'll send later today. Is it okay
> to keep your A-b tag?
Yes, of course.
~Michal
|