From: <wang.yi59@zte.com.cn>
To: ehabkost@redhat.com
Cc: dgilbert@redhat.com, eblake@redhat.com, berrange@redhat.com,
liu.yunh@zte.com.cn, qemu-devel@nongnu.org,
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: Thu, 20 Jul 2017 12:41:57 +0800 (CST) [thread overview]
Message-ID: <201707201241573748200@zte.com.cn> (raw)
>On Wed, Jul 19, 2017 at 08:17:49PM +0100, Dr. David Alan Gilbert wrote:
>> * Eduardo Habkost (address@hidden) wrote:
>> > On Wed, Jul 19, 2017 at 10:17:36AM -0500, Eric Blake wrote:
>> > > On 07/19/2017 10:07 AM, Daniel P. Berrange wrote:
>> > > >> 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.
>> > >
>> > > Is 'cpu' (and the followup commands affected by it) the only stateful
>> > > HMP command pairing? Is there a way to specify multiple HMP commands in
>> > > a single human-monitor-command QMP call?
>> > >
>> > > Indeed, tweaking qemu's human-monitor-command call to track the state
>> > > might be cleaner than having libvirt have to tweak API to work around
>> > > this wart of HMP.
>> >
>> > The CPU index was the only state kept by the human monitor, and I
>> > think it's by design that it stopped being considered "monitor
>> > state" to be tracked, and became just an argument to
>> > human-monitor-command.
>> >
>> > It's true that it broke compatibility of
>> > "virsh qemu-monitor-command <domain> --hmp 'cpu <n>'",
>> > when we moved to QMP, but this happened years ago, and it looks
>> > like nobody was relying on it. I don't see the point of trying
>> > to emulate the previous stateful interface.
>>
>> IMHO Yi's fix (once reworked) is the right fix - it removes the
>> use of that piece of state, when the optional parameter is used.
>> (OK, so it needs rework not to change that state and to
>> come to some agreement as to what to use instead of cpu index number
>> etc).
>
>Agreed, as it helps us to keep the "virsh qemu-monitor-command"
>interface simpler. But we have 8 commands that use
>mon_get_cpu(), we shouldn't fix only "info lapic".
Thank you all!
I will rework this patch in this way:
- extend 'info registers' with apic id value instead of current, like this:
CPU#1 (socket-id: a, core-id: b, thread-id: c, apic-id: d)
- add parameter 'apic id' for 'info lapic'
As to other commands, I want to send some other patches 'cause in my opinion not
all commands need 'apic-id' as index.
---
Best wishes
Yi Wang
next reply other threads:[~2017-07-20 4:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-20 4:41 wang.yi59 [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-07-19 8:48 [Qemu-devel] [PATCH v2] hmp: allow cpu index for "info lapic" wang.yi59
2017-07-19 9:16 ` Igor Mammedov
2017-07-19 4:47 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
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
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=201707201241573748200@zte.com.cn \
--to=wang.yi59@zte.com.cn \
--cc=Liu.Jianjun3@zte.com.cn \
--cc=berrange@redhat.com \
--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 \
/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.