Skip to content

balloon: error if guest driver is not initialised

Amit Shah qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3balloon: Make functions return 0 on OK, -1 on error.balloon.c+8 -60 replies
2/3balloon: report error if ballooning operation failsballoon.c balloon.h hw/virtio-balloon.c+8 -40 replies
3/3virtio-balloon: report error if balloon driver in guest not availablehw/virtio-balloon.c+3 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/3] balloon: error if guest driver is not initialised

Hello,

These patches make qemu generate an error on failure in setting a balloon value:

(qemu) balloon 400
Device 'balloon' has not been activated

This can happen when the guest hasn't yet loaded a balloon driver.

Previously, such a ballooning attempt didn't produce an error, but the virtio-balloon driver remembered the value nevertheless, causing a module load in the guest using the attempted balloon value originally. This may not be the desired course of action.

I've re-used the QERR_DEVICE_NOT_ACTIVE error message, I think it fits in this case too. If not, let me know and I'll change it to something else.

Please review and apply.

Amit Shah (3):
balloon: Make functions return 0 on OK, -1 on error.
balloon: report error if ballooning operation fails
virtio-balloon: report error if balloon driver in guest not available

 balloon.c           |   19 ++++++++++++-------
 balloon.h           |    2 +-
 hw/virtio-balloon.c |    6 +++++-
 3 files changed, 18 insertions(+), 9 deletions(-)
Signature · 1 line
1.7.7.3