From nobody Fri Oct 31 09:26:57 2025 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; 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=1751399706; cv=none; d=zohomail.com; s=zohoarc; b=TkeZ+xKhAX3mr4nD3IvqziPl5YVtba9hUXpMXdCzF/dxFZvNI60msVn6bsxyfhdt5BurdpMmznlAgsyi9sVZxqroMiKON6sJCf8uBMYFDDVlvwCp7xrBmpjNQui0ouWLd3s2CfASATKJDIwFriP6HI6rMivL0tfivDmPkANlFK0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1751399706; h=Content-Type: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=PYagUw7+nV4AIrSjbYjtskD6tyaobfXIr4xaV+yxYuw=; b=hcsecEvNNAjgCrwvnvbq/ZjIvVkCVWk5OZCGFJHJdUUFlNEtt+RcC1L3j2jvYRt/9UswyCnFnYYvPlZPQVwEvIIaeNJtHHOuztF79okInfulfxm6KbuUyvuCauQfl3vYZXns8V8IqIEu3N8liLMs0SMLjxV/TriIUDtrbavrSqk= 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 175139970610612.241121174738396; Tue, 1 Jul 2025 12:55:06 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1029948.1403701 (Exim 4.92) (envelope-from ) id 1uWh43-0001Qh-Pa; Tue, 01 Jul 2025 19:54:47 +0000 Received: by outflank-mailman (output) from mailman id 1029948.1403701; Tue, 01 Jul 2025 19:54:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uWh43-0001P7-Jd; Tue, 01 Jul 2025 19:54:47 +0000 Received: by outflank-mailman (input) for mailman id 1029948; Tue, 01 Jul 2025 19:54:45 +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 1uWh41-0000D0-TQ for xen-devel@lists.xenproject.org; Tue, 01 Jul 2025 19:54:45 +0000 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [2a00:1450:4864:20::429]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 3b8e77c4-56b5-11f0-b894-0df219b8e170; Tue, 01 Jul 2025 21:54:43 +0200 (CEST) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3a4e749d7b2so1029516f8f.0 for ; Tue, 01 Jul 2025 12:54:43 -0700 (PDT) Received: from lab.home (dynamic-2a00-1028-83a4-4bca-c0bb-96ff-feed-9d50.ipv6.o2.cz. [2a00:1028:83a4:4bca:c0bb:96ff:feed:9d50]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a88c7e9d1csm14291644f8f.13.2025.07.01.12.54.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Jul 2025 12:54:42 -0700 (PDT) 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: 3b8e77c4-56b5-11f0-b894-0df219b8e170 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751399683; x=1752004483; 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=PYagUw7+nV4AIrSjbYjtskD6tyaobfXIr4xaV+yxYuw=; b=Di3xDQEKfDyU7yBCcvW7aAj2PGSFVVzQQwN1VPejqsnsAUO472bU38df8ZInR9KTD4 2sp0iBEeHF9AI8UxPb6ZokYYbF8GHI6thVhKqdOq1QoYbUImL9fwMXbRM5R7bC+57Upm x2mHMtyO76e5sKXg6yUR33xSwXQtRzAsPWTVPT60ocvPXJ8FU+P5nkh0j8eoPkvJCMNn NOdV+XlJOERvf2p1yyW06Gs2U5AxijWdOfIIdUKwwM4Zcb9f7hD1z+v9ez9JWJOoUzzd J8InY0jwAz3Uy0dLBv9hGNFnRFUeZRzbXt7gHace4cpk7ujap50OscJ6CT2b+a3MqOiH spkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751399683; x=1752004483; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PYagUw7+nV4AIrSjbYjtskD6tyaobfXIr4xaV+yxYuw=; b=WgACGQKvSSV9HwOR8ftHypwH75AR7dutHFrpZAkYI8Yil8tNoPeoOhmc+EC+lS5DqZ i94SYbGKlWBboreCtqi1ymWlK2nR9fAD4fAp0DPCDcJPfiN2wOWAzCXX0wMHOfsUu22T gx4HsLNb3/aR6Th0MyDsAtW/q0usxj8/k0Nj/ejzQgti/eRZCXJ/UDPXUYUChtwI/3Jq Gz1Uhgmuv9VaoLOoYyimQuJv0nLsgvNmG3dkJ6bINyQj7ig408JVdFFFBTWqqayvxq+w eaVghJDBYkwPQwvzoUvkTmmAEyYf/U+df+C5KRmy97a1UA+M0CwQc6X05bWj8887W3kh DH4Q== X-Gm-Message-State: AOJu0YyWakvvO0zJ4/Bp9qeecV04b1IQtMrP/vwWiTVbPCNNB+tlA4di x9Y4GdcsG8HzDBs2cmN6vgjKDsFcTQNEslrqaiwKZ9HrQhRUQqGWQ7mlc3bTKg== X-Gm-Gg: ASbGnct6PCktHTa6DAQuWkrkcilA8Vk5eISZNPi9ftiF1XbSN9kBJs+0pcti7dBJn78 trcpYfIb1JlmBaqqi64V4VjiKhHH/lZ2jx1DpjUEWy4hO2aaNHlBCtMTUFiKxt4TQW5Z7AvgzCS HcJU1Ol+qPR+xbqjZD8d13NiEeBhc7OT0a32Jqanekk3AJKZ9EQbjQABv68f5gSPxNmilm/hPD+ jx1Y2gvAr6o/Gt0UahITEe6cKHvTsggu+m+COXkRfc+vV66sTstFiJByLklIg6FsdXIHb2rlS9b 9JetNqvNSodqWwVse7aDOuo03BWiv2cfMpPUAHhMurbmO8xtHt9RDhsSbn5rUfu3tp3jVJLoJzJ t4edGwXXSg2RVPVy6FfgmkBiT13HWjCZfLwBcVwEtMpKxlvjicUye1XL/v/vGqA== X-Google-Smtp-Source: AGHT+IE/KB/pxZ3KsLfyOzOBxluoYg0uOA1iBcipA1IAJq6s4BCrryXlA7GMb3XV63jEVfYXkY5AUw== X-Received: by 2002:a05:6000:4282:b0:3a5:1306:3c30 with SMTP id ffacd0b85a97d-3af459656bfmr1410089f8f.0.1751399682732; Tue, 01 Jul 2025 12:54:42 -0700 (PDT) From: "=?UTF-8?q?Petr=20Bene=C5=A1?=" X-Google-Original-From: =?UTF-8?q?Petr=20Bene=C5=A1?= To: xen-devel@lists.xenproject.org Cc: =?UTF-8?q?Petr=20Bene=C5=A1?= , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH v7 6/7] xen/x86: Disallow creating domains with altp2m enabled and altp2m.nr == 0 Date: Tue, 1 Jul 2025 19:54:28 +0000 Message-Id: <6875a5f659a9a48e2beb49e3c5ff8a2720ff882e.1751397919.git.w1benny@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1751399706511116600 From: Petr Bene=C5=A1 Since libxl finally sends the altp2m.nr value, we can remove the previously introduced temporary workaround. Creating domain with enabled altp2m while setting altp2m.nr =3D=3D 0 doesn't make sense and it's probably not what user wants. Signed-off-by: Petr Bene=C5=A1 Acked-by: Jan Beulich --- xen/arch/x86/domain.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index 155ea1f79f..872e97999c 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -739,8 +739,9 @@ int arch_sanitise_domain_config(struct xen_domctl_creat= edomain *config) =20 if ( !config->altp2m.nr ) { - /* Fix the value to the legacy default */ - config->altp2m.nr =3D 10; + dprintk(XENLOG_INFO, + "altp2m must be requested with altp2m.nr > 0\n"); + return -EINVAL; } =20 if ( config->altp2m.nr > MAX_NR_ALTP2M ) --=20 2.34.1