#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");
}
#if KEYBOARD_DEBUG_80H
-static int keyboard_write_delay(ushort_t port, void * src, uint_t length, void * priv_data) {
+static int keyboard_write_delay(struct guest_info *core, ushort_t port, void * src, uint_t length, void * priv_data) {
if (length == 1) {
PrintDebug("keyboard: write of 0x%x to 80h\n", *((uint8_t*)src));
}
+#ifdef V3_CONFIG_CHECKPOINT
+static int keyboard_save(struct v3_chkpt_ctx * ctx, void * private_data) {
+ return 0;
+}
+
+
+static int keyboard_load(struct v3_chkpt_ctx * ctx, void * private_data) {
+ struct keyboard_internal * kbd = (struct keyboard_internal *)private_data;
+ keyboard_reset_device(kbd);
+ return 0;
+}
+
+#endif
+
+
static struct v3_device_ops dev_ops = {
.free = (int (*)(void *))keyboard_free,
-
+#ifdef V3_CONFIG_CHECKPOINT
+ .save = keyboard_save,
+ .load = keyboard_load
+#endif
};