+diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig
+index 5f9d860..2281c40 100644
+--- a/drivers/input/Kconfig
++++ b/drivers/input/Kconfig
+@@ -172,6 +172,8 @@ source "drivers/input/touchscreen/Kconfig"
+
+ source "drivers/input/misc/Kconfig"
+
++source "drivers/input/xen/Kconfig"
++
+ endif
+
+ menu "Hardware I/O ports"
diff --git a/drivers/input/Makefile b/drivers/input/Makefile
index 98c4f9a..414082b 100644
--- a/drivers/input/Makefile
+xeninput-objs := pass2.o
diff --git a/drivers/input/xen/pass2.c b/drivers/input/xen/pass2.c
new file mode 100644
-index 0000000..550b07f
+index 0000000..4f049ef
--- /dev/null
+++ b/drivers/input/xen/pass2.c
-@@ -0,0 +1,1153 @@
+@@ -0,0 +1,1154 @@
+/*
+ * Kernel-side driver of XenClient's pass-through PS/2 solution.
+ * Most the intelligence is in ioemu. This driver talks to the h/w (i8042),
+ return ret;
+}
+
++#if 0
+static int
+pa2_wait_on_aux_output_buf(
+ void)
+ }
+ return ret;
+}
++#endif
+
+static int
+pa2_cmd_write_do(
+static irqreturn_t
+pa2_irq(
+ int irq,
-+ void *dev_id,
-+ struct pt_regs *regs)
++ void *dev_id)
+{
+ pa2_state_t *sp;
+ pa2_ps_t *pp;
+module_exit(pa2_deinit);
+
+MODULE_LICENSE("Dual BSD/GPL");
+diff --git a/include/linux/pass2.h b/include/linux/pass2.h
+new file mode 100644
+index 0000000..a06517e
+--- /dev/null
++++ b/include/linux/pass2.h
+@@ -0,0 +1,69 @@
++#ifndef _K_PASS2_H
++#define _K_PASS2_H
++
++#define PA2_IOCTL_GRAB _IO('p', 0x02)
++#define PA2_IOCTL_WR_DATA _IO('p', 0x04)
++#define PA2_IOCTL_WR_CMD _IO('p', 0x06)
++#define PA2_IOCTL_RD_RECORD _IO('p', 0x07)
++
++#define PA2_IOCTL_INIT_LOCK _IO('p', 0x09)
++#define PA2_IOCTL_INIT_QUERY _IO('p', 0x10)
++#define PA2_IOCTL_INIT_SET _IO('p', 0x11)
++
++#define PA2_IOCTL_INIT_CMD _IO('p', 0x12)
++
++typedef struct pa2_entry_s {
++ u8 pe_status;
++ u8 pe_data;
++} pa2_entry_t;
++
++/*
++ * Data payload for PA2_IOCTL_WR_DATA.
++ */
++
++typedef struct pa2_data_s {
++ u8 pd_clear;
++ u8 pd_data;
++} pa2_data_t;
++
++/*
++ * Record header, used by PA2_IOCTL_RD_RECORD ioctl().
++ */
++
++typedef struct pa2_rec_hd_s {
++ u32 ph_rec_size; /* in records (input) */
++ u32 ph_rec_num; /* in records (output) */
++ u8 ph_focus;
++ u8 ph_overflow;
++ u8 ph_forced;
++ pa2_entry_t *ph_records;
++} pa2_rec_hd_t;
++
++/*
++ * pg_grab - 0 = release, 1 = grab device.
++ */
++
++typedef struct pa2_grab_s {
++ u8 pg_grab;
++ u8 pg_flags;
++ u8 pg_aux_sample;
++ u8 pg_aux_res;
++ u8 pg_syn_mode_byte;
++} pa2_grab_t;
++
++/* pg_flags */
++#define PA2_GRAB_SYNAPTIC 0x01
++
++/*
++ * Init data payload. Used to pass discovered static data from primary
++ * VMs to secondaries.
++ */
++
++#define PA2_DATA_INIT_MAX 2048
++
++typedef struct pa2_data_init_s {
++ u32 di_len;
++ u8 di_data[PA2_DATA_INIT_MAX];
++} pa2_data_init_t;
++
++#endif /* _K_PASS2_H */