git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus-merged' of master.kernel.org:/home/rmk/linux-2.6-arm
[safe/jmp/linux-2.6]
/
include
/
asm-x86
/
lguest_hcall.h
diff --git
a/include/asm-x86/lguest_hcall.h
b/include/asm-x86/lguest_hcall.h
index
2091779
..
a3241f2
100644
(file)
--- a/
include/asm-x86/lguest_hcall.h
+++ b/
include/asm-x86/lguest_hcall.h
@@
-4,7
+4,7
@@
#define LHCALL_FLUSH_ASYNC 0
#define LHCALL_LGUEST_INIT 1
#define LHCALL_FLUSH_ASYNC 0
#define LHCALL_LGUEST_INIT 1
-#define LHCALL_
CRASH
2
+#define LHCALL_
SHUTDOWN
2
#define LHCALL_LOAD_GDT 3
#define LHCALL_NEW_PGTABLE 4
#define LHCALL_FLUSH_TLB 5
#define LHCALL_LOAD_GDT 3
#define LHCALL_NEW_PGTABLE 4
#define LHCALL_FLUSH_TLB 5
@@
-20,10
+20,14
@@
#define LGUEST_TRAP_ENTRY 0x1F
#define LGUEST_TRAP_ENTRY 0x1F
+/* Argument number 3 to LHCALL_LGUEST_SHUTDOWN */
+#define LGUEST_SHUTDOWN_POWEROFF 1
+#define LGUEST_SHUTDOWN_RESTART 2
+
#ifndef __ASSEMBLY__
#include <asm/hw_irq.h>
#ifndef __ASSEMBLY__
#include <asm/hw_irq.h>
-/*G:031
F
irst, how does our Guest contact the Host to ask for privileged
+/*G:031
But f
irst, how does our Guest contact the Host to ask for privileged
* operations? There are two ways: the direct way is to make a "hypercall",
* to make requests of the Host Itself.
*
* operations? There are two ways: the direct way is to make a "hypercall",
* to make requests of the Host Itself.
*
@@
-42,7
+46,7
@@
hcall(unsigned long call,
{
/* "int" is the Intel instruction to trigger a trap. */
asm volatile("int $" __stringify(LGUEST_TRAP_ENTRY)
{
/* "int" is the Intel instruction to trigger a trap. */
asm volatile("int $" __stringify(LGUEST_TRAP_ENTRY)
-
/* The call in %eax (aka "a") might be overwritten */
+ /* The call in %eax (aka "a") might be overwritten */
: "=a"(call)
/* The arguments are in %eax, %edx, %ebx & %ecx */
: "a"(call), "d"(arg1), "b"(arg2), "c"(arg3)
: "=a"(call)
/* The arguments are in %eax, %edx, %ebx & %ecx */
: "a"(call), "d"(arg1), "b"(arg2), "c"(arg3)
@@
-58,8
+62,7
@@
hcall(unsigned long call,
#define LGUEST_IRQS (NR_IRQS < 32 ? NR_IRQS: 32)
#define LHCALL_RING_SIZE 64
#define LGUEST_IRQS (NR_IRQS < 32 ? NR_IRQS: 32)
#define LHCALL_RING_SIZE 64
-struct hcall_args
-{
+struct hcall_args {
/* These map directly onto eax, ebx, ecx, edx in struct lguest_regs */
unsigned long arg0, arg2, arg3, arg1;
};
/* These map directly onto eax, ebx, ecx, edx in struct lguest_regs */
unsigned long arg0, arg2, arg3, arg1;
};