Commit a3ac12fb authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/ehabkost/tags/numa-next-pull-request' into staging



NUMA queue, 2018-05-30

* New command-line option: --preconfig
  This option allows pausing QEMU and allow the configuration
  using QMP commands before running board initialization code.
* New QMP set-numa-node, now made possible because of --preconfig
* Small update on -numa error messages

# gpg: Signature made Thu 31 May 2018 00:02:59 BST
# gpg:                using RSA key 2807936F984DC5A6
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6

* remotes/ehabkost/tags/numa-next-pull-request:
  tests: functional tests for QMP command set-numa-node
  qmp: add set-numa-node command
  qmp: permit query-hotpluggable-cpus in preconfig state
  tests: extend qmp test with preconfig checks
  cli: add --preconfig option
  tests: qapi-schema tests for allow-preconfig
  qapi: introduce new cmd option "allow-preconfig"
  hmp: disable monitor in preconfig state
  qapi: introduce preconfig runstate
  numa: split out NumaOptions parsing into set_numa_options()
  numa: postpone options post-processing till machine_run_board_init()
  numa: clarify error message when node index is out of range in -numa dist, ...

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents fe817a8a c35665e1
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -559,7 +559,7 @@ following example objects:
Usage: { 'command': STRING, '*data': COMPLEX-TYPE-NAME-OR-DICT,
         '*returns': TYPE-NAME, '*boxed': true,
         '*gen': false, '*success-response': false,
         '*allow-oob': true }
         '*allow-oob': true, '*allow-preconfig': true }

Commands are defined by using a dictionary containing several members,
where three members are most common.  The 'command' member is a
@@ -683,6 +683,15 @@ OOB command handlers must satisfy the following conditions:

If in doubt, do not implement OOB execution support.

A command may use the optional 'allow-preconfig' key to permit its execution
at early runtime configuration stage (preconfig runstate).
If not specified then a command defaults to 'allow-preconfig': false.

An example of declaring a command that is enabled during preconfig:
 { 'command': 'qmp_capabilities',
   'data': { '*enable': [ 'QMPCapability' ] },
   'allow-preconfig': true }

=== Events ===

Usage: { 'event': STRING, '*data': COMPLEX-TYPE-NAME-OR-DICT,
+3 −2
Original line number Diff line number Diff line
@@ -737,7 +737,7 @@ static char *cpu_slot_to_string(const CPUArchId *cpu)
    return g_string_free(s, false);
}

static void machine_numa_finish_init(MachineState *machine)
static void machine_numa_finish_cpu_init(MachineState *machine)
{
    int i;
    bool default_mapping;
@@ -792,7 +792,8 @@ void machine_run_board_init(MachineState *machine)
    MachineClass *machine_class = MACHINE_GET_CLASS(machine);

    if (nb_numa_nodes) {
        machine_numa_finish_init(machine);
        numa_complete_configuration(machine);
        machine_numa_finish_cpu_init(machine);
    }

    /* If the machine supports the valid_cpu_types check and the user
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ typedef enum QmpCommandOptions
    QCO_NO_OPTIONS            =  0x0,
    QCO_NO_SUCCESS_RESP       =  (1U << 0),
    QCO_ALLOW_OOB             =  (1U << 1),
    QCO_ALLOW_PRECONFIG       =  (1U << 2),
} QmpCommandOptions;

typedef struct QmpCommand
+2 −0
Original line number Diff line number Diff line
@@ -22,7 +22,9 @@ struct NumaNodeMem {
};

extern NodeInfo numa_info[MAX_NODES];
int parse_numa(void *opaque, QemuOpts *opts, Error **errp);
void parse_numa_opts(MachineState *ms);
void numa_complete_configuration(MachineState *ms);
void query_numa_node_mem(NumaNodeMem node_mem[]);
extern QemuOptsList qemu_numa_opts;
void numa_legacy_auto_assign_ram(MachineClass *mc, NodeInfo *nodes,
+1 −0
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ typedef enum WakeupReason {
    QEMU_WAKEUP_REASON_OTHER,
} WakeupReason;

void qemu_exit_preconfig_request(void);
void qemu_system_reset_request(ShutdownCause reason);
void qemu_system_suspend_request(void);
void qemu_register_suspend_notifier(Notifier *notifier);
Loading