qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>, qemu-devel@nongnu.org
Cc: "Kevin Wolf" <kwolf@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Ben Warren" <ben@skyportsystems.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Peter Lieven" <pl@kamp.de>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Max Reitz" <mreitz@redhat.com>,
	"Ronnie Sahlberg" <ronniesahlberg@gmail.com>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	qemu-block@nongnu.org, "Richard Henderson" <rth@twiddle.net>
Subject: Re: [PATCH v2 3/8] qapi/misc: Restrict balloon-related commands to machine code
Date: Tue, 17 Mar 2020 12:04:44 +0100	[thread overview]
Message-ID: <7f7f3e39-08b8-b120-9d25-1c72200b947f@redhat.com> (raw)
In-Reply-To: <c32e5f6f-539c-5f09-d927-49dd9587844b@redhat.com>

On 17.03.20 12:03, Philippe Mathieu-Daudé wrote:
> Hi David,
> 
> On 3/16/20 10:05 AM, David Hildenbrand wrote:
>> On 16.03.20 01:03, Philippe Mathieu-Daudé wrote:
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>> ---
>>>   qapi/machine.json          | 83 ++++++++++++++++++++++++++++++++++++++
>>>   qapi/misc.json             | 83 --------------------------------------
>>>   include/sysemu/balloon.h   |  2 +-
>>>   balloon.c                  |  2 +-
>>>   hw/virtio/virtio-balloon.c |  2 +-
>>>   monitor/hmp-cmds.c         |  1 +
>>>   6 files changed, 87 insertions(+), 86 deletions(-)
>>>
>>> diff --git a/qapi/machine.json b/qapi/machine.json
>>> index 07ffc07ba2..c096efbea3 100644
>>> --- a/qapi/machine.json
>>> +++ b/qapi/machine.json
>>> @@ -915,3 +915,86 @@
>>>     'data': 'NumaOptions',
>>>     'allow-preconfig': true
>>>   }
>>> +
>>> +##
>>> +# @balloon:
>>> +#
>>> +# Request the balloon driver to change its balloon size.
>>> +#
>>> +# @value: the target size of the balloon in bytes
>>
>> Not related to your patch. The description of most of this stuff is wrong.
>>
>> It's not the target size of the balloon, it's the target logical size of
>> the VM (logical_vm_size = vm_ram_size - balloon_size)
>>
>> -> balloon_size = vm_ram_size - @value
>>
>> E.g., "balloon 1024" with a 3G guest means "please inflate the balloon
>> to 2048"
>>
>>> +#
>>> +# Returns: - Nothing on success
>>> +#          - If the balloon driver is enabled but not functional because the KVM
>>> +#            kernel module cannot support it, KvmMissingCap
>>> +#          - If no balloon device is present, DeviceNotActive
>>> +#
>>> +# Notes: This command just issues a request to the guest.  When it returns,
>>> +#        the balloon size may not have changed.  A guest can change the balloon
>>> +#        size independent of this command.
>>> +#
>>> +# Since: 0.14.0
>>> +#
>>> +# Example:
>>> +#
>>> +# -> { "execute": "balloon", "arguments": { "value": 536870912 } }
>>> +# <- { "return": {} }
>>> +#
>>> +##
>>> +{ 'command': 'balloon', 'data': {'value': 'int'} }
>>> +
>>> +##
>>> +# @BalloonInfo:
>>> +#
>>> +# Information about the guest balloon device.
>>> +#
>>> +# @actual: the number of bytes the balloon currently contains
>>
>> Dito
>>
>> @actual is the logical size of the VM (logical_vm_size = vm_ram_size -
>> balloon_size)
>>
>>> +#
>>> +# Since: 0.14.0
>>> +#
>>> +##
>>> +{ 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
>>> +
>>> +##
>>> +# @query-balloon:
>>> +#
>>> +# Return information about the balloon device.
>>> +#
>>> +# Returns: - @BalloonInfo on success
>>> +#          - If the balloon driver is enabled but not functional because the KVM
>>> +#            kernel module cannot support it, KvmMissingCap
>>> +#          - If no balloon device is present, DeviceNotActive
>>> +#
>>> +# Since: 0.14.0
>>> +#
>>> +# Example:
>>> +#
>>> +# -> { "execute": "query-balloon" }
>>> +# <- { "return": {
>>> +#          "actual": 1073741824,
>>> +#       }
>>> +#    }
>>> +#
>>> +##
>>> +{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }
>>> +
>>> +##
>>> +# @BALLOON_CHANGE:
>>> +#
>>> +# Emitted when the guest changes the actual BALLOON level. This value is
>>> +# equivalent to the @actual field return by the 'query-balloon' command
>>> +#
>>> +# @actual: actual level of the guest memory balloon in bytes
>>
>> Dito
>>
>> @actual is the logical size of the VM (vm_ram_size - balloon_size)
>>
>>
>> Most probably we want to pull this description fix out. #badinterface
> 
> Since you understand how ballooning works, do you mind sending a patch 
> with description fixed? :)

Will add it to my todo list, so your patch can go in first :)

Thanks

-- 
Thanks,

David / dhildenb



  reply	other threads:[~2020-03-17 11:06 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-16  0:03 [PATCH v2 0/8] user-mode: Prune build dependencies (part 2) Philippe Mathieu-Daudé
2020-03-16  0:03 ` [PATCH v2 1/8] target/i386: Restrict X86CPUFeatureWord to X86 targets Philippe Mathieu-Daudé
2020-03-16  0:29   ` Aleksandar Markovic
2020-03-16  0:31     ` Aleksandar Markovic
2020-03-16  7:30     ` Philippe Mathieu-Daudé
2020-03-18  8:25   ` Philippe Mathieu-Daudé
2020-03-16  0:03 ` [PATCH v2 2/8] qapi/misc: Restrict LostTickPolicy enum to machine code Philippe Mathieu-Daudé
2020-05-25 14:12   ` Philippe Mathieu-Daudé
2020-05-26 15:00   ` Igor Mammedov
2020-03-16  0:03 ` [PATCH v2 3/8] qapi/misc: Restrict balloon-related commands " Philippe Mathieu-Daudé
2020-03-16  9:05   ` David Hildenbrand
2020-03-17 11:03     ` Philippe Mathieu-Daudé
2020-03-17 11:04       ` David Hildenbrand [this message]
2020-03-16  0:03 ` [PATCH v2 4/8] qapi/misc: Move query-uuid command with block code Philippe Mathieu-Daudé
2020-03-16 13:09   ` Igor Mammedov
2020-03-16 13:57     ` Philippe Mathieu-Daudé
2020-03-16  0:03 ` [PATCH v2 5/8] qapi/misc: Restrict query-vm-generation-id command to machine code Philippe Mathieu-Daudé
2020-03-16 12:45   ` Igor Mammedov
2020-03-17  9:44     ` Philippe Mathieu-Daudé
2020-03-17 11:07       ` Igor Mammedov
2020-03-16  0:03 ` [PATCH v2 6/8] qapi/misc: Restrict ACPI commands " Philippe Mathieu-Daudé
2020-03-16 12:47   ` Igor Mammedov
2020-03-16  0:03 ` [PATCH v2 7/8] qapi/misc: Restrict PCI " Philippe Mathieu-Daudé
2020-05-25 14:12   ` Philippe Mathieu-Daudé
2020-03-16  0:03 ` [PATCH v2 8/8] qapi/misc: Restrict device memory " Philippe Mathieu-Daudé
2020-03-16 12:49   ` Igor Mammedov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7f7f3e39-08b8-b120-9d25-1c72200b947f@redhat.com \
    --to=david@redhat.com \
    --cc=armbru@redhat.com \
    --cc=ben@skyportsystems.com \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=pl@kamp.de \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).