X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fkeyboard.c;h=6d398782c6969b99938403bd99413edc8e0e755c;hp=e974503c823a2917de86de47fb518035235e5952;hb=5d1bbcc86de011e3f0d115b6f10fd8645cdf855e;hpb=a9a6c3664c8fdbdb9841a55d1a2fca7f4fa8f5de diff --git a/palacios/src/devices/keyboard.c b/palacios/src/devices/keyboard.c index e974503..6d39878 100644 --- a/palacios/src/devices/keyboard.c +++ b/palacios/src/devices/keyboard.c @@ -1051,9 +1051,27 @@ static int keyboard_reset_device(struct keyboard_internal * kbd) { } +#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 };