[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] Allow direct hypercalls
# HG changeset patch # User john.levon@xxxxxxx # Date 1209521783 25200 # Node ID 9a5c6e3620d83f9354e3eedbc4ef24a7a5ad752e # Parent f477f895f78752bb9fa2e6ee6c1d09b6a8cd3230 Allow direct hypercalls For PV guests, there's no reason to force use of the indirect hypercall mechanism. Allow it. Also allow TRAP_INSTR to be used from assembly. Signed-off-by: John Levon <john.levon@xxxxxxx> diff --git a/xen/include/public/arch-x86/xen-x86_32.h b/xen/include/public/arch-x86/xen-x86_32.h --- a/xen/include/public/arch-x86/xen-x86_32.h +++ b/xen/include/public/arch-x86/xen-x86_32.h @@ -36,13 +36,15 @@ * Clobbered: Argument registers (e.g., 2-arg hypercall clobbers %ebx,%ecx) */ -#if __XEN_INTERFACE_VERSION__ < 0x00030203 /* - * Legacy hypercall interface: + * Direct hypercall interface: * As above, except the entry sequence to the hypervisor is: * mov $hypercall-number*32,%eax ; int $0x82 */ +#if !defined(_ASM) #define TRAP_INSTR "int $0x82" +#else +#define TRAP_INSTR int $0x82 #endif /* diff --git a/xen/include/public/arch-x86/xen-x86_64.h b/xen/include/public/arch-x86/xen-x86_64.h --- a/xen/include/public/arch-x86/xen-x86_64.h +++ b/xen/include/public/arch-x86/xen-x86_64.h @@ -36,16 +36,18 @@ * Clobbered: argument registers (e.g., 2-arg hypercall clobbers %rdi,%rsi) */ -#if __XEN_INTERFACE_VERSION__ < 0x00030203 /* - * Legacy hypercall interface: + * Direct hypercall interface: * As above, except the entry sequence to the hypervisor is: * mov $hypercall-number*32,%eax ; syscall * Clobbered: %rcx, %r11, argument registers (as above) */ +#if !defined(_ASM) #define TRAP_INSTR "syscall" +#else +#define TRAP_INSTR syscall #endif - + /* * 64-bit segment selectors * These flat segments are in the Xen-private section of every GDT. Since these _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |