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