equal
deleted
inserted
replaced
|
1 /* |
|
2 * Virtio Support |
|
3 * |
|
4 * Copyright IBM, Corp. 2007-2008 |
|
5 * |
|
6 * Authors: |
|
7 * Anthony Liguori <aliguori@us.ibm.com> |
|
8 * Rusty Russell <rusty@rustcorp.com.au> |
|
9 * |
|
10 * This work is licensed under the terms of the GNU GPL, version 2. See |
|
11 * the COPYING file in the top-level directory. |
|
12 * |
|
13 */ |
|
14 |
|
15 #ifndef _QEMU_VIRTIO_BALLOON_H |
|
16 #define _QEMU_VIRTIO_BALLOON_H |
|
17 |
|
18 #include "virtio.h" |
|
19 |
|
20 /* from Linux's linux/virtio_balloon.h */ |
|
21 |
|
22 /* The ID for virtio_balloon */ |
|
23 #define VIRTIO_ID_BALLOON 5 |
|
24 |
|
25 /* The feature bitmap for virtio balloon */ |
|
26 #define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */ |
|
27 |
|
28 /* Size of a PFN in the balloon interface. */ |
|
29 #define VIRTIO_BALLOON_PFN_SHIFT 12 |
|
30 |
|
31 struct virtio_balloon_config |
|
32 { |
|
33 /* Number of pages host wants Guest to give up. */ |
|
34 uint32_t num_pages; |
|
35 /* Number of pages we've actually got in balloon. */ |
|
36 uint32_t actual; |
|
37 }; |
|
38 |
|
39 void virtio_balloon_init(VirtIOBindFn bind, void *bind_arg); |
|
40 |
|
41 #endif |