Source-Changes-HG archive

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

[src/trunk]: src/sys/external/mit/xen-include-public/dist/xen/include/public ...



details:   https://anonhg.NetBSD.org/src/rev/856d5758999a
branches:  trunk
changeset: 838836:856d5758999a
user:      cherry <cherry%NetBSD.org@localhost>
date:      Sat Feb 02 08:03:47 2019 +0000

description:
Import Xen public headers version 4.11.1

Release tag: RELEASE-4-11-1

git log of the freeze is as follows:

commit 96cbd0893f783997caaf117e897d5fa8f2dc7b5f
Author: Jan Beulich <jbeulich%suse.com@localhost>
Date:   Thu Nov 29 15:04:11 2018 +0100

    update Xen version to 4.11.1

diffstat:

 sys/external/mit/xen-include-public/dist/xen/include/public/COPYING                   |    38 +
 sys/external/mit/xen-include-public/dist/xen/include/public/arch-arm.h                |   476 +++
 sys/external/mit/xen-include-public/dist/xen/include/public/arch-arm/hvm/save.h       |    39 +
 sys/external/mit/xen-include-public/dist/xen/include/public/arch-arm/smccc.h          |    66 +
 sys/external/mit/xen-include-public/dist/xen/include/public/arch-x86/cpufeatureset.h  |   269 ++
 sys/external/mit/xen-include-public/dist/xen/include/public/arch-x86/cpuid.h          |   118 +
 sys/external/mit/xen-include-public/dist/xen/include/public/arch-x86/hvm/save.h       |   657 +++++
 sys/external/mit/xen-include-public/dist/xen/include/public/arch-x86/hvm/start_info.h |   159 +
 sys/external/mit/xen-include-public/dist/xen/include/public/arch-x86/pmu.h            |   167 +
 sys/external/mit/xen-include-public/dist/xen/include/public/arch-x86/xen-mca.h        |   446 +++
 sys/external/mit/xen-include-public/dist/xen/include/public/arch-x86/xen-x86_32.h     |   194 +
 sys/external/mit/xen-include-public/dist/xen/include/public/arch-x86/xen-x86_64.h     |   241 +
 sys/external/mit/xen-include-public/dist/xen/include/public/arch-x86/xen.h            |   359 ++
 sys/external/mit/xen-include-public/dist/xen/include/public/arch-x86_32.h             |    27 +
 sys/external/mit/xen-include-public/dist/xen/include/public/arch-x86_64.h             |    43 +
 sys/external/mit/xen-include-public/dist/xen/include/public/callback.h                |   121 +
 sys/external/mit/xen-include-public/dist/xen/include/public/dom0_ops.h                |   120 +
 sys/external/mit/xen-include-public/dist/xen/include/public/domctl.h                  |  1253 ++++++++++
 sys/external/mit/xen-include-public/dist/xen/include/public/elfnote.h                 |   283 ++
 sys/external/mit/xen-include-public/dist/xen/include/public/errno.h                   |   124 +
 sys/external/mit/xen-include-public/dist/xen/include/public/event_channel.h           |   385 +++
 sys/external/mit/xen-include-public/dist/xen/include/public/features.h                |   129 +
 sys/external/mit/xen-include-public/dist/xen/include/public/grant_table.h             |   684 +++++
 sys/external/mit/xen-include-public/dist/xen/include/public/hvm/dm_op.h               |   480 +++
 sys/external/mit/xen-include-public/dist/xen/include/public/hvm/e820.h                |    38 +
 sys/external/mit/xen-include-public/dist/xen/include/public/hvm/hvm_info_table.h      |    82 +
 sys/external/mit/xen-include-public/dist/xen/include/public/hvm/hvm_op.h              |   325 ++
 sys/external/mit/xen-include-public/dist/xen/include/public/hvm/hvm_vcpu.h            |   144 +
 sys/external/mit/xen-include-public/dist/xen/include/public/hvm/hvm_xs_strings.h      |    83 +
 sys/external/mit/xen-include-public/dist/xen/include/public/hvm/ioreq.h               |   143 +
 sys/external/mit/xen-include-public/dist/xen/include/public/hvm/params.h              |   284 ++
 sys/external/mit/xen-include-public/dist/xen/include/public/hvm/pvdrivers.h           |    49 +
 sys/external/mit/xen-include-public/dist/xen/include/public/hvm/save.h                |   113 +
 sys/external/mit/xen-include-public/dist/xen/include/public/io/9pfs.h                 |    49 +
 sys/external/mit/xen-include-public/dist/xen/include/public/io/blkif.h                |   702 +++++
 sys/external/mit/xen-include-public/dist/xen/include/public/io/console.h              |    56 +
 sys/external/mit/xen-include-public/dist/xen/include/public/io/displif.h              |   872 ++++++
 sys/external/mit/xen-include-public/dist/xen/include/public/io/fbif.h                 |   176 +
 sys/external/mit/xen-include-public/dist/xen/include/public/io/fsif.h                 |   192 +
 sys/external/mit/xen-include-public/dist/xen/include/public/io/kbdif.h                |   576 ++++
 sys/external/mit/xen-include-public/dist/xen/include/public/io/libxenvchan.h          |   101 +
 sys/external/mit/xen-include-public/dist/xen/include/public/io/netif.h                |  1076 ++++++++
 sys/external/mit/xen-include-public/dist/xen/include/public/io/pciif.h                |   125 +
 sys/external/mit/xen-include-public/dist/xen/include/public/io/protocols.h            |    42 +
 sys/external/mit/xen-include-public/dist/xen/include/public/io/pvcalls.h              |   153 +
 sys/external/mit/xen-include-public/dist/xen/include/public/io/ring.h                 |   484 +++
 sys/external/mit/xen-include-public/dist/xen/include/public/io/sndif.h                |  1091 ++++++++
 sys/external/mit/xen-include-public/dist/xen/include/public/io/tpmif.h                |   143 +
 sys/external/mit/xen-include-public/dist/xen/include/public/io/usbif.h                |   254 ++
 sys/external/mit/xen-include-public/dist/xen/include/public/io/vscsiif.h              |   330 ++
 sys/external/mit/xen-include-public/dist/xen/include/public/io/xenbus.h               |    80 +
 sys/external/mit/xen-include-public/dist/xen/include/public/io/xs_wire.h              |   153 +
 sys/external/mit/xen-include-public/dist/xen/include/public/kexec.h                   |   263 ++
 sys/external/mit/xen-include-public/dist/xen/include/public/memory.h                  |   727 +++++
 sys/external/mit/xen-include-public/dist/xen/include/public/nmi.h                     |    85 +
 sys/external/mit/xen-include-public/dist/xen/include/public/physdev.h                 |   387 +++
 sys/external/mit/xen-include-public/dist/xen/include/public/platform.h                |   663 +++++
 sys/external/mit/xen-include-public/dist/xen/include/public/pmu.h                     |   143 +
 sys/external/mit/xen-include-public/dist/xen/include/public/sched.h                   |   202 +
 sys/external/mit/xen-include-public/dist/xen/include/public/sysctl.h                  |  1140 +++++++++
 sys/external/mit/xen-include-public/dist/xen/include/public/tmem.h                    |   124 +
 sys/external/mit/xen-include-public/dist/xen/include/public/trace.h                   |   341 ++
 sys/external/mit/xen-include-public/dist/xen/include/public/vcpu.h                    |   248 +
 sys/external/mit/xen-include-public/dist/xen/include/public/version.h                 |   116 +
 sys/external/mit/xen-include-public/dist/xen/include/public/vm_event.h                |   379 +++
 sys/external/mit/xen-include-public/dist/xen/include/public/xen-compat.h              |    44 +
 sys/external/mit/xen-include-public/dist/xen/include/public/xen.h                     |  1004 ++++++++
 sys/external/mit/xen-include-public/dist/xen/include/public/xencomm.h                 |    41 +
 sys/external/mit/xen-include-public/dist/xen/include/public/xenoprof.h                |   152 +
 sys/external/mit/xen-include-public/dist/xen/include/public/xsm/flask_op.h            |   216 +
 70 files changed, 21069 insertions(+), 0 deletions(-)

diffs (truncated from 21349 to 300 lines):

diff -r 2d7ec39c816d -r 856d5758999a sys/external/mit/xen-include-public/dist/xen/include/public/COPYING
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/external/mit/xen-include-public/dist/xen/include/public/COPYING       Sat Feb 02 08:03:47 2019 +0000
@@ -0,0 +1,38 @@
+XEN NOTICE
+==========
+
+This copyright applies to all files within this subdirectory and its
+subdirectories:
+  include/public/*.h
+  include/public/hvm/*.h
+  include/public/io/*.h
+
+The intention is that these files can be freely copied into the source
+tree of an operating system when porting that OS to run on Xen. Doing
+so does *not* cause the OS to become subject to the terms of the GPL.
+
+All other files in the Xen source distribution are covered by version
+2 of the GNU General Public License except where explicitly stated
+otherwise within individual source files.
+
+ -- Keir Fraser (on behalf of the Xen team)
+
+=====================================================================
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
+DEALINGS IN THE SOFTWARE.
diff -r 2d7ec39c816d -r 856d5758999a sys/external/mit/xen-include-public/dist/xen/include/public/arch-arm.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/external/mit/xen-include-public/dist/xen/include/public/arch-arm.h    Sat Feb 02 08:03:47 2019 +0000
@@ -0,0 +1,476 @@
+/******************************************************************************
+ * arch-arm.h
+ *
+ * Guest OS interface to ARM Xen.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Copyright 2011 (C) Citrix Systems
+ */
+
+#ifndef __XEN_PUBLIC_ARCH_ARM_H__
+#define __XEN_PUBLIC_ARCH_ARM_H__
+
+/*
+ * `incontents 50 arm_abi Hypercall Calling Convention
+ *
+ * A hypercall is issued using the ARM HVC instruction.
+ *
+ * A hypercall can take up to 5 arguments. These are passed in
+ * registers, the first argument in x0/r0 (for arm64/arm32 guests
+ * respectively irrespective of whether the underlying hypervisor is
+ * 32- or 64-bit), the second argument in x1/r1, the third in x2/r2,
+ * the forth in x3/r3 and the fifth in x4/r4.
+ *
+ * The hypercall number is passed in r12 (arm) or x16 (arm64). In both
+ * cases the relevant ARM procedure calling convention specifies this
+ * is an inter-procedure-call scratch register (e.g. for use in linker
+ * stubs). This use does not conflict with use during a hypercall.
+ *
+ * The HVC ISS must contain a Xen specific TAG: XEN_HYPERCALL_TAG.
+ *
+ * The return value is in x0/r0.
+ *
+ * The hypercall will clobber x16/r12 and the argument registers used
+ * by that hypercall (except r0 which is the return value) i.e. in
+ * addition to x16/r12 a 2 argument hypercall will clobber x1/r1 and a
+ * 4 argument hypercall will clobber x1/r1, x2/r2 and x3/r3.
+ *
+ * Parameter structs passed to hypercalls are laid out according to
+ * the Procedure Call Standard for the ARM Architecture (AAPCS, AKA
+ * EABI) and Procedure Call Standard for the ARM 64-bit Architecture
+ * (AAPCS64). Where there is a conflict the 64-bit standard should be
+ * used regardless of guest type. Structures which are passed as
+ * hypercall arguments are always little endian.
+ *
+ * All memory which is shared with other entities in the system
+ * (including the hypervisor and other guests) must reside in memory
+ * which is mapped as Normal Inner Write-Back Outer Write-Back Inner-Shareable.
+ * This applies to:
+ *  - hypercall arguments passed via a pointer to guest memory.
+ *  - memory shared via the grant table mechanism (including PV I/O
+ *    rings etc).
+ *  - memory shared with the hypervisor (struct shared_info, struct
+ *    vcpu_info, the grant table, etc).
+ *
+ * Any cache allocation hints are acceptable.
+ */
+
+/*
+ * `incontents 55 arm_hcall Supported Hypercalls
+ *
+ * Xen on ARM makes extensive use of hardware facilities and therefore
+ * only a subset of the potential hypercalls are required.
+ *
+ * Since ARM uses second stage paging any machine/physical addresses
+ * passed to hypercalls are Guest Physical Addresses (Intermediate
+ * Physical Addresses) unless otherwise noted.
+ *
+ * The following hypercalls (and sub operations) are supported on the
+ * ARM platform. Other hypercalls should be considered
+ * unavailable/unsupported.
+ *
+ *  HYPERVISOR_memory_op
+ *   All generic sub-operations
+ *
+ *  HYPERVISOR_domctl
+ *   All generic sub-operations, with the exception of:
+ *    * XEN_DOMCTL_irq_permission (not yet implemented)
+ *
+ *  HYPERVISOR_sched_op
+ *   All generic sub-operations, with the exception of:
+ *    * SCHEDOP_block -- prefer wfi hardware instruction
+ *
+ *  HYPERVISOR_console_io
+ *   All generic sub-operations
+ *
+ *  HYPERVISOR_xen_version
+ *   All generic sub-operations
+ *
+ *  HYPERVISOR_event_channel_op
+ *   All generic sub-operations
+ *
+ *  HYPERVISOR_physdev_op
+ *   No sub-operations are currenty supported
+ *
+ *  HYPERVISOR_sysctl
+ *   All generic sub-operations, with the exception of:
+ *    * XEN_SYSCTL_page_offline_op
+ *    * XEN_SYSCTL_get_pmstat
+ *    * XEN_SYSCTL_pm_op
+ *
+ *  HYPERVISOR_hvm_op
+ *   Exactly these sub-operations are supported:
+ *    * HVMOP_set_param
+ *    * HVMOP_get_param
+ *
+ *  HYPERVISOR_grant_table_op
+ *   All generic sub-operations
+ *
+ *  HYPERVISOR_vcpu_op
+ *   Exactly these sub-operations are supported:
+ *    * VCPUOP_register_vcpu_info
+ *    * VCPUOP_register_runstate_memory_area
+ *
+ *
+ * Other notes on the ARM ABI:
+ *
+ * - struct start_info is not exported to ARM guests.
+ *
+ * - struct shared_info is mapped by ARM guests using the
+ *   HYPERVISOR_memory_op sub-op XENMEM_add_to_physmap, passing
+ *   XENMAPSPACE_shared_info as space parameter.
+ *
+ * - All the per-cpu struct vcpu_info are mapped by ARM guests using the
+ *   HYPERVISOR_vcpu_op sub-op VCPUOP_register_vcpu_info, including cpu0
+ *   struct vcpu_info.
+ *
+ * - The grant table is mapped using the HYPERVISOR_memory_op sub-op
+ *   XENMEM_add_to_physmap, passing XENMAPSPACE_grant_table as space
+ *   parameter. The memory range specified under the Xen compatible
+ *   hypervisor node on device tree can be used as target gpfn for the
+ *   mapping.
+ *
+ * - Xenstore is initialized by using the two hvm_params
+ *   HVM_PARAM_STORE_PFN and HVM_PARAM_STORE_EVTCHN. They can be read
+ *   with the HYPERVISOR_hvm_op sub-op HVMOP_get_param.
+ *
+ * - The paravirtualized console is initialized by using the two
+ *   hvm_params HVM_PARAM_CONSOLE_PFN and HVM_PARAM_CONSOLE_EVTCHN. They
+ *   can be read with the HYPERVISOR_hvm_op sub-op HVMOP_get_param.
+ *
+ * - Event channel notifications are delivered using the percpu GIC
+ *   interrupt specified under the Xen compatible hypervisor node on
+ *   device tree.
+ *
+ * - The device tree Xen compatible node is fully described under Linux
+ *   at Documentation/devicetree/bindings/arm/xen.txt.
+ */
+
+#define XEN_HYPERCALL_TAG   0XEA1
+
+#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
+
+/*
+ * XEN_GUEST_HANDLE represents a guest pointer, when passed as a field
+ * in a struct in memory. On ARM is always 8 bytes sizes and 8 bytes
+ * aligned.
+ * XEN_GUEST_HANDLE_PARAM represents a guest pointer, when passed as an
+ * hypercall argument. It is 4 bytes on aarch32 and 8 bytes on aarch64.
+ */
+#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;                                \
+    } while ( 0 )
+#define set_xen_guest_handle(hnd, val) set_xen_guest_handle_raw(hnd, val)
+
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+/* Anonymous union includes both 32- and 64-bit names (e.g., r0/x0). */
+# define __DECL_REG(n64, n32) union {          \
+        uint64_t n64;                          \
+        uint32_t n32;                          \
+    }
+#else
+/* Non-gcc sources must always use the proper 64-bit name (e.g., x0). */
+#define __DECL_REG(n64, n32) uint64_t n64
+#endif
+
+struct vcpu_guest_core_regs
+{
+    /*         Aarch64       Aarch32 */
+    __DECL_REG(x0,           r0_usr);
+    __DECL_REG(x1,           r1_usr);
+    __DECL_REG(x2,           r2_usr);
+    __DECL_REG(x3,           r3_usr);
+    __DECL_REG(x4,           r4_usr);
+    __DECL_REG(x5,           r5_usr);
+    __DECL_REG(x6,           r6_usr);
+    __DECL_REG(x7,           r7_usr);
+    __DECL_REG(x8,           r8_usr);
+    __DECL_REG(x9,           r9_usr);
+    __DECL_REG(x10,          r10_usr);
+    __DECL_REG(x11,          r11_usr);
+    __DECL_REG(x12,          r12_usr);
+
+    __DECL_REG(x13,          sp_usr);
+    __DECL_REG(x14,          lr_usr);
+
+    __DECL_REG(x15,          __unused_sp_hyp);
+
+    __DECL_REG(x16,          lr_irq);
+    __DECL_REG(x17,          sp_irq);
+
+    __DECL_REG(x18,          lr_svc);
+    __DECL_REG(x19,          sp_svc);
+
+    __DECL_REG(x20,          lr_abt);
+    __DECL_REG(x21,          sp_abt);
+
+    __DECL_REG(x22,          lr_und);
+    __DECL_REG(x23,          sp_und);
+
+    __DECL_REG(x24,          r8_fiq);
+    __DECL_REG(x25,          r9_fiq);
+    __DECL_REG(x26,          r10_fiq);
+    __DECL_REG(x27,          r11_fiq);
+    __DECL_REG(x28,          r12_fiq);
+
+    __DECL_REG(x29,          sp_fiq);
+    __DECL_REG(x30,          lr_fiq);
+
+    /* Return address and mode */



Home | Main Index | Thread Index | Old Index