On 04/26/2018 09:39 AM, Igor Mammedov wrote:

>>> I'll try to come up with a text for qemu-doc.texi, not about
>>> deprecating -S but about when --preconfig should be used vs -S
>>> and where to get list of commands that could be used at preconfig state.  
>>
>> Sounds good to me.  Thanks!
> how about something like this:
> 
> diff --git a/qemu-tech.texi b/qemu-tech.texi
> index 52a56ae..6951258 100644
> --- a/qemu-tech.texi
> +++ b/qemu-tech.texi
> @@ -5,6 +5,7 @@
>  * CPU emulation::
>  * Translator Internals::
>  * QEMU compared to other emulators::
> +* Managed start up options::
>  * Bibliography::
>  @end menu
>  
> @@ -314,6 +315,44 @@ VirtualBox [9], Xen [10] and KVM [11] are based on QEMU. 
> QEMU-SystemC
>  [12] uses QEMU to simulate a system where some hardware devices are
>  developed in SystemC.
>  
> +@node Managed start up options
> +@section Managed start up options
> +
> +In system mode emulation, it's possible to create VM in paused state using
> +-S command line option. In this state the machine is completely initialized
> +according to command line options and ready to execute VM code but VCPU 
> threads
> +are not executing any code. VM state in this paused state depends on way QEMU
> +was started. It could be in:
> +@table @asis
> +@item initial state (after reset/power on state)
> +@item with direct kernel loading initial state could be ammended to execute

s/ammended/amended/

> +code loaded by QEMU in VM's RAM and with incomming migration

s/incomming/incoming/

> +@item with incomming migrartion, initial state will by ammended by the 
> migrated

and again, for both words
s/migrartion/migration/

> +machine state after migration completes.
> +@end table
> +
> +This paused state is typically used by users to query machine state and/or
> +additionally configure machine (hotplug devices) in runtime before allowing
> +VM code to run.
> +
> +However at -S pause point it's impossible to configure options that affect
> +initial VM creation (like: -smp/-m/-numa ...) or cold plug devices. That's
> +when -preconfig command line option should be used. It allows to pause

s/to pause/pausing/

> +QEMU before initial VM creation in preconfig state, query being created
> +VM at runtime and configure start up options depending on previous query

Reads awkwardly.  Maybe:

It allows pausing QEMU before the initial VM creation, in a new
preconfig state, where additional queries and configuration can be
performed via QMP before moving on to the resulting configuration startup.

> +results. In preconfig state QEMU allows to configure VM only via QMP monitor
> +with a limited command set which doesn't depend on completely initialized
> +machine, which includes but not limited to:

In the preconfig state, QEMU only allows a limited set of commands over
the QMP monitor, where the commands do not depend on an initialized
machine, including but not limited to:

> +@table @asis
> +@item qmp_capabilities
> +@item query-qmp-schema
> +@item query-commands
> +@item query-status
> +@end table
> +The full list of commands is in QMP schema which could be queried with
> +query-qmp-schema, where commands supported at preconfig state have option
> +'allowed-in-preconfig' set to true.
> +
>  @node Bibliography
>  @section Bibliography
> 

>> A separate command would have less room for ambiguity.
> I've added following instead of reusing 'cont':
> 
> ##                                                                            
>    
> # @exit-preconfig:                                                            
>    

This should definitely be mentioned in the docs section of commands
permitted during preconfig.

> #                                                                             
>    
> # Exit from "preconfig" state                                                 
>    
> #                                                                             
>    
> # Since 2.13                                                                  
>    
> #                                                                             
>    
> # Returns: nothing                                                            
>    
> #                                                                             
>    
> # Notes: Command makes QEMU exit from preconfig state and proceeds with       
>    
> # VM initialization using configuration data provided on command line         
>    
> # and via QMP monitor at preconfig state. Command is available only at        
>    
> # preconfig state (i.e. if --preconfig command line option).                  
>    
> #                                                                             
>    
> # Example:                                                                    
>    
> #                                                                             
>    
> # -> { "execute": "exit-preconfig" }                                          
>    
> # <- { "return": {} }                                                         
>    
> #                                                                             
>    
> ##                                                                            
>    
> { 'command': 'exit-preconfig', 'allowed-in-preconfig': true } 
> 
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to