[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 21/29] xen/asm-generic: introduce stub header altp2m.h
- To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Thu, 19 Oct 2023 13:27:23 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=hLlb7nS/7c3RCP9QonB07Jz3Nk7u8VGVTktgJfx3dx4=; b=I17qspdQNWOQvPs8BeRF2prrZCH9dmJVO08szpzZ+JFQMLcxSuX8AiIpMnjvtpGD/9aw/H3ZEcjmBlsQit/qInO4TCHlZhG5SYcjjrx6mpjV0oN8EPqCWpXG3XzuB/d54puz5eNzpQm3Hk8qG6OaLVOZqYFkVMsIjaz97rYA3Zve3ypFj3uDvXfVEbVR9Fa9ERoYltjG8azNNZP2cLYZmSoxyX6g1rLUxwdZOX7qm0aj+MV+K4W17Mboh0tQIIQKO+V4XD9zVrMZZCDAhMy5hVqiIytqeHV8WNYMkdMltLUthB61bL/5ZxBXoFIWk1RJnyUpd9CdWvXZpIlEbT6B5Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M3XfB9fMd2rHCfnZh3HxotdKHV5weFApQ0IbZt+hCZk1U58BV0GNCIL6nwSEX0eFRC7mjnqu/X1y0UmIwKg5z42dNziw0B0UohTtkqwiXdgGRhXf11f81615YNtCsZsmtujlGrtxqa+NQlNBpBcFuUX2DtYOqxH5xXuok6Q161y4GT6zs0wUAEkcwKDtHld6dkfQGh4EAxiRiKF0c/Xsy2lujzAkblYpIje05QJyE7LYVfUSScoxsvIN/E2yoFnUbjHMgDydUoD7Ko/+fBKNKL1fFi7Xq/FlVPjHg8eudhe1/9d5rdAa9+Hz7UX4G4OY+xmUzhOSi0QjvKmpZoI0nA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Thu, 19 Oct 2023 11:27:36 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 14.09.2023 16:56, Oleksii Kurochko wrote:
> The patch introduces header stub necessry for full Xen build.
>
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
> ---
> xen/include/asm-generic/altp2m.h | 34 ++++++++++++++++++++++++++++++++
> 1 file changed, 34 insertions(+)
> create mode 100644 xen/include/asm-generic/altp2m.h
While odd to be needed, this looks largely okay for the moment. Just
one remark:
> --- /dev/null
> +++ b/xen/include/asm-generic/altp2m.h
> @@ -0,0 +1,34 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +#ifndef __ASM_GENERIC_ALTP2M_H
> +#define __ASM_GENERIC_ALTP2M_H
> +
> +#include <xen/bug.h>
> +
> +struct domain;
> +struct vcpu;
> +
> +/* Alternate p2m on/off per domain */
> +static inline bool altp2m_active(const struct domain *d)
> +{
> + /* Not implemented on GENERIC. */
> + return false;
> +}
> +
> +/* Alternate p2m VCPU */
> +static inline uint16_t altp2m_vcpu_idx(const struct vcpu *v)
uint16_t is what x86 wants, but even on Arm it's suspicious. For a
generic header I'd say make it unsigned int, thus also eliminating
the question whether xen/types.h should be included here.
Jan
|