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

Re: [PATCH v4 4/5] xen/memory, tools: Avoid hardcoding GUEST_MAGIC_BASE in init-dom0less


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Henry Wang <xin.wang2@xxxxxxx>
  • Date: Fri, 19 Apr 2024 14:30:06 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.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=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=C7Hat+JDbOO2WOmmOhCxAXaiRuoZaBVACIZQtQH6N5k=; b=aGPyJbKJDGkkk3CFHLltoLUZHymMq/iADgtBXiqYsPz5s/ZU19/eAZl3ZnO2lkZyze+zgQ/Bp3lVopKbw4yQ0yZeuO6Ja8v77hxpWV+oBlT85fdGv63mS5ef6LZYkOzEY1LHORr/I671cHG3eYGDAeCLUoYRgEXxF5gZSU9h3tSl4AyW81mTzlom2Fp2zsYvjBILYBfmBpHeNlzsK91+rVIF8UA/6tYKYxINQcA75cq1tlH7VNPrSas5oOCig+e1JhsVv39R0F7guS4xl5Avmv1cEivv44a99fWbj/CNuXqtNFb/0pUqshhlRr6PbpM/mK4sDl79h8KaGcszYCbX4A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=afrZeifnOQxRndkouh5fWp9Febn/6+B9PioHu0MsExHkdiHerQIJUyexf3v5ih4cKLOjlHt1NXaUrVKnduBtvtmGv99bHR4H74RovQTQ6Y2z6CIiyUc/JCYuewPMFTH1qQxRxTnLqwMenqYU9f/LWCdnR/OnJ4wEkBD6oJq67f9o7C2dgNIUAUXbbaT4x4fF63ayfUNrYSehi1bgMPDGYtR+Z/4BPe1OBGKi9/ddDRaIaWYtdSYIYREbqFgumloc8pJ8lMI7TBp5A+GZ0HhO2E7e5esg4So4vvsdmeTBZGcFscJmFDnt7+mLH/WvxcLEHjdf8s/56MhG1XHJsekceg==
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Alec Kwapis <alec.kwapis@xxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Daniel Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 19 Apr 2024 06:30:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Jan,

On 4/19/2024 2:18 PM, Jan Beulich wrote:
On 19.04.2024 04:31, Henry Wang wrote:
On 4/18/2024 8:54 PM, Jan Beulich wrote:
On 09.04.2024 06:53, Henry Wang wrote:
--- a/xen/include/public/memory.h
+++ b/xen/include/public/memory.h
@@ -21,6 +21,7 @@
   #define XENMEM_increase_reservation 0
   #define XENMEM_decrease_reservation 1
   #define XENMEM_populate_physmap     6
+#define XENMEM_populate_physmap_heap_alloc 29
Without a comment, how is one supposed to know what the difference is of
this new sub-op compared to the "normal" one? I actually wonder whether
referring to a Xen internal (allocation requested to come from the heap)
is actually a good idea here. I'm inclined to suggest to name this after
the purpose it has from the guest or tool stack perspective.

Speaking of which: Is this supposed to be guest-accessible, or is it
intended for tool-stack use only (I have to admit I don't even know where
init-dom0less actually runs)? In the latter case that also wants enforcing.
This may require an adjustment to the XSM hook in use here. Cc-ing Daniel
for possible advice.
This sub-op should be called by the init-dom0less application (toolstack
side), which runs in Dom0.
I'm puzzled: How can init-dom0less (note its name!) run in Dom0, when there
is none?

[1] is the original patch that introduced this application (More details can be found in the cover letter of the original series of [1]). I think the use case for this application is to make dom0less domains to use the PV driver when dom0 and dom0less domUs exist at the same time. There used to be a discussion regarding the naming confusion, see [2] commit message, but I cannot remember if this discussion has settled or not.

[1] https://lore.kernel.org/xen-devel/20220505001656.395419-6-sstabellini@xxxxxxxxxx/ [2] https://lore.kernel.org/xen-devel/20230630091210.3742121-1-luca.fancellu@xxxxxxx/

Kind regards,
Henry

Jan

Daniel has proposed an alternative solution
which is based on the hypfs. If we decide to go that route, I think I
will rewrite the series. I will wait for the discussion settled. Thanks
for looping in Daniel!

Kind regards,
Henry




 


Rackspace

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