All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: liuhaiwei <liuhaiwei9699@126.com>
Cc: qemu-devel@nongnu.org,  pbonzini@redhat.com,
	 eduardo@habkost.net, eblake@redhat.com,  armbru@redhat.com,
	 liuhaiwei <liuhaiwei@inspur.com>
Subject: Re: [PATCH] Use QMP command object-add instead of object_add for memory hotplugin
Date: Thu, 08 Sep 2022 13:41:33 +0200	[thread overview]
Message-ID: <877d2edrf6.fsf@pond.sub.org> (raw)
In-Reply-To: <20220908095247.2582144-1-liuhaiwei9699@126.com> (liuhaiwei's message of "Thu, 8 Sep 2022 05:52:47 -0400")

liuhaiwei <liuhaiwei9699@126.com> writes:

> From: liuhaiwei <liuhaiwei@inspur.com>
>
> Signed-off-by: liuhaiwei <liuhaiwei@inspur.com>
> ---
>  docs/memory-hotplug.txt | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/docs/memory-hotplug.txt b/docs/memory-hotplug.txt
> index 6aa5e17e26..85ed4d8f3d 100644
> --- a/docs/memory-hotplug.txt
> +++ b/docs/memory-hotplug.txt
> @@ -34,15 +34,15 @@ hotplugged by using any combination of the available memory slots.
>  
>  Two monitor commands are used to hotplug memory:
>  
> - - "object_add": creates a memory backend object
> + - "object-add": creates a memory backend object
>   - "device_add": creates a front-end pc-dimm device and inserts it
>                   into the first empty slot
>  
>  For example, the following commands add another 1GB to the guest
>  discussed earlier:
>  
> -  (qemu) object_add memory-backend-ram,id=mem1,size=1G
> -  (qemu) device_add pc-dimm,id=dimm1,memdev=mem1
> +  (qemu) object-add qom-type=memory-backend-ram id=mem1 size=1073741824
> +  (qemu) device_add driver=pc-dimm id=dimm1 memdev=mem1

This is HMP, where the command is spelled object_add.  Your patch is
wrong.

>  
>  Using the file backend
>  ----------------------
> @@ -55,7 +55,7 @@ For example, assuming that the host has 1GB hugepages available in
>  the /mnt/hugepages-1GB directory, a 1GB hugepage could be hotplugged
>  into the guest from the previous section with the following commands:
>  
> -  (qemu) object_add memory-backend-file,id=mem1,size=1G,mem-path=/mnt/hugepages-1GB

Likewise.

> +  (qemu) object-add qom-type=memory-backend-file id=mem1  size=1073741824 mem-path=/mnt/hugepages-1GB 
>    (qemu) device_add pc-dimm,id=dimm1,memdev=mem1
>  
>  It's also possible to start a guest with memory cold-plugged into the



  reply	other threads:[~2022-09-08 11:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-08  9:52 [PATCH] Use QMP command object-add instead of object_add for memory hotplugin liuhaiwei
2022-09-08 11:41 ` Markus Armbruster [this message]
2022-09-08 11:52   ` liuhaiwei9699
2022-09-08 12:34     ` Markus Armbruster
2022-09-08 12:55       ` Dr. David Alan Gilbert

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=877d2edrf6.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=liuhaiwei9699@126.com \
    --cc=liuhaiwei@inspur.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.