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

Re: [PATCH v2 2/4] xen/arm: drop MAX_PAGES_PER_VCPU


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Fri, 19 Dec 2025 09:22:19 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=citrix.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=h9UnFy5KwesNcy7PIsyc/HqjEchhxWubsnRj55onrPQ=; b=v0RpYXuTOUgpstlAWclEZ0fbmGx6vlB6HgwSxdp8jFhaHRIDnr5W3KtfP+aWlcZceVpTwJpV8ZmYh81QljJrr03/n6cIAgY/OxQvgZARW5oD7MJeCyZA0wYLjqglHSPd7z84Kp1QSHjThqhfh3XZqYb8VvqW/rXaQNXe837Il/K7Mytme+DRQAQnitVV6/lZLLDgp9WXWvop7HG1wqrcpjnr3IcQsSnKa+D7qSYxnXJYwLukNHmVKzM8viRNpSPWZA3E0+m5hsOYmvuWpd9tBn+sX2BZ3aFubnsxr32S7NEzjzbGjKZM/ZL61c6BKn2uhFKEy/qQnzemmiIJi3VQSg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FbPumLChOSrn658q/E+gvS9PfdcacOnrM+yXzWp+vmWYzoG8Sqa4AWrz/QsXPKH6o+ZGF3KtyCRlboRP5fTiBPdFoBXGlgVjdRXPIiSBILiF3359y9A8Jnf3YsFsZlMcYbzkgqid4FNtUh0q/bOVSq44KsiPPtHSrx1/mCIyHb0kPpXonsg0jEtt9B7EWy168gXP76talJ4p/ivlrpvSjB925ABwdd/O3qprFLFPyOIkNth+hyn0e+AdXCu7QB3hN/wK3PC+UvGjKvEVvELmIm5UI1LTBV7VJA4rcb+A0ge+9VnIu4Iw0RaCLCd2ZyMr1D/47z110/PpuuIfo1vvxg==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Fri, 19 Dec 2025 08:22:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 18/12/2025 19:19, Andrew Cooper wrote:
> On 18/12/2025 5:28 pm, Oleksii Kurochko wrote:
>> diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
>> index 47973f99d9..e566023340 100644
>> --- a/xen/arch/arm/domain.c
>> +++ b/xen/arch/arm/domain.c
>> @@ -473,36 +473,21 @@ void dump_pageframe_info(struct domain *d)
>>  
>>  }
>>  
>> -/*
>> - * The new VGIC has a bigger per-IRQ structure, so we need more than one
>> - * page on ARM64. Cowardly increase the limit in this case.
>> - */
>> -#if defined(CONFIG_NEW_VGIC) && defined(CONFIG_ARM_64)
>> -#define MAX_PAGES_PER_VCPU  2
>> -#else
>> -#define MAX_PAGES_PER_VCPU  1
>> -#endif
>> -
>>  struct vcpu *alloc_vcpu_struct(const struct domain *d)
>>  {
>>      struct vcpu *v;
>>  
>> -    BUILD_BUG_ON(sizeof(*v) > MAX_PAGES_PER_VCPU * PAGE_SIZE);
>> -    v = alloc_xenheap_pages(get_order_from_bytes(sizeof(*v)), 0);
>> -    if ( v != NULL )
>> -    {
>> -        unsigned int i;
>> -
>> -        for ( i = 0; i < DIV_ROUND_UP(sizeof(*v), PAGE_SIZE); i++ )
>> -            clear_page((void *)v + i * PAGE_SIZE);
>> -    }
>> +    BUILD_BUG_ON(sizeof(*v) > PAGE_SIZE);
>> +    v = alloc_xenheap_pages(0, 0);
> 
> I know this is only interim until the next patch, but
> alloc_xenheap_page() to match the free function used.
> 
> Personally, I'd merge patches 2 and 3 together, because everything you
> touch in this patch is deleted by the next one.
> 
> But, whatever the ARM maintainers prefer.
I'm in favor of Andrew's suggestion. There's no point in introducing something
in one patch and dropping it in the very next one.

~Michal




 


Rackspace

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