Remove empty dummy file "loaders.cache" during uninstall (bug #1766841)
[qemu/ar7.git] / include / hw / virtio / virtio-balloon.h
blob1ea13bd6a48d3a7aedb3d199e98e7ed39c782191
1 /*
2 * Virtio Support
4 * Copyright IBM, Corp. 2007-2008
6 * Authors:
7 * Anthony Liguori <aliguori@us.ibm.com>
8 * Rusty Russell <rusty@rustcorp.com.au>
10 * This work is licensed under the terms of the GNU GPL, version 2. See
11 * the COPYING file in the top-level directory.
15 #ifndef QEMU_VIRTIO_BALLOON_H
16 #define QEMU_VIRTIO_BALLOON_H
18 #include "standard-headers/linux/virtio_balloon.h"
19 #include "hw/virtio/virtio.h"
20 #include "hw/pci/pci.h"
22 #define TYPE_VIRTIO_BALLOON "virtio-balloon-device"
23 #define VIRTIO_BALLOON(obj) \
24 OBJECT_CHECK(VirtIOBalloon, (obj), TYPE_VIRTIO_BALLOON)
26 typedef struct virtio_balloon_stat VirtIOBalloonStat;
28 typedef struct virtio_balloon_stat_modern {
29 uint16_t tag;
30 uint8_t reserved[6];
31 uint64_t val;
32 } VirtIOBalloonStatModern;
34 typedef struct VirtIOBalloon {
35 VirtIODevice parent_obj;
36 VirtQueue *ivq, *dvq, *svq;
37 uint32_t num_pages;
38 uint32_t actual;
39 uint64_t stats[VIRTIO_BALLOON_S_NR];
40 VirtQueueElement *stats_vq_elem;
41 size_t stats_vq_offset;
42 QEMUTimer *stats_timer;
43 int64_t stats_last_update;
44 int64_t stats_poll_interval;
45 uint32_t host_features;
46 } VirtIOBalloon;
48 #endif