[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 2/3] xen: move alloc/free_vcpu_struct() to common code
- To: "Orzel, Michal" <michal.orzel@xxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Fri, 9 Jan 2026 13:35:17 +0000
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; 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=YdL9bBnj8vt/gvQGyqnFLv6d4zNpW2N5Ve6nKesWXGI=; b=AWH93QfolJYzdBcEqwa1qTz99fwcKj0sgq8ZlzytAAea4z2dNZbqSXEmX3WT7JT1S9Y7L9QXM4gZen5Wji3xDicTUZ1EYGLQzBexvIqPOVj0R/VGM0cZ5kL85yI0TMm9sGG9ed/mgOTpSfSDZEVcZyidZG/wldamoYX/rSxzjMuCEa1CH5SQEu7LyOmnZR6HDqL+q/djWIK5+ULdDrJoaeBzsKspEssgNOMHGxY74y+TPvDcvjZXA4kn1MMb2T5a2OtgffGtaDVNuVWgwHczVdTSKvdvlCwZWacN8bIOgDrRQ2eKTGk5mz1VwDU2nHiJ2eSFGXWpRe4twu6Aj4UjFw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kmJ2MhcD/t6EiZ5B+n/EYLYxaLB+2jzFUTtnOCBY9xWPxqFAuIotHfobmi1J8/cqIOqDhJv97JSJ7zEdxIj3Z3HYiXg0soChLQjkgPFZoRlr1OETgbcY4aC5uF2/hCZkwBFN8mKHqh28bPZxfYGWE55MO9T+Vr1zWMbEhDL0Qx/9Imi6wx7LGbCwePa+1TcDtBqEYf2KJY3BfUq+RgZBbEOPDTByQ1l3PEjH7XRm4PWq7gOaYgYziBaOyhCYXuJCjG1XPa8XhlNvNYGsxKPrqG8yL9SNO2892JbIBMI6RuoDVqabFBCkE8ziKzHdX9uHZhjpkuiqVLVnnmVEVJnlPg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Timothy Pearson <tpearson@xxxxxxxxxxxxxxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>
- Delivery-date: Fri, 09 Jan 2026 13:35:39 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 09/01/2026 1:17 pm, Orzel, Michal wrote:
>
> On 07/01/2026 17:28, Oleksii Kurochko wrote:
>> alloc_vcpu_struct() and free_vcpu_struct() contain little
>> architecture-specific logic and are suitable for sharing across
>> architectures. Move both helpers to common code.
>>
>> To support the remaining architectural differences, introduce
>> arch_vcpu_struct_memflags(), allowing architectures to override the
>> memory flags passed to alloc_xenheap_pages(). This is currently needed
>> by x86, which may require MEMF_bits(32) for HVM guests using shadow
>> paging.
>>
>> The ARM implementation of alloc/free_vcpu_struct() is removed and
>> replaced by the common version. Stub implementations are also dropped
>> from PPC and RISC-V.
>>
>> Now that the size of struct vcpu for Arm64 is smaller than PAGE_SIZE,
>> MAX_PAGES_PER_VCPU is no longer needed and is removed.
>>
>> Finally, make alloc_vcpu_struct() and free_vcpu_struct() static to
>> common/domain.c, as they are no longer used outside common code.
>>
>> No functional changes.
>>
>> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
>> Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
>> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> In case you need Arm tag here:
> Acked-by: Michal Orzel <michal.orzel@xxxxxxx>
Thanks. I think that's now sufficient to finish this series. I'll
queue it in my next sweep.
~Andrew
|