[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: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Fri, 9 Jan 2026 14:17:03 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.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=PXzj5snBkHhZomySM8tnBeVK9MbSz5xlbWA1TLEawqs=; b=uf34DKLDmtxDCcEgOlwQdXL3IvNgdrjiciCjS/iW4W3dtz8f9ggTelkitMJ3tO5HqdIzyPI8MgA0Ip/l3i/XqFH1b+WsFnqTEqSpc9fpadEVRKruTkKJgPoKSS2yU97+wimNjTdzMnVrbWYP3fBBuhH53L08B8vGwQz+XqFpYMo5MA9iQT/Po1IK705IjdYMj/UwCwgGNWJZugorXk2avvN+Gl2GC8OKJNsQPBqufFIQyCaqEN52XsQiphm2aafV74iX3NlBvL4s/s3F/GmcEJVGgGoEqXF8uR0R0qZOa/DUtyMQh6TVogpKVTTFtTp43ca2Ym0bGyKpHiknD4tppA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Bd/3U2e5NZXTp4a79zwf1Ev2TzQN6g1ZqB/vlKjWADUqoCaD/TYBj6OCqv0qGEUDsyYHljc2SZ+JWyttW3RO1TTJzlcbNi7++K1puwSKY8Bhbig/T/Qc1w7+2HAU1eMfcasHbJe29xyF/3BkZL4I4h/ZUeZNjdl/D3GTQrhdNHykZ8zd+1Gk3/Nfo3MTGeNZmqZ74KfG+O4h9+e6l3Wu2zyUxqVTGe9dRO97q5ppD431bYfM18V3V6Hhnaz3xDWSvW81eSD69Oq7G2roBqBZpNeKEQ6UsPpMrOYTsg9CRX5HonOBTCTx8TUTMCwXJ748fmq9aWJZ3hTUgoWEw3zQaw==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, 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:17:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


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>

~Michal




 


Rackspace

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