qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

ps2: accept 'Set Key Make and Break' commands

HP-UX sends both the 'Set key make and break (0xfc) and
'Set all key typematic make and break' (0xfa). QEMU response
with 'Resend' as it doesn't handle these commands. HP-UX than
reports an PS/2 max retransmission exceeded error. Add these
commands and just reply with ACK.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Message-Id: <20191220211512.3289-4-svens@stackframe.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

authored by

Sven Schnelle and committed by
Richard Henderson
c56b6209 376b8519

+10
+10
hw/input/ps2.c
··· 49 49 #define KBD_CMD_RESET_DISABLE 0xF5 /* reset and disable scanning */ 50 50 #define KBD_CMD_RESET_ENABLE 0xF6 /* reset and enable scanning */ 51 51 #define KBD_CMD_RESET 0xFF /* Reset */ 52 + #define KBD_CMD_SET_MAKE_BREAK 0xFC /* Set Make and Break mode */ 53 + #define KBD_CMD_SET_TYPEMATIC 0xFA /* Set Typematic Make and Break mode */ 52 54 53 55 /* Keyboard Replies */ 54 56 #define KBD_REPLY_POR 0xAA /* Power on reset */ ··· 573 575 case KBD_CMD_SCANCODE: 574 576 case KBD_CMD_SET_LEDS: 575 577 case KBD_CMD_SET_RATE: 578 + case KBD_CMD_SET_MAKE_BREAK: 576 579 s->common.write_cmd = val; 577 580 ps2_queue(&s->common, KBD_REPLY_ACK); 578 581 break; ··· 592 595 KBD_REPLY_ACK, 593 596 KBD_REPLY_POR); 594 597 break; 598 + case KBD_CMD_SET_TYPEMATIC: 599 + ps2_queue(&s->common, KBD_REPLY_ACK); 600 + break; 595 601 default: 596 602 ps2_queue(&s->common, KBD_REPLY_RESEND); 597 603 break; 598 604 } 605 + break; 606 + case KBD_CMD_SET_MAKE_BREAK: 607 + ps2_queue(&s->common, KBD_REPLY_ACK); 608 + s->common.write_cmd = -1; 599 609 break; 600 610 case KBD_CMD_SCANCODE: 601 611 if (val == 0) {