00001 /* 00002 * Virtio Support 00003 * 00004 * Copyright IBM, Corp. 2007-2008 00005 * 00006 * Authors: 00007 * Anthony Liguori <aliguori@us.ibm.com> 00008 * Rusty Russell <rusty@rustcorp.com.au> 00009 * 00010 * This work is licensed under the terms of the GNU GPL, version 2. See 00011 * the COPYING file in the top-level directory. 00012 * 00013 */ 00014 00015 #ifndef _QEMU_VIRTIO_BALLOON_H 00016 #define _QEMU_VIRTIO_BALLOON_H 00017 00018 #include "virtio.h" 00019 #include "pci.h" 00020 00021 /* from Linux's linux/virtio_balloon.h */ 00022 00023 /* The ID for virtio_balloon */ 00024 #define VIRTIO_ID_BALLOON 5 00025 00026 /* The feature bitmap for virtio balloon */ 00027 #define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */ 00028 00029 /* Size of a PFN in the balloon interface. */ 00030 #define VIRTIO_BALLOON_PFN_SHIFT 12 00031 00032 struct virtio_balloon_config 00033 { 00034 /* Number of pages host wants Guest to give up. */ 00035 uint32_t num_pages; 00036 /* Number of pages we've actually got in balloon. */ 00037 uint32_t actual; 00038 }; 00039 00040 void *virtio_balloon_init(PCIBus *bus); 00041 00042 #endif