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

[PATCH] xen/dom0less: Clear xenstore page


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Wed, 20 Aug 2025 17:12:42 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org 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=5y8FbORDWaQ5Tt7vudtaZzZ0Fchb9UsA1yZxoBCPL8M=; b=g42zsHDZNXy7UVhZ6RY28oj3/uuEDOriLA/8iSwtFq7Xf80JW7gqU6AicxJGEQEAXcINV0GzFSxs4egG3DsW5n8XXlLuCqy65+mXSAJx2bb1vjjiNrLZqT8fsZz8rCRw9MPnFf69Q6yKQ1DDX/4z/OCa7UPTH6W6T65oMGKMt7wBgi5MKT3YZimYs/gJxo1Dw6ddLlmHaM8QOvoyQBZGNR7CqVMIEcpLpMRw9nmXNNpwPwtZaPjaaUMqAqEIZTKqoHCA8rYmw7AF63Lo7NLWkqXM/ewA0e1i4UJaF2rasSFIKgHHRgPbR3qKbQVfnPqJkiHEc+2L/ouSSl7j/GcRpA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=el8LAprn5QIIYsOWX6OOtThuep5t8ET8DPNwB1E4/1rFKw/GazXbHOekAgYrcpnnr8UCZFFZmdLM4CLP01GIo5d7lJDZKlbbYStHhuOkuOcOex4f4nizNfa0O8k5JG1QSM2Rd8cacVPCH2Jqfol0Z3AvfDCw4vG2P/Y/rD5F5wJ74DaCmqCoVn0WV3Na7T6tyLEl/EuH1KpOKWPXJPkwCdO58Sqiz3B/qy3kE18gMy8wMivMZs6jt8R0tLHpw7wmnqg0d8TlGAInMTd06hruEnZscLkIXC0rkZcNttn+alAYP+c1x1mujDQt607QQtGl+MrxsLcYGV0CnQP6dqt6XA==
  • Cc: Jason Andryuk <jason.andryuk@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>
  • Delivery-date: Wed, 20 Aug 2025 21:13:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

C Xenstored was seen failing to map a domU's event channel.  Enhancing
Xen's error messages shows:
common/event_channel.c:427:d0v0 EVTCHNOP failure: d1, port 3267543746 error -22

Port 3267543746 is 0xc2c2c2c2 - SCRUB_PATTERN.

Xenstore expects a non-zero evtchn_port to be valid.  Explicitly zero
the page to avoid this.

Fixes: f78895ad78c9 ("tools/xenstored: Read event channel from xenstored page")
Signed-off-by: Jason Andryuk <jason.andryuk@xxxxxxx>
---
Tweaked stubdom & dom0less C xenstored pipeline success:
Test CI pipeline:
https://gitlab.com/xen-project/people/jandryuk-amd/xen/-/pipelines/1994879466

Example failure:
https://gitlab.com/xen-project/people/jandryuk-amd/xen/-/jobs/11084356847

Alternatively, a fixes could be:
Fixes: df2c03e2ebfe ("xen/arm: Alloc XenStore page for Dom0less DomUs from 
hypervisor")
If the page should have been zero from the start.

gitlab-ci uses oxenstored for most testings, so this isn't seen by
default.  I don't see this in local testing, so I guess I don't have
SCRUB_PATTERN writing enabled?
---
 xen/common/device-tree/dom0less-build.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/common/device-tree/dom0less-build.c 
b/xen/common/device-tree/dom0less-build.c
index 6bb038111d..badc227031 100644
--- a/xen/common/device-tree/dom0less-build.c
+++ b/xen/common/device-tree/dom0less-build.c
@@ -600,6 +600,7 @@ static int __init alloc_xenstore_page(struct domain *d)
     d->arch.hvm.params[HVM_PARAM_STORE_PFN] = gfn_x(gfn);
 #endif
     interface = map_domain_page(mfn);
+    clear_page(interface);
     interface->connection = XENSTORE_RECONNECT;
     unmap_domain_page(interface);
 
-- 
2.50.1




 


Rackspace

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