~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/xen/arm/interface.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /******************************************************************************
  3  * Guest OS interface to ARM Xen.
  4  *
  5  * Stefano Stabellini <stefano.stabellini@eu.citrix.com>, Citrix, 2012
  6  */
  7 
  8 #ifndef _ASM_ARM_XEN_INTERFACE_H
  9 #define _ASM_ARM_XEN_INTERFACE_H
 10 
 11 #include <linux/types.h>
 12 
 13 #define uint64_aligned_t uint64_t __attribute__((aligned(8)))
 14 
 15 #define __DEFINE_GUEST_HANDLE(name, type) \
 16         typedef struct { union { type *p; uint64_aligned_t q; }; }  \
 17         __guest_handle_ ## name
 18 
 19 #define DEFINE_GUEST_HANDLE_STRUCT(name) \
 20         __DEFINE_GUEST_HANDLE(name, struct name)
 21 #define DEFINE_GUEST_HANDLE(name) __DEFINE_GUEST_HANDLE(name, name)
 22 #define GUEST_HANDLE(name)        __guest_handle_ ## name
 23 
 24 #define set_xen_guest_handle(hnd, val)                  \
 25         do {                                            \
 26                 if (sizeof(hnd) == 8)                   \
 27                         *(uint64_t *)&(hnd) = 0;        \
 28                 (hnd).p = val;                          \
 29         } while (0)
 30 
 31 #define __HYPERVISOR_platform_op_raw __HYPERVISOR_platform_op
 32 
 33 #ifndef __ASSEMBLY__
 34 /* Explicitly size integers that represent pfns in the interface with
 35  * Xen so that we can have one ABI that works for 32 and 64 bit guests.
 36  * Note that this means that the xen_pfn_t type may be capable of
 37  * representing pfn's which the guest cannot represent in its own pfn
 38  * type. However since pfn space is controlled by the guest this is
 39  * fine since it simply wouldn't be able to create any sure pfns in
 40  * the first place.
 41  */
 42 typedef uint64_t xen_pfn_t;
 43 #define PRI_xen_pfn "llx"
 44 typedef uint64_t xen_ulong_t;
 45 #define PRI_xen_ulong "llx"
 46 typedef int64_t xen_long_t;
 47 #define PRI_xen_long "llx"
 48 /* Guest handles for primitive C types. */
 49 __DEFINE_GUEST_HANDLE(uchar, unsigned char);
 50 __DEFINE_GUEST_HANDLE(uint,  unsigned int);
 51 DEFINE_GUEST_HANDLE(char);
 52 DEFINE_GUEST_HANDLE(int);
 53 DEFINE_GUEST_HANDLE(void);
 54 DEFINE_GUEST_HANDLE(uint64_t);
 55 DEFINE_GUEST_HANDLE(uint32_t);
 56 DEFINE_GUEST_HANDLE(xen_pfn_t);
 57 DEFINE_GUEST_HANDLE(xen_ulong_t);
 58 
 59 /* Maximum number of virtual CPUs in multi-processor guests. */
 60 #define MAX_VIRT_CPUS 1
 61 
 62 struct arch_vcpu_info { };
 63 struct arch_shared_info { };
 64 
 65 /* TODO: Move pvclock definitions some place arch independent */
 66 struct pvclock_vcpu_time_info {
 67         u32   version;
 68         u32   pad0;
 69         u64   tsc_timestamp;
 70         u64   system_time;
 71         u32   tsc_to_system_mul;
 72         s8    tsc_shift;
 73         u8    flags;
 74         u8    pad[2];
 75 } __attribute__((__packed__)); /* 32 bytes */
 76 
 77 /* It is OK to have a 12 bytes struct with no padding because it is packed */
 78 struct pvclock_wall_clock {
 79         u32   version;
 80         u32   sec;
 81         u32   nsec;
 82         u32   sec_hi;
 83 } __attribute__((__packed__));
 84 #endif
 85 
 86 #endif /* _ASM_ARM_XEN_INTERFACE_H */
 87 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php