From nobody Mon Apr 13 00:05:41 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; 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=1775836539; cv=none; d=zohomail.com; s=zohoarc; b=F7Zqkg4VAn42mZ35Ez5aGK3ZjIMJvgAvInecvIccr1VCuEzOI3TfIcTBcUlyINkFd7YSgUEvTAGJzwz2kfjGH2jjx7cRBYqiSln9pmFNPZ1P7SAiOhhs9wAQLM2bXVj5LY0camqX00rkUACwCmIrAYy3MuWuBBGbUOYQwXdcYFM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775836539; 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=sTRi4YH+C2jL1DPdQVnyL1+s27z+ZRb1KNlQ9e7rLKA=; b=U/yZuTi891eXYPk1s8qYD20c2VQ+VrR4tEd5paoAPZAgtHHAtnE9CfHddyef3j2pUwOlQoaQGN/pP13ZrZNzPJ5priaWx4SY6baq3Zr7uePa0Hqp0v/Ca+eGHCt0Kf4Vge6lchm1J21cCan+bcZ2xFZPFVUbV3IBot+ljhu3K4c= 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 1775836539250299.85607238754653; Fri, 10 Apr 2026 08:55:39 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1279418.1563868 (Exim 4.92) (envelope-from ) id 1wBECT-0007hP-Ka; Fri, 10 Apr 2026 15:55:17 +0000 Received: by outflank-mailman (output) from mailman id 1279418.1563868; Fri, 10 Apr 2026 15:55:17 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wBECT-0007hE-HA; Fri, 10 Apr 2026 15:55:17 +0000 Received: by outflank-mailman (input) for mailman id 1279418; Fri, 10 Apr 2026 15:55:15 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) id 1wBECR-0007EN-Iz for xen-devel@lists.xenproject.org; Fri, 10 Apr 2026 15:55:15 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wBECP-00Cwd5-DQ for xen-devel@lists.xenproject.org; Fri, 10 Apr 2026 17:55:14 +0200 Received: from [10.42.69.12] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69d91d56-bab6-0a2a0a5309dd-0a2a450cb636-26 for ; Fri, 10 Apr 2026 17:55:14 +0200 Received: from [209.85.128.45] (helo=mail-wm1-f45.google.com) by tlsNG-d25034.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.0) (envelope-from ) id 69d91d62-f40c-0a2a450c0019-d155802dc8a2-3 for ; Fri, 10 Apr 2026 17:55:14 +0200 Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-48897fd88ebso23326085e9.2 for ; Fri, 10 Apr 2026 08:55:14 -0700 (PDT) Received: from fedora (user-109-243-69-121.play-internet.pl. [109.243.69.121]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488d5b3c597sm78285605e9.12.2026.04.10.08.55.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Apr 2026 08:55:13 -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" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=20251104 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775836514; x=1776441314; 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=sTRi4YH+C2jL1DPdQVnyL1+s27z+ZRb1KNlQ9e7rLKA=; b=s/ADolDC1igUBrDPOfb0FyBbtLgF20pDCtb70tfFOXxjW34DJUjmeIpWcZUCgaQGgh Y5qPFZp4pfhZyNi7/+GCs5Pdu1w3LFm2W9SG/rg6yAPNxQTd6AOHb7RxCuOcbgCIfryk 1k1fCeVRwTzybMTvNOVzzs08ju0cOG/k53w/FqY9KgCNqYF9LPtaT4PhBRvBVPdlpyRC ZDckx2a+gjiHdbhPfbuu4uDywDtuLgvn5fc7SQAN70RKuUde2GreZYLiUWX3EcfuLMWu d9ECxqwsJM1a3tH/QtOxMbmtFc5aIaUCsDy92SGc+UWDKs9VYEWBPCAkUtVXqksZj3go YHqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775836514; x=1776441314; 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=sTRi4YH+C2jL1DPdQVnyL1+s27z+ZRb1KNlQ9e7rLKA=; b=QSmsXq6xlY8fO41BZfN/YyvJ03QAO8P7sd4t80ENciSQxkBUtdX2cfLaw2Ue6VvDpW IJw5AcKy9+XsGA5uf+bTz90uX7fzhxAUMLge8CdtUY+rH5LGi4Ein+hY+F4HT4wESuaZ pqcVr0pMmmx/pJFS68ZSzwW2sDAjVgtAano4C11vQs+IarZj6+hgisFv+kqaNFswumj9 GljOzpmQXCCGSQyCHFWwFSmh0RdrTGGkEsyGSStD/bivqZyCtj2IQph8bjHpa/CjV/+y TKIEbkAwqiOH0rFsR5Z384JgZ2tfgrvQM2yhfoajVvKkxfGnoDzEOBoAgY+LTmbQ24UV QXWw== X-Gm-Message-State: AOJu0YxRgERfs3ZPJ9PfmGhzGap3LbvEgc0VEBz/hxJbVR9dZg6VvcDq nqWjmMUymYKGiaqrEPJYbmpiD62ki7AO0A+IOpuYnkFDFCyLY4DCNLGFbvawqQ== X-Gm-Gg: AeBDieuspLs7cDOb9Xtz6o2VKI1yCFL0cGf9XyulyV4p1MkqiNrp4Cp6UJgh3V9N91T BvXbob6g3Sa+FGYu6cW4tOM5pj2+5laNO8wDOyrZtlCol3lZC+P5ic+Cbj4sT65/yGnTSW8fOys dmtT/ZCZiVVhENJmCerg9TR+P1Efhdr0S2tRo88J4Pyh7fkOShVNezr9/Z4foYknQu14j3IVIiX Y0x+0U+AvVh5IJDRow1lRc+P8Z3MdY+Y2jFlY3Goe4iTTsnyh49mngT9yk+LISZ9gdpne2MjYEM 8QaB7bODFzvzMf2l6xMqwAl8ZbjYrv6855W24T9v/rl0mAoOTBz9buKJ6izfDvuRA4V9Y06ECkq GKyhqE9Z+akUvCipjZousPEae5vmEflJACgzaQAm5sosjwoqx7TTJOzo1TUrNe7VY7BNvR8BJcw bYI3mpfVXF/Mwbzh9DI82ICqzKmd1lRaTsSYSbERrWK2BoRJhHShRDujRTWz3QGrQXREkptOvEv Fjn X-Received: by 2002:a05:600c:34cd:b0:487:575:5e1 with SMTP id 5b1f17b1804b1-488d68c2cb4mr48418635e9.24.1775836514072; Fri, 10 Apr 2026 08:55:14 -0700 (PDT) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Romain Caritey , Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Andrew Cooper , Anthony PERARD , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH v3 04/12] xen/dom0less: rename kernel_zimage_probe() to kernel_image_probe() Date: Fri, 10 Apr 2026 17:54:50 +0200 Message-ID: X-Mailer: git-send-email 2.53.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-purgate-ID: tlsNG-d25034/1775836514-FF547A3D-4A6AEDB5/10/73395122804 X-purgate-type: spam X-purgate-size: 7698 X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1775836541064154100 Content-Type: text/plain; charset="utf-8" The helper kernel_zimage_probe() is referenced from common code (xen/common/device-tree/kernel.c), but its name is tied to the zImage format which is specific to Arm (from architectures supported by Xen). Other architectures supported by Xen, such as RISC-V, do not use the zImage format and instead rely on other kernel image types (e.g. Image or compressed Image variants: Image.gz, etc). Using "zimage" in the name is therefore misleading in architecture-independent code. Rename kernel_zimage_probe() to kernel_image_probe() and update the associated structure field from "zimage" to "image" to reflect that the code handles generic kernel images rather than the zImage format specifically. No functional change intended. Reported-by: Jan Beulich Signed-off-by: Oleksii Kurochko --- Changes in v3: - Nothing changed. Only rebase. --- Changes in v2: - new patch. --- xen/arch/arm/kernel.c | 48 ++++++++++++++++----------------- xen/common/device-tree/kernel.c | 2 +- xen/include/xen/fdt-kernel.h | 4 +-- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c index 7544fd50a20f..3c613cdb233f 100644 --- a/xen/arch/arm/kernel.c +++ b/xen/arch/arm/kernel.c @@ -101,8 +101,8 @@ static paddr_t __init kernel_zimage_place(struct kernel= _info *info) paddr_t load_addr; =20 #ifdef CONFIG_ARM_64 - if ( (info->arch.type =3D=3D DOMAIN_64BIT) && (info->zimage.start =3D= =3D 0) ) - return mem->bank[0].start + info->zimage.text_offset; + if ( (info->arch.type =3D=3D DOMAIN_64BIT) && (info->image.start =3D= =3D 0) ) + return mem->bank[0].start + info->image.text_offset; #endif =20 /* @@ -111,19 +111,19 @@ static paddr_t __init kernel_zimage_place(struct kern= el_info *info) * and above 32MiB. Load it as high as possible within these * constraints, while also avoiding the DTB. */ - if ( info->zimage.start =3D=3D 0 ) + if ( info->image.start =3D=3D 0 ) { paddr_t load_end; =20 load_end =3D mem->bank[0].start + mem->bank[0].size; load_end =3D MIN(mem->bank[0].start + MB(128), load_end); =20 - load_addr =3D load_end - info->zimage.len; + load_addr =3D load_end - info->image.len; /* Align to 2MB */ load_addr &=3D ~((2 << 20) - 1); } else - load_addr =3D info->zimage.start; + load_addr =3D info->image.start; =20 return load_addr; } @@ -131,8 +131,8 @@ static paddr_t __init kernel_zimage_place(struct kernel= _info *info) static void __init kernel_zimage_load(struct kernel_info *info) { paddr_t load_addr =3D kernel_zimage_place(info); - paddr_t paddr =3D info->zimage.kernel_addr; - paddr_t len =3D info->zimage.len; + paddr_t paddr =3D info->image.kernel_addr; + paddr_t len =3D info->image.len; void *kernel; int rc; =20 @@ -215,7 +215,7 @@ int __init kernel_uimage_probe(struct kernel_info *info, return -EOPNOTSUPP; } =20 - info->zimage.start =3D be32_to_cpu(uimage.load); + info->image.start =3D be32_to_cpu(uimage.load); info->entry =3D be32_to_cpu(uimage.ep); =20 /* @@ -224,20 +224,20 @@ int __init kernel_uimage_probe(struct kernel_info *in= fo, * independent image. That means Xen is free to load such an image at * any valid address. */ - if ( info->zimage.start =3D=3D 0 ) + if ( info->image.start =3D=3D 0 ) printk(XENLOG_INFO "No load address provided. Xen will decide where to load it= .\n"); else printk(XENLOG_INFO "Provided load address: %"PRIpaddr" and entry address: %"PR= Ipaddr"\n", - info->zimage.start, info->entry); + info->image.start, info->entry); =20 /* * If the image supports position independent execution, then user can= not * provide an entry point as Xen will load such an image at any approp= riate * memory address. Thus, we need to return error. */ - if ( (info->zimage.start =3D=3D 0) && (info->entry !=3D 0) ) + if ( (info->image.start =3D=3D 0) && (info->entry !=3D 0) ) { printk(XENLOG_ERR "Entry point cannot be non zero for PIE image.\n"); @@ -257,13 +257,13 @@ int __init kernel_uimage_probe(struct kernel_info *in= fo, if ( rc ) return rc; =20 - info->zimage.kernel_addr =3D mod->start; - info->zimage.len =3D mod->size; + info->image.kernel_addr =3D mod->start; + info->image.len =3D mod->size; } else { - info->zimage.kernel_addr =3D addr + sizeof(uimage); - info->zimage.len =3D len; + info->image.kernel_addr =3D addr + sizeof(uimage); + info->image.len =3D len; } =20 info->load =3D kernel_zimage_load; @@ -289,7 +289,7 @@ int __init kernel_uimage_probe(struct kernel_info *info, * Thus, Xen uses uimage.load attribute to determine the load address = and * zimage.text_offset is ignored. */ - info->zimage.text_offset =3D 0; + info->image.text_offset =3D 0; #endif =20 return 0; @@ -338,10 +338,10 @@ static int __init kernel_zimage64_probe(struct kernel= _info *info, if ( (end - start) > size ) return -EINVAL; =20 - info->zimage.kernel_addr =3D addr; - info->zimage.len =3D end - start; - info->zimage.text_offset =3D zimage.text_offset; - info->zimage.start =3D 0; + info->image.kernel_addr =3D addr; + info->image.len =3D end - start; + info->image.text_offset =3D zimage.text_offset; + info->image.start =3D 0; =20 info->load =3D kernel_zimage_load; =20 @@ -389,10 +389,10 @@ static int __init kernel_zimage32_probe(struct kernel= _info *info, } } =20 - info->zimage.kernel_addr =3D addr; + info->image.kernel_addr =3D addr; =20 - info->zimage.start =3D start; - info->zimage.len =3D end - start; + info->image.start =3D start; + info->image.len =3D end - start; =20 info->load =3D kernel_zimage_load; =20 @@ -403,7 +403,7 @@ static int __init kernel_zimage32_probe(struct kernel_i= nfo *info, return 0; } =20 -int __init kernel_zimage_probe(struct kernel_info *info, paddr_t addr, +int __init kernel_image_probe(struct kernel_info *info, paddr_t addr, paddr_t size) { int rc; diff --git a/xen/common/device-tree/kernel.c b/xen/common/device-tree/kerne= l.c index 28096121a52d..cfa27464f0fc 100644 --- a/xen/common/device-tree/kernel.c +++ b/xen/common/device-tree/kernel.c @@ -235,7 +235,7 @@ int __init kernel_probe(struct kernel_info *info, if ( rc && rc !=3D -EINVAL ) return rc; =20 - rc =3D kernel_zimage_probe(info, mod->start, mod->size); + rc =3D kernel_image_probe(info, mod->start, mod->size); =20 return rc; } diff --git a/xen/include/xen/fdt-kernel.h b/xen/include/xen/fdt-kernel.h index 33a60597bb4d..2af3bd5f0722 100644 --- a/xen/include/xen/fdt-kernel.h +++ b/xen/include/xen/fdt-kernel.h @@ -56,7 +56,7 @@ struct kernel_info { paddr_t text_offset; /* 64-bit Image only */ #endif paddr_t start; /* Must be 0 for 64-bit Image */ - } zimage; + } image; }; =20 #if __has_include() @@ -122,7 +122,7 @@ void kernel_load(struct kernel_info *info); =20 int kernel_decompress(struct boot_module *mod, uint32_t offset); =20 -int kernel_zimage_probe(struct kernel_info *info, paddr_t addr, paddr_t si= ze); +int kernel_image_probe(struct kernel_info *info, paddr_t addr, paddr_t siz= e); =20 /* * uImage isn't really used nowadays thereby leave kernel_uimage_probe() --=20 2.53.0