X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=balloon.c;h=1d720fff816e209797ff6fb94037b4bbb8f1b562;hb=bace1f90f9207ec79e9d28eb668532b43ac8b81f;hp=5d69e8a00b4873b416868d271b45f4e6a39af42e;hpb=a0b1a66ea39bca011108734147a72232a4d08c7a;p=mirror_qemu.git diff --git a/balloon.c b/balloon.c index 5d69e8a00b..1d720fff81 100644 --- a/balloon.c +++ b/balloon.c @@ -24,11 +24,12 @@ * THE SOFTWARE. */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "exec/cpu-common.h" #include "sysemu/kvm.h" #include "sysemu/balloon.h" -#include "trace.h" +#include "trace-root.h" #include "qmp-commands.h" #include "qapi/qmp/qerror.h" #include "qapi/qmp/qjson.h" @@ -36,6 +37,17 @@ static QEMUBalloonEvent *balloon_event_fn; static QEMUBalloonStatus *balloon_stat_fn; static void *balloon_opaque; +static bool balloon_inhibited; + +bool qemu_balloon_is_inhibited(void) +{ + return balloon_inhibited; +} + +void qemu_balloon_inhibit(bool state) +{ + balloon_inhibited = state; +} static bool have_balloon(Error **errp) {