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

Re: [PATCH v3 3/6] xen/arm: mpu: Define Xen start address for MPU systems


  • To: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Mon, 14 Oct 2024 18:53:20 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • 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=2; 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=rsVmI/AJaNozcM/AJY1eFyfrw+h8i4iXeWgudEr49Ww=; b=XIwBJHTLr5YtYQh0DrvP04IE2KXdrzNhleJq5wwnTH5yIv5vtqN7XA91sFLLjn8BC0XmqirSnofzMjinSCfSrkkQlhpI1kCnVkFTXKVJ3pE2qOwdFDSFSUxfNKRo1vjlEcVMzK+XE8KTSSRzOc5jlPA8zhp+Q9YUEGV2xYxk10wmkvTAPshCxpgu8GqFjYIigx0zYpsDkUk1mNMqdlt2cWss3ghnsEUEgW+Na6FAspufyZPpFUoyXzhE7+Jpd0TWrn3kzo6isayNhRuhtYuEbYpixN9zhHGeCeDIMKlWSJFwAcw7CRkN6P+gaoyMPsm9VSniuPOSMi7riLb7tWn+mA==
  • 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=rsVmI/AJaNozcM/AJY1eFyfrw+h8i4iXeWgudEr49Ww=; b=nePdSxctpVl7IZNyCt8sl5SEqpsV3wENR4lkjDhWcbIepqgClao8M1nhlNXZ3s2K6U6oeXms7aWQyrO4KO7OTONMkqBz4xsxaxqlAKZuaGvCgyAgC4BsHU8ayQHtlPJtHxLvFe08o8CPAspCEqymiEpcBrcAwapJFmUwy0c1lJADyMvLiKYJ2Thr20BeaeWplW0Pg52PSGX0nw1x7LYbXzYjJjMVinV2BF9WqWKnZx7STxzJC1R2nt9HTD3v9XLVUweQxzuCveBZK7Qlw6QN9/zn1+toB4NgECohCy0EnnRt49E5qHc48AOzkW4VLdFmuoX/r9KeB4q5yDKSewD38A==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=I2kjcU4AzvF0jRaEbPfYQ8rwRcwDDzYUTX9oS4Wneonyh3Jgo6TPJdD+AXFniACEoHl89j3ftRXJ5wX5ZsaHzLk5AfsvDOf+K4vPpX2Of1SP7QsucmCldsq+aTH2DyboBRJwKNHxcJc0H5faNdsogT/C4gMQtGZYOVxInjcqeaf29ZZH30p8Xs0Yz0eNgBjLrhF3A7wC+T4yz6tf/0MLyeS44guZUHvR8p6GVPkTuFVKu+TSMiHnMKWZurndo0zRsgK1CoLSs3K2/ZZJ1jN7m7+tbUgB8Z2sqC6Zpo2AuICzTcrOVCkRt/ArEui94ZwfOc1x19F0zSzub5PhPapFCw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fst7Cmp5r3CbnaUt6Xmahe2cQQSS9sUF0/r3TPrvuBrd2cCO72SOKz30pz9uJvvFWNpx+HzuIc64J7UWZ1ksosUex9iolg66eWPGy3ZLXjK1Bmyku0/LU/4p3usyFquW1bRoSbvluKP/jTWkmenqos0lH16oD6xYfIqFsWCzT+WEsqSJmJStzencIiBYQrW9d3afEL/wHjYZTm29azW7OaaSS9Mzao8WJ/kYFm7aIPjTOQjpMnhKobkaiGmZVRwAntbPwob6Slr3d7xNgE5SPSFtLt888PAKqfy70C9b090v36fPLcyNvG4RM265EHt2DU3EhIu9ljATUx/4IWClCQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Jiamei Xie <Jiamei.Xie@xxxxxxx>, "frediano.ziglio@xxxxxxxxx" <frediano.ziglio@xxxxxxxxx>
  • Delivery-date: Mon, 14 Oct 2024 18:53:56 +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: AQHbGx17mFolmke5JEyORtvE+VZJJrKGnmUA
  • Thread-topic: [PATCH v3 3/6] xen/arm: mpu: Define Xen start address for MPU systems

+ Frediano for suggestion about header protection define name

> +++ b/xen/arch/arm/include/asm/mpu/layout.h
> @@ -0,0 +1,33 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +
> +#ifndef __ARM_MPU_LAYOUT_H__
> +#define __ARM_MPU_LAYOUT_H__

I think we are moving away from this notation:
https://patchwork.kernel.org/project/xen-devel/patch/20241004081713.749031-6-frediano.ziglio@xxxxxxxxx/
Shall this be ASM___ARM__MPU__LAYOUT_H ? @Frediano


> +
> +#define XEN_START_ADDRESS CONFIG_XEN_START_ADDRESS
> +
> +/*
> + * All MPU platforms need to provide a XEN_START_ADDRESS for linker. This
> + * address indicates where Xen image will be loaded and run from. This
> + * address must be aligned to a PAGE_SIZE.
> + */
> +#if (XEN_START_ADDRESS % PAGE_SIZE) != 0
> +#error "XEN_START_ADDRESS must be aligned to 4KB"
> +#endif
> +
> +/*
> + * For MPU, XEN's virtual start address is same as the physical address.
> + * The reason being MPU treats VA == PA. IOW, it cannot map the physical
> + * address to a different fixed virtual address. So, the virtual start
> + * address is determined by the physical address at which Xen is loaded.
> + */
> +#define XEN_VIRT_START         _AT(paddr_t, XEN_START_ADDRESS)
> +
> +#endif /* __ARM_MPU_LAYOUT_H__ */

                   ^-- ASM___ARM__MPU__LAYOUT_H ? 

Apart from that, the rest looks ok to me:
Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>





 


Rackspace

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