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

Re: [PATCH v3] xen/domain: introduce generic functions for domain struct allocation and freeing


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
  • Date: Fri, 28 Nov 2025 15:41:25 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.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=tzoxoM9J6gp4BN/3M8GU7oAmfY6x/NtL+3wFAeqvHDE=; b=qYlMhE4Kl8AXD4PNQJRLGoaSmq73P5X28JWPgyd6DgjmMu2VdIe6bW8PmA3NmnCWu2oZLEQVlk05AcG5SXNfNqHdoIYvkyfn3cU+Ve83JrmX8AUVOXT4lHEMBaEL3wx7n54+TXwbPGALpsE0Qghx0L61enmFIrsJDE+1E3+shxHhO5xKggevyRHHhE+rQwXa6doYfaBqxpVD1PadzxeJ73I1kzT8dAlQlf7HIlhTCC642VD/4nSA1fHC1jA7Gz75oAVsClh7ls01/lnCJlAIjJf/BmO1X4xNQO+CRqGGQjl1rrnRZTVxGcx2jJwQ6dCAm3VmzGR3KWfRsxxG/Ivjig==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mQqGlSOeYDNuLoNmVjqPdlZz4W1ud/lC+GW6S9Xj1cXBEYoTNZFL6htHZPJDlnngRY8HOOi8zisM162dL4bsZ6eZB13/J75klNoAE2HyZpQ9nF84PMyouc1zUdHs+gqEoaGniReOmTb7wZnAPAJiULyQKD+rriHuyRaTzx4UWo6ZTqAj7kxeAmBMIez5eoVV0MEdWkGl2LlBpmdm8W68WTDDbDv8i4SxqTOCA0ra3ONhmZT3eS/ccJxb1mkZS4ImcD/kdrgMmiDWXc6ap2Z1RKTS/4+vDVEtxgqNytAQ//Wr5jKkAUzS5x/cziLbKPiei38r+2AuImlYNmybsQfzAQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Timothy Pearson <tpearson@xxxxxxxxxxxxxxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Bob Eshleman <bobbyeshleman@xxxxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 28 Nov 2025 13:41:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>



On 28.11.25 15:19, Jan Beulich wrote:
On 28.11.2025 13:11, Grygorii Strashko wrote:
On 27.11.25 18:26, Oleksii Kurochko wrote:
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -799,6 +799,28 @@ static int sanitise_domain_config(struct 
xen_domctl_createdomain *config)
       return arch_sanitise_domain_config(config);
   }
+struct domain *alloc_domain_struct(void)
+{
+#ifndef arch_domain_struct_memflags
+# define arch_domain_struct_memflags() 0
+#endif

Is it really the right way to
hide part of common interface in common code instead of header?

If it had multiple uses in different files, surely it should be put in a header.
In this case though, with (even long term) there being only a single use site, I
don't see why we should even bother figuring out which header would be an
appropriate place for it to live in.

Thank you for clarification.

--
Best regards,
-grygorii




 


Rackspace

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