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

Re: [PATCH v2 2/8] xen/ppc: Add public/arch-ppc.h


  • To: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 29 Aug 2023 15:31:36 +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=xItzR6I9ExFMeYMq4xpqk0v/mI0HfIWpTKBQsmLymyg=; b=O245nOFiTywSlBBakX5eOSIVvpIMalDmM2Dh6PVn796Lnr/SQSPBVUEHyOO22gG0rYG13HGX0+puv2M/ihWUgl0LrJtFeUujUHdTVFbdfejStJ2gMpFYWN6QT5+yIqmGQ+K8JVo06ycTEjkonNVScezlGx5koqN4TJHsgPNyp8fKTm7FICTgAriq0xT5Hu1kPXB6uMy5SaK7qxgBZvWZP6PmFa+3yFXMqgLpmotDJFMSxt8xnHL/A9dsMjTCc8MXhdhLuWt0dsr0AxS/PmkQ3cx6H139Ygw190+yoXBFgsVsEEeQ4D3uwqekwSn0tiWxmSGW7HKPj48MhMZOAlF8OA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hzChtJXEuOxNo8XUQEdqs3QJE6Hxi+Fie8eeBJPVpSmmSYUWabuzHSAV0DHQL/hLTJLki9LKENAl6le3u6H1/yGwOWr+qPh7BPw2Cr1pquYlMrlby/Qnz26edqpQ4o9iNJe+j6KFjGXW9wym8kZRHeLeqIwQJiaBsOm+fI3i+EIPjSQQqRc+2gX3mFGwqy6PD88/yATK3ks08BT73/dAiUv/nQQZ64J8sKLZ+HnaVwFJ+3HJbLQTB7GFbEOnsYnRCW8vNetR23PXZV5hsR0JltmGVT4d0Dwk278bnIKTNTI+zaahSK16rACobVYEGPz09bT1JOna/lJ/nV9K7LkHUA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Timothy Pearson <tpearson@xxxxxxxxxxxxxxxxxxxxx>, 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: Tue, 29 Aug 2023 13:31:44 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 23.08.2023 22:07, Shawn Anastasio wrote:
> Signed-off-by: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

> --- /dev/null
> +++ b/xen/include/public/arch-ppc.h
> @@ -0,0 +1,110 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */
> +/*
> + * Copyright (C) IBM Corp. 2005, 2006
> + * Copyright (C) Raptor Engineering, LLC 2023
> + *
> + * Authors: Hollis Blanchard <hollisb@xxxxxxxxxx>
> + *          Timothy Pearson <tpearson@xxxxxxxxxxxxxxxxxxxxx>
> + *          Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
> + */
> +
> +#ifndef __XEN_PUBLIC_ARCH_PPC_H__
> +#define __XEN_PUBLIC_ARCH_PPC_H__
> +
> +#define  int64_aligned_t  int64_t __attribute__((__aligned__(8)))
> +#define uint64_aligned_t uint64_t __attribute__((__aligned__(8)))
> +
> +#ifndef __ASSEMBLY__
> +#define ___DEFINE_XEN_GUEST_HANDLE(name, type)                  \
> +    typedef union { type *p; unsigned long q; }                 \
> +        __guest_handle_ ## name;                                \
> +    typedef union { type *p; uint64_aligned_t q; }              \
> +        __guest_handle_64_ ## name
> +
> +#define __DEFINE_XEN_GUEST_HANDLE(name, type) \
> +    ___DEFINE_XEN_GUEST_HANDLE(name, type);   \
> +    ___DEFINE_XEN_GUEST_HANDLE(const_##name, const type)
> +#define DEFINE_XEN_GUEST_HANDLE(name)   __DEFINE_XEN_GUEST_HANDLE(name, name)
> +#define __XEN_GUEST_HANDLE(name)        __guest_handle_64_ ## name
> +#define XEN_GUEST_HANDLE(name)          __XEN_GUEST_HANDLE(name)
> +#define XEN_GUEST_HANDLE_PARAM(name)    __guest_handle_ ## name
> +#define set_xen_guest_handle_raw(hnd, val)                  \
> +    do {                                                    \
> +        __typeof__(&(hnd)) sxghr_tmp_ = &(hnd);             \
> +        sxghr_tmp_->q = 0;                                  \
> +        sxghr_tmp_->p = (val);                                \

I'll take the liberty of correcting the slightly broken padding here.

Jan



 


Rackspace

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