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

Re: [PATCH v2 2/5] Mini-OS: get own domid


  • To: Julien Grall <julien@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 13 Nov 2023 10:28:01 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; 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=IprFfEJOyudnsrrIYDrvL6CyRfjorIymqxcVkbLhRv4=; b=OmRsGafZxdI2GvufVeQbEVwYyOokCFn1Ajcfa+KYI+4/VMztE5FD+upMGa1e+IS7IUu+Su5m32wooyD/U3FemzVsDdMc82b9zGqGFj/QZJ3JUProWyLr9F7y4pCKR9acnhbTogsSI6iBOQgibyfLNM2mGYE95gp2NZKbEztcW+9CStmETP2eyeXPYT0+mdBo/tHKf2eLsoRV9DJjS/Zhisyu1PVGaEgMfhaU/IbZPGdVjw6pnDUYmsco0jAOHto7R+i9WsrhEzryjuX2vAsTsnEnlp+GdM/awpUA6x4R16UxN+SJvsxFO3AVe45MckWPFL6k7nNlco3PH7dy7UJYMw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dsNs5Jjgi7zrYKLP16A791KYwzcGgIwJkdm2IUIWF2AGcpgXPWM6CIjJBRQ05A7Ty32LlcIvblOuBWajmwifn1Lc01HS3X32L9evROR3j/kykfZrxe3V3nLFzaGUrygw8psjwu79OQ1Djx474dQ8wby56uDrszbHAMwCLb29rwJoxrU3OvaK9nbOkWK88TTs1UQs0Gz3hJJq9aOcA2Q7LQ8aWvbS2st9/5JaWh8tUZDKGoFbKaPIAu0D8qHOXiTS6eB6iHyqTh34kx9T1EflCAmy34KOtcPe50LxqlnC4IAmCGWRxxSNMVK5RDI9OksHhtLyRHq3hjmID/D4CO+MYw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: minios-devel@xxxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, samuel.thibault@xxxxxxxxxxxx, wl@xxxxxxx, Juergen Gross <jgross@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 13 Nov 2023 09:28:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13.11.2023 10:12, Julien Grall wrote:
> 
> 
> On 13/11/2023 07:37, Jan Beulich wrote:
>> On 10.11.2023 18:38, Julien Grall wrote:
>>> Hi Jan,
>>>
>>> On 10/11/2023 12:44, Jan Beulich wrote:
>>>> On 10.11.2023 13:23, Roger Pau Monné wrote:
>>>>> On Fri, Nov 10, 2023 at 12:34:32PM +0100, Juergen Gross wrote:
>>>>>> Get the own domid via creation of a temporary event channel. There is
>>>>>> no "official" way to read the own domid in PV guests, so use the event
>>>>>> channel interface to get it:
>>>>>>
>>>>>> - allocate an unbound event channel specifying DOMID_SELF for the
>>>>>>     other end
>>>>>>
>>>>>> - read the event channel status which will contain the own domid in
>>>>>>     unbound.dom
>>>>>>
>>>>>> - close the event channel
>>>>>
>>>>> Should we look into introducing a way to expose the domid, so that in
>>>>> the future we might not need to resort to this workarounds to get the
>>>>> domid?
>>>>>
>>>>> Maybe in the PV-specific cpuid leaf?  It's a shame we didn't put it in
>>>>> a non-HVM specific leaf when it was made available to HVM for pvshim
>>>>> reasons.
>>>>
>>>> Couldn't we retroactively generalize the type-agnostic parts of that
>>>> leaf?
>>>
>>> This would only work for x86. I think we want to have a generic
>>> hypercalls so it can be used by all arch.
>>
>> Hmm, yes, perhaps. Otoh it would seem desirable to me if arch-es also
>> provided some extension to an arch-natural way of feature detection
>> (which CPUID is on x86), without the need to invoke any hypercalls.
> 
> For Arm, I can't really think of anything other than hvc/smc which are 
> used for calls to the hypervisor/monitor (so basically hypercalls).
> 
> Please suggest if you have a better idea.

I don't know enough Arm to properly suggest something. Arm64 has various
id_* system registers, so I would be wondering whether having a properly
virtual one reserved in system register space couldn't do the trick.
(Clearly just one may not be sufficient long term, so there might be a
scalability issue with such an approach. Unlike x86'es CPUID Arm's MRS,
aiui, doesn't take inputs other than the coordinates of the system
register to read.)

Jan



 


Rackspace

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