From nobody Mon Sep 16 18:56:08 2024 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=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1721339893; cv=none; d=zohomail.com; s=zohoarc; b=F4pcbBYG4XkhhhBBCFv2MUP0J9t6/qaxZTBk0HSGw0sEdBaAkIXrTb8gDLWBy9+As6bXXzJDMFzgHHIny7ppO68YwN+p7OPylPoQzNgkeSteMnISHyvEV6gURpLeTZlgfBQ7hCriYAY6kA2aYCl7/ilxpSTXaNEf/qyS7SjxLbY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1721339893; 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=zwFWzFvgZNrEVHvyRBE8cy2ybaA/G1NJTsH6Emb+MEQ=; b=BvkSsrChNh7WsxI745bt1lhbNb2rAjoyBdYlz/0F98zJPJHAkfssvRzISRJjY4bPQYI78sZHY4bjffK1gE+oSAOkLXD815l7XiyaTWHqEXDhVejaKVTh26CZGqfzQDxeOQCxxiUZR+UOv3LhImFx17AQpVirwjM3Aq+NgOqt1xY= 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=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1721339893377553.4233293961363; Thu, 18 Jul 2024 14:58:13 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.760735.1170642 (Exim 4.92) (envelope-from ) id 1sUZ8O-0003EA-1M; Thu, 18 Jul 2024 21:57:56 +0000 Received: by outflank-mailman (output) from mailman id 760735.1170642; Thu, 18 Jul 2024 21:57:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUZ8N-0003Cv-RQ; Thu, 18 Jul 2024 21:57:55 +0000 Received: by outflank-mailman (input) for mailman id 760735; Thu, 18 Jul 2024 21:57:54 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUZ8M-0003BD-6A for xen-devel@lists.xenproject.org; Thu, 18 Jul 2024 21:57:54 +0000 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [2a00:1450:4864:20::229]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id c8087f40-4550-11ef-bbfd-fd08da9f4363; Thu, 18 Jul 2024 23:57:52 +0200 (CEST) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2eedea0fd88so17559621fa.2 for ; Thu, 18 Jul 2024 14:57:52 -0700 (PDT) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7a33de74e5sm5294266b.147.2024.07.18.14.57.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 14:57:50 -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: c8087f40-4550-11ef-bbfd-fd08da9f4363 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1721339871; x=1721944671; 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=zwFWzFvgZNrEVHvyRBE8cy2ybaA/G1NJTsH6Emb+MEQ=; b=r+Vu8uaXA/MHX011CptwK1aHeMR5A1/I9RhXtxeeA/sC31JVuYUnhvZLqi+8LnC6QP g/1HvrBIXn0FNjZIYsZaSnJlpPHst7g0aMw+CvE2nPTHPcqJy/IKh1Q2nE0fHIlxtv3u PB5FT7fX1yj2OvsCSvn+u6BCBHEMbuY55aiPM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721339871; x=1721944671; 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=zwFWzFvgZNrEVHvyRBE8cy2ybaA/G1NJTsH6Emb+MEQ=; b=VK981onbRL7G4/2U26bNbEKETPirUPSX5YyA/NnABQQNs5jGb2pqsLzcfXSYs3XG2D CY8dBWxp8niAYn0fhQ6ChcuIs+0Xe3Q7f72EQxEpH+gLgqMhPqthxt7r0qYXGp/uXj+L yOkMLWuGczBI9qQH3OjF+vBhz78bM3ZQjRuisD4VDcdG1lH+kwBDN1kB9vOVobh4XfV8 bSOLkP/kIdp3MJTkPDgD8O6ohuQJFPXChY58DdF1ZqlEkT/sjWN3jEZPfx9irFM5PKB/ Gdc5P2guOPtMeyDI1pWDb+BO72T/L5qM3ZwEKf424fM3t7Mia1XbqHzIq89ZPA+IJdAM xZMA== X-Gm-Message-State: AOJu0Yw6iC1qE+PC9HdF3IKTAiG+k0WzNTbZSCPcBprVOrxP/OeOokOW KzuDnpyS6GqgLJ9FOzKQSSXa6noQ0ekNecEgjVKzmNT6s9k4K6I9CgkYOjh4pmqhu1zpX7KY86A 1 X-Google-Smtp-Source: AGHT+IFRHnZO7GLRxxpq0OV++qcIOqQIfYWu2izeKn140Dl3ATRuCUEfGAbfWVvQK4LITKnoUg8qmA== X-Received: by 2002:a05:6512:682:b0:52c:e040:7d9 with SMTP id 2adb3069b0e04-52ee5428af2mr4540350e87.59.1721339871272; Thu, 18 Jul 2024 14:57:51 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Bertrand Marquis , Michal Orzel , Oleksii Kurochko Subject: [PATCH 1/4] xen/domain: Introduce arch_init_idle_domain() Date: Thu, 18 Jul 2024 22:57:41 +0100 Message-Id: <20240718215744.3892072-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240718215744.3892072-1-andrew.cooper3@citrix.com> References: <20240718215744.3892072-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1721339895375116600 The idle domain causes a large amount of complexity in domain_create() beca= use of x86's need to initialise d->arch.ctxt_switch in arch_domain_create(). In order to address this, introduce an optional hook to perform extra initialisation of the idle domain. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Stefano Stabellini CC: Julien Grall CC: Volodymyr Babchuk CC: Bertrand Marquis CC: Michal Orzel CC: Oleksii Kurochko --- xen/common/domain.c | 3 +++ xen/include/xen/sched.h | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/xen/common/domain.c b/xen/common/domain.c index fb262dcec919..e312c820d641 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -685,6 +685,9 @@ struct domain *domain_create(domid_t domid, =20 rangeset_domain_initialise(d); =20 + if ( is_idle_domain(d) ) + arch_init_idle_domain(d); + /* DOMID_{XEN,IO,etc} (other than IDLE) are sufficiently constructed. = */ if ( is_system_domain(d) && !is_idle_domain(d) ) return d; diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index 2dcd1d1a4f8a..90666576c2f8 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -728,6 +728,11 @@ struct domain *domain_create(domid_t domid, struct xen_domctl_createdomain *config, unsigned int flags); =20 +#ifndef arch_init_idle_domain +/* Optional, if there's any construction necessary for DOMID_IDLE */ +static inline void arch_init_idle_domain(struct domain *d) {} +#endif + /* * rcu_lock_domain_by_id() is more efficient than get_domain_by_id(). * This is the preferred function if the returned domain reference --=20 2.39.2 From nobody Mon Sep 16 18:56:08 2024 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=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1721339893; cv=none; d=zohomail.com; s=zohoarc; b=dk2yXg4jz53BowmhkdQuCEmLjeT5+gcTZnkO7Onld6HjcJArjoneybw6tOMVdqiwWITNa33fmrttZY5Yy4LD64yMf9g8jjWVK2n6ly0y6/KI1OMu7PoYTtHjCP2LcxZaInxtgvHwrjxD0lqxE+MyBuxkYuemhNtcCV2ivEgkhA4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1721339893; 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=4GWn57rc3KL1PwUW4FYINxfwiapH7y2BIUBNdFS5IEE=; b=HeXVGyq7hbipu14EVnE4K+KhWC5Mc3bM+sR+AGIkurCIkUA3bZf93u+0GicZrCnMhwmzZpIdHsf8NoQjd4cC/ymX6WjHHdRChdJu9kJSm5I7r4y866ezGv/+bVDvoZE8AXygCOz5MMDtnTrDWHBSJN8vPfzF/GnOkj7rgBnk8tU= 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=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1721339893409562.3426067983299; Thu, 18 Jul 2024 14:58:13 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.760736.1170657 (Exim 4.92) (envelope-from ) id 1sUZ8P-0003es-5a; Thu, 18 Jul 2024 21:57:57 +0000 Received: by outflank-mailman (output) from mailman id 760736.1170657; Thu, 18 Jul 2024 21:57:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUZ8P-0003eC-2K; Thu, 18 Jul 2024 21:57:57 +0000 Received: by outflank-mailman (input) for mailman id 760736; Thu, 18 Jul 2024 21:57:55 +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 1sUZ8N-0002ha-LT for xen-devel@lists.xenproject.org; Thu, 18 Jul 2024 21:57:55 +0000 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [2a00:1450:4864:20::62d]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c8c7e146-4550-11ef-8776-851b0ebba9a2; Thu, 18 Jul 2024 23:57:54 +0200 (CEST) Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a77ec5d3b0dso142087166b.0 for ; Thu, 18 Jul 2024 14:57:54 -0700 (PDT) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7a33de74e5sm5294266b.147.2024.07.18.14.57.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 14:57:51 -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: c8c7e146-4550-11ef-8776-851b0ebba9a2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1721339873; x=1721944673; 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=4GWn57rc3KL1PwUW4FYINxfwiapH7y2BIUBNdFS5IEE=; b=d+pdsbs/RoAFns/vM3tUJkFHJlIQYRydN8LQ/gz1QR7WROYNiK0B9rU6ZPac+YC6Zm AAdA26TeNwGKxxqpiVD8v9nxS8s04P1mOZY1YBXSzHbjRFL9lZtqDRWtOS3h9h5qSL7q 4slXc+JfOYdatcY9WJW6v4QqEzyHOYEjSIaNM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721339873; x=1721944673; 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=4GWn57rc3KL1PwUW4FYINxfwiapH7y2BIUBNdFS5IEE=; b=eDgBQP6ftG6/7g06MKaIs0VzsfI7N/n5M6YaZ8kfOquC/YM3IdDVwzeUcrX6n1Ep39 on6pJkGmnEA0aaOdhV3MIzjPilTSvCLQGv2rrKWBVk1NlyXE8V0By+jQCwd9jvofe+K4 J57VxKF2XHPpcmZFzknGMkpZoAK/O6nnn0u62io9xiafJyKCXu4462Yj8KUnZIpeX77B 2flFBl45C6NenjhZY7txC5JL4qIXTuPDGFQhpGCTZOROF9uiv0bJE+cigvdVNh0wob+S LutsOY9rVQO4cYflo28BS1aqM38y6uGWYNHLfOSQUs0goLBNHCP4xpUwHCUp0D2FD7pS WGRw== X-Gm-Message-State: AOJu0YwEexa1C6uC+sfjZq8cmiaqieZomtfg9lJOywldHycxz1faPhHC RAV69anmyBHhBE2VG29bbOqh7LpQyJY+4Pj1ygGLpVv2xbqPfLcbBwHIrI0GaRi1gJJ3h1V3hGz j X-Google-Smtp-Source: AGHT+IE3GGRKISsIRhYfJ2h3x/9H/KPzRnvd/7V4dLwQxc5o97oAu/KglCBD0nhQcEY4Ch4NIYTFfg== X-Received: by 2002:a17:906:eb57:b0:a75:360a:6cb0 with SMTP id a640c23a62f3a-a7a0115669bmr386806366b.29.1721339873212; Thu, 18 Jul 2024 14:57:53 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Bertrand Marquis , Michal Orzel , Oleksii Kurochko Subject: [PATCH 2/4] x86/domain: Implement arch_init_idle_domain() Date: Thu, 18 Jul 2024 22:57:42 +0100 Message-Id: <20240718215744.3892072-3-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240718215744.3892072-1-andrew.cooper3@citrix.com> References: <20240718215744.3892072-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1721339895156116600 The idle domain needs d->arch.ctxt_switch initialised on x86. Implement the new arch_init_idle_domain() in order to do this. Right now this double-initalises the ctxt_switch pointer, but it's safe and will stop happening when domain_create() is cleaned up as a consequence. No practical change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Stefano Stabellini CC: Julien Grall CC: Volodymyr Babchuk CC: Bertrand Marquis CC: Michal Orzel CC: Oleksii Kurochko --- xen/arch/x86/domain.c | 19 ++++++++++++------- xen/arch/x86/include/asm/domain.h | 3 +++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index ccadfe0c9e70..eff905c6c6e5 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -768,6 +768,17 @@ static bool emulation_flags_ok(const struct domain *d,= uint32_t emflags) return true; } =20 +void __init arch_init_idle_domain(struct domain *d) +{ + static const struct arch_csw idle_csw =3D { + .from =3D paravirt_ctxt_switch_from, + .to =3D paravirt_ctxt_switch_to, + .tail =3D idle_loop, + }; + + d->arch.ctxt_switch =3D &idle_csw; +} + int arch_domain_create(struct domain *d, struct xen_domctl_createdomain *config, unsigned int flags) @@ -783,13 +794,7 @@ int arch_domain_create(struct domain *d, /* Minimal initialisation for the idle domain. */ if ( unlikely(is_idle_domain(d)) ) { - static const struct arch_csw idle_csw =3D { - .from =3D paravirt_ctxt_switch_from, - .to =3D paravirt_ctxt_switch_to, - .tail =3D idle_loop, - }; - - d->arch.ctxt_switch =3D &idle_csw; + arch_init_idle_domain(d); =20 d->arch.cpu_policy =3D ZERO_BLOCK_PTR; /* Catch stray misuses. */ =20 diff --git a/xen/arch/x86/include/asm/domain.h b/xen/arch/x86/include/asm/d= omain.h index f5daeb182baa..bca3258d69ac 100644 --- a/xen/arch/x86/include/asm/domain.h +++ b/xen/arch/x86/include/asm/domain.h @@ -779,6 +779,9 @@ struct arch_vcpu_io { /* Maxphysaddr supportable by the paging infrastructure. */ unsigned int domain_max_paddr_bits(const struct domain *d); =20 +#define arch_init_idle_domain arch_init_idle_domain +void arch_init_idle_domain(struct domain *d); + #endif /* __ASM_DOMAIN_H__ */ =20 /* --=20 2.39.2 From nobody Mon Sep 16 18:56:08 2024 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=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1721339896; cv=none; d=zohomail.com; s=zohoarc; b=NbfBBQJ9OsAWlV7gLvzSz7Y7/nDmDmWLkK3G9PlRMNFVuUmLiDZfn5lD5T6CZBrwfRd1fVnrzJCJQu6SmO7Wk5adVE0nGgBCqIzdtqBXENHy+LppPwQwO4xrYqKTrpc4beo0vpmX42gf/mmqf47M4wDepzdcfWXt3C0/nzm1HXo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1721339896; 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=0kD2ViH5db6Uhco+HhIi3wbdU8JjVgf/T8jwX9hiBjs=; b=UMXjo53gdsWU61xpVEN1v2fDWPi+dMlmX/QnBwalz7V1v4kKFr2zcwoSLLnKmTkxM0rU8vESb1eBqVsZ3YNgl51KCfrx0Ik3ur/PWb2O70VNgVIXMPaOO9uNgPlmN2YISpNBghH6KkV1IMc2rB4/YYBACJYNGcyfxLNwYxS0pu0= 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=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 17213398960781014.8578153425489; Thu, 18 Jul 2024 14:58:16 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.760738.1170667 (Exim 4.92) (envelope-from ) id 1sUZ8Q-0003vB-Dz; Thu, 18 Jul 2024 21:57:58 +0000 Received: by outflank-mailman (output) from mailman id 760738.1170667; Thu, 18 Jul 2024 21:57:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUZ8Q-0003v2-9y; Thu, 18 Jul 2024 21:57:58 +0000 Received: by outflank-mailman (input) for mailman id 760738; Thu, 18 Jul 2024 21:57:57 +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 1sUZ8P-0002ha-1r for xen-devel@lists.xenproject.org; Thu, 18 Jul 2024 21:57:57 +0000 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [2a00:1450:4864:20::22d]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c99aefcf-4550-11ef-8776-851b0ebba9a2; Thu, 18 Jul 2024 23:57:55 +0200 (CEST) Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2eeb2d60efbso20289261fa.1 for ; Thu, 18 Jul 2024 14:57:55 -0700 (PDT) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7a33de74e5sm5294266b.147.2024.07.18.14.57.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 14:57:53 -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: c99aefcf-4550-11ef-8776-851b0ebba9a2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1721339874; x=1721944674; 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=0kD2ViH5db6Uhco+HhIi3wbdU8JjVgf/T8jwX9hiBjs=; b=ANnUEvxc/vpl9CEkHpCop9xNZHENXl93pV0kHUKa+CTQ/vcGluBBuBpf6JSIfF9Lj2 HXY1mX1bzCJwai6fPNzjLLHtZ7IjwZmerDHEz/+gRIqsCOyysL8RfOPDi9zNVg+PtzVG hXXipgtRDf6S1ZMhYMZROGlB5k5oje/tguD2k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721339874; x=1721944674; 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=0kD2ViH5db6Uhco+HhIi3wbdU8JjVgf/T8jwX9hiBjs=; b=Y8ezOTb66sZwZCt0wfcSSgTvdcFMQO0/nWlQbpYuhTWYYZAJfwGj7nwjxVnIs1aRql EqX6vvLRgCrW1DW5yEjRsHUKodOnnrTacQqVxECBp/Iu11eTle5MRs8aGMggM4yx7q2C 97ozrdmv7O2r00Del0frhQBnnv6JuC+CMO06wt2qpzoX/imm+mU8Wg76He1DxeJnAtuK gbJeP+/J0fQEmALBtAoieIaypO/5TNO8DeGBUZMpjw/ukkov1a2/+ebxHqh9j4CxPsLf hmLK1k20A0oZuhAQ+auez/SqAKNFjenOKB301McGndOQ6QOmu6YOWsBCF7Toz72LinDN DNzg== X-Gm-Message-State: AOJu0Yw+yvVzRjO6PHvHPvtEo0JVq85V+8NHJuwsKN1wMutXJopyaVPs omRGAo/psi5+48/Kq3VouSYDhVe7brr0jrsFnEze2oYkAxMPf6dNwU7wcMfh8SZeXlTle7N9d1K G X-Google-Smtp-Source: AGHT+IGHlZV97i3PU5wQnBNAb4+RoZtIr+55cNa39VxMHty8bOFfUy/Rr/pg4MsU3ofnYw53Ne+R8Q== X-Received: by 2002:a05:6512:6c7:b0:52e:9670:e40b with SMTP id 2adb3069b0e04-52ee53d2c31mr4190759e87.39.1721339874564; Thu, 18 Jul 2024 14:57:54 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Bertrand Marquis , Michal Orzel , Oleksii Kurochko Subject: [PATCH 3/4] xen/domain: Simpliy domain_create() now the idle domain is complete earlier Date: Thu, 18 Jul 2024 22:57:43 +0100 Message-Id: <20240718215744.3892072-4-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240718215744.3892072-1-andrew.cooper3@citrix.com> References: <20240718215744.3892072-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1721339897014116600 With x86 implementing arch_init_idle_domain(), there is no longer any need = to call arch_domain_create() with the idle domain. Have the idle domain exit early with all other system domains. Move the static-analysis ASSERT() earlier. Then, remove the !is_idle_domain() protections around the majority of domain_create() and remove one level of indentation. No practical change. Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Stefano Stabellini CC: Julien Grall CC: Volodymyr Babchuk CC: Bertrand Marquis CC: Michal Orzel CC: Oleksii Kurochko --- xen/common/domain.c | 127 +++++++++++++++++++++----------------------- 1 file changed, 60 insertions(+), 67 deletions(-) diff --git a/xen/common/domain.c b/xen/common/domain.c index e312c820d641..8bc0bcd06ca5 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -688,95 +688,88 @@ struct domain *domain_create(domid_t domid, if ( is_idle_domain(d) ) arch_init_idle_domain(d); =20 - /* DOMID_{XEN,IO,etc} (other than IDLE) are sufficiently constructed. = */ - if ( is_system_domain(d) && !is_idle_domain(d) ) + /* DOMID_{XEN,IO,IDLE,etc} are sufficiently constructed. */ + if ( is_system_domain(d) ) return d; =20 + /* + * The assertion helps static analysis tools infer that config cannot = be + * NULL in this branch, which in turn means that it can be safely + * dereferenced. Therefore, this assertion is not redundant. + */ + ASSERT(config); + #ifdef CONFIG_HAS_PIRQ - if ( !is_idle_domain(d) ) - { - if ( !is_hardware_domain(d) ) - d->nr_pirqs =3D nr_static_irqs + extra_domU_irqs; - else - d->nr_pirqs =3D extra_hwdom_irqs ? nr_static_irqs + extra_hwdo= m_irqs - : arch_hwdom_irqs(d); - d->nr_pirqs =3D min(d->nr_pirqs, nr_irqs); + if ( !is_hardware_domain(d) ) + d->nr_pirqs =3D nr_static_irqs + extra_domU_irqs; + else + d->nr_pirqs =3D extra_hwdom_irqs ? nr_static_irqs + extra_hwdom_ir= qs + : arch_hwdom_irqs(d); + d->nr_pirqs =3D min(d->nr_pirqs, nr_irqs); =20 - radix_tree_init(&d->pirq_tree); - } + radix_tree_init(&d->pirq_tree); #endif =20 if ( (err =3D arch_domain_create(d, config, flags)) !=3D 0 ) goto fail; init_status |=3D INIT_arch; =20 - if ( !is_idle_domain(d) ) - { - /* - * The assertion helps static analysis tools infer that config can= not - * be NULL in this branch, which in turn means that it can be safe= ly - * dereferenced. Therefore, this assertion is not redundant. - */ - ASSERT(config); - - watchdog_domain_init(d); - init_status |=3D INIT_watchdog; + watchdog_domain_init(d); + init_status |=3D INIT_watchdog; =20 - err =3D -ENOMEM; - d->iomem_caps =3D rangeset_new(d, "I/O Memory", RANGESETF_prettypr= int_hex); - d->irq_caps =3D rangeset_new(d, "Interrupts", 0); - if ( !d->iomem_caps || !d->irq_caps ) - goto fail; + err =3D -ENOMEM; + d->iomem_caps =3D rangeset_new(d, "I/O Memory", RANGESETF_prettyprint_= hex); + d->irq_caps =3D rangeset_new(d, "Interrupts", 0); + if ( !d->iomem_caps || !d->irq_caps ) + goto fail; =20 - if ( (err =3D xsm_domain_create(XSM_HOOK, d, config->ssidref)) != =3D 0 ) - goto fail; + if ( (err =3D xsm_domain_create(XSM_HOOK, d, config->ssidref)) !=3D 0 ) + goto fail; =20 - d->controller_pause_count =3D 1; - atomic_inc(&d->pause_count); + d->controller_pause_count =3D 1; + atomic_inc(&d->pause_count); =20 - if ( (err =3D evtchn_init(d, config->max_evtchn_port)) !=3D 0 ) - goto fail; - init_status |=3D INIT_evtchn; + if ( (err =3D evtchn_init(d, config->max_evtchn_port)) !=3D 0 ) + goto fail; + init_status |=3D INIT_evtchn; =20 - if ( (err =3D grant_table_init(d, config->max_grant_frames, - config->max_maptrack_frames, - config->grant_opts)) !=3D 0 ) - goto fail; - init_status |=3D INIT_gnttab; + if ( (err =3D grant_table_init(d, config->max_grant_frames, + config->max_maptrack_frames, + config->grant_opts)) !=3D 0 ) + goto fail; + init_status |=3D INIT_gnttab; =20 - if ( (err =3D argo_init(d)) !=3D 0 ) - goto fail; + if ( (err =3D argo_init(d)) !=3D 0 ) + goto fail; =20 - err =3D -ENOMEM; + err =3D -ENOMEM; + d->pbuf =3D xzalloc_array(char, DOMAIN_PBUF_SIZE); + if ( !d->pbuf ) + goto fail; =20 - d->pbuf =3D xzalloc_array(char, DOMAIN_PBUF_SIZE); - if ( !d->pbuf ) - goto fail; + if ( (err =3D sched_init_domain(d, config->cpupool_id)) !=3D 0 ) + goto fail; =20 - if ( (err =3D sched_init_domain(d, config->cpupool_id)) !=3D 0 ) - goto fail; + if ( (err =3D late_hwdom_init(d)) !=3D 0 ) + goto fail; =20 - if ( (err =3D late_hwdom_init(d)) !=3D 0 ) - goto fail; + /* + * Must not fail beyond this point, as our caller doesn't know whether + * the domain has been entered into domain_list or not. + */ =20 - /* - * Must not fail beyond this point, as our caller doesn't know whe= ther - * the domain has been entered into domain_list or not. - */ + spin_lock(&domlist_update_lock); + pd =3D &domain_list; /* NB. domain_list maintained in order of domid. = */ + for ( pd =3D &domain_list; *pd !=3D NULL; pd =3D &(*pd)->next_in_list ) + if ( (*pd)->domain_id > d->domain_id ) + break; + d->next_in_list =3D *pd; + d->next_in_hashbucket =3D domain_hash[DOMAIN_HASH(domid)]; + rcu_assign_pointer(*pd, d); + rcu_assign_pointer(domain_hash[DOMAIN_HASH(domid)], d); + spin_unlock(&domlist_update_lock); =20 - spin_lock(&domlist_update_lock); - pd =3D &domain_list; /* NB. domain_list maintained in order of dom= id. */ - for ( pd =3D &domain_list; *pd !=3D NULL; pd =3D &(*pd)->next_in_l= ist ) - if ( (*pd)->domain_id > d->domain_id ) - break; - d->next_in_list =3D *pd; - d->next_in_hashbucket =3D domain_hash[DOMAIN_HASH(domid)]; - rcu_assign_pointer(*pd, d); - rcu_assign_pointer(domain_hash[DOMAIN_HASH(domid)], d); - spin_unlock(&domlist_update_lock); - - memcpy(d->handle, config->handle, sizeof(d->handle)); - } + memcpy(d->handle, config->handle, sizeof(d->handle)); =20 return d; =20 --=20 2.39.2 From nobody Mon Sep 16 18:56:08 2024 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=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1721339900; cv=none; d=zohomail.com; s=zohoarc; b=bVCfjRTz5l2HkVCDQvIvot088nwbqUEd7Z1cRx1I2ryI+inrEUb9tef1+vBCoJHJN7cGpvIBX3F8gulmAe24CaU2tIjsM09RqbzMt6XGNuOOyNisVfRoGLiNMol7hTOnnp5BfAt0iqHHMCiojNgR3GDoaNtIuCGdjSlZOsgklpQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1721339900; 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=pK2gBpeR70VDp1XL+JhXx1V184ewFc/upF4kiKIMrfA=; b=P0ZpjkoX0BaQXnEAumov4BRRhO3v5OOF+y68hX6tq80+aPMXUviYvx2x4bX2yaPviy0uhhtRs/Gs5BW98B6RN0U5pWkxk7wgEmhZUzhtLm4X1rVcelRArEIDyzwaHd//XPc4vNpGxwA1Rzzj8BDG9CgnFBoXY54B3Wc+pXr39oc= 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=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1721339900308855.7072412450892; Thu, 18 Jul 2024 14:58:20 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.760739.1170677 (Exim 4.92) (envelope-from ) id 1sUZ8R-0004Bb-P7; Thu, 18 Jul 2024 21:57:59 +0000 Received: by outflank-mailman (output) from mailman id 760739.1170677; Thu, 18 Jul 2024 21:57:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUZ8R-0004BC-Jj; Thu, 18 Jul 2024 21:57:59 +0000 Received: by outflank-mailman (input) for mailman id 760739; Thu, 18 Jul 2024 21:57:58 +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 1sUZ8Q-0002ha-Fc for xen-devel@lists.xenproject.org; Thu, 18 Jul 2024 21:57:58 +0000 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [2a00:1450:4864:20::636]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id ca7955d4-4550-11ef-8776-851b0ebba9a2; Thu, 18 Jul 2024 23:57:57 +0200 (CEST) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a77b60cafecso124216166b.1 for ; Thu, 18 Jul 2024 14:57:57 -0700 (PDT) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7a33de74e5sm5294266b.147.2024.07.18.14.57.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 14:57:54 -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: ca7955d4-4550-11ef-8776-851b0ebba9a2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1721339876; x=1721944676; 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=pK2gBpeR70VDp1XL+JhXx1V184ewFc/upF4kiKIMrfA=; b=fRaLajRIwFrm1Uv0PtCIKgo9YHsDVVF5cpWV6w1BGcPJYprt4WiLyUD7GGzl9STZWk UtClffa3ytaFydikIxZHXQF/aP9XTo1x+ZnKZC+dB60xjQXLXoVBOA+nNVFwU8MoEj1d YvZWNDq/ymAhaxljliElkL9HiwKLlpPTvmrwI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721339876; x=1721944676; 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=pK2gBpeR70VDp1XL+JhXx1V184ewFc/upF4kiKIMrfA=; b=q4wYmMYUkvEQmuKu3JNNFFH85x1EYf2xTYZ02GJPkluvhEvrgMmRpqZtEnTeGSpqRM 5tpRXpeC5PjFQ0y3aeu1lF7tsryxaRVtRrf88mQ08pmuY7MRpbce9fXdaNRDzLGKHJdh 959KOmw9X0ptny+O/UUa0ilHQutcE7oobXu82dhSIzETGXA8daT0re+WY/Q+QUp4HZPr probWaCqmIZXU5NAXLpnv2k+URS+p097nAk33EH+qc63tOpkZsRUPgazVkdjTZbdW5pM wMOOg2Dn1FW/nNRIZYpCa5x/Mb5jLR7KlK/5j5sqMFb62KWKKCvZyMvIL6OSv/M4CNyu gfhw== X-Gm-Message-State: AOJu0YyaW+cLdGOfTDV6n3/BSmSW0cCT7Qnbf40m+aHl0YpsEWPEWggV /bTprDL4ENA8X4/J0PEpRErhVGx6/InvLGpT8kEl8TWlf4hlyOLzAoa+CPjw5ZM73BUfqzJBNhG l X-Google-Smtp-Source: AGHT+IFB7yjppIhAgZ8m4CBxVfzIr48DXBLeUPrXLqCUrWuO+0kxLeiYLzO/mUuOjamiLIWw3mAohg== X-Received: by 2002:a17:906:f212:b0:a77:cb9c:e808 with SMTP id a640c23a62f3a-a7a01360756mr371966466b.69.1721339875805; Thu, 18 Jul 2024 14:57:55 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Bertrand Marquis , Michal Orzel , Oleksii Kurochko Subject: [PATCH 4/4] arch/domain: Clean up the idle domain remnants in arch_domain_create() Date: Thu, 18 Jul 2024 22:57:44 +0100 Message-Id: <20240718215744.3892072-5-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240718215744.3892072-1-andrew.cooper3@citrix.com> References: <20240718215744.3892072-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1721339900978116600 With arch_domain_create() no longer being called with the idle domain, drop the last remaining logic. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich Reviewed-by: Stefano Stabellini --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Stefano Stabellini CC: Julien Grall CC: Volodymyr Babchuk CC: Bertrand Marquis CC: Michal Orzel CC: Oleksii Kurochko --- xen/arch/arm/domain.c | 6 ------ xen/arch/x86/domain.c | 17 ----------------- 2 files changed, 23 deletions(-) diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 7cfcefd27944..3ba959f86633 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -706,12 +706,6 @@ int arch_domain_create(struct domain *d, =20 BUILD_BUG_ON(GUEST_MAX_VCPUS < MAX_VIRT_CPUS); =20 - /* Idle domains do not need this setup */ - if ( is_idle_domain(d) ) - return 0; - - ASSERT(config !=3D NULL); - #ifdef CONFIG_IOREQ_SERVER ioreq_domain_init(d); #endif diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index eff905c6c6e5..c71b9023cb1a 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -791,23 +791,6 @@ int arch_domain_create(struct domain *d, =20 spin_lock_init(&d->arch.e820_lock); =20 - /* Minimal initialisation for the idle domain. */ - if ( unlikely(is_idle_domain(d)) ) - { - arch_init_idle_domain(d); - - d->arch.cpu_policy =3D ZERO_BLOCK_PTR; /* Catch stray misuses. */ - - return 0; - } - - if ( !config ) - { - /* Only IDLE is allowed with no config. */ - ASSERT_UNREACHABLE(); - return -EINVAL; - } - if ( d->domain_id && cpu_has_amd_erratum(&boot_cpu_data, AMD_ERRATUM_1= 21) ) { if ( !opt_allow_unsafe ) --=20 2.39.2