[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xen/arm: fix iomem_ranges cfg in map_range_to_domain()
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Grygorii Strashko <gragst.linux@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
- Date: Tue, 18 Feb 2025 11:50:50 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.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=9j9BLFoEIzIKPySarG9cml6mbqo+D7Q3lrAEQ0SRiyk=; b=MmAKY4Zskw/nBk437BF8yXLowz8pziJf0Y7zWQ8yji7NeWXi3oiDDUREX5uQN+hb8CfKmDlNHeSm0IN2Nr/P90sVKiYdUk7E/eroOQcebeLOF+Y3fb4LZ1RyDQtm66aKogcaIpelfVk13twr3kNCxJpF/gP1QDZLE4m1HAwRxsX+rW3V+YnBfOJ6B2JkMmh0kDvQ3FKHXg62/h9cgybY5r/FMspYTsFevV8X3GrrCtBSOCa6pWX5foGOVCZOpD6Z6vmeqmodeeIH3pdytIECUIf1Y3nyr3dYjvPrYigt3b0ohfwL9tD0+0opSY+Aw/DXSH6O/2uLR+cmoeYccv7rcA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Zi20X9+xZHNh+eDcyN4zNue3751mqpu+B5LDz/+8y5DiohTQrOhJEL1QuPUf1hOwNF9RPfbS5d//f26LiS4Sw49nzzvkp/vrVk5+jcBHkXuO/HA2Hw7xiVwuNg13+FFk1yTeH68FNtkamKyJMzaJl62G7/ofISrG9fJn3MeANr0GJa1bclwOGBCiyXFfuioN1FPeV+HA56KZmYFzEbAsCq37LTaYscU1aekTteqoJaAJcMiRc47gWGB13rv/Z8rFASAkWofSr0qGzKdeB5Hx+vgzvO/p8aAkqcQr4J4XwkmjcD1DgR7itdmkv2biKccGWgLH19P1Kd3wYxHZNdeKAA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Tue, 18 Feb 2025 09:50:59 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi Andrew, Julien,
On 14.02.25 16:25, Andrew Cooper wrote:
On 14/02/2025 2:10 pm, Grygorii Strashko wrote:
For example, requested range:
00e6140000 - 00e6141004 should set e6140:e6141 nr=2, but will
configure
e6140 e6142 nr=3 instead.
I am not sure what 'nr' is referring to here.
Sorry, will change to "num_pages"?
I agree Xen needs to be better (and by that, I mean consistent and
clear), but there are subtle bugs with most approaches like this.
Any exclusive bound, as well as counts like this need $n+1 bits of
arithmetic when you want to describe the boundaries of the space.
There is also a boundary condition for counts. What map_foo(x, 0) mean?
Real hardware uses "last" for describing boundaries (x86 specifically
calls this "limit" in the ISA, but it's a trick used by other
architectures too). Unlike "end", it's clearly an inclusive bound.
Personally, I'd like to see Xen switch to "start, last" pairs. It's
unambiguous and has fewest boundary cases.
I'm preparing for re-sending the changes with applied Julien's comments,
but I'd like to ask for clarification, as I'm not fully understand if I need to
perform any other actions regarding above comment, or not. Sorry.
BR,
-grygorii
|