From nobody Fri Jan 9 09:08:15 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1766078925; cv=none; d=zohomail.com; s=zohoarc; b=B4NjEKFxyY2irKtdjkPyCE73vKw2Y5jc9qltLpXdes0/n0VBBeT3sO2Xgxjeo3Qy+jyEY0rtYGYTzevtOACXKR5d/kQ5ml2rS16DveGUp1mLUYr5ZL6GGud5Ys+qFfr8LUkd+rJ3Ret23ab2Wm5CL4fQQ7plfHwo/ZKNCWkHyhw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1766078925; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=rW+wJ63md9ndA96ESO3iCElLFPadst5PIcpnOB9F2yY=; b=e3wPvrtXv8dA7NURhPRqyDeHTdjzLGEKTdaJd68vw/jbtjyWX9otKC3W0JukkG0RqsH8ZXp13LWlKlg2JGMkYgTJMxL114nVblLHxV/N11um+nA8OeyUIzNkDFD1UUseSEfaF4Pt/4R+D9Ap6Utz+Rr2pD9X8+42R6wAsK1AeWA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1766078925052592.9098794868676; Thu, 18 Dec 2025 09:28:45 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1190024.1510699 (Exim 4.92) (envelope-from ) id 1vWHne-0002mo-8k; Thu, 18 Dec 2025 17:28:26 +0000 Received: by outflank-mailman (output) from mailman id 1190024.1510699; Thu, 18 Dec 2025 17:28:26 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vWHne-0002lW-3u; Thu, 18 Dec 2025 17:28:26 +0000 Received: by outflank-mailman (input) for mailman id 1190024; Thu, 18 Dec 2025 17:28:25 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vWHnd-0002iW-0J for xen-devel@lists.xenproject.org; Thu, 18 Dec 2025 17:28:25 +0000 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [2a00:1450:4864:20::52c]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id f3de86f7-dc36-11f0-9cce-f158ae23cfc8; Thu, 18 Dec 2025 18:28:22 +0100 (CET) Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-64b4b35c812so1192929a12.0 for ; Thu, 18 Dec 2025 09:28:22 -0800 (PST) Received: from fedora (user-109-243-71-38.play-internet.pl. [109.243.71.38]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-64b585b53c1sm3209423a12.5.2025.12.18.09.28.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Dec 2025 09:28:21 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: f3de86f7-dc36-11f0-9cce-f158ae23cfc8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766078902; x=1766683702; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rW+wJ63md9ndA96ESO3iCElLFPadst5PIcpnOB9F2yY=; b=NLCfjbxlBNuNJoQb7UGi80qWLnruJmUqetGj/rQtsBYtxyQjXZvkeJVYZWT/bMGFx4 gT2mtUSs0GW5lT0yuDABx5zRlBZdR8jt5vru8GIxG5siSzEw9hbufIB0+Xx0AM7qoCXH hta4fNaIeH1kypozPhOvve1usqzM0mOyZpy+DYtNSdk2n6SQg/oR+OUKE5HBY8d1WPQn WynzeLbkHsnGVy6dwMtzDacbrfIBXhsDCRzs05TYa5Wq5t5KUKFqzdwiLVVwhb2D8zse kkQV0po8oo52I5nfJyoJlRWJRh/d1Ax89urhFknLdrGj22bGrTA3ZA5WqHMoSI9zSQIs MlZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766078902; x=1766683702; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=rW+wJ63md9ndA96ESO3iCElLFPadst5PIcpnOB9F2yY=; b=RazTm4Je+K45+DhXLSsMePu296x5pEp9pGndcsNvoh+VvCmhkfhcO+UisiDT/+kTtT hsNKh4sSD3YNHk9qNRom810M9iDxHY9msfXqsgZJOTRsso370ImvmUuIGhUAsw5TNiG1 f2j1iqA9Lc6HqtszgxTyysym6MTdTRfr8KY5kgBUtHlkdoLg/Ij9TEl7zLm0S4wiD7jS MHd07DuwvQI1dMT16c2X767f4UikmVBiFU+kA+1FjOFkjDbgaQqVYCjjEov805qb0ceQ ylaPEdsMGAnvrwvKljW7dJd34dGEx0si5XzWBNmdzSzOu+y+KRGtOZ9U1CafOA/1L7Ro b23Q== X-Gm-Message-State: AOJu0Yz+rbOT/GgNL3oICfHeEQMgytRl6acLMv0UVydJFHnC9ElnSOHu td2WCdu01XKcWyG2z/azoEbCu44G0KvARxn44hlT9GkKZdDJ8xwheWxNobWUAA== X-Gm-Gg: AY/fxX4f7vk0rZ4AMkgcC36pN1bSMmytg5EZS77YgZ17aBTA7CDqiIx707CKqNWoxtX Cp/r6ZEAHNiotNoJxkpuh5su+3IgntDSYFVbw5wnlORdPH8tcrSUT/Uop61fGXJVQuoCehGBOvl 6MTbYCcj3liiS3pqlzXUZ4ajnutJ30NUlva3Kz7plcNJuCJFZPHkqq+J6vmqVXdlOoxKv1lpvV3 SWBdLsR9S4qOcvzj6VBYnDaOv1Av9rDpaluJ6W0ZNobVlwE63rlzZlXKi5HSv+0S7HA5clxpTGo m4MP4SjGR4fClztCoAaV7x7ETuFjfowqpMhCwKCQqt+moZn8OHFzWwVqgRXZQDAA/G9i7PLBstn dWlTAS2J/6SKfK9U9/nCrvtMEKosmmE+DZc5kwV3P9RFX3rtZjZOxDOdwxWaR7hdf422Z/MzE4x 3bMfgw+ZVNm1Z72NYryyqwrPnC5O63VdoWRdWElZN/Au7emezLLM2f+jM= X-Google-Smtp-Source: AGHT+IHOLBkvgXaKhb4YYR5U8jNPk5mPr/gqCgbWRquEGgBpPyyXGtotZ574+vtr5wqIVm/PSZMAwA== X-Received: by 2002:a05:6402:3550:b0:641:8a92:9334 with SMTP id 4fb4d7f45d1cf-64b8e938162mr193723a12.6.1766078901964; Thu, 18 Dec 2025 09:28:21 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk Subject: [PATCH v2 2/4] xen/arm: drop MAX_PAGES_PER_VCPU Date: Thu, 18 Dec 2025 18:28:07 +0100 Message-ID: <74f1594aad235765002b59f2baa975cc8fe72f06.1766053253.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1766078925669158500 Content-Type: text/plain; charset="utf-8" Now that the size of struct vcpu is smaller than PAGE_SIZE, MAX_PAGES_PER_VCPU is no longer needed and is removed. This change also updates {alloc,free}_vcpu_struct(). Signed-off-by: Oleksii Kurochko --- Changes in v2: - New patch. --- xen/arch/arm/domain.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 47973f99d9..e566023340 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -473,36 +473,21 @@ void dump_pageframe_info(struct domain *d) =20 } =20 -/* - * The new VGIC has a bigger per-IRQ structure, so we need more than one - * page on ARM64. Cowardly increase the limit in this case. - */ -#if defined(CONFIG_NEW_VGIC) && defined(CONFIG_ARM_64) -#define MAX_PAGES_PER_VCPU 2 -#else -#define MAX_PAGES_PER_VCPU 1 -#endif - struct vcpu *alloc_vcpu_struct(const struct domain *d) { struct vcpu *v; =20 - BUILD_BUG_ON(sizeof(*v) > MAX_PAGES_PER_VCPU * PAGE_SIZE); - v =3D alloc_xenheap_pages(get_order_from_bytes(sizeof(*v)), 0); - if ( v !=3D NULL ) - { - unsigned int i; - - for ( i =3D 0; i < DIV_ROUND_UP(sizeof(*v), PAGE_SIZE); i++ ) - clear_page((void *)v + i * PAGE_SIZE); - } + BUILD_BUG_ON(sizeof(*v) > PAGE_SIZE); + v =3D alloc_xenheap_pages(0, 0); + if ( v ) + clear_page(v); =20 return v; } =20 void free_vcpu_struct(struct vcpu *v) { - free_xenheap_pages(v, get_order_from_bytes(sizeof(*v))); + free_xenheap_page(v); } =20 int arch_vcpu_create(struct vcpu *v) --=20 2.52.0