From: Eduardo Habkost <ehabkost@redhat.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: wang.yi59@zte.com.cn, qemu-devel@nongnu.org, pbonzini@redhat.com,
rth@twiddle.net, Liu.Jianjun3@zte.com.cn, liu.yunh@zte.com.cn
Subject: Re: [Qemu-devel] [PATCH v2] hmp: allow cpu index for "info lapic"
Date: Wed, 19 Jul 2017 09:41:47 -0300 [thread overview]
Message-ID: <20170719124147.GH2757@localhost.localdomain> (raw)
In-Reply-To: <20170719121628.GI2103@work-vm>
On Wed, Jul 19, 2017 at 01:16:28PM +0100, Dr. David Alan Gilbert wrote:
> * Eduardo Habkost (ehabkost@redhat.com) wrote:
> > On Wed, Jul 19, 2017 at 12:47:53PM +0800, wang.yi59@zte.com.cn wrote:
> > > Hi Eduardo,
> > >
> > > Thank you for your reply!
> > >
> > > >On Mon, Jul 17, 2017 at 09:49:37PM -0400, Yi Wang wrote:
> > > >> Add [vcpu] index support for hmp command "info lapic", which is
> > > >> useful when debugging ipi and so on. Current behavior is not
> > > >> changed when the parameter isn't specified.
> > > >>
> > > >> Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
> > > >> Signed-off-by: Yun Liu <liu.yunh@zte.com.cn>
> > > >
> > >
> > > >We have 8 monitor commands (see below) that use the CPU set by
> > > >the "cpu" command (mon_get_cpu()) as input. Why is "info lapic"
> > > >special?
> > >
> > > When we debugging a problem of ipi, we wanted to verify lapic info
> > > on each vCPU, but we found that we could only get vCPU 0's lapic
> > > through "info lapic", so we supposed this patch could help those
> > > who have the same problem as us.
> >
> > The "cpu" command is supposed to allow you to select the CPU for
> > those commands. Doesn't it work?
>
> In the other arm to the thread Yi explained that they were driving
> it via virsh qemu-monitor-command, and I've just tried and it
> doesn't seem to work; doing:
>
> 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'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'
dumping local APIC state for CPU 1
LVT0 0x00010000 active-hi edge masked Fixed (vec 0)
LVT1 0x00010000 active-hi edge masked Fixed (vec 0)
LVTPC 0x00010000 active-hi edge masked Fixed (vec 0)
LVTERR 0x00010000 active-hi edge masked Fixed (vec 0)
LVTTHMR 0x00010000 active-hi edge masked Fixed (vec 0)
LVTT 0x00010000 active-hi edge masked one-shot Fixed (vec 0)
Timer DCR=0x0 (divide by 2) initial_count = 0
SPIV 0x000000ff APIC disabled, focus=off, spurious vec 255
ICR 0x000000fd physical edge de-assert no-shorthand
ICR2 0x00000000 cpu 0 (X2APIC ID)
ESR 0x00000000
ISR (none)
IRR (none)
APR 0x00 TPR 0x00 DFR 0x0f LDR 0x00 PPR 0x00
--
Eduardo
next prev parent reply other threads:[~2017-07-19 12:41 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 [this message]
2017-07-19 15:02 ` Eric Blake
2017-07-19 15:07 ` Daniel P. Berrange
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=20170719124147.GH2757@localhost.localdomain \
--to=ehabkost@redhat.com \
--cc=Liu.Jianjun3@zte.com.cn \
--cc=dgilbert@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 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).