[PULL 040/113] m68k: do not use ram_size global

2020-12-02 Thread Paolo Bonzini
Use the machine properties instead. Cc: Laurent Vivier Reviewed-by: Thomas Huth Signed-off-by: Paolo Bonzini --- hw/m68k/mcf5206.c | 4 +++- hw/m68k/mcf5208.c | 3 ++- target/m68k/m68k-semi.c | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/m68k/mcf5206.

[PULL 041/113] microblaze: do not use ram_size global

2020-12-02 Thread Paolo Bonzini
Use the equivalent argument to the function instead. Signed-off-by: Paolo Bonzini --- hw/microblaze/boot.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/microblaze/boot.c b/hw/microblaze/boot.c index 8ad3c27f2c..e1f56f83f9 100644 --- a/hw/microblaze/boot.c +++ b/

[PULL 072/113] vl: move -global check earlier

2020-12-02 Thread Paolo Bonzini
The check has the same effect here, it only matters that it is performed once all devices, both builtin and user-specified, have been created. Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/softmmu/v

[PULL 044/113] nios2: do not use ram_size global

2020-12-02 Thread Paolo Bonzini
Use the equivalent argument to the function instead. Signed-off-by: Paolo Bonzini --- hw/nios2/boot.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/nios2/boot.c b/hw/nios2/boot.c index 1df3b66c29..3cb864914b 100644 --- a/hw/nios2/boot.c +++ b/hw/nios2/boot.c @@ -

[PULL 033/113] sparc: remove bios_name

2020-12-02 Thread Paolo Bonzini
Cc: Mark Cave-Ayland Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20201026143028.3034018-15-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- hw/sparc/leon3.c | 4 +--- hw/sparc/sun4m.c | 2 +- hw/sparc64/sun4u.c | 2 +- 3 file

[PULL 066/113] vl: separate qemu_create_early_backends

2020-12-02 Thread Paolo Bonzini
"Early" backends are created before the machine and can be used as machine options. Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 123 +++ 1 file changed, 65 insertions(+), 58 deletions(-) diff --git a/softmmu/vl.c b/

[PULL 047/113] s390x: do not use ram_size global

2020-12-02 Thread Paolo Bonzini
Use the machine properties instead. Cc: Cornelia Huck Signed-off-by: Paolo Bonzini --- hw/s390x/ipl.c | 10 ++ hw/s390x/s390-skeys.c | 6 -- hw/s390x/s390-virtio-ccw.c | 4 +++- target/s390x/excp_helper.c | 3 ++- target/s390x/mem_helper.c | 10 +++--- targe

[PULL 053/113] vl: remove bogus check

2020-12-02 Thread Paolo Bonzini
There is no reason to prevent -preconfig -daemonize. Of course if no monitor is defined there will be no way to start the VM, but that is a user error. Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index 69d54b

[PULL 055/113] vl: move various initialization routines out of qemu_init

2020-12-02 Thread Paolo Bonzini
Some very simple initialization routines can be nested in existing subsystem-level functions, do that to simplify qemu_init. Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 3 +++ include/hw/qdev-core.h | 8 migration/migration.c | 4 softmmu/

[PULL 077/113] vl: extract machine done notifiers

2020-12-02 Thread Paolo Bonzini
Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 24 include/sysemu/sysemu.h | 1 + softmmu/vl.c| 24 3 files changed, 25 insertions(+), 24 deletions(-) diff --git a/hw/core/machine.c b/hw/core/m

[PULL 052/113] vl: extract validation of -smp to machine.c

2020-12-02 Thread Paolo Bonzini
Once smp_parse is done, the validation operates on the MachineState. There is no reason for that code to be in vl.c. Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 23 +++ include/hw/boards.h | 1 + softmmu/vl.c

[PULL 042/113] mips: do not use ram_size global

2020-12-02 Thread Paolo Bonzini
Use the machine properties or loader parameters instead. Cc: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- hw/mips/fuloong2e.c | 4 ++-- hw/mips/malta.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c index 25b679011

[PULL 080/113] vl: clean up -boot variables

2020-12-02 Thread Paolo Bonzini
Move more of them into MachineState, in preparation for moving initialization of the machine out of vl.c. Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- include/hw/boards.h | 1 + softmmu/vl.c| 12 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a

[PULL 039/113] i386: do not use ram_size global

2020-12-02 Thread Paolo Bonzini
Use the loader parameters instead. Signed-off-by: Paolo Bonzini --- hw/i386/fw_cfg.c | 2 +- hw/i386/vmport.c | 3 ++- hw/i386/xen/xen-hvm.c | 2 +- hw/intc/apic_common.c | 3 ++- hw/smbios/smbios.c| 8 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/hw/i38

[PULL 049/113] make ram_size local to vl.c

2020-12-02 Thread Paolo Bonzini
Use the machine properties for the leftovers too. Signed-off-by: Paolo Bonzini --- hw/core/generic-loader.c | 3 ++- hw/core/numa.c | 10 +- hw/virtio/virtio-balloon.c | 3 ++- include/exec/cpu-common.h | 2 -- monitor/qmp-cmds.c | 3 ++- softmmu/vl.c

[PULL 059/113] vl: preconfig and loadvm are mutually exclusive

2020-12-02 Thread Paolo Bonzini
Just like -incoming. Later we will add support for "-incoming defer -preconfig", because there are cases (Xen, block layer) that want to look at RUNSTATE_INMIGRATE. -loadvm will remain mutually exclusive with preconfig; the plan is to just do loadvm in the monitor, since the user is already going

[PULL 058/113] vl: extract various command line validation snippets to a new function

2020-12-02 Thread Paolo Bonzini
Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 1 + softmmu/vl.c | 78 +++ 2 files changed, 40 insertions(+), 39 deletions(-) diff --git a/hw/core/machine.c b/hw/core/machine.c index 5260155962..7ef3de5ce5 100644

[PULL 078/113] vl: extract softmmu/rtc.c

2020-12-02 Thread Paolo Bonzini
Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- include/sysemu/sysemu.h | 2 + softmmu/meson.build | 1 + softmmu/rtc.c | 190 softmmu/vl.c| 156 - 4 files changed, 193 insertions(+

[PULL 046/113] riscv: do not use ram_size global

2020-12-02 Thread Paolo Bonzini
Use the machine properties instead. Cc: Alistair Francis Signed-off-by: Paolo Bonzini --- hw/riscv/boot.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/riscv/boot.c b/hw/riscv/boot.c index 9b3fe3fb1e..70a9bf8f5d 100644 --- a/hw/riscv/boot.c +++ b/hw/riscv/boot.c @@

[PULL 054/113] vl: split various early command line options to a separate function

2020-12-02 Thread Paolo Bonzini
Various options affect the global state of QEMU including the rest of qemu_init, and they need to be called very early. Group them together in a function that is called at the beginning. Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 200

[PULL 045/113] ppc: do not use ram_size global

2020-12-02 Thread Paolo Bonzini
Use the machine properties instead. Cc: qemu-...@nongnu.org Signed-off-by: Paolo Bonzini --- hw/ppc/prep.c | 2 +- hw/ppc/spapr_vio.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index c6b9d1ddcb..7e72f6e4a9 100644 --- a/hw/ppc/prep.

[PULL 074/113] vl: start VM via qmp_cont

2020-12-02 Thread Paolo Bonzini
Complement the previous patch by starting the VM with a QMP command. The plan is that the user will be able to do the same, invoking two commands "finish-machine-init" and "cont" instead of "x-exit-preconfig". Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 3 ++- 1 f

[PULL 051/113] treewide: do not use short-form boolean options

2020-12-02 Thread Paolo Bonzini
They are going to be deprecated, avoid warnings on stdout while the tests run. Signed-off-by: Paolo Bonzini --- docs/specs/tpm.rst | 2 +- python/qemu/machine.py | 2 +- qemu-options.hx | 32 ++-- tests/qtest/bios-tab

[PULL 061/113] qemu-option: restrict qemu_opts_set to merge-lists QemuOpts

2020-12-02 Thread Paolo Bonzini
qemu_opts_set is used to create default network backends and to parse sugar options -kernel, -initrd, -append, -bios and -dtb. These are very different uses: I would *expect* a function named qemu_opts_set to set an option in a merge-lists QemuOptsList, such as -kernel, and possibly to set an opti

[PULL 060/113] vl: extract various command line desugaring snippets to a new function

2020-12-02 Thread Paolo Bonzini
Keep the machine initialization sequence free of miscellaneous command line parsing actions. The only difference is that preallocation will always be done with one thread if -smp is not provided; previously it was using mc->default_cpus, which is almost always 1 anyway. Reviewed-by: Igor Mammedov

[PULL 050/113] hw/char/serial: Clean up unnecessary code

2020-12-02 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Since commit 5ec3a23e6c8 ("serial: convert PIO to new memory api read/write") we don't need to worry about accesses bigger than 8-bit. Use the extract()/deposit() functions to access the correct part of the 16-bit 'divider' register. Reported-by: Jonathan D. Belanger

[PULL 084/113] kernel-doc: add support for ____cacheline_aligned_in_smp attribute

2020-12-02 Thread Paolo Bonzini
From: André Almeida Subroutine dump_struct uses type attributes to check if the struct syntax is valid. Then, it removes all attributes before using it for output. `cacheline_aligned_in_smp` is an attribute that is not included in both steps. Add it, since it is used by kernel structs. Signe

[PULL 067/113] vl: separate qemu_create_late_backends

2020-12-02 Thread Paolo Bonzini
"Late" backends are created after the machine. Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 64 ++-- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index aafcbec356..d9fe9f

[PULL 064/113] vl: extract default devices to separate functions

2020-12-02 Thread Paolo Bonzini
Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 216 +++ 1 file changed, 114 insertions(+), 102 deletions(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index cb4b870f09..1a80a9a68d 100644 --- a/softmmu/vl.c +++ b/softmmu/v

[PULL 089/113] Replace HTTP links with HTTPS ones: documentation

2020-12-02 Thread Paolo Bonzini
From: "Alexander A. Klimov" Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`

[PULL 071/113] vl: initialize displays before preconfig loop

2020-12-02 Thread Paolo Bonzini
Displays should be available before the monitor starts, so that it is possible to use the graphical console to interact with the monitor itself. This patch is quite ugly, but all this is temporary. The double call to qemu_init_displays will go away as soon we can unify machine initialization betw

[PULL 063/113] vl: load plugins as late as possible

2020-12-02 Thread Paolo Bonzini
There is no need to load plugins in the middle of default device processing, move -plugin handling just before preconfig is entered. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 12 ++-- 1 file changed, 6 insertions(+),

[PULL 096/113] Revert "scripts/kerneldoc: For Sphinx 3 use c:macro for macros with arguments"

2020-12-02 Thread Paolo Bonzini
This reverts commit 92bb29f9b2c3d4a98eef5f0db935d4be291eec72. We will replace the commit with the fix from Linux. Signed-off-by: Paolo Bonzini Message-Id: <20201117165312.118257-15-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- scripts/kernel-doc | 18 +- 1 file changed,

[PULL 057/113] vl: move prelaunch part of qemu_init to new functions

2020-12-02 Thread Paolo Bonzini
The final part of qemu_init, starting with the completion of board init, is already relatively clean. Split it out of qemu_init so that qemu_init keeps only the messy parts. Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 249 +++--

[PULL 068/113] vl: separate qemu_create_machine

2020-12-02 Thread Paolo Bonzini
Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 113 +++ 1 file changed, 60 insertions(+), 53 deletions(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index d9fe9f63c0..5af52454ee 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.

[PULL 065/113] vl: move CHECKPOINT_INIT after preconfig

2020-12-02 Thread Paolo Bonzini
Move CHECKPOINT_INIT right before the machine initialization is completed. Everything before is essentially an extension of command line parsing. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 5 + softmmu/vl.c | 5

[PULL 069/113] vl: separate qemu_apply_machine_options

2020-12-02 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 81 +--- 1 file changed, 45 insertions(+), 36 deletions(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index 5af52454ee..acf09b2040 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -2704,6 +2704,49 @@ sta

[PULL 082/113] docs: temporarily disable the kernel-doc extension

2020-12-02 Thread Paolo Bonzini
Preserve bisectability while we update scripts/kernel-doc from Linux. Without this patch, building with Sphinx 3 would break while we revert our own Sphinx 3 support and replace it with Linux's. Suggested-by: Peter Maydell Signed-off-by: Paolo Bonzini --- docs/sphinx/kerneldoc.py | 3 +++ 1 fil

[PULL 097/113] Revert "kernel-doc: Use c:struct for Sphinx 3.0 and later"

2020-12-02 Thread Paolo Bonzini
This reverts commit 152d1967f650f67b7ece3a5dda77d48069d72647. We will replace the commit with the fix from Linux. Signed-off-by: Paolo Bonzini Message-Id: <20201117165312.118257-16-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- docs/sphinx/kerneldoc.py | 1 - scripts/kernel-doc |

[PULL 073/113] migration, vl: start migration via qmp_migrate_incoming

2020-12-02 Thread Paolo Bonzini
Make qemu_start_incoming_migration local to migration/migration.c. By using the runstate instead of a separate flag, vl need not do anything to setup deferred incoming migration. qmp_migrate_incoming also does not need the deferred_incoming flag anymore, because "-incoming PROTOCOL" will clear the

[PULL 102/113] scripts: kernel-doc: fix typedef identification

2020-12-02 Thread Paolo Bonzini
From: Mauro Carvalho Chehab Some typedef expressions are output as normal functions. As we need to be clearer about the type with Sphinx 3.x, detect such cases. While here, fix a wrongly-indented block. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini Message-Id: <2020111716

[PULL 076/113] vl: extract softmmu/datadir.c

2020-12-02 Thread Paolo Bonzini
Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- hw/alpha/dp264.c| 1 + hw/arm/boot.c | 1 + hw/arm/digic_boards.c | 1 + hw/arm/highbank.c | 1 + hw/arm/npcm7xx_boards.c | 1 + hw/arm/sbsa-ref.c | 1 + hw/arm/vexpress.c | 1 + hw/ar

[PULL 079/113] vl: remove serial_max_hds

2020-12-02 Thread Paolo Bonzini
serial_hd(i) is NULL if and only if i >= serial_max_hds(). Test serial_hd(i) instead of bounding the loop at serial_max_hds(), thus removing one more function that vl.c is expected to export. Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- hw/ppc/spapr.c | 6 ++ includ

[PULL 090/113] scripts/kernel-doc: parse __ETHTOOL_DECLARE_LINK_MODE_MASK

2020-12-02 Thread Paolo Bonzini
From: Mauro Carvalho Chehab The __ETHTOOL_DECLARE_LINK_MODE_MASK macro is a variant of DECLARE_BITMAP(), used by phylink.h. As we have already a parser for DECLARE_BITMAP(), let's add one for this macro, in order to avoid such warnings: ./include/linux/phylink.h:54: warning: Function par

[PULL 104/113] scripts: kernel-doc: allow passing desired Sphinx C domain dialect

2020-12-02 Thread Paolo Bonzini
From: Mauro Carvalho Chehab When kernel-doc is called via kerneldoc.py, there's no need to auto-detect the Sphinx version, as the Sphinx module already knows it. So, add an optional parameter to allow changing the Sphinx dialect. As kernel-doc can also be manually called, keep the auto-detection

[PULL 075/113] hmp: introduce cmd_available

2020-12-02 Thread Paolo Bonzini
Combine the RUN_STATE_PRECONFIG and cmd_can_preconfig checks into a single function, to avoid repeating the same expression (or its negation after applying DeMorgan's rule) over and over again. Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- monitor/hmp.c | 18 ++ 1

[PULL 092/113] scripts/kernel-doc: optionally treat warnings as errors

2020-12-02 Thread Paolo Bonzini
From: Pierre-Louis Bossart The kbuild bot recently added the W=1 option, which triggered documentation cleanups to squelch hundreds of kernel-doc warnings. To make sure new kernel contributions don't add regressions to kernel-doc descriptors, this patch suggests an option to treat warnings as er

[PULL 086/113] scripts: kernel-doc: proper handle @foo->bar()

2020-12-02 Thread Paolo Bonzini
From: Mauro Carvalho Chehab The pattern @foo->bar() is valid, as it can be used by a function pointer inside a struct passed as a parameter. Right now, it causes a warning: ./drivers/firewire/core-transaction.c:606: WARNING: Inline strong start-string without end-string. In this speci

[PULL 083/113] kernel-doc: fix processing nested structs with attributes

2020-12-02 Thread Paolo Bonzini
From: André Almeida The current regular expression for strip attributes of structs (and for nested ones as well) also removes all whitespaces that may surround the attribute. After that, the code will split structs and iterate for each symbol separated by comma at the end of struct definition (e.

[PULL 105/113] scripts: kernel-doc: fix line number handling

2020-12-02 Thread Paolo Bonzini
From: Mauro Carvalho Chehab Address several issues related to pointing to the wrong line number: 1) ensure that line numbers will always be initialized When section is the default (Description), the line number is not initializing, producing this: $ ./scripts/kernel-doc --enable-

[PULL 095/113] scripts: kernel-doc: add support for typedef enum

2020-12-02 Thread Paolo Bonzini
From: Mauro Carvalho Chehab The PHY kernel-doc markup has gained support for documenting a typedef enum. However, right now the parser was not prepared for it. So, add support for parsing it. Fixes: 4069a572d423 ("net: phy: Document core PHY structures") Signed-off-by: Mauro Carvalho Chehab S

[PULL 081/113] config-file: move -set implementation to vl.c

2020-12-02 Thread Paolo Bonzini
We want to make it independent of QemuOpts. Signed-off-by: Paolo Bonzini Signed-off-by: Paolo Bonzini --- include/qemu/config-file.h | 1 - softmmu/vl.c | 33 + util/qemu-config.c | 33 - 3 files changed, 33

[PULL 113/113] scripts: kernel-doc: remove unnecesssary change wrt Linux

2020-12-02 Thread Paolo Bonzini
A comment in kernel-doc mentions QEMU's qatomic_set macro, but since this code originated in Linux we should just revert it and stay as close to the kernel's copy of the script as possible. The change was introduced (more or less unintentionally) in QEMU commit commit d73415a31547, which did a glo

[PULL 093/113] kernel-doc: include line numbers for function prototypes

2020-12-02 Thread Paolo Bonzini
From: Mauro Carvalho Chehab This should solve bad error reports like this one: ./include/linux/iio/iio.h:0: WARNING: Unknown target name: "devm". Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/56eed0ba50cd726236acd12b11b55ce54854c5ea.1599660067.git.mchehab+hua...

[PULL 088/113] scripts: kernel-doc: accept blank lines on parameter description

2020-12-02 Thread Paolo Bonzini
From: Mauro Carvalho Chehab Sphinx is very pedantic with respect to blank lines. Sometimes, in order to make it to properly handle something, we need to add a blank line. However, currently, any blank line inside a kernel-doc comment like: /* * @foo: bar * *

[PULL 085/113] scripts/kernel-doc: Add support for named variable macro arguments

2020-12-02 Thread Paolo Bonzini
From: Jonathan Neuschäfer Currently, when kernel-doc encounters a macro with a named variable argument[1], such as this: #define hlist_for_each_entry_rcu(pos, head, member, cond...) ... it expects the variable argument to be documented as `cond...`, rather than `cond`. This is semantically w

[PATCH 02/15] vl: remove separate preconfig main_loop

2020-12-02 Thread Paolo Bonzini
Move post-preconfig initialization to the x-exit-preconfig. If preconfig is not requested, just exit preconfig mode immediately with the QMP command. As a result, the preconfig loop will run with accel_setup_post and os_setup_post restrictions (xen_restrict, chroot, etc.) already done. Signed-of

[PULL 094/113] kernel-doc: add support for ____cacheline_aligned attribute

2020-12-02 Thread Paolo Bonzini
From: Jonathan Cameron Subroutine dump_struct uses type attributes to check if the struct syntax is valid. Then, it removes all attributes before using it for output. `cacheline_aligned` is an attribute that is not included in both steps. Add it, since it is used by kernel structs. Based on

[PULL 087/113] scripts: kernel-doc: accept negation like !@var

2020-12-02 Thread Paolo Bonzini
From: Mauro Carvalho Chehab On a few places, it sometimes need to indicate a negation of a parameter, like: !@fshared This pattern happens, for example, at: kernel/futex.c and it is perfectly valid. However, kernel-doc currently transforms it into: !**fshared** This

[PULL 099/113] scripts: kernel-doc: use a less pedantic markup for funcs on Sphinx 3.x

2020-12-02 Thread Paolo Bonzini
From: Mauro Carvalho Chehab Unfortunately, Sphinx 3.x parser for c functions is too pedantic: https://github.com/sphinx-doc/sphinx/issues/8241 While it could be relaxed with some configurations, there are several corner cases that it would make it hard to maintain, and will require teac

[PULL 101/113] scripts: kernel-doc: reimplement -nofunction argument

2020-12-02 Thread Paolo Bonzini
From: Mauro Carvalho Chehab Right now, the build system doesn't use -nofunction, as it is pretty much useless, because it doesn't consider the other output modes (extern, internal), working only with all. Also, it is limited to exclude functions. Re-implement it in order to allow excluding any

[PATCH 10/15] vl: make qemu_get_machine_opts static

2020-12-02 Thread Paolo Bonzini
Machine options can be retrieved as properties of the machine object. Encourage that by removing the "easy" accessor to machine options. Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 11 --- hw/arm/boot.c | 2 +- hw/microblaze/boot.c| 9 - hw/nios2/bo

[PULL 106/113] scripts: kernel-doc: try to use c:function if possible

2020-12-02 Thread Paolo Bonzini
From: Mauro Carvalho Chehab There are a few namespace clashes by using c:macro everywhere: basically, when using it, we can't have something like: .. c:struct:: pwm_capture .. c:macro:: pwm_capture So, we need to use, instead: .. c:function:: int pwm_capture (struct p

[PULL 091/113] scripts/kernel-doc: handle function pointer prototypes

2020-12-02 Thread Paolo Bonzini
From: Mauro Carvalho Chehab There are some function pointer prototypes inside the net includes, like this one: int (*pcs_config)(struct phylink_config *config, unsigned int mode, phy_interface_t interface, const unsigned long *advertising); There's nothing wro

[PATCH 05/15] vl: extract softmmu/globals.c

2020-12-02 Thread Paolo Bonzini
Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 2 ++ include/exec/cpu-common.h | 3 ++ include/exec/exec-all.h | 3 -- softmmu/globals.c | 74 +++ softmmu/meson.build | 1 + softmmu/vl.c

[PULL 109/113] scripts: kernel-doc: fix typedef parsing

2020-12-02 Thread Paolo Bonzini
From: Mauro Carvalho Chehab The include/linux/genalloc.h file defined this typedef: typedef unsigned long (*genpool_algo_t)(unsigned long *map,unsigned long size,unsigned long start,unsigned int nr,void *data, struct gen_pool *pool, unsigned long start_addr); Because it has a type com

[PULL 100/113] scripts: kernel-doc: fix troubles with line counts

2020-12-02 Thread Paolo Bonzini
From: Mauro Carvalho Chehab There's currently a bug with the way kernel-doc script counts line numbers that can be seen with: $ ./scripts/kernel-doc -rst -enable-lineno include/linux/math64.h >all && ./scripts/kernel-doc -rst -internal -enable-lineno include/linux/math64.h >int && dif

[PULL 098/113] scripts: kernel-doc: make it more compatible with Sphinx 3.x

2020-12-02 Thread Paolo Bonzini
From: Mauro Carvalho Chehab With Sphinx 3.x, the ".. c:type:" tag was changed to accept either: .. c:type:: typedef-like declaration .. c:type:: name Using it for other types (including functions) don't work anymore. So, there are newer tags for macro, enum, struct, union, and

[PULL 108/113] Revert "kernel-doc: Handle function typedefs that return pointers"

2020-12-02 Thread Paolo Bonzini
This reverts commit 19ab6044be0c55d529e875e3ee16fdd5c3b54d33. We will replace the commit with the fix from Linux. Signed-off-by: Paolo Bonzini Message-Id: <20201117165312.118257-27-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- scripts/kernel-doc | 4 ++-- 1 file changed, 2 insertions(+)

[PULL 111/113] scripts: kernel-doc: use :c:union when needed

2020-12-02 Thread Paolo Bonzini
From: Mauro Carvalho Chehab Sphinx C domain code after 3.2.1 will start complaning if :c:struct would be used for an union type: .../Documentation/gpu/drm-kms-helpers:352: ../drivers/video/hdmi.c:851: WARNING: C 'identifier' cross-reference uses wrong tag: reference name is 'union hdmi

[PULL 112/113] Revert "docs: temporarily disable the kernel-doc extension"

2020-12-02 Thread Paolo Bonzini
This reverts commit fd68a72875cf318f4310726f842139119c5f45d5. We're done with the update of kernel-doc and we can restore kernel-doc's functionality. Signed-off-by: Paolo Bonzini Signed-off-by: Paolo Bonzini --- docs/sphinx/kerneldoc.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/do

[PULL 107/113] Revert "kernel-doc: Handle function typedefs without asterisks"

2020-12-02 Thread Paolo Bonzini
This reverts commit 3cd3c5193cde5242e243c25759f85802e267994f. We will replace the commit with the fix from Linux. Signed-off-by: Paolo Bonzini Message-Id: <20201117165312.118257-26-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- scripts/kernel-doc | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 14/15] null-machine: do not create a default memdev

2020-12-02 Thread Paolo Bonzini
The default RAM size is 0, so no RAM will be created anyway. Signed-off-by: Paolo Bonzini --- hw/core/null-machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/null-machine.c b/hw/core/null-machine.c index 7e693523d7..c40badf5bc 100644 --- a/hw/core/null-machine.

[PULL 103/113] scripts: kernel-doc: don't mangle with parameter list

2020-12-02 Thread Paolo Bonzini
From: Mauro Carvalho Chehab While kernel-doc needs to parse parameters in order to identify its name, it shouldn't be touching the type, as parsing it is very difficult, and errors happen. One current error is when parsing this parameter: const u32 (*tab)[256] Found at ./lib/crc32.c, o

[PULL 110/113] scripts: kernel-doc: split typedef complex regex

2020-12-02 Thread Paolo Bonzini
From: Mauro Carvalho Chehab The typedef regex for function prototypes are very complex. Split them into 3 separate regex and then join them using qr. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/3a4af999a0d62d4ab9dfae1cdefdfcad93383356.1603792384.git.mchehab+hua...@kern

[PATCH 13/15] memory: allow creating MemoryRegions before accelerators

2020-12-02 Thread Paolo Bonzini
Compute the DIRTY_MEMORY_CODE bit in memory_region_get_dirty_log_mask instead of memory_region_init_*. This makes it possible to allocate memory backend objects at any time. Signed-off-by: Paolo Bonzini --- softmmu/memory.c | 12 ++-- softmmu/vl.c | 6 +- 2 files changed, 7 ins

RE: [PATCH 1/2] i386/cpu: Add the Intel PT capabilities checking before extend the CPUID level

2020-12-02 Thread Kang, Luwei
> -Original Message- > From: Eduardo Habkost > Sent: Wednesday, December 2, 2020 5:12 AM > To: Kang, Luwei > Cc: pbonz...@redhat.com; r...@twiddle.net; qemu-devel@nongnu.org > Subject: Re: [PATCH 1/2] i386/cpu: Add the Intel PT capabilities checking > before > extend the CPUID level > >

[PATCH 00/15] Finish cleaning up qemu_init

2020-12-02 Thread Paolo Bonzini
These are the patches that needed another review, had some conflicts, or were not quite ready for the previous posting. Highlights include: - fixing the HMP prompt for -preconfig - enabling the qtest server with -object instead of -qtest - decoupling target machine code from QemuOpts Based-on:

[PATCH 01/15] remove preconfig state

2020-12-02 Thread Paolo Bonzini
The preconfig state is only used if -incoming is not specified, which makes the RunState state machine more tricky than it need be. However there is already an equivalent condition which works even with -incoming, namely qdev_hotplug. Use it instead of a separate runstate. Signed-off-by: Paolo B

[PATCH 15/15] monitor: allow quitting while in preconfig state

2020-12-02 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hmp-commands.hx | 1 + qapi/control.json | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index ff2d7aa8f3..d192afa652 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -45,6 +45,7 @@ ERST .par

[PATCH 03/15] vl: allow -incoming defer with -preconfig

2020-12-02 Thread Paolo Bonzini
Now that there is no RUN_STATE_PRECONFIG anymore that can conflict with RUN_STATE_INMIGRATE, we can allow -incoming defer with -preconfig. Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/softmmu/vl

[PATCH 00/28] qemu-option, keyval, vl: switch -object/-M/-accel to keyval parsing

2020-12-02 Thread Paolo Bonzini
This series switches -object, -M and -accel from QemuOpts to keyval. Monitor commands device_add and netdev_add are also switched to keyval, though -device and -netdev for now are not. Along the way, the syntax of keyval and QemuOpts becomes more consistent and support for keyval-based options is

[PATCH 07/15] chardev: do not use machine_init_done

2020-12-02 Thread Paolo Bonzini
machine_init_done is not the right flag to check when preconfig is taken into account; for example "./qemu-system-x86_64 -serial mon:stdio -preconfig" does not print the QEMU monitor header until after exit_preconfig. Add back a custom bool for mux character devices. This partially undoes commit

[PATCH 06/15] vl: move all generic initialization out of vl.c

2020-12-02 Thread Paolo Bonzini
qdev_machine_creation_done is only setting a flag now. Extend it to move more code out of vl.c. Leave only consistency checks and gdbserver processing in qemu_machine_creation_done. gdbserver_start can be moved after qdev_machine_creation_done because it only does listen on the socket and create

[PATCH 04/15] vl: extract softmmu/runstate.c

2020-12-02 Thread Paolo Bonzini
Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- include/sysemu/sysemu.h | 3 + softmmu/meson.build | 1 + softmmu/runstate.c | 800 softmmu/vl.c| 752 + 4 files changed, 805 insertio

Re: [PATCH v2 32/32] scripts: kernel-doc: remove unnecesssary change wrt Linux

2020-12-02 Thread Philippe Mathieu-Daudé
On 12/1/20 11:35 AM, Paolo Bonzini wrote: > A comment in kernel-doc mentions QEMU's qatomic_set macro, but since > this code originated in Linux we should just revert it and stay as close > to the kernel's copy of the script as possible. > > The change was introduced (more or less unintentionally)

[PATCH 03/28] qemu-option: clean up id vs. list->merge_lists

2020-12-02 Thread Paolo Bonzini
Looking at all merge-lists QemuOptsList, here is how they access their QemuOpts: reopen_opts in qemu-io-cmds.c ("qemu-img reopen -o") qemu_opts_find(&reopen_opts, NULL) empty_opts in qemu-io.c ("qemu-io open -o") qemu_opts_find(&empty_opts, NULL) qemu_rtc_opts ("-rtc") qe

[PATCH 09/15] machine: record whether nvdimm= was set

2020-12-02 Thread Paolo Bonzini
This is needed for SPAPR which has different defaults than everyone else. Right now it looks at the -machine QemuOpts, but those will go away. Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 1 + include/hw/mem/nvdimm.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --g

[PATCH 04/28] qemu-option: move help handling to get_opt_name_value

2020-12-02 Thread Paolo Bonzini
Right now, help options are parsed normally and then checked specially in opt_validate, but only if coming from qemu_opts_parse_noisily. has_help_option does the check on its own. opt_validate() has two callers: qemu_opt_set(), which passes null and is therefore unaffected, and opts_do_parse(), w

[PATCH 02/28] qemu-option: pass QemuOptsList to opts_accepts_any

2020-12-02 Thread Paolo Bonzini
A QemuOptsList can be of one of two kinds: either it is pre-validated, or it accepts any key and validation happens somewhere else (typically in a Visitor or against a list of QOM properties). opts_accepts_any returns true if a QemuOpts instance was created from a QemuOptsList of the latter kind,

[PATCH 12/15] plugin: propagate errors

2020-12-02 Thread Paolo Bonzini
qemu_finish_machine_init currently can only exit QEMU if it fails. Prepare for giving it proper error propagation, and possibly for adding a plugin_add monitor command that calls an accelerator method. While at it, make all errors from plugin_load look the same. Signed-off-by: Paolo Bonzini ---

[PATCH 08/15] machine: introduce MachineInitPhase

2020-12-02 Thread Paolo Bonzini
Generalize the qdev_hotplug variable to the different phases of machine initialization. We would like to allow different monitor commands depending on the phase. Signed-off-by: Paolo Bonzini --- hw/core/machine-qmp-cmds.c | 6 +++--- hw/core/machine.c | 8 +++- hw/core/qdev.c

[PATCH 11/15] qtest: add a QOM object for qtest

2020-12-02 Thread Paolo Bonzini
The qtest server right now can only be created using the -qtest and -qtest-log options. Allow an alternative way to create it using "-object qtest,chardev=...,log=...". Signed-off-by: Paolo Bonzini --- softmmu/qtest.c | 144 softmmu/vl.c| 5

[PATCH 28/28] vl: switch -accel parsing to keyval

2020-12-02 Thread Paolo Bonzini
Switch from QemuOpts to keyval. This enables compound options for accelerators. Signed-off-by: Paolo Bonzini --- accel/accel.c | 6 ++ include/sysemu/accel.h | 1 + softmmu/vl.c | 134 ++--- 3 files changed, 67 insertions(+), 74 deletio

[PATCH 06/28] keyval: accept escaped commas in implied option

2020-12-02 Thread Paolo Bonzini
This is used with the weirdly-named device "SUNFD,fdtwo": $ qemu-system-sparc -device SUNW,,fdtwo,help SUNW,fdtwo options: drive=- Node name or ID of a block device to use as a backend fallback= - FDC drive type, 144/288/120/none/auto (default: "144") ... Therefore,

[PATCH 13/28] remove -writeconfig

2020-12-02 Thread Paolo Bonzini
Like -set and -readconfig, it would not really be too hard to extend -writeconfig to parsing mechanisms other than QemuOpts. However, the uses of -writeconfig are substantially more limited, as it is generally easier to write the configuration by hand in the first place. In addition, -writeconfig

RE: Proposal for a regular upstream performance testing

2020-12-02 Thread Chenqun (kuhn)
> -Original Message- > From: Qemu-devel > [mailto:qemu-devel-bounces+kuhn.chenqun=huawei@nongnu.org] On > Behalf Of Luká? Doktor > Sent: Thursday, November 26, 2020 4:10 PM > To: QEMU Developers > Cc: Charles Shih ; Aleksandar Markovic > ; Stefan Hajnoczi > > Subject: Proposal for a r

[PATCH 07/28] keyval: simplify keyval_parse_one

2020-12-02 Thread Paolo Bonzini
Now that the key is NULL terminated, we can remove some of the contortions that were done to operate on possibly '='-terminated strings in keyval_parse_one. Signed-off-by: Paolo Bonzini --- util/keyval.c | 27 ++- 1 file changed, 10 insertions(+), 17 deletions(-) diff --

[PATCH 19/28] qemu-io: use keyval for -object parsing

2020-12-02 Thread Paolo Bonzini
Enable creation of object with non-scalar properties. Signed-off-by: Paolo Bonzini --- qemu-io.c | 42 +- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git a/qemu-io.c b/qemu-io.c index ac88d8bd40..306086f767 100644 --- a/qemu-io.c +++ b/qemu-i

RE: Proposal for a regular upstream performance testing

2020-12-02 Thread Chenqun (kuhn)
> On Tue, Dec 01, 2020 at 01:06:35PM +0100, Lukáš Doktor wrote: > > Dne 01. 12. 20 v 11:22 Stefan Hajnoczi napsal(a): > > > On Tue, Dec 01, 2020 at 09:05:49AM +0100, Lukáš Doktor wrote: > > > > Dne 30. 11. 20 v 14:25 Stefan Hajnoczi napsal(a): > > > > > On Thu, Nov 26, 2020 at 09:10:14AM +0100, Luk

<    1   2   3   4   5   >