All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	wang.yi59@zte.com.cn, liu.yunh@zte.com.cn, qemu-devel@nongnu.org,
	"libvir-list@redhat.com" <libvir-list@redhat.com>,
	pbonzini@redhat.com, Liu.Jianjun3@zte.com.cn, rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH v2] hmp: allow cpu index for "info lapic"
Date: Wed, 19 Jul 2017 16:07:58 +0100	[thread overview]
Message-ID: <20170719150758.GK30084@redhat.com> (raw)
In-Reply-To: <f870ca6c-a8fb-a88c-f171-a66f4158671d@redhat.com>

On Wed, Jul 19, 2017 at 10:02:04AM -0500, Eric Blake wrote:
> [adding libvirt]
> 
> On 07/19/2017 07:41 AM, Eduardo Habkost wrote:
> 
> >> virsh  qemu-monitor-command --domain rhel6.8 --hmp --cmd "cpu 1"
> >> virsh  qemu-monitor-command --domain rhel6.8 --hmp --cmd "info lapic"
> >> dumping local APIC state for CPU 0
> > 
> > Right, the "cpu" command is useless inside a
> > 'human-monitor-command' QMP command.  The 'cpu-index' argument
> > should be used instead. should make "cpu" print an error if ran
> > inside 'human-monitor-command' instead of silently pretend it
> > worked.
> > 
> > If virsh doesn't support the 'cpu-index' argument to
> > 'human-monitor-command',
> 
> It doesn't.  Perhaps we should add that as a future libvirt-qemu.so API
> addition, although it's probably easier to just use QMP than HMP when
> using 'virsh qemu-monitor-command' if HMP doesn't do what you want.

Or special case the "cpu 1" command - ie notice that it is being
requested and don't execute 'human-montor-command'. Instead just
record the CPU index, and use that for future "human-monitor-command"
invokations, so we get full compat with the (dubious) stateful HMP
semantics that traditionally existed.

> 
> > it's possible to work around that
> > limitation by building your own QMP command.  e.g.:
> > 
> >   # virsh qemu-monitor-command f26test '{"execute":"human-monitor-command", "arguments":{"command-line":"info lapic", "cpu-index":1}}' | jq -r '.return'
> 
> Indeed, there's the use of QMP to work around the HMP deficiency.
> 
> -- 
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.           +1-919-301-3266
> Virtualization:  qemu.org | libvirt.org
> 



Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

  reply	other threads:[~2017-07-19 15:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-19  4:47 [Qemu-devel] [PATCH v2] hmp: allow cpu index for "info lapic" wang.yi59
2017-07-19  6:16 ` Eduardo Habkost
2017-07-19 12:16   ` Dr. David Alan Gilbert
2017-07-19 12:41     ` Eduardo Habkost
2017-07-19 15:02       ` Eric Blake
2017-07-19 15:07         ` Daniel P. Berrange [this message]
2017-07-19 15:17           ` Eric Blake
2017-07-19 18:32             ` Eduardo Habkost
2017-07-19 19:17               ` Dr. David Alan Gilbert
2017-07-19 19:46                 ` Eduardo Habkost
2017-07-19  8:10 ` Dr. David Alan Gilbert
  -- strict thread matches above, loose matches on Subject: below --
2017-07-20  4:41 wang.yi59
2017-07-19  8:48 wang.yi59
2017-07-19  9:16 ` Igor Mammedov
2017-07-19  4:25 wang.yi59
2017-07-19  7:36 ` Igor Mammedov
2017-07-18  1:49 Yi Wang
2017-07-18 14:54 ` Igor Mammedov
2017-07-18 23:26   ` Eduardo Habkost
2017-07-19  7:39     ` Igor Mammedov
2017-07-18 23:25 ` Eduardo Habkost

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=20170719150758.GK30084@redhat.com \
    --to=berrange@redhat.com \
    --cc=Liu.Jianjun3@zte.com.cn \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=liu.yunh@zte.com.cn \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=wang.yi59@zte.com.cn \
    /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.