Merge branches 'acpica-fixes' and 'device-properties-fixes'
[deliverable/linux.git] / include / linux / lguest_launcher.h
CommitLineData
7334492b
RR
1#ifndef _LINUX_LGUEST_LAUNCHER
2#define _LINUX_LGUEST_LAUNCHER
d7e28ffe 3/* Everything the "lguest" userspace program needs to know. */
b45d8cb0 4#include <linux/types.h>
d7e28ffe 5
e2c97843
RR
6/*D:010
7 * Drivers
8 *
9 * The Guest needs devices to do anything useful. Since we don't let it touch
10 * real devices (think of the damage it could do!) we provide virtual devices.
b3e28b65
RR
11 * We emulate a PCI bus with virtio devices on it; we used to have our own
12 * lguest bus which was far simpler, but this tests the virtio 1.0 standard.
e2c97843 13 *
a6bd8e13
RR
14 * Virtio devices are also used by kvm, so we can simply reuse their optimized
15 * device drivers. And one day when everyone uses virtio, my plan will be
16 * complete. Bwahahahah!
2e04ef76 17 */
d7e28ffe
RR
18
19/* Write command first word is a request. */
20enum lguest_req
21{
58a24566 22 LHREQ_INITIALIZE, /* + base, pfnlimit, start */
15045275 23 LHREQ_GETDMA, /* No longer used */
d7e28ffe 24 LHREQ_IRQ, /* + irq */
5dac051b 25 LHREQ_BREAK, /* No longer used */
d9bab50a 26 LHREQ_EVENTFD, /* No longer used. */
18c13737
RR
27 LHREQ_GETREG, /* + offset within struct pt_regs (then read value). */
28 LHREQ_SETREG, /* + offset within struct pt_regs, value. */
8ed31300 29 LHREQ_TRAP, /* + trap number to deliver to guest. */
d7e28ffe 30};
2966af73 31
69a09dc1
RR
32/*
33 * This is what read() of the lguest fd populates. trap ==
34 * LGUEST_TRAP_ENTRY for an LHCALL_NOTIFY (addr is the
35 * argument), 14 for a page fault in the MMIO region (addr is
36 * the trap address, insn is the instruction), or 13 for a GPF
37 * (insn is the instruction).
38 */
39struct lguest_pending {
40 __u8 trap;
41 __u8 insn[7];
42 __u32 addr;
43};
7334492b 44#endif /* _LINUX_LGUEST_LAUNCHER */
This page took 0.807055 seconds and 5 git commands to generate.