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

RE: [v2 2/4] xen/arm32: 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:53:00 +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=GoVB4vG/uM5KKyFoUUtHs7ZFGShlDxHmaf6jJWSY2HE=; b=h4mtR1EHLGTr+B0DlmSPvbaPDi9lr6+937pAirACElBg89kqSTK7tr+zDFA1SpWtj54vSCYVL2VKvng8ok4WedvsBnxisXgSFmnBB/T5Ozj1JyqIbME+Mx0HP2EEoYOLLHeLhSgKBGAh//SA9CjqvoHFpc/Dazux1ej0lbHOD66M6rdWBcQZWM7mnv8HPT3m700RBrhp99t2hEnQZsXXdnkTfD/DblC9SKjAphWexOoIALhRS8Nk/lW0uips9rQRfJ4r57Tr894T8g/JHgbzsyqOkVlIjHJiB/8ZDycgXVLyjh2c7sV1HBwIf896//0P9cVWttEbeQcUvX/iQqqkMg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SHG32UIlS4sXhtl55BbiYhwvh8ihbD1+0ivyJnPjgv5OIiV99EQWmLk3WaAxoxmUT5hnn/lGOlea4AppAdnFX7TDeG7WspOxWdFYdqQtKyS3b1b1U0cLEJPgSmX1i2kHki5MnHIrbZomPLe4fcYegrPGpzvzE/1yg3hYtwl9lxyILnVCkJ8yO/DFK3U5RlnYi4pxzmHCTa2g3Y7B2uXRRcEx0+9n2GFUu33l0pTZmFGUENBGosa+sP+gjLPFR+u8eG7PuCEBylVhAicWORzLJDK3Nfiy+pTRkWSJF9rrt9HRmMQZv9vscqrJUicFhJ+Bv4H1Tb7IlRE3fiBSXyA9vQ==
  • 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:53:32 +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: AQHZqsXt6KY/k4F950WYV4UFWmacUq+iYkag
  • Thread-topic: [v2 2/4] xen/arm32: head: Don't map too much in boot_third

Hi Julien,

> -----Original Message-----
> Subject: [v2 2/4] xen/arm32: 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.
> 
> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
> Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

Reviewed-by: Henry Wang <Henry.Wang@xxxxxxx>

Kind regards,
Henry



 


Rackspace

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