|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 09/17] xen/dom0less: store xenstore event channel in page
On 17.07.2025 08:19, Juergen Gross wrote:
> On 16.07.25 23:14, 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>
>> ---
>> xen/common/device-tree/dom0less-build.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/xen/common/device-tree/dom0less-build.c
>> b/xen/common/device-tree/dom0less-build.c
>> index a2789e3bdf..284139bf14 100644
>> --- a/xen/common/device-tree/dom0less-build.c
>> +++ b/xen/common/device-tree/dom0less-build.c
>> @@ -26,6 +26,7 @@
>> #include <public/io/xs_wire.h>
>>
>> #include <asm/dom0less-build.h>
>> +#include <asm/guest_access.h>
>> #include <asm/setup.h>
>>
>> #include <xen/static-memory.h>
>> @@ -126,8 +127,14 @@ static void __init initialize_domU_xenstore(void)
>>
>> if ( gfn != XENSTORE_PFN_LATE_ALLOC &&
>> IS_ENABLED(CONFIG_GRANT_TABLE) )
>> {
>> + evtchn_port_t port = d->arch.hvm.params[HVM_PARAM_STORE_EVTCHN];
>> + paddr_t evtchn_gaddr = gfn_to_gaddr(_gfn(gfn)) +
>> + offsetof(struct xenstore_domain_interface, evtchn_port);
>> +
>> ASSERT(gfn < UINT32_MAX);
>> gnttab_seed_entry(d, GNTTAB_RESERVED_XENSTORE, xs_domid, gfn);
>> + access_guest_memory_by_gpa(d, evtchn_gaddr, &port, sizeof(port),
>> + true /* is_write */);
>
> I couldn't find access_guest_memory_by_gpa() for x86. I think you either need
> to
> introduce it for all archs, or you need to handle this differently.
This code isn't buildable (yet) for x86, is it? There's a series of Alejandro's
moving in that direction, but that didn't go in yet. And even then aiui this
file would still be excluded.
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |