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

Re: [PATCH v12 12/12] xen/arm: add cache coloring support for Xen image


  • To: Carlo Nonato <carlo.nonato@xxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Mon, 16 Dec 2024 15:54:34 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=minervasys.tech 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=8jx4YTWH4aXYEjjuOnHuBsDma2MLcE157dQwiArtFHQ=; b=ePc+of7i31GAG9mHKKtnW1HkW6r5xJvgCvCgacX9SiHVHK7YsaLV8Vl/gRH5GEhvAZM4WEj06Fo+eyiNA9+WqFqBP+eoH5AP/YVMzTHnX/x+dFoMLrd7EUklVcnKGuTcp+dnisWPm7mvfvMUhJnsoCro/S2TfJglBr8x89AydUj0pxd/qmfToLj32+B6dRp7GmR+KQ5GCQFm3vW6jVK92b7r0V76c/MY/9VhMLa/0TnTHA2TMwwD5yPQl01cLoLGCKRVdhBUXa/YhTK0QUwRiI9Qvrs596Udr0V7JuGICkUpG5xBlwEA1oLItiKv4lA4Wol9V17k4tGC5un18ZjFwg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TLwaWLyg4ubZ9GzuxPoGl02ZQ89wF1SYQ3weEAonkyKboamlFnGaG2bJFIuSf36/gvgvQcq+3xnX9d3+/JrF5hy7pQLGKyLEzj9wjzQOuY/rKxNLGdIkx7ZfRkGBnDsKOQj7f8VGrq08/wP2fhHACSnnrEifrbmXseDYz7nnckNc5pr4GUMgLB3iplSgpsYGI0D3LcVrqHAh5AFJBVx+plBFGIeFv6PfqOOevoF0Qn0ZBcFgX8iU1uZfbVLJjljiyV9YpyHPaWBvG/H6z5CjtrNaKr5WhRnM2+PJrnfkiX4jS8SgcOxrxd4Q8X74g0EiAzWZgt1r5ehWtzz9vhwXLg==
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <andrea.bastoni@xxxxxxxxxxxxxxx>, <marco.solieri@xxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 16 Dec 2024 14:54:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 16/12/2024 15:28, Carlo Nonato wrote:
> 
> 
> Hi Michal,
> 
> On Mon, Dec 16, 2024 at 2:56 PM Michal Orzel <michal.orzel@xxxxxxx> wrote:
>>
>> On 13/12/2024 17:28, Carlo Nonato wrote:
>>>
>>> Xen image is relocated to a new colored physical space. Some relocation
>>> functionalities must be brought back:
>>> - the virtual address of the new space is taken from 0c18fb76323b
>>>   ("xen/arm: Remove unused BOOT_RELOC_VIRT_START").
>>> - relocate_xen() and get_xen_paddr() are taken from f60658c6ae47
>>>   ("xen/arm: Stop relocating Xen").
>>>
>>> setup_pagetables() must be adapted for coloring and for relocation. Runtime
>>> page tables are used to map the colored space, but they are also linked in
>>> boot tables so that the new space is temporarily available for relocation.
>>> This implies that Xen protection must happen after the copy.
>>>
>>> Finally, since the alternative framework needs to remap the Xen text and
>>> inittext sections, this operation must be done in a coloring-aware way.
>>> The function xen_remap_colored() is introduced for that.
>>>
>>> Signed-off-by: Carlo Nonato <carlo.nonato@xxxxxxxxxxxxxxx>
>>> Signed-off-by: Marco Solieri <marco.solieri@xxxxxxxxxxxxxxx>
>>> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> # common

[...]

>> Also, this function is only executed in case of LLC coloring, so shouldn't it
>> be #ifdef protected.
> 
> Here and in other places (patch #8) I'm relying on DCE to remove functions
> that are not called. This was a suggestion from Jan in that patch. Can we
> adopt the same here?
Yes, we can.

~Michal




 


Rackspace

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