qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 74f38e: numa: clarify error message when node


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 74f38e: numa: clarify error message when node index is out...
Date: Thu, 31 May 2018 06:40:46 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 74f38e96b321ef8df2bf7fa1bd4f673ef06aca5b
      
https://github.com/qemu/qemu/commit/74f38e96b321ef8df2bf7fa1bd4f673ef06aca5b
  Author: Igor Mammedov <address@hidden>
  Date:   2018-05-30 (Wed, 30 May 2018)

  Changed paths:
    M numa.c

  Log Message:
  -----------
  numa: clarify error message when node index is out of range in -numa dist, ...

When using following CLI:
  -numa dist,src=128,dst=1,val=20
user gets a rather confusing error message:
   "Invalid node 128, max possible could be 128"

Where 128 is number of nodes that QEMU supports (MAX_NODES),
while src/dst is an index up to that limit, so it should be
MAX_NODES - 1 in error message.
Make error message to explicitly state valid range for node
index to be more clear.

Signed-off-by: Igor Mammedov <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 7a3099fc9c5c7789fa1613165812bbc8bd28ee52
      
https://github.com/qemu/qemu/commit/7a3099fc9c5c7789fa1613165812bbc8bd28ee52
  Author: Igor Mammedov <address@hidden>
  Date:   2018-05-30 (Wed, 30 May 2018)

  Changed paths:
    M hw/core/machine.c
    M include/sysemu/numa.h
    M numa.c

  Log Message:
  -----------
  numa: postpone options post-processing till machine_run_board_init()

in preparation for numa options to being handled via QMP before
machine_run_board_init(), move final numa configuration checks
and processing to machine_run_board_init() so it could take into
account both CLI (via parse_numa_opts()) and QMP input

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 3319b4efc295b421fac442746202c9a1da193973
      
https://github.com/qemu/qemu/commit/3319b4efc295b421fac442746202c9a1da193973
  Author: Igor Mammedov <address@hidden>
  Date:   2018-05-30 (Wed, 30 May 2018)

  Changed paths:
    M include/sysemu/numa.h
    M numa.c

  Log Message:
  -----------
  numa: split out NumaOptions parsing into set_numa_options()

it will allow to reuse set_numa_options() for parsing
configuration commands received via QMP interface

Signed-off-by: Igor Mammedov <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 8a36283e120ab3633557d6732fa700366e0137c7
      
https://github.com/qemu/qemu/commit/8a36283e120ab3633557d6732fa700366e0137c7
  Author: Igor Mammedov <address@hidden>
  Date:   2018-05-30 (Wed, 30 May 2018)

  Changed paths:
    M qapi/run-state.json

  Log Message:
  -----------
  qapi: introduce preconfig runstate

New preconfig runstate will be used in follow up patches
related to introducing --preconfig CLI option and is
intended to replace prelaunch runstate from QEMU start
up to machine_init callback.

Signed-off-by: Igor Mammedov <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
[ehabkost: Changed "since 2.13" to "since 3.0"]
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 71dc578e116599ea73c8a2a4e693134702ec0e83
      
https://github.com/qemu/qemu/commit/71dc578e116599ea73c8a2a4e693134702ec0e83
  Author: Igor Mammedov <address@hidden>
  Date:   2018-05-30 (Wed, 30 May 2018)

  Changed paths:
    M monitor.c

  Log Message:
  -----------
  hmp: disable monitor in preconfig state

Ban it for now, if someone would need it to work early,
one would have to implement checks if HMP command is valid
at preconfig state.

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: d6fe3d02e9a2ce7b63a0723d0b71f3013f59d705
      
https://github.com/qemu/qemu/commit/d6fe3d02e9a2ce7b63a0723d0b71f3013f59d705
  Author: Igor Mammedov <address@hidden>
  Date:   2018-05-30 (Wed, 30 May 2018)

  Changed paths:
    M docs/devel/qapi-code-gen.txt
    M include/qapi/qmp/dispatch.h
    M monitor.c
    M qapi/introspect.json
    M qapi/misc.json
    M qapi/run-state.json
    M scripts/qapi/commands.py
    M scripts/qapi/common.py
    M scripts/qapi/doc.py
    M scripts/qapi/introspect.py
    M tests/qapi-schema/test-qapi.py

  Log Message:
  -----------
  qapi: introduce new cmd option "allow-preconfig"

New option will be used to allow commands, which are prepared/need
to run, during preconfig state. Other commands that should be able
to run in preconfig state, should be amended to not expect machine
in initialized state or deal with it.

For compatibility reasons, commands that don't use new flag
'allow-preconfig' explicitly are not permitted to run in
preconfig state but allowed in all other states like they used
to be.

Within this patch allow following commands in preconfig state:
   qmp_capabilities
   query-qmp-schema
   query-commands
   query-command-line-options
   query-status
   exit-preconfig
to allow qmp connection, basic introspection and moving to the next
state.

PS:
set-numa-node and query-hotpluggable-cpus will be enabled later in
a separate patches.

Signed-off-by: Igor Mammedov <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
[ehabkost: Changed "since 2.13" to "since 3.0"]
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 7b13f2c27a02499e9f8d955e0a4c68a5165e150d
      
https://github.com/qemu/qemu/commit/7b13f2c27a02499e9f8d955e0a4c68a5165e150d
  Author: Igor Mammedov <address@hidden>
  Date:   2018-05-30 (Wed, 30 May 2018)

  Changed paths:
    M tests/Makefile.include
    A tests/qapi-schema/allow-preconfig-test.err
    A tests/qapi-schema/allow-preconfig-test.exit
    A tests/qapi-schema/allow-preconfig-test.json
    A tests/qapi-schema/allow-preconfig-test.out
    M tests/qapi-schema/doc-good.out
    M tests/qapi-schema/ident-with-escape.out
    M tests/qapi-schema/indented-expr.out
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out
    M tests/qapi-schema/test-qapi.py
    M tests/test-qmp-cmds.c

  Log Message:
  -----------
  tests: qapi-schema tests for allow-preconfig

use new allow-preconfig parameter in tests and make sure that
the QAPISchema can parse allow-preconfig correctly

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 047f7038f586d2150f16c6d9ba9cfd0479f0f6ac
      
https://github.com/qemu/qemu/commit/047f7038f586d2150f16c6d9ba9cfd0479f0f6ac
  Author: Igor Mammedov <address@hidden>
  Date:   2018-05-30 (Wed, 30 May 2018)

  Changed paths:
    M include/sysemu/sysemu.h
    M qapi/misc.json
    M qapi/qmp-dispatch.c
    M qemu-options.hx
    M qemu-tech.texi
    M qmp.c
    M vl.c

  Log Message:
  -----------
  cli: add --preconfig option

This option allows pausing QEMU in the new RUN_STATE_PRECONFIG state,
allowing the configuration of QEMU from QMP before the machine jumps
into board initialization code of machine_run_board_init()

The intent is to allow management to query machine state and additionally
configure it using previous query results within one QEMU instance
(i.e. eliminate the need to start QEMU twice, 1st to query board specific
parameters and 2nd for actual VM start using query results for
additional parameters).

The new option complements -S option and could be used with or without
it. The difference is that -S pauses QEMU when the machine is completely
initialized with all devices wired up and ready to execute guest code
(QEMU needs only to unpause VCPUs to let guest execute its code),
while the "preconfig" option pauses QEMU early before board specific init
callback (machine_run_board_init) is executed and allows the configuration
of machine parameters which will be used by board init code.

When early introspection/configuration is done, command 'exit-preconfig'
should be used to exit RUN_STATE_PRECONFIG and transition to the next
requested state (i.e. if -S is used then QEMU will pause the second
time when board/device initialization is completed or start guest
execution if -S isn't provided on CLI)

PS:
Initially 'preconfig' is planned to be used for configuring numa
topology depending on board specified possible cpus layout.

Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
[ehabkost: Changed "since 2.13" to "since 3.0"]
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: fb1e58f72ba8daf7446ac46b00b5d1853486d28b
      
https://github.com/qemu/qemu/commit/fb1e58f72ba8daf7446ac46b00b5d1853486d28b
  Author: Igor Mammedov <address@hidden>
  Date:   2018-05-30 (Wed, 30 May 2018)

  Changed paths:
    M tests/qmp-test.c

  Log Message:
  -----------
  tests: extend qmp test with preconfig checks

Add permission checks for commands at 'preconfig' stage.

Signed-off-by: Igor Mammedov <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 899eaab464fab310ecb16c8e2572d835ae1929da
      
https://github.com/qemu/qemu/commit/899eaab464fab310ecb16c8e2572d835ae1929da
  Author: Igor Mammedov <address@hidden>
  Date:   2018-05-30 (Wed, 30 May 2018)

  Changed paths:
    M qapi/misc.json

  Log Message:
  -----------
  qmp: permit query-hotpluggable-cpus in preconfig state

it will allow mgmt to query possible CPUs, which depends on
used machine(version)/-smp options, without restarting
QEMU and use results to configure numa mapping or adding
CPUs with device_add* later.

PS:
*) device_add is not allowed to run at preconfig in this series
   but later it could be dealt with by injecting -device
   in preconfig state and letting existing -device handling
   to actually plug devices

Signed-off-by: Igor Mammedov <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: f3be67812c226162f86ce92634bd913714445420
      
https://github.com/qemu/qemu/commit/f3be67812c226162f86ce92634bd913714445420
  Author: Igor Mammedov <address@hidden>
  Date:   2018-05-30 (Wed, 30 May 2018)

  Changed paths:
    M numa.c
    M qapi/misc.json

  Log Message:
  -----------
  qmp: add set-numa-node command

Command is allowed to run only in preconfig stage and
will allow to configure numa mapping for CPUs depending
on possible CPUs layout (query-hotpluggable-cpus) for
given machine instance.

Example of configuration session:
$QEMU -smp 2 --preconfig ...

QMP:
-> {'execute': 'query-hotpluggable-cpus' }
<- {'return': [
       {'props': {'core-id': 0, 'thread-id': 0, 'socket-id': 1}, ... },
       {'props': {'core-id': 0, 'thread-id': 0, 'socket-id': 0}, ... }
   ]}

-> {'execute': 'set-numa-node', 'arguments': { 'type': 'node', 'nodeid': 0 } }
<- {'return': {}}
-> {'execute': 'set-numa-node', 'arguments': { 'type': 'cpu',
       'node-id': 0, 'core-id': 0, 'thread-id': 0, 'socket-id': 1, }
   }
<- {'return': {}}

-> {'execute': 'set-numa-node', 'arguments': { 'type': 'node', 'nodeid': 1 } }
-> {'execute': 'set-numa-node', 'arguments': { 'type': 'cpu',
       'node-id': 1, 'core-id': 0, 'thread-id': 0, 'socket-id': 0 }
   }
<- {'return': {}}

-> {'execute': 'query-hotpluggable-cpus' }
<- {'return': [
       {'props': {'core-id': 0, 'thread-id': 0, 'node-id': 0, 'socket-id': 1}, 
... },
       {'props': {'core-id': 0, 'thread-id': 0, 'node-id': 1, 'socket-id': 0}, 
... }
   ]}

Signed-off-by: Igor Mammedov <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
[ehabkost: Changed "since 2.13" to "since 3.0"]
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: c35665e1ee3d4344cd5156430ebc92310635f9bd
      
https://github.com/qemu/qemu/commit/c35665e1ee3d4344cd5156430ebc92310635f9bd
  Author: Igor Mammedov <address@hidden>
  Date:   2018-05-30 (Wed, 30 May 2018)

  Changed paths:
    M tests/libqtest.c
    M tests/libqtest.h
    M tests/numa-test.c
    M tests/qmp-test.c

  Log Message:
  -----------
  tests: functional tests for QMP command set-numa-node

 * start QEMU with 2 unmapped cpus,
 * while in preconfig state
    * add 2 numa nodes
    * assign cpus to them
 * exit preconfig and in running state check that cpus
   are mapped correctly.

Signed-off-by: Igor Mammedov <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: a3ac12fba028df90f7b3dbec924995c126c41022
      
https://github.com/qemu/qemu/commit/a3ac12fba028df90f7b3dbec924995c126c41022
  Author: Peter Maydell <address@hidden>
  Date:   2018-05-31 (Thu, 31 May 2018)

  Changed paths:
    M docs/devel/qapi-code-gen.txt
    M hw/core/machine.c
    M include/qapi/qmp/dispatch.h
    M include/sysemu/numa.h
    M include/sysemu/sysemu.h
    M monitor.c
    M numa.c
    M qapi/introspect.json
    M qapi/misc.json
    M qapi/qmp-dispatch.c
    M qapi/run-state.json
    M qemu-options.hx
    M qemu-tech.texi
    M qmp.c
    M scripts/qapi/commands.py
    M scripts/qapi/common.py
    M scripts/qapi/doc.py
    M scripts/qapi/introspect.py
    M tests/Makefile.include
    M tests/libqtest.c
    M tests/libqtest.h
    M tests/numa-test.c
    A tests/qapi-schema/allow-preconfig-test.err
    A tests/qapi-schema/allow-preconfig-test.exit
    A tests/qapi-schema/allow-preconfig-test.json
    A tests/qapi-schema/allow-preconfig-test.out
    M tests/qapi-schema/doc-good.out
    M tests/qapi-schema/ident-with-escape.out
    M tests/qapi-schema/indented-expr.out
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out
    M tests/qapi-schema/test-qapi.py
    M tests/qmp-test.c
    M tests/test-qmp-cmds.c
    M vl.c

  Log Message:
  -----------
  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 <address@hidden>"
# 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: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/fe817a8a0d4a...a3ac12fba028
      **NOTE:** This service been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]