/******************************************************************************
*
* Guest OS interface to x86 32-bit 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
* 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 (c) 2004-2007, K A Fraser
*/
/*
* Hypercall interface:
* Input: %ebx, %ecx, %edx, %esi, %edi (arguments 1-5)
* Output: %eax
* Access is via hypercall page (set up by guest loader or via a Xen MSR):
* call hypercall_page + hypercall-number * 32
* Clobbered: Argument registers (e.g., 2-arg hypercall clobbers %ebx,%ecx)
*/
/*
* Direct hypercall interface:
* As above, except the entry sequence to the hypervisor is:
* mov $hypercall-number*32,%eax ; int $0x82
*/
#if !defined(_ASM)
#else
#endif
/*
* These flat segments are in the Xen-private section of every GDT. Since these
* are also present in the initial GDT, many OSes will be able to avoid
* installing their own GDT.
*/
#define HYPERVISOR_VIRT_START_PAE \
#define MACH2PHYS_VIRT_START_PAE \
#define MACH2PHYS_VIRT_END_PAE \
/* Non-PAE bounds are obsolete. */
#define HYPERVISOR_VIRT_START_NONPAE \
#define MACH2PHYS_VIRT_START_NONPAE \
#define MACH2PHYS_VIRT_END_NONPAE \
#ifndef HYPERVISOR_VIRT_START
#endif
#ifndef machine_to_phys_mapping
#endif
#if defined(__XEN__) || defined(__XEN_TOOLS__)
#ifdef __GNUC__
typedef struct { type *p; } \
__guest_handle_ ## name; \
typedef struct { union { type *p; uint64_aligned_t q; }; } \
#else /* __GNUC__ */
/*
* Workaround for 6671857.
*/
typedef struct { type *p; } \
__guest_handle_ ## name; \
typedef struct { union { type *p; uint64_aligned_t q; } u; }\
#endif /* __GNUC__ */
} while ( 0 )
#endif
#ifndef __ASSEMBLY__
struct cpu_user_regs {
};
/*
* Page-directory addresses above 4GB do not fit into architectural %cr3.
* When accessing %cr3, or equivalent field in vcpu_guest_context, guests
*/
struct arch_vcpu_info {
unsigned long cr2;
};
struct xen_callback {
unsigned long cs;
unsigned long eip;
};
/*
* Structure used to capture the register state at panic time. This struct
* is built to mimic a similar structure in Solaris. If there is interest
* in making this panic implementation an official part of Xen, this should
* be made more platform-neutral.
*/
struct panic_regs {
unsigned long pad1;
unsigned long pad2;
unsigned long gs;
unsigned long fs;
unsigned long es;
unsigned long ds;
unsigned long edi;
unsigned long esi;
unsigned long ebp;
unsigned long esp;
unsigned long ebx;
unsigned long edx;
unsigned long ecx;
unsigned long eax;
unsigned long pad3;
unsigned long pad4;
unsigned long eip;
unsigned long cs;
unsigned long efl;
unsigned long pad5;
unsigned long ss;
};
#endif /* !__ASSEMBLY__ */
/* Offsets of each field in the xen_panic_regs structure. */
#define PANIC_REG_PAD1 0
#endif /* __XEN_PUBLIC_ARCH_X86_XEN_X86_32_H__ */
/*
* Local variables:
* mode: C
* c-set-style: "BSD"
* c-basic-offset: 4
* tab-width: 4
* indent-tabs-mode: nil
* End:
*/