From nobody Mon Feb 9 08:56:40 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1599751370; cv=none; d=zohomail.com; s=zohoarc; b=B/WIcxlR8/QPmQ1vQoiMYHJR/A1c6rDtUTyIJ/Z5dOhTcHJENnVCjXgj3mO2Wsio0ZgF/oyQACKi4J/Of9LdS97TpYa29k/CNDA1+BtAeFh1qIql6X7daM1EYFqnAa4upbwB7DoCcashwKXBrkJB7zoXryOOUQ9bbq3++eGbxC4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599751370; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=aU61XF2iw8CsgjICtHQ/mc0+U4DSy1u0xwIZtbOf8Pc=; b=Crp1PoSlADPB7PvJZrp/9Ec59j3VUnyGN771KKlLG5Nz8Po2H3bNzXLpp83G/Qx/uXU1alfGz1xoZ5Su7ETmq5L0xo53GPM8aIieRKNAKBENQsJP4txPYr5dn1HPPeZ6DWumuNHJglbnuxhAqpAhF7aEmjLY7eRP5AmHSwEn964= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1599751370859121.30896870999254; Thu, 10 Sep 2020 08:22:50 -0700 (PDT) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-265-i3NEF4RINpC5l0faplk1aw-1; Thu, 10 Sep 2020 11:22:46 -0400 Received: by mail-wm1-f71.google.com with SMTP id 189so123729wme.5 for ; Thu, 10 Sep 2020 08:22:45 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (65.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.65]) by smtp.gmail.com with ESMTPSA id d13sm9286484wrp.44.2020.09.10.08.22.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:22:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599751369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aU61XF2iw8CsgjICtHQ/mc0+U4DSy1u0xwIZtbOf8Pc=; b=JvCkc0+gW47DYpR0pXosV/PyYqacVqVWiACp5B6Ib303haCEdvnQ81611WNAyKcmPQFbm2 rqOI9vljxxAo5h0iQCtEuZfuMLbLA6nV2k3sEuKj85XGA2tOz+i53/+Twm7CgJulfgW7Ma GphnZW5BULJMJgoeqz1ExCTDwsjzcYU= X-MC-Unique: i3NEF4RINpC5l0faplk1aw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aU61XF2iw8CsgjICtHQ/mc0+U4DSy1u0xwIZtbOf8Pc=; b=FOO0rpm1WgjiY3aCarloH98+wcws/+ZaiRZLQFKLUKY2rYcKmoPYUadunnJd6ohQSv 6u6gZ7fblRx78PBDF6z8NJflkSSuio7jBziAilX+4vw7ejZ8a3qCiVHn6Ft6ccD2bUOW MFMd4mKNa9Kw4Rxi2tyZ7inZXGHIQSueydXWU8F8TqvINGWMY9/ELyOOMf/4VAIZ7G50 by3Uo9Y3hLKJP9oJrn4ezcq5TbNq1xcitm41PSxUZG/nlUWHFd/2ayiHXrlLOynqzUzY SlfslbR2i0PEO4XD+o+B/pCGk32spWS94rU063Urg/op7irnonMBwy5HxTWBJBUD9rkk M43A== X-Gm-Message-State: AOAM532AvrwetMSmx2KYdQCq3GCeNEaj2h6gxTmXYy7PiOh5T+bKecIO TIqC6mgahSaG3hle55UMh6e6qT1ITI/UY+BJiy+eNBuRGBozBQgtVXr44UlaH5PYXGOpKbRvddO MQdIRixFNqWiKcA== X-Received: by 2002:a1c:96:: with SMTP id 144mr545161wma.84.1599751364564; Thu, 10 Sep 2020 08:22:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuSyW1m8MirtWlezIlKFdwxgvvcDVaVY2J/rTTHdvbnXc3LSStI3zetmtLsSn1F1o80NrVNg== X-Received: by 2002:a1c:96:: with SMTP id 144mr545138wma.84.1599751364320; Thu, 10 Sep 2020 08:22:44 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Ben Warren , "Dr. David Alan Gilbert" , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Richard Henderson , Eric Blake , Peter Lieven , Eduardo Habkost , Igor Mammedov , Ronnie Sahlberg , qemu-block@nongnu.org, Marcel Apfelbaum , Michael Roth , Markus Armbruster , David Hildenbrand , Paolo Bonzini , Kevin Wolf , "Michael S. Tsirkin" , Max Reitz , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 3/9] qapi: Correct balloon documentation Date: Thu, 10 Sep 2020 17:22:19 +0200 Message-Id: <20200910152225.524322-4-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200910152225.524322-1-philmd@redhat.com> References: <20200910152225.524322-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The documentation incorrectly uses the "size of the balloon" description when it should be "logical size of the VM". Fix it. The relation between both values is: logical_vm_size =3D vm_ram_size - balloon_size Reported-by: David Hildenbrand Suggested-by: David Hildenbrand Reviewed-by: David Hildenbrand Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- qapi/misc.json | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/qapi/misc.json b/qapi/misc.json index b21963a176d..a667fdf03e5 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -192,7 +192,8 @@ # # Information about the guest balloon device. # -# @actual: the number of bytes the balloon currently contains +# @actual: the logical size of the VM in bytes +# Formula used: logical_vm_size =3D vm_ram_size - balloon_size # # Since: 0.14.0 # @@ -228,7 +229,8 @@ # 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 +# @actual: the logical size of the VM in bytes +# Formula used: logical_vm_size =3D vm_ram_size - balloon_size # # Note: this event is rate-limited. # @@ -759,7 +761,10 @@ # # Request the balloon driver to change its balloon size. # -# @value: the target size of the balloon in bytes +# @value: the target logical size of the VM in bytes +# We can deduce the size of the balloon using this formula: +# logical_vm_size =3D vm_ram_size - balloon_size +# From it we have: balloon_size =3D vm_ram_size - @value # # Returns: - Nothing on success # - If the balloon driver is enabled but not functional because t= he KVM @@ -777,6 +782,8 @@ # -> { "execute": "balloon", "arguments": { "value": 536870912 } } # <- { "return": {} } # +# With a 2.5GiB guest this command inflated the balloon to 3GiB. +# ## { 'command': 'balloon', 'data': {'value': 'int'} } =20 --=20 2.26.2