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

Re: [PATCH v3 8/8] xen/dom0less: store xenstore event channel in page


  • To: "Orzel, Michal" <michal.orzel@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Wed, 27 Aug 2025 09:24:03 -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=N1dfsLPEJr6prokg36dJQqYvkdfMPUPgjOr3lyfTFvw=; b=XAibtkxvnwlnSyTL3y7ods1MPv/FTUVXz4gb2FYJzAtt4Jg4kskxs3AnpsUJ3Qqpt1w31FDT/pze8heS5bkklS+gngQSh5HU9q0D/d7JLdHcBPf06d7dHZ8fdi4yD8pWtFh0tUziQmoxDHb0GDOdknrz1uz0UE5hbuQEZ8YuN7vIXBRAJ7j9ANt0xnFdDHbOa8OstCI80oKTtEpdgQhB0B0qWPuNbXKBfIBQi1mLOdRNDcRTdkUzzDSzmieIAORjivzEJOZq4E0W9aBlYEACbAcQ43MG85d0v5UU4caWxxwB7lhpxqBwIiGuCN/EOX0L2qCcXQKDuBa2GkHCh0cDCw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SExRb11X7JXabmdxXpurp/z95J29AwrpeFG7k7M+2MWf8vKsJfbM1iQN/RjlYw1sP4wIVkw3ErQsO7BvG9eZAOuCuX26lyk6LPOATfqxVy12PRv1rFgDy7meOXjbxK9z/E/dbIX4C+PDEOsl60xyFbFd/lM2TZ23gKBuFCaTyDknybpdi1OR+f7IAUqp3MFbbOhelUTCTB6ljoYIaoZ3xJTJw5NGgUljIfa92xlSpeZkKH54La4lVA6tPN8W6I5ZN4sN+fg5GbmU4bLGkKLavu40OVMyyl5l3eZRqjereLAMLb0BuvQEAd3Wm2unw6SNcHT981e0ffCKq1p9SVmRBg==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>
  • Delivery-date: Wed, 27 Aug 2025 13:23:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2025-08-27 04:03, Orzel, Michal wrote:


On 26/08/2025 23:08, Jason Andryuk wrote:
Write the associated event channel into the xenstore page so xenstored
can read it.  xenstored can map the grant by the reserved grant table
entry, and then read out the event channel and bind it.  This eliminates
the need for an additional mechanism to discover the event channel.

Signed-off-by: Jason Andryuk <jason.andryuk@xxxxxxx>
---
v2:
No change

This should go in after the init-dom0less changes so init-dom0less is
ready for xenstored automatically introducing domains.

I'm looking for feedback.  This is ARM-only for the time being, but that
is the only in-tree user of this code.  From the perspective, it is okay
to go in.

If we want a cross-arch approach, a common function to write to guest
physical addresses would be needed for additional arches, but they
aren't available yet.

Oleksii added a function pointer to dtb_load() and initrd_load() when
moving dom0less to common, but I think that isn't necessary.  Just
having a common helper would be sufficient.

copy_to_guest_phys() or something_copy_to_guest_phys() could be defined
or a wrapper for ARM's copy_to_guest_phys_flush_dcache().  Other arches
could need to implement it when using dom0less.

I'm not an ARM expert, but Stefano said
copy_to_guest_phys_flush_dcache() is not necessary since this xenstore
page isn't expected to be accessed without caches enabled.
I'm not sure I understand this point. When copying data *to* the guest, cleaning
is about Xen's cache, not guest's...

I was trying to highlight that the patch is using access_guest_memory_by_gpa(), but dtb_load() and initrd_load() use copy_to_guest_phys_flush_dcache().

I assumed from the name, and Stefano's comment, that copy_to_guest_phys_flush_dcache() was about ensuring the CPU's cache is flushed to RAM. That way a guest starting with cache disabled would see the correct contents. But I don't really know how it works and may be wrong.

Thanks,
Jason



 


Rackspace

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