X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fkeyboard.c;h=cf619676535ec6c756b6038c799bdb83c5bd43fd;hb=3d9181a002f5f30881ee53fff4ec1b2ab8395b0a;hp=7fce87ceb704af9775180b10a3a5a15d0b3c643a;hpb=4290e5f20a4ea5e5f32cb8228ac4d7446dc1021b;p=palacios.git diff --git a/palacios/src/devices/keyboard.c b/palacios/src/devices/keyboard.c index 7fce87c..cf61967 100644 --- a/palacios/src/devices/keyboard.c +++ b/palacios/src/devices/keyboard.c @@ -23,6 +23,9 @@ #include #include +#include +#include +#include #ifndef CONFIG_DEBUG_KEYBOARD @@ -327,7 +330,9 @@ static int key_event_handler(struct guest_info * info, if (evt->scan_code == 0x44) { // F10 debug dump v3_print_guest_state(info); // PrintGuestPageTables(info, info->shdw_pg_state.guest_cr3); - } else if (evt->scan_code == 0x43) { // F9 Sym test + } +#ifdef CONFIG_SYMBIOTIC +else if (evt->scan_code == 0x43) { // F9 Sym test PrintDebug("Testing sym call\n"); sym_arg_t a0 = 0x1111; sym_arg_t a1 = 0x2222; @@ -345,7 +350,7 @@ static int key_event_handler(struct guest_info * info, sym_arg_t addr = 0; v3_sym_call1(info, SYMCALL_MEM_LOOKUP, &addr); } - +#endif addr_t irq_state = v3_lock_irqsave(state->kb_lock); @@ -979,9 +984,9 @@ static struct v3_device_ops dev_ops = { -static int keyboard_init(struct guest_info * vm, void * cfg_data) { +static int keyboard_init(struct guest_info * vm, v3_cfg_tree_t * cfg) { struct keyboard_internal * keyboard_state = NULL; - + char * name = v3_cfg_val(cfg, "name"); PrintDebug("keyboard: init_device\n"); @@ -997,10 +1002,10 @@ static int keyboard_init(struct guest_info * vm, void * cfg_data) { keyboard_state->mouse_enabled = 0; - struct vm_device * dev = v3_allocate_device("KEYBOARD", &dev_ops, keyboard_state); + struct vm_device * dev = v3_allocate_device(name, &dev_ops, keyboard_state); if (v3_attach_device(vm, dev) == -1) { - PrintError("Could not attach device %s\n", "KEYBOARD"); + PrintError("Could not attach device %s\n", name); return -1; }