X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Flnx_virtio_balloon.c;h=e936f9e8be95205d1fd1b93e9ed87f98e1449d09;hb=70842a596167a7cfb7d8c8121cf0d5d2350079ea;hp=0bd5727f9f1b8eb50d4a283fcec5680d402c4fbc;hpb=72420d58d18ec71d4777d029daaf0c6a1c820b32;p=palacios.git diff --git a/palacios/src/devices/lnx_virtio_balloon.c b/palacios/src/devices/lnx_virtio_balloon.c index 0bd5727..e936f9e 100644 --- a/palacios/src/devices/lnx_virtio_balloon.c +++ b/palacios/src/devices/lnx_virtio_balloon.c @@ -77,9 +77,7 @@ struct virtio_balloon_state { }; -static int virtio_free(struct vm_device * dev) { - return -1; -} + static int virtio_reset(struct virtio_balloon_state * virtio) { @@ -361,10 +359,17 @@ static int virtio_io_read(struct guest_info * core, uint16_t port, void * dst, u } +static int virtio_free(struct virtio_balloon_state * virtio) { + + // unregister from PCI + + V3_Free(virtio); + return 0; +} static struct v3_device_ops dev_ops = { - .free = virtio_free, + .free = (int (*)(void *))virtio_free, };