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

Re: [PATCH v2 3/5] arm/dom0less: put dom0less feature code in a separate module


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Tue, 3 Oct 2023 07:44:23 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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=Z7S2fb8E2+dgqK0X7XudhqCH7RZeLIoxa15wZ4NRYCk=; b=AzwLZsJxz7oSkXbCoK7qQXCIeDhRGKvV0U52mYUol90ZflWUB8W6yiWzm9PUKCT9NSQKUdEwwU1AKMrt+O6WfpwjG5Odt7ZIEriaXdfUvr0JybsPf6dNAOX4+Gbhtpw8k55ks2CZqSAM167FgCaB8PdxdjFx9Yc0N4Hqo3XCE3+KSsKwnldeWKenM8BVsGIWUEq9QGasSc4a0mv+QWLz1qN0+ICr/AhaHMSgI2eJv0LDXdBlLPlshVTV2IXqG9URBTW9hwUVvrYjD9W7nnI6oeUFMNqmEyjl2Bd7pa0XetTHtYQ/FWuc1WKW+TZkoXRAy6bvly/z+EpDE/pK3kSsbw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jPywmDD5d7saMhKe3rFofOQTHApSIF/yks4T+nL1UuqKpBf+1bOgM0gIuj7tZoDZRqfZdzywWSwxzuVDqLhOrIHiAvJpYyfL9bbZG3TIszBu+g3HJ+HF6Z6anNavMo0eF2txMHCrFVHbOsgnNDclseZpndMAb71J8n4aOWe7+o9xD6Zvcn9R0dByKtZ1w/gEt/TCYiEmbErqjLHfxlq7ZyyxzvkLN5jPGrtlUywjHQ7rwsoNFryt17mO0lx1mAAVpQaxCoXFyHBqDzWFfQV+C7IfjI2ESq9fAmO0ZkVl4Ospt3ohI6yBGnDtQusRKeur3HSjmxWR+v6HhV3iSavjvA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 03 Oct 2023 07:44:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZ8UtNgBNI2koBH0+cEATmTDiuOrAw9peAgABwTYCAANJ9gIAD+GkAgABk7gCAAIXRgIAAm66A
  • Thread-topic: [PATCH v2 3/5] arm/dom0less: put dom0less feature code in a separate module

>>>> Given that code movement is painful from a git history perspective, and
>>>> given that we have to move dom0less code to xen/common anyway to make
>>>> it available to RISC-V and also x86, could we do it in one shot here?
>>> 
>>> Looking at the name of the functions, I would expect that we would need 
>>> another code movement in the future to move back Arm specific function 
>>> under arch/arm/. So we would end up with two code movement as well.
>>> 
>>> I would prefer if we wait until RISC-V/x86 needs it so we don't 
>>> unnecessarily move Arm specific code in common/.
>> 
>> I agree with Julien here.
>> Moving the code now will mean moving part of it back in arm in the future 
>> once we have a second user of this.
>> I would rather wait for the need to come so that we do this cleanly.
>> 
>> Also using hyperlaunch name now would be weird as there was no agreement on 
>> the naming (as far as I know) so far.
> 
> RISC-V is already using dom0less code, however in a downstream
> repository. To make progress faster the code was copied (not shared)
> from arch/arm to arch/riscv. More details on the Xen community call this
> week. 
> https://gitlab.com/xen-project/people/olkur/xen/-/blob/riscv_aia_support/xen/arch/riscv/domain_build.c?ref_type=heads
> 
> Hyperlaunch also needs dom0less code to be made common to make progress:
> https://marc.info/?l=xen-devel&m=169154172700539
> 
> So I think that there is an immediate RISC-V and X86 need.
> 
> But the point about "moving the code now will mean moving part of it
> back in arm in the future" is valid. How do we move forward?
> 
> I don't think we want to block Luca's progress to wait for more
> plumbings done on x86 or RISC-V. Also we don't want to scope creep
> Luca's series too much.
> 
> But I think the goal should be to move dom0less code to xen/common as
> soon as possible and make it arch neutral. How do we get there?

So here is why I felt painful doing now a move to the common code, but maybe 
you (maintainers) can give me some
feedbacks.

I see that the functions that might be put in common are these, some of them 
however have arm specific code in them:

is_dom0less_mode
allocate_bank_memory
allocate_memory
handle_passthrough_prop
handle_prop_pfdt
scan_pfdt_node
check_partial_fdt
domain_p2m_pages
alloc_xenstore_evtchn
domain_handle_dtb_bootmodule (contains reference to the gic)
prepare_dtb_domU (have reference to psci, gic, vpl011)
construct_domU (have reference to vpl011, static shared memory)
create_domUs(have reference to vpl011, sve)

Here the functions that can stay in arm code:

make_gicv2_domU_node
make_gicv3_domU_node
make_gic_domU_node
make_vpl011_uart_node


Given that the status after the move to common of the above functions is not 
very clean, I’ve decided to don’t do that,
however if you are fine with it, I can do the modification and who is going to 
work further on the subject can consolidate
and make them build for other architecture.

Cheers,
Luca



 


Rackspace

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