All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: armbru@redhat.com
Subject: [PATCH v2 00/11] vl: compound properties for machines
Date: Thu, 17 Jun 2021 17:52:57 +0200	[thread overview]
Message-ID: <20210617155308.928754-1-pbonzini@redhat.com> (raw)

This series converts -M to keyval parsing, so that they can use
compound properties.  The series also converts -smp to a
compound property.

This is also a preparatory work for SGX support, which would like to use
an array-type machine property.

Patches 1-3 introduce the infrastructure and the new functions that
will be used for "-M help" and to use keyval with "merge_lists = true"
semantics.

Patch 4 does the actual switch of -M to keyval and patch 5 removes now
dead code from qemu-option

Patches 6-11 finally validate the concept by implementing -smp as a
compound property; that is "-smp X=Y" is converted to "-machine smp.X=Y"
automatically.  Really the only interesting patches are 9 and 11,
while the others are just cleanups.

The series does not support JSON syntax for -M because we need
to consider what happens if string-based dictionaries (produced by -M
key=val) have to be merged with strongly-typed dictionaries (produced
by -M {'key': 123}).

The plan is to only allow exactly one -M option when JSON syntax is in
use; the problem is that this is a forwards-compatibility landmine.
As soon as -smp is converted, for example, -smp becomes a shortcut for -M
and it is now forbidden to use -M '{....}' together with -smp.  It would
be impossible to know which options in the future will become incompatible
with -M JSON syntax.  Therefore, support for JSON syntax is delayed
until after the main options are converted to QOM compound properties.
These could be -boot, -acpitable, -smbios, -m, -semihosting-config,
-rtc and -fw_cfg.

Paolo

Paolo Bonzini (11):
  qom: export more functions for use with non-UserCreatable objects
  keyval: introduce keyval_merge
  keyval: introduce keyval_parse_into
  vl: switch -M parsing to keyval
  qemu-option: remove now-dead code
  machine: move dies from X86MachineState to CpuTopology
  machine: move common smp_parse code to caller
  machine: add error propagation to mc->smp_parse
  machine: pass QAPI struct to mc->smp_parse
  machine: reject -smp dies!=1 for non-PC machines
  machine: add smp compound property

 hw/core/machine.c           | 192 +++++++++++---------
 hw/i386/pc.c                | 110 +++++-------
 hw/i386/x86.c               |  15 +-
 include/hw/boards.h         |   4 +-
 include/hw/i386/pc.h        |   3 -
 include/hw/i386/x86.h       |   1 -
 include/qemu/option.h       |   6 +-
 include/qom/object.h        |  23 +++
 qapi/machine.json           |  27 +++
 qom/object_interfaces.c     |  58 ++++--
 softmmu/vl.c                | 348 ++++++++++++++++++------------------
 tests/qtest/numa-test.c     |  22 +--
 tests/unit/test-keyval.c    |  58 ++++++
 tests/unit/test-qemu-opts.c |  35 ----
 util/keyval.c               | 114 +++++++++++-
 util/qemu-option.c          |  51 ++----
 16 files changed, 621 insertions(+), 446 deletions(-)

-- 
2.31.1



             reply	other threads:[~2021-06-17 16:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 15:52 Paolo Bonzini [this message]
2021-06-17 15:52 ` [PATCH v2 01/11] qom: export more functions for use with non-UserCreatable objects Paolo Bonzini
2021-06-17 15:52 ` [PATCH v2 02/11] keyval: introduce keyval_merge Paolo Bonzini
2021-06-18  7:42   ` Markus Armbruster
2021-06-17 15:53 ` [PATCH v2 03/11] keyval: introduce keyval_parse_into Paolo Bonzini
2021-06-17 15:53 ` [PATCH v2 04/11] vl: switch -M parsing to keyval Paolo Bonzini
2021-06-17 15:53 ` [PATCH v2 05/11] qemu-option: remove now-dead code Paolo Bonzini
2021-06-17 15:53 ` [PATCH v2 06/11] machine: move dies from X86MachineState to CpuTopology Paolo Bonzini
2021-06-17 15:53 ` [PATCH v2 07/11] machine: move common smp_parse code to caller Paolo Bonzini
2021-06-17 15:53 ` [PATCH v2 08/11] machine: add error propagation to mc->smp_parse Paolo Bonzini
2021-06-17 15:53 ` [PATCH v2 09/11] machine: pass QAPI struct " Paolo Bonzini
2021-06-17 15:53 ` [PATCH v2 10/11] machine: reject -smp dies!=1 for non-PC machines Paolo Bonzini
2021-06-17 15:53 ` [PATCH v2 11/11] machine: add smp compound property Paolo Bonzini
2021-06-17 16:21 ` [PATCH v2 00/11] vl: compound properties for machines no-reply

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=20210617155308.928754-1-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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.