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

Re: [PATCH v3 0/8] Follow-up static shared memory PART I


  • To: Penny Zheng <Penny.Zheng@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Mon, 21 Aug 2023 12:49:26 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=arm.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
  • 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=ZSVLiKcBJDPblZpmJrHNhbojEefU3bY+AgfDCSTk7NE=; b=DV6TKfzhQEUDXaVfe6U/P1g0ffJF6rRS12coGwr3N05iK7oQb1aMPlhO8pqB1nIF8SoLTXsvqkUkT7xYSsxDuKEqMbf6M0JUOXHWADts23wEjNdHBGIa7uUj7aUsUm7ZRi0tW2Uqxkkk/w51HE4iizD7w5a5TUJhppCTYpz60sCkr9VC+dJDg8V1rXHdzTihD/akmYFShFVQRFM0/qWfIU/DjnvLzJHRghi2dmTEIjeShn4t3epuh/cH4+w4W4TLKkPK3OvNFAYGJcmgF23ZehCaj6O+Rs4YMtrNJj1ZTc3h07uNlr1jHpNs22tt/NGjlHTvQS/9BzOX0b8BiCbynQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GzzaOBbCjHgcXiooIYhdb7eilEXFv2wFszhrelEv5WLzo2iepEmg3OnDCWBk2WYrW2KZfboWzgN55o19mgiWSPywapVESeMoGKjQ3OCVyHGe6mCWn1Cx8qhxZ9vhvuc5vdGJIchwDNZRjgEGvD3iGNh4cSpTpqvwJS+H4ECc4N+SnZZaITMxfnlQraZFNdIq6pqFvMAQ4XUvbhArVB1JxguxDBn7TBEn+z98qJSLYnhaUqfP7eDWqQvQe5VZxf2f0TigBEmIKyTTaab72jHsTKZfQbKy3xiK+Ee3gODvqqn5vVwwHwwRTG14rrbZrxvTTIplISwlb/3Y/1g7r4/yGw==
  • Cc: <wei.chen@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "Julien Grall" <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Mon, 21 Aug 2023 10:49:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Penny,

On 21/08/2023 06:00, Penny Zheng wrote:
> 
> 
> There are some unsolving issues on current 4.17 static shared memory
> feature[1], including:
> - In order to avoid keeping growing 'membank', having the shared memory
> info in separate structures is preferred.
> - Missing implementation on having the host address optional in
> "xen,shared-mem" property
> - Removing static shared memory from extended regions
> - Missing reference release on foreign superpage
> - Missing "xen,offset" feature, which is introduced in Linux DOC[2]
> 
> All above objects have been divided into two parts to complete. And this
> patch serie is PART I.
> 
> [1] https://lore.kernel.org/all/20220908135513.1800511-1-Penny.Zheng@xxxxxxx/
> [2] 
> https://www.kernel.org/doc/Documentation/devicetree/bindings/reserved-memory/xen%2Cshared-memory.txt

It looks like there is a problem with the changes introduced in this series.
The gitlab static shared memory tests failed:
https://gitlab.com/xen-project/patchew/xen/-/pipelines/973985190
No Xen logs meaning the failure occurred before serial console initialization.

Now, I would like to share some observations after playing around with the 
current static shared mem code today.
1) Static shared memory region is advertised to a domain by creating a child 
node under reserved-memory.
/reserved-memory is nothing but a way to carve out a region from the normal 
memory specified in /memory node.
For me, such regions should be described in domain's /memory node as well. This 
is not the case at the moment
for static shm unlike to other sub-nodes of /reserved-memory (present in host 
dtb) for which Xen creates separate
/memory nodes.

2) Domain dtb parsing issue with two /reserved-memory nodes present.
In case there is a /reserved-memory node already present in the host dtb, Xen 
would create yet another /reserved-memory
node for the static shm (to be observed in case of dom0). This is a bug as 
there can be only one /reserved-memory node.
This leads to an error when dumping with dtc and leads to a shm node not being 
visible to a domain (guest OS relies on
a presence of a single /reserved-memory node). The issue is because in 
make_resv_memory_node(), you are not checking if
such node already exists.

I haven't looked closely at this series yet. It might be that these issues are 
fixed. If not, I would definitely
suggest to fix them in the first place.

~Michal



 


Rackspace

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