From: Avi Kivity on
On 03/19/2010 10:46 PM, Dmitry Torokhov wrote:
> Some hypervisors may refuse our request to lock pages in certain
> circumstances. For example, VMware may decide that the target balloon
> size decreased since it was last communicated to the guest and thus
> current page should not be locked.
>
>
> static struct virtio_driver virtio_balloon_driver = {
> diff --git a/include/linux/virtio_balloon.h b/include/linux/virtio_balloon.h
> index a50ecd1..4baad1c 100644
> --- a/include/linux/virtio_balloon.h
> +++ b/include/linux/virtio_balloon.h
> @@ -6,12 +6,16 @@
> #include<linux/virtio_config.h>
>
> /* The feature bitmap for virtio balloon */
> -#define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */
> -#define VIRTIO_BALLOON_F_STATS_VQ 1 /* Memory Stats virtqueue */
> +#define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */
> +#define VIRTIO_BALLOON_F_STATS_VQ 1 /* Memory Stats virtqueue */
> +#define VIRTIO_BALLOON_F_HOST_MAY_REFUSE 2 /* Host may refuse some pages */
>
> /* Size of a PFN in the balloon interface. */
> #define VIRTIO_BALLOON_PFN_SHIFT 12
>
> +#define VIRTIO_BALLOON_PFN_OK 0
> +#define VIRTIO_BALLOON_PFN_FAIL 1
> +
> struct virtio_balloon_config
> {
> /* Number of pages host wants Guest to give up. */
>

Please update the virtio pci spec (can't find the URL - Rusty?) to
reflect the protocol change.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/