All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksii Kurochko <oleksii.kurochko@gmail.com>
To: Luca Fancellu <Luca.Fancellu@arm.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"Romain Caritey" <Romain.Caritey@microchip.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Julien Grall" <julien@xen.org>,
	"Bertrand Marquis" <Bertrand.Marquis@arm.com>,
	"Michal Orzel" <michal.orzel@amd.com>,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Anthony PERARD" <anthony.perard@vates.tech>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [PATCH v4 02/11] xen/dom0less: rename kernel_zimage_probe() to kernel_image_probe()
Date: Wed, 6 May 2026 11:48:21 +0200	[thread overview]
Message-ID: <bec36dbf-5df2-4756-a81d-7938e8d58104@gmail.com> (raw)
In-Reply-To: <EA0D6439-CA9E-450A-80BA-442A7C8F0A28@arm.com>



On 4/29/26 12:59 PM, Luca Fancellu wrote:
> Hi Oleksii,
> 
>>
>> diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c
>> index 9395b5af8745..a5554714cd7b 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;
>>
>> #ifdef CONFIG_HAS_DOMAIN_TYPE
>> -    if ( (info->type == DOMAIN_64BIT) && (info->zimage.start == 0) )
>> -        return mem->bank[0].start + info->zimage.text_offset;
>> +    if ( (info->type == DOMAIN_64BIT) && (info->image.start == 0) )
>> +        return mem->bank[0].start + info->image.text_offset;
>> #endif
>>
>>      /*
>> @@ -111,19 +111,19 @@ static paddr_t __init kernel_zimage_place(struct kernel_info *info)
>>       * and above 32MiB. Load it as high as possible within these
>>       * constraints, while also avoiding the DTB.
>>       */
>> -    if ( info->zimage.start == 0 )
>> +    if ( info->image.start == 0 )
>>      {
>>          paddr_t load_end;
>>
>>          load_end = mem->bank[0].start + mem->bank[0].size;
>>          load_end = MIN(mem->bank[0].start + MB(128), load_end);
>>
>> -        load_addr = load_end - info->zimage.len;
>> +        load_addr = load_end - info->image.len;
>>          /* Align to 2MB */
>>          load_addr &= ~((2 << 20) - 1);
>>      }
>>      else
>> -        load_addr = info->zimage.start;
>> +        load_addr = info->image.start;
>>
>>      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 = kernel_zimage_place(info);
>> -    paddr_t paddr = info->zimage.kernel_addr;
>> -    paddr_t len = info->zimage.len;
>> +    paddr_t paddr = info->image.kernel_addr;
>> +    paddr_t len = info->image.len;
>>      void *kernel;
>>      int rc;
>>
>> @@ -215,7 +215,7 @@ int __init kernel_uimage_probe(struct kernel_info *info,
>>          return -EOPNOTSUPP;
>>      }
>>
>> -    info->zimage.start = be32_to_cpu(uimage.load);
>> +    info->image.start = be32_to_cpu(uimage.load);
>>      info->entry = be32_to_cpu(uimage.ep);
>>
>>      /*
>> @@ -224,20 +224,20 @@ int __init kernel_uimage_probe(struct kernel_info *info,
>>       * independent image. That means Xen is free to load such an image at
>>       * any valid address.
>>       */
>> -    if ( info->zimage.start == 0 )
>> +    if ( info->image.start == 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: %"PRIpaddr"\n",
>> -               info->zimage.start, info->entry);
>> +               info->image.start, info->entry);
>>
>>      /*
>>       * If the image supports position independent execution, then user cannot
>>       * provide an entry point as Xen will load such an image at any appropriate
>>       * memory address. Thus, we need to return error.
>>       */
>> -    if ( (info->zimage.start == 0) && (info->entry != 0) )
>> +    if ( (info->image.start == 0) && (info->entry != 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 *info,
>>          if ( rc )
>>              return rc;
>>
>> -        info->zimage.kernel_addr = mod->start;
>> -        info->zimage.len = mod->size;
>> +        info->image.kernel_addr = mod->start;
>> +        info->image.len = mod->size;
>>      }
>>      else
>>      {
>> -        info->zimage.kernel_addr = addr + sizeof(uimage);
>> -        info->zimage.len = len;
>> +        info->image.kernel_addr = addr + sizeof(uimage);
>> +        info->image.len = len;
>>      }
>>
>>      info->load = 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.
> 
> Should we update the comment as well?
> 
> Also in here:
> https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/include/xen/fdt-kernel.h;h=4d0467bb396a9cf317954fd511469e7f56d67844;hb=refs/heads/staging#l111

Agree, it should be updated. I'll do that in the next version.

Thanks.

~ Oleksii


  reply	other threads:[~2026-05-06  9:48 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-28 14:33 [PATCH v4 00/11] RISCV: enable DOMAIN_BUILD_HELPERS Oleksii Kurochko
2026-04-28 14:33 ` [PATCH v4 01/11] xen: arm: fix len type for guest copy functions Oleksii Kurochko
2026-04-29 10:08   ` Luca Fancellu
2026-05-04  5:30     ` Jan Beulich
2026-05-05  8:27       ` Luca Fancellu
2026-05-05  9:05         ` Jan Beulich
2026-05-05 10:07           ` Luca Fancellu
2026-05-05 10:13             ` Jan Beulich
2026-05-05 10:16               ` Luca Fancellu
2026-04-28 14:33 ` [PATCH v4 02/11] xen/dom0less: rename kernel_zimage_probe() to kernel_image_probe() Oleksii Kurochko
2026-04-29 10:59   ` Luca Fancellu
2026-05-06  9:48     ` Oleksii Kurochko [this message]
2026-04-28 14:33 ` [PATCH v4 03/11] xen: move declaration of fw_unreserved_regions() to common header Oleksii Kurochko
2026-04-29 15:01   ` Luca Fancellu
2026-04-28 14:33 ` [PATCH v4 04/11] xen: introduce domain-layout.h with common domain_use_host_layout() Oleksii Kurochko
2026-04-29 15:10   ` Luca Fancellu
2026-05-06 10:26     ` Oleksii Kurochko
2026-05-04 12:59   ` Jan Beulich
2026-05-06 15:47     ` Oleksii Kurochko
2026-05-07  7:25       ` Jan Beulich
2026-05-07  7:37         ` Oleksii Kurochko
2026-04-28 14:33 ` [PATCH v4 05/11] xen: rename p2m_ipa_bits to p2m_gpa_bits Oleksii Kurochko
2026-04-29 15:15   ` Luca Fancellu
2026-05-06 10:32     ` Oleksii Kurochko
2026-04-28 14:33 ` [PATCH v4 06/11] xen/riscv: implement copy_to_guest_phys() Oleksii Kurochko
2026-04-28 14:33 ` [PATCH v4 07/11] xen/riscv: add Linux kernel loading support Oleksii Kurochko
2026-05-04 14:05   ` Jan Beulich
2026-05-06 11:57     ` Oleksii Kurochko
2026-05-06 12:45       ` Jan Beulich
2026-05-06 13:43         ` Oleksii Kurochko
2026-05-06 14:02           ` Jan Beulich
2026-05-06 14:53     ` Oleksii Kurochko
2026-05-06 15:00       ` Jan Beulich
2026-04-28 14:33 ` [PATCH v4 08/11] xen/riscv: rework G-stage mode handling Oleksii Kurochko
2026-05-04 14:23   ` Jan Beulich
2026-05-06 14:03     ` Oleksii Kurochko
2026-04-28 14:33 ` [PATCH v4 09/11] xen/riscv: introduce p2m_gpa_bits Oleksii Kurochko
2026-04-28 14:33 ` [PATCH v4 10/11] xen/riscv: add definition of guest RAM banks Oleksii Kurochko
2026-04-28 14:33 ` [PATCH v4 11/11] xen/riscv: enable DOMAIN_BUILD_HELPERS Oleksii Kurochko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bec36dbf-5df2-4756-a81d-7938e8d58104@gmail.com \
    --to=oleksii.kurochko@gmail.com \
    --cc=Bertrand.Marquis@arm.com \
    --cc=Luca.Fancellu@arm.com \
    --cc=Romain.Caritey@microchip.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.