[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] xen/arm: Don't use copy_from_paddr for DTB relocation
- To: Luca Fancellu <luca.fancellu@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: "Orzel, Michal" <michal.orzel@xxxxxxx>
- Date: Wed, 26 Feb 2025 15:10:09 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
- 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=LX7B2LbKgiROv/N4IJd7rS3bgn8L2vYhf0UmpYm8ABY=; b=Q4nrP5z0trKLLlhWiKlmi2+LOwUe6qKcmF0JDRm7f7sJ+HYD963QWzgY0KfMoM78Olxwr9eyq6BNTxoULCOpdN28GwPgsLvKIbkiiFSGG53hx997YrFSypBcTrqamhJesmX5TE8bPVKvnWwqu3mocPN3B87C4PY/A1JFlpZIZbjUZxBMoLjFCP4p9lTizM/mdWSQsl31nIlhm5YXuigTLXoUusg1tv8HpV95HIQ+/bLqol+S54KyKV2QSTVQbtuyxFRFSi8jgxzyWrOp378ambY8URd8SUs5k3x/06tlPpjTXRUbRdGdB6IlMwPPgKw/tlS3tcL/+ejHXHkgVWkteQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UWlBtQmWfhC/surAD6A/LqVZ9Xoy21QfZOifrV6tRJWrUCjDHQmdDzuFwNuzOJnf8H91POlIAxEhkZdZJ8L3ycB2OozQNvWnlmrjcRYE3V3yvGGx5cviil5L30dg2XKRp41xviRrs0lVMSGQkGlatDbDe4qaZUvstrbFhomRz5eXdwVJTimSIGopUEz4ydZmi1+4k4nnHokyDOaLH/Vwy/SDkCvafk3CC6/RAgs/eGc6KzflHbT6zC9wmgW989YEZsWmUFIEFDMUx+Qhvy1Wu/1buvXGd+DmUNVndNrFtskFAy8VfMATIzWGchqRu+J2QNKS1cmUA2QLaAQWYzpq2A==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Wed, 26 Feb 2025 14:10:22 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 26/02/2025 12:26, Luca Fancellu wrote:
>
>
> Currently the early stage of the Arm boot maps the DTB using
> early_fdt_map() using PAGE_HYPERVISOR_RO which is cacheable
> read-only memory, later during DTB relocation the function
> copy_from_paddr() is used to map pages in the same range on
> the fixmap but using PAGE_HYPERVISOR_WC which is non-cacheable
> read-write memory.
>
> The Arm specifications, ARM DDI0487L.a, section B2.11 "Mismatched
> memory attributes" discourage using mismatched attributes for
> aliases of the same location.
>
> Given that there is nothing preventing the relocation since the region
> is already mapped, fix that by open-coding copy_from_paddr inside
> relocate_fdt, without mapping on the fixmap.
>
> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
Acked-by: Michal Orzel <michal.orzel@xxxxxxx>
~Michal
|