[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 2/8] xen/ppc: Add public/arch-ppc.h
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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |