summaryrefslogtreecommitdiff
path: root/include/linux/lguest_launcher.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2015-02-11 15:15:09 +1030
committerRusty Russell <rusty@rustcorp.com.au>2015-02-11 16:47:30 +1030
commit69a09dc1742ffbb3b02f3a1e03da4801e96452e9 (patch)
treec9887c6b6150810ba103b76cf9d4376af3edd5e5 /include/linux/lguest_launcher.h
parent18c137371b2ea86d263b75665a4904a0b8872990 (diff)
lguest: write more information to userspace about pending traps.
This is preparation for userspace handling MMIO and ioport accesses. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/lguest_launcher.h')
-rw-r--r--include/linux/lguest_launcher.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/lguest_launcher.h b/include/linux/lguest_launcher.h
index f27cae27b0c1..c4451ebece47 100644
--- a/include/linux/lguest_launcher.h
+++ b/include/linux/lguest_launcher.h
@@ -68,6 +68,19 @@ enum lguest_req
};
/*
+ * This is what read() of the lguest fd populates. trap ==
+ * LGUEST_TRAP_ENTRY for an LHCALL_NOTIFY (addr is the
+ * argument), 14 for a page fault in the MMIO region (addr is
+ * the trap address, insn is the instruction), or 13 for a GPF
+ * (insn is the instruction).
+ */
+struct lguest_pending {
+ __u8 trap;
+ __u8 insn[7];
+ __u32 addr;
+};
+
+/*
* The alignment to use between consumer and producer parts of vring.
* x86 pagesize for historical reasons.
*/