[Qemu-devel] [PATCH 0/6] Reenable hmp for preconfig mode

Dr. David Alan Gilbert (git) posted 6 patches 5 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180605122636.33654-1-dgilbert@redhat.com
Test checkpatch passed
Test docker-mingw@fedora passed
Test docker-quick@centos7 failed
Test s390x passed
There is a newer version of this series
hmp-commands-info.hx |  9 +++++++++
hmp-commands.hx      | 17 +++++++++++++++++
hmp.c                |  7 +++++++
hmp.h                |  1 +
monitor.c            | 42 +++++++++++++++++++++++++++++++++---------
5 files changed, 67 insertions(+), 9 deletions(-)
[Qemu-devel] [PATCH 0/6] Reenable hmp for preconfig mode
Posted by Dr. David Alan Gilbert (git) 5 years, 10 months ago
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

Reenable HMP in preconfig mode; it's pretty
easy and anyway I want to do a similar thing for OOB eventually.
We'll want to enable more commands in preconfig mode to make it
useful at some point.

Dave


Dr. David Alan Gilbert (6):
  hmp: Add flag for preconfig commands
  hmp: Allow help on preconfig commands
  hmp: Restrict auto-complete in preconfig
  hmp: Add info commands for preconfig
  hmp: add exit_preconfig
  hmp: Allow HMP in preconfig state again

 hmp-commands-info.hx |  9 +++++++++
 hmp-commands.hx      | 17 +++++++++++++++++
 hmp.c                |  7 +++++++
 hmp.h                |  1 +
 monitor.c            | 42 +++++++++++++++++++++++++++++++++---------
 5 files changed, 67 insertions(+), 9 deletions(-)

-- 
2.17.0


Re: [Qemu-devel] [PATCH 0/6] Reenable hmp for preconfig mode
Posted by Peter Xu 5 years, 10 months ago
On Tue, Jun 05, 2018 at 01:26:30PM +0100, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> Reenable HMP in preconfig mode; it's pretty
> easy and anyway I want to do a similar thing for OOB eventually.
> We'll want to enable more commands in preconfig mode to make it
> useful at some point.
> 
> Dave

Wanna add "quit" into the preconfig-allowed list for HMP as well?

Tested-by: Peter Xu <peterx@redhat.com>

-- 
Peter Xu

Re: [Qemu-devel] [PATCH 0/6] Reenable hmp for preconfig mode
Posted by Dr. David Alan Gilbert 5 years, 10 months ago
* Peter Xu (peterx@redhat.com) wrote:
> On Tue, Jun 05, 2018 at 01:26:30PM +0100, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> > 
> > Reenable HMP in preconfig mode; it's pretty
> > easy and anyway I want to do a similar thing for OOB eventually.
> > We'll want to enable more commands in preconfig mode to make it
> > useful at some point.
> > 
> > Dave
> 
> Wanna add "quit" into the preconfig-allowed list for HMP as well?

I tried; quit triggers a disallowed state transition!

> Tested-by: Peter Xu <peterx@redhat.com>
> 
> -- 
> Peter Xu
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

Re: [Qemu-devel] [PATCH 0/6] Reenable hmp for preconfig mode
Posted by Peter Xu 5 years, 10 months ago
On Thu, Jun 07, 2018 at 10:00:30AM +0100, Dr. David Alan Gilbert wrote:
> * Peter Xu (peterx@redhat.com) wrote:
> > On Tue, Jun 05, 2018 at 01:26:30PM +0100, Dr. David Alan Gilbert (git) wrote:
> > > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> > > 
> > > Reenable HMP in preconfig mode; it's pretty
> > > easy and anyway I want to do a similar thing for OOB eventually.
> > > We'll want to enable more commands in preconfig mode to make it
> > > useful at some point.
> > > 
> > > Dave
> > 
> > Wanna add "quit" into the preconfig-allowed list for HMP as well?
> 
> I tried; quit triggers a disallowed state transition!

Would it be understandable if we just avoid calling qmp_quit() when
during preconfig?  An evil idea is, "exit()". :)

After all we have nothing there!

-- 
Peter Xu

Re: [Qemu-devel] [PATCH 0/6] Reenable hmp for preconfig mode
Posted by Igor Mammedov 5 years, 10 months ago
On Thu, 7 Jun 2018 16:54:44 +0800
Peter Xu <peterx@redhat.com> wrote:

> On Tue, Jun 05, 2018 at 01:26:30PM +0100, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> > 
> > Reenable HMP in preconfig mode; it's pretty
> > easy and anyway I want to do a similar thing for OOB eventually.
> > We'll want to enable more commands in preconfig mode to make it
> > useful at some point.
> > 
> > Dave  
> 
> Wanna add "quit" into the preconfig-allowed list for HMP as well?
There is exit-preconfig, but yeah it just forwards us to the next state

But for human users that just want to play with HMP 'quit'
might be useful, but only to the extent of trying out things out.
 
> Tested-by: Peter Xu <peterx@redhat.com>
> 


Re: [Qemu-devel] [PATCH 0/6] Reenable hmp for preconfig mode
Posted by Peter Xu 5 years, 10 months ago
On Thu, Jun 07, 2018 at 11:45:17AM +0200, Igor Mammedov wrote:
> On Thu, 7 Jun 2018 16:54:44 +0800
> Peter Xu <peterx@redhat.com> wrote:
> 
> > On Tue, Jun 05, 2018 at 01:26:30PM +0100, Dr. David Alan Gilbert (git) wrote:
> > > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> > > 
> > > Reenable HMP in preconfig mode; it's pretty
> > > easy and anyway I want to do a similar thing for OOB eventually.
> > > We'll want to enable more commands in preconfig mode to make it
> > > useful at some point.
> > > 
> > > Dave  
> > 
> > Wanna add "quit" into the preconfig-allowed list for HMP as well?
> There is exit-preconfig, but yeah it just forwards us to the next state
> 
> But for human users that just want to play with HMP 'quit'
> might be useful, but only to the extent of trying out things out.

Yes, actually I don't yet see a good reason to actually use HMP during
preconfig mode even as a whole.  But as Dave mentioned, it's too easy
to achieve that so I don't have a reason to object that too.

Regards,

-- 
Peter Xu

Re: [Qemu-devel] [PATCH 0/6] Reenable hmp for preconfig mode
Posted by Igor Mammedov 5 years, 10 months ago
On Tue,  5 Jun 2018 13:26:30 +0100
"Dr. David Alan Gilbert (git)" <dgilbert@redhat.com> wrote:

> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> Reenable HMP in preconfig mode; it's pretty
> easy and anyway I want to do a similar thing for OOB eventually.
> We'll want to enable more commands in preconfig mode to make it
> useful at some point.
> 
> Dave
> 
> 
> Dr. David Alan Gilbert (6):
>   hmp: Add flag for preconfig commands
>   hmp: Allow help on preconfig commands
>   hmp: Restrict auto-complete in preconfig
>   hmp: Add info commands for preconfig
>   hmp: add exit_preconfig
>   hmp: Allow HMP in preconfig state again
> 
>  hmp-commands-info.hx |  9 +++++++++
>  hmp-commands.hx      | 17 +++++++++++++++++
>  hmp.c                |  7 +++++++
>  hmp.h                |  1 +
>  monitor.c            | 42 +++++++++++++++++++++++++++++++++---------
>  5 files changed, 67 insertions(+), 9 deletions(-)
> 

I was trying to find out way to use QMP schema info with HMP
without manual commands flagging but this looks so much simpler,
so that if it is acceptable I'm all in for this version.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
except 4/6 which needs a little bit amended.