[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 1/4] xen/arm: Add wrapper find_unused_regions


  • To: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • From: Koichiro Den <den@xxxxxxxxxxxxx>
  • Date: Sat, 28 Jun 2025 23:04:58 +0900
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=valinux.co.jp; dmarc=pass action=none header.from=valinux.co.jp; dkim=pass header.d=valinux.co.jp; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UQueM2AfpMJ51YOzXPCOaQjsYe47pS0bjfj4ttYAIYA=; b=eJdqyJTx6esGvpJGL9ugeU+iVP+VihAPW3yVtsvqi9P0uSOqJJFlf5Q2aUM2S8gy5fnfYm0Y/uxY9HmRfVBp634UZl8zRc5o3bq4waY8+p//Bh39PvHzqs5kIvO8u162j9SeStdYvb+D7iYkhcB/o8Nsm4Ba0ZfYJYwzhwFaBN3JSlgHhbHDmzSxpjdoCeA5ken9bcaqxWg8r4CT9CG0oGbIjGtzkH6uintv+r6GwaNY1W2s3OuCdRCq7Ro5zq4dIr3EweJnTlnU1kxYuX0Ga49yWHe4ja85X21zrPa8RTvDgsqYp5aCycSZBRJQCzPsiUw3/ZtHdO+NePHog5LjmQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Ja7KSw81FiaqQrHV+V+nQwoB750oRusGVlpVfHgZ0V5Dp+Utmj2J/tTiRJGp5y9VSCZS1LQGR3KmqpdpoY1PA7rz7i5V1llL6Rotg2mOV+Zn/WwSeSWSEvwP/beseuD3MvmWDPsplZFZsEI/QIxUZd11DZFiiPDapvuT02WAyDoSZgoOhOFuZ5J4I7CdYsuSezo0CETweIT0J5uMog05pusZ4mk9S/Bra6iVAvzpoVK8Swi64lKIMWcQi3WB12OUD8eXJrfGmAW4k7rlLVFRbd+Rc5Aci1+Ed/+IyQWV8RzzKzRf0My9vKdFlNHnj66ZT3qme9guRgbJuYrXHHcEnA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=valinux.co.jp;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Sat, 28 Jun 2025 14:05:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Jun 23, 2025 at 03:33:55PM +0200, Orzel, Michal wrote:
> 

Thank you for the review + apologies for my delayed response.

> 
> On 21/06/2025 17:11, Koichiro Den wrote:
> > This is preparatory work for the upcoming commits that implement the
> > standard PV time interface (ARM DEN 0057A).
> I personally don't find such messages useful. If at all, reasoning should be
> given first and then this message could appear.

Right, I'll rewrite the commit message.

> 
> > 
> > No functional changes intended.
> > 
> > Signed-off-by: Koichiro Den <den@xxxxxxxxxxxxx>
> > ---
> >  xen/arch/arm/domain_build.c | 29 ++++++++++++++++++-----------
> >  1 file changed, 18 insertions(+), 11 deletions(-)
> > 
> > diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> > index 4ff161887ec3..9d44b6fa9470 100644
> > --- a/xen/arch/arm/domain_build.c
> > +++ b/xen/arch/arm/domain_build.c
> > @@ -1070,6 +1070,23 @@ static int __init find_host_extended_regions(const 
> > struct kernel_info *kinfo,
> >      return res;
> >  }
> >  
> > +static int __init find_unused_regions(struct domain *d,
> > +                                      const struct kernel_info *kinfo,
> Let's not propagate unjustified (IMO) behavior of passing both domain and 
> kinfo
> pointers. The latter contains the domain member and therefore is sufficient as
> argument.

Thanks for pointing that out, I'll do so in the next take.

> 
> > +                                      struct membanks *ext_regions)
> > +{
> > +    if ( domain_use_host_layout(d) )
> > +    {
> > +        if ( !is_iommu_enabled(d) )
> > +            return find_host_extended_regions(kinfo, ext_regions);
> > +        else
> > +            return find_memory_holes(kinfo, ext_regions);
> > +    }
> > +    else
> > +    {
> You can take opportunity to drop unneeded braces

Will update this part in v2. Thank you!

> 
> Otherwise, LGTM.
> 
> ~Michal
> 



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.