btw., i tried to match up the kernel's i8042.c with kvm's and it was pretty hard due to arbitrary differences. The kernel knows about: -------------------> /* * Status register bits. */ #define I8042_STR_PARITY 0x80 #define I8042_STR_TIMEOUT 0x40 #define I8042_STR_AUXDATA 0x20 #define I8042_STR_KEYLOCK 0x10 #define I8042_STR_CMDDAT 0x08 #define I8042_STR_MUXERR 0x04 #define I8042_STR_IBF 0x02 #define I8042_STR_OBF 0x01 /* * Control register bits. */ #define I8042_CTR_KBDINT 0x01 #define I8042_CTR_AUXINT 0x02 #define I8042_CTR_IGNKEYLOCK 0x08 #define I8042_CTR_KBDDIS 0x10 #define I8042_CTR_AUXDIS 0x20 #define I8042_CTR_XLATE 0x40 /* * Return codes. */ #define I8042_RET_CTL_TEST 0x55 <------------------- While hw/i8042.c knows about similar things, just under different names: -------------------> #define CMD_READ_MODE 0x20 #define CMD_WRITE_MODE 0x60 #define CMD_WRITE_AUX_BUF 0xD3 #define CMD_WRITE_AUX 0xD4 #define CMD_TEST_AUX 0xA9 #define CMD_DISABLE_AUX 0xA7 #define CMD_ENABLE_AUX 0xA8 #define RESPONSE_ACK 0xFA #define MODE_DISABLE_AUX 0x20 #define AUX_ENABLE_REPORTING 0x20 #define AUX_SCALING_FLAG 0x10 #define AUX_DEFAULT_RESOLUTION 0x2 #define AUX_DEFAULT_SAMPLE 100 #define KBD_STATUS_SYS 0x4 #define KBD_STATUS_A2 0x8 #define KBD_STATUS_INH 0x10 #define KBD_STATUS_OBF 0x01 #define KBD_STATUS_AUX_OBF 0x20 #define KBD_MODE_KBD_INT 0x01 #define KBD_MODE_SYS 0x02 <------------------- Would it be possible for hw/i8042.c to use the kernel names, to make it easier to review and debug this code? (also, 0x2 should be 0x02 to make it easier to review as well.) Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html