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

Re: [PATCH v4 2/9] xen/arm: implement domU extended regions


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Fri, 1 Apr 2022 13:52:54 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=+RX0zrkWaF+G96cV0dhi+/BlSlqMy1i6xCHXOJTnBmA=; b=PX4Rwz8I+vAw1MTyVnV8HHxKduaR/cqR6lVQTBu4MiwEr8YAhjUVTupEPwS+M0zWzo0bxilt/lfYnHbCsEM8gRiZO8D5iME74qCUkhDANZQ3BPWW1n6aBmGExuY52pbzCFG1Cal303UdwnYtcCgsW3dh1LmephjpzNPcBGjbwAUY6vMOabo8pV/FcJvZIua9gS2YasYlk+w/DAWMVTI8a0bNxhhTVuBpJezLUNZqxVza6nX2yGcd5/SxuwGAmK4dxIF5puVfvdqxJRefQmPKcURmAScgFgNLPt1HVEqK9rodQMjSNLj4mcjeRIbALuyesWm+oQBchVu7EhyOCRW6og==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LeUOeCOck69er0yfigKo/uMQiAAlyKZanNphCO9JNNW79r7G+ubQ+kT6kjBFR/MXgFyIA0Czw5LIjfUiSL+8o9nb1JJhl99D+ToryXWttBJmcwIY8+osMWu0ovGxpU5EBv9lsZlFwzkV0Q3YeYagI/Wh4WkZRdOxnEVanre/44b/FCfvshx/GPpPSvkmDcy6AhJXNg3CA1/SAUGoXspYtZHiRFUzfvLAHvV9Q3RL9NTydQXWJt3I221ZdiLh3WlQSGHdrpzuik9WafBzroTKs9RLQquiFNL3LXVC1srnbFFrl/niBnXYc0eDNrbKtkiZOMrUAwkwx/6A6dURaXV7Cw==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen developer discussion <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, "Volodymyr_Babchuk@xxxxxxxx" <Volodymyr_Babchuk@xxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
  • Delivery-date: Fri, 01 Apr 2022 13:53:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYRWDx0w9vetaSnE2EriQcgkUblqzbFM0A
  • Thread-topic: [PATCH v4 2/9] xen/arm: implement domU extended regions

Hi Stefano,

> +#define ALIGN_UP_TO_2MB(x)   (((x) + MB(2) - 1) & (~(MB(2) - 1)))
> +
> +static int __init find_domU_holes(const struct kernel_info *kinfo,
> +                                  struct meminfo *ext_regions)
> +{
> +    unsigned int i;
> +    uint64_t bankend[GUEST_RAM_BANKS];
> +    const uint64_t bankbase[] = GUEST_RAM_BANK_BASES;
> +    const uint64_t banksize[] = GUEST_RAM_BANK_SIZES;
> +
> +    for ( i = 0; i < GUEST_RAM_BANKS; i++ )
> +    {
> +        ext_regions->bank[ext_regions->nr_banks].start =
> +            ALIGN_UP_TO_2MB(bankbase[i] + kinfo->mem.bank[i].size);
> +
> +        bankend[i] = ~0ULL >> (64 - p2m_ipa_bits);
> +        bankend[i] = min(bankend[i], bankbase[i] + banksize[i] - 1);
> +        if (bankend[i] > ext_regions->bank[ext_regions->nr_banks].start)

Just a code style issue, the if needs a space before and after the condition

With this fixed:

Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>

Cheers,
Luca




 


Rackspace

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