#include <palacios/vm_guest.h>
-#ifndef CONFIG_DEBUG_KEYBOARD
+#ifndef V3_CONFIG_DEBUG_KEYBOARD
#undef PrintDebug
#define PrintDebug(fmt, args...)
#endif
#include <palacios/vmm_telemetry.h>
-#ifdef CONFIG_SYMMOD
+#ifdef V3_CONFIG_SYMMOD
#include <palacios/vmm_symmod.h>
#endif
}
// PrintGuestPageTables(info, info->shdw_pg_state.guest_cr3);
}
-#ifdef CONFIG_SYMCALL
+#ifdef V3_CONFIG_SYMCALL
else if (evt->scan_code == 0x43) { // F9 Sym test
struct guest_info * core = &(vm->cores[0]);
PrintDebug("Testing sym call\n");
v3_dbg_enable ^= 1;
}
-#ifdef CONFIG_TELEMETRY
+#ifdef V3_CONFIG_TELEMETRY
else if (evt->scan_code == 0x41) { // F7 telemetry dump
v3_print_telemetry(vm);
}
#endif
-#ifdef CONFIG_SYMMOD
+#ifdef V3_CONFIG_SYMMOD
else if (evt->scan_code == 0x40) { // F6 Test symmod load
v3_load_sym_capsule(vm, "lnx_test");
}
PrintDebug("Keyboard: scancode set being read\n");
push_to_output_queue(kbd, 0x45 - 2 * kbd->scancode_set, COMMAND, KEYBOARD);
break;
+ case 1:
+ PrintError("keyboard: unsupported scancode set %d selected\n", data);
+ return -1;
case 2:
PrintDebug("Keyboard: scancode set being set to %d\n", data);
kbd->scancode_set = data;
push_to_output_queue(kbd, 0xfa, COMMAND, KEYBOARD);
break;
- case 1:
case 3:
- PrintError("keyboard: unsupported scancode set %d selected\n", data);
- return -1;
+ /* OpenBSD wants scancode set 3, but falls back to 2 if a
+ * subsequent read reveals that the request was ignored
+ */
+ PrintError("keyboard: ignoring request for scancode set %d\n", data);
+ break;
default:
PrintError("keyboard: unknown scancode set %d selected\n", data);
return -1;