[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [v2 1/4] xen/arm64: head: Don't map too much in boot_third
- To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Henry Wang <Henry.Wang@xxxxxxx>
- Date: Thu, 29 Jun 2023 22:52:58 +0000
- Accept-language: zh-CN, 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=fb0opwtVEAKr/38TBMxRuNOi5yr3x62SzdWm4Mg5AbA=; b=dv1LaTxNJeyfIyl+A1U/ZG65Un7Wdkdd3DFdM+EIb25YYmyfyLfmXnAfu1BdOV6Y09qvrxxHRsHBqby4TxNDvdpj8Tz8NolITqvCs2KfZnVH0jEjP5OOrjpaUYwDQGRxk2eJhJIa/p1QGEsTmBb4Jk3ExQACejFJJvknlx/KjXBoTnGXMvgiCtsJMD92nqMG5wTg5sae2IjrkI+sSV+HSnblQBfEj4Hs75b+1hfMfM0lLeA5vzpAzpUEJdRzbJ88yNFxdSmcRranqKylQPbePkeDVyluMrfwZ/mGUmr3FbPiwHMwPyb1O1Q2qG5Qtbk8WfA0tHH0kOYL3T8GZANY3w==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MaT9tt5sPB+hSYPQjwcOmeDxm05by5MG+k0DfJExrEmtvDJ0eciI2WcOiqhujdvOc3lBnkh30+Do4y9CU08WFksmE4XTDItMpd84RMUPurNoWK045BxBxjFrfvG5d8jHkqIMbb9HAcE/I4PzU4agUD5MjwfHTZqkwHncUXXcQxQo2h5aHt7l+/FIM8Ot6Jw3pvmKzKrr07n9K8uiRTKysIhsbKSOs5tCs+db2GWOvtQfrFrjGXYL8Tqc/5sFJ6chL/WMtxp4W+MCPFvYiwj9PcNUf8E07JQwhiLAAKVpiFSYZKvdHaO4S0BYEd8viGwZD1GTHSRaSyilGW+BdqLBdw==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Luca Fancellu <Luca.Fancellu@xxxxxxx>, "michal.orzel@xxxxxxx" <michal.orzel@xxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>
- Delivery-date: Thu, 29 Jun 2023 22:54:00 +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: AQHZqsXsNehRAmncWEmbzZpBKUuCiq+iYfbw
- Thread-topic: [v2 1/4] xen/arm64: head: Don't map too much in boot_third
Hi Julien,
> -----Original Message-----
> Subject: [v2 1/4] xen/arm64: head: Don't map too much in boot_third
>
> From: Julien Grall <jgrall@xxxxxxxxxx>
>
> At the moment, we are mapping the size of the reserved area for Xen
> (i.e. 2MB) even if the binary is smaller. We don't exactly know what's
> after Xen, so it is not a good idea to map more than necessary for a
> couple of reasons:
> * We would need to use break-before-make if the extra PTE needs to
> be updated to point to another region
> * The extra area mapped may be mapped again by Xen with different
> memory attribute. This would result to attribute mismatch.
>
> Therefore, rework the logic in create_page_tables() to map only what's
> necessary. To simplify the logic, we also want to make sure _end
> is page-aligned. So align the symbol in the linker and add an assert
> to catch any change.
>
> Lastly, take the opportunity to confirm that _start is equal to
> XEN_VIRT_START as the assembly is using both interchangeably.
>
> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
Reviewed-by: Henry Wang <Henry.Wang@xxxxxxx>
Kind regards,
Henry
|