[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 09/11] xen/riscv: introduce p2m_gpa_bits
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
- Date: Wed, 1 Apr 2026 15:50:13 +0200
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=20251104 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:In-Reply-To:From:Content-Language:References:Cc:To:Subject:User-Agent:MIME-Version:Date:Message-ID"
- Cc: Romain Caritey <Romain.Caritey@xxxxxxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Wed, 01 Apr 2026 13:50:17 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 4/1/26 8:07 AM, Jan Beulich wrote:
@@ -191,8 +209,13 @@ static void __init gstage_mode_detect(void)
void __init guest_mm_init(void)
{
+ unsigned int gpa_bits;
+ unsigned int paging_levels = default_gstage_mode.paging_levels;
Deriving a global from a default, when ...
gstage_mode_detect();
+ ASSERT(default_gstage_mode.paging_levels <= max_gstage_mode.paging_levels);
... the default isn't the maximum possible, isn't going to fly.
I didn't get you here.
If we want Xen uses Sv39 for G-stage, we want to limit guest's 56-bit
GPA to 39-bit GPA, but not the maximum supported by h/w mode for G-stage
mode.
I can only repeat what I thought I had got across already on an earlier
series of yours: What mode a guest is going to use is going to be a guest
property. The default mode therefore isn't the only mode that may be used
at runtime.
I remember that, but i don't really understand what is wrong now with
the ASSERT(). It should be changed or dropped at all when this property
you are talking about will be introduced.
~ Oleksii
|