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

Re: Arm: AArch32: Need suggestions to support 32 bit physical addresses


  • To: Ayan Kumar Halder <ayankuma@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 30 Nov 2022 13:01:57 +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=jxGDAiMsGhspSjRoO+ViyEmOjq0u3fEicMhhyFsshd8=; b=fGMdhEqwmQGziYoZ9Bu6peGSQDiVeZ8YssAlrDmTu9z5h6Z3p7mbBb77+t6UYP6T+Ii4DuwhK5VkjUO61aIZ/v6S/kJX6Vdo1V1g43+g209Z7dS035//MEdWDm42fJ1Vzr6ssN/2hs0+ZKm5A9U19hPhcwbupix91fHiwBXuz21APSksHEmYEpWOxkfg+btXB5vqgg5A6fBvcrV85EYxGCBYFa05wjtQ+Q/oQa94MRBp106/NW8nP9d0qp3/k1CvKKz/HKX82Frai53F02kB9X4TJ2/WZl5cpEi+L55FW8jR1Jl4EgUINg6nQujUlLHJF3Djq1aqdzfYhVszYqgllQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z2TQgGMkUCFeWM0NTOy+QTXn1sc2EWau9YIkZOD4k3eEWPReYBXBW9wcQJbIhaev5Lbxol/x/b1TmQWmXQgPJ1h79UXxuL6llGbd/jyV+lZ1K2Wo6i7GpTrWKiROlMh+pV1eJUJmzzAKQHLIZEqoOvp0NuknLtw/9HNWF/uxas98fi3VzgJHEFaJLwb+oRGCdjCmTH8U56Hq3jIDZ2DYxoEMrWA2F4ounf5rmFq+KbkY+T4lP4WXlVvnIY0e24RQ/EawsPGxUjWUzdY0aGlrQYFW0QcCCbmHKuTnhe2FBUcKohRjz1k0m4N7cGiwvlV0DCyD03wL5GaWb9896fqvRg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, "Stabellini, Stefano" <stefano.stabellini@xxxxxxx>, bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Andre Przywara <andre.przywara@xxxxxxx>, "Volodymyr_Babchuk@xxxxxxxx" <Volodymyr_Babchuk@xxxxxxxx>, Rahul Singh <rahul.singh@xxxxxxx>, Vladimir Murzin <vladimir.murzin@xxxxxxx>, Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 30 Nov 2022 12:02:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 30.11.2022 12:27, Ayan Kumar Halder wrote:
> Looking at "min(flsl(mfn + 1) - 1 + PAGE_SHIFT, PADDR_BITS);", I do not 
> understand the reason for "... -1" (ie subtracting by 1).
> 
> Do you know the reason ?

That's because fls() and flsl() and friends return 1-based bit indexes
(with 0 being returned when the input was zero), when we need 0-based
values here.

Jan



 


Rackspace

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