xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [Xen-devel] [RFC v5 000/126] error: auto propagated local_err
@ 2019-10-11 16:03 Vladimir Sementsov-Ogievskiy
  2019-10-11 16:04 ` [Xen-devel] [RFC v5 024/126] " Vladimir Sementsov-Ogievskiy
                   ` (6 more replies)
  0 siblings, 7 replies; 34+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2019-10-11 16:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: Ronnie Sahlberg, Jeff Cody, Jan Kiszka, Eric Blake,
	Alberto Garcia, Hailiang Zhang, qemu-block, Aleksandar Rikalo,
	Halil Pasic, Hervé Poussineau, Anthony Perard,
	Samuel Thibault, Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Stefan Hajnoczi, John Snow,
	Richard Henderson, Kevin Wolf, vsementsov, Andrew Jeffery,
	Chris Wulff, Subbaraya Sundeep, Michael Walle, qemu-ppc,
	Bastian Koppelmann, Igor Mammedov, Fam Zheng, Peter Maydell,
	sheepdog, Matthew Rosato, David Hildenbrand, Palmer Dabbelt,
	Thomas Huth, Max Filippov, Denis V. Lunev, Hannes Reinecke,
	Stefano Stabellini, Gonglei (Arei),
	Marcel Apfelbaum, Liu Yuan, Artyom Tarasenko, Eric Farman,
	Amit Shah, Stefan Weil, Greg Kurz, Yuval Shaia, qemu-s390x,
	qemu-arm, Peter Chubb, Cédric Le Goater, Stafford Horne,
	qemu-riscv, Cornelia Huck, Aleksandar Markovic, Aurelien Jarno,
	Paul Burton, Sagar Karandikar, Paul Durrant, Jason Wang,
	Gerd Hoffmann, Edgar E. Iglesias, Guan Xuetao, Ari Sundholm,
	Juan Quintela, Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Laszlo Ersek, Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Michael S. Tsirkin, Mark Cave-Ayland, Vincenzo Maffione,
	Marek Vasut, armbru, Marc-André Lureau, Alistair Francis,
	Pavel Dovgalyuk, Giuseppe Lettieri, Luigi Rizzo, David Gibson,
	Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

Hi all!

At the request of Markus: full version of errp propagation. Let's look
at it. Cover as much as possible, except inserting macro invocation
where it's not necessary.

It's huge, and so it's an RFC.

In v5 I've added a lot more preparation cleanups:
01-23 are preparation cleanups
  01: not changed, keep Eric's r-b
  02: improve commit msg [Markus], keep Eric's r-b
  03: changed, only error API here, drop r-b
24 is core macro
  - improve cover letter, wording and macro code style
  - keep Eric's r-b
25-26: automation scripts
   - commit-per-subsystem changed a lot. it's a draft, don't bother too
     much with it
   - coccinelle: add support of error_propagate_prepend

27-126: generated patches

====

Here is a proposal of auto propagation for local_err, to not call
error_propagate on every exit point, when we deal with local_err.

There are also two issues with errp:

1. error_fatal & error_append_hint/error_prepend: user can't see this
additional info, because exit() happens in error_setg earlier than info
is added. [Reported by Greg Kurz]

2. error_abort & error_propagate: when we wrap
error_abort by local_err+error_propagate, resulting coredump will
refer to error_propagate and not to the place where error happened.
(the macro itself don't fix the issue, but it allows to [3.] drop all
local_err+error_propagate pattern, which will definitely fix the issue)
[Reported by Kevin Wolf]

====

Generated patches split:

misc
   hw/misc/ivshmem.c
   hw/misc/tmp105.c
   hw/misc/tmp421.c
s390x
   hw/intc/s390_flic_kvm.c
   hw/s390x/3270-ccw.c
   hw/s390x/css-bridge.c
   hw/s390x/css.c
   hw/s390x/s390-skeys.c
   hw/s390x/s390-virtio-ccw.c
   hw/s390x/sclp.c
   hw/s390x/tod-kvm.c
   hw/vfio/ccw.c
   target/s390x/cpu.c
tcg
   exec.c
   hw/arm/armv7m.c
   hw/arm/smmu-common.c
   hw/arm/smmuv3.c
   hw/cpu/a15mpcore.c
   hw/cpu/a9mpcore.c
   hw/cpu/arm11mpcore.c
   hw/i386/pc.c
   hw/intc/nios2_iic.c
   hw/mips/cps.c
   hw/riscv/riscv_hart.c
   hw/riscv/sifive_e.c
   hw/riscv/sifive_u.c
   hw/sd/milkymist-memcard.c
   target/alpha/cpu.c
   target/arm/cpu.c
   target/arm/cpu64.c
   target/cris/cpu.c
   target/hppa/cpu.c
   target/i386/cpu.c
   target/lm32/cpu.c
   target/m68k/cpu.c
   target/microblaze/cpu.c
   target/mips/cpu.c
   target/moxie/cpu.c
   target/nios2/cpu.c
   target/openrisc/cpu.c
   target/ppc/compat.c
   target/ppc/translate_init.inc.c
   target/riscv/cpu.c
   target/sh4/cpu.c
   target/sparc/cpu.c
   target/tricore/cpu.c
   target/unicore32/cpu.c
   target/xtensa/cpu.c
kvm
   target/ppc/kvm.c
   target/s390x/cpu_models.c
xen
   hw/block/dataplane/xen-block.c
   hw/block/xen-block.c
   hw/xen/xen-backend.c
   hw/xen/xen-bus.c
   hw/xen/xen-host-pci-device.c
   hw/xen/xen_pt.c
   hw/xen/xen_pt_config_init.c
Hosts
   qga/commands-win32.c
   util/oslib-posix.c
ARM Machines
   hw/arm/allwinner-a10.c
   hw/arm/aspeed_soc.c
   hw/arm/bcm2835_peripherals.c
   hw/arm/bcm2836.c
   hw/arm/digic.c
   hw/arm/fsl-imx25.c
   hw/arm/fsl-imx31.c
   hw/arm/fsl-imx6.c
   hw/arm/integratorcp.c
   hw/arm/msf2-soc.c
   hw/arm/nrf51_soc.c
   hw/arm/stm32f205_soc.c
   hw/arm/virt.c
   hw/arm/xlnx-versal-virt.c
   hw/arm/xlnx-zynqmp.c
   hw/cpu/realview_mpcore.c
   hw/display/bcm2835_fb.c
   hw/dma/bcm2835_dma.c
   hw/dma/xilinx_axidma.c
   hw/gpio/aspeed_gpio.c
   hw/gpio/bcm2835_gpio.c
   hw/intc/arm_gic.c
   hw/intc/arm_gic_kvm.c
   hw/intc/arm_gicv3.c
   hw/intc/arm_gicv3_its_kvm.c
   hw/intc/arm_gicv3_kvm.c
   hw/intc/armv7m_nvic.c
   hw/intc/realview_gic.c
   hw/microblaze/xlnx-zynqmp-pmu.c
   hw/misc/bcm2835_mbox.c
   hw/misc/bcm2835_property.c
   hw/misc/msf2-sysreg.c
   hw/net/xilinx_axienet.c
   hw/nvram/nrf51_nvm.c
   hw/timer/aspeed_timer.c
   hw/watchdog/wdt_aspeed.c
MIPS Machines
   hw/core/loader-fit.c
PowerPC Machines
   hw/intc/pnv_xive.c
   hw/intc/xics.c
   hw/intc/xics_kvm.c
   hw/intc/xics_pnv.c
   hw/intc/xics_spapr.c
   hw/isa/pc87312.c
   hw/misc/macio/macio.c
   hw/ppc/e500.c
   hw/ppc/mac_newworld.c
   hw/ppc/pnv.c
   hw/ppc/pnv_core.c
   hw/ppc/pnv_homer.c
   hw/ppc/pnv_lpc.c
   hw/ppc/pnv_occ.c
   hw/ppc/pnv_psi.c
   hw/ppc/spapr.c
   hw/ppc/spapr_caps.c
   hw/ppc/spapr_cpu_core.c
   hw/ppc/spapr_drc.c
   hw/ppc/spapr_irq.c
   hw/ppc/spapr_pci.c
   hw/ppc/spapr_vio.c
SPARC Machines
   hw/sparc/sun4m.c
   hw/sparc64/sun4u.c
S390 Machines
   hw/s390x/ipl.c
   hw/s390x/s390-pci-bus.c
X86 Machines
   hw/acpi/ich9.c
   hw/char/debugcon.c
   hw/char/serial-pci-multi.c
   hw/char/serial-pci.c
   hw/core/machine.c
   hw/core/numa.c
   hw/intc/apic_common.c
   hw/pci-host/piix.c
IDE
   hw/ide/qdev.c
Floppy
   hw/block/fdc.c
IPack
   hw/ipack/ipack.c
PCI
   hw/pci-bridge/gen_pcie_root_port.c
   hw/pci-bridge/pci_bridge_dev.c
   hw/pci-bridge/pci_expander_bridge.c
   hw/pci-bridge/pcie_pci_bridge.c
   hw/pci-bridge/pcie_root_port.c
   hw/pci/pci.c
   hw/pci/pcie.c
   hw/pci/shpc.c
ACPI/SMBIOS
   hw/acpi/core.c
   hw/acpi/cpu_hotplug.c
   hw/acpi/memory_hotplug.c
   hw/mem/memory-device.c
   hw/mem/pc-dimm.c
   hw/smbios/smbios.c
Network devices
   hw/net/dp8393x.c
   hw/net/ne2000-isa.c
pflash
   hw/block/pflash_cfi01.c
   hw/block/pflash_cfi02.c
SCSI
   hw/scsi/esp-pci.c
   hw/scsi/mptsas.c
   hw/scsi/scsi-bus.c
   hw/scsi/scsi-disk.c
   hw/scsi/scsi-generic.c
   hw/scsi/virtio-scsi.c
SD (Secure Card)
   hw/sd/sdhci-pci.c
   hw/sd/sdhci.c
USB
   hw/usb/bus.c
   hw/usb/ccid-card-emulated.c
   hw/usb/dev-smartcard-reader.c
   hw/usb/dev-storage.c
   hw/usb/hcd-ohci-pci.c
   hw/usb/hcd-ohci.c
   hw/usb/hcd-uhci.c
   hw/usb/hcd-xhci.c
USB (serial adapter)
   hw/usb/dev-serial.c
VFIO
   hw/vfio/common.c
   hw/vfio/pci-quirks.c
   hw/vfio/pci.c
   hw/vfio/platform.c
vfio-ccw
   hw/s390x/s390-ccw.c
vhost
   hw/block/vhost-user-blk.c
   hw/scsi/vhost-scsi.c
   hw/scsi/vhost-user-scsi.c
   hw/virtio/vhost-vsock.c
virtio
   hw/virtio/virtio-balloon.c
   hw/virtio/virtio-bus.c
   hw/virtio/virtio-pci.c
   hw/virtio/virtio-rng-pci.c
   hw/virtio/virtio.c
virtio-9p
   hw/9pfs/9p-local.c
   hw/9pfs/9p.c
virtio-blk
   hw/block/dataplane/virtio-blk.c
   hw/block/virtio-blk.c
virtio-ccw
   hw/s390x/virtio-ccw-crypto.c
   hw/s390x/virtio-ccw-rng.c
   hw/s390x/virtio-ccw.c
virtio-input
   hw/input/virtio-input.c
virtio-serial
   hw/char/virtio-serial-bus.c
virtio-rng
   backends/rng.c
   hw/virtio/virtio-rng.c
megasas
   hw/scsi/megasas.c
NVDIMM
   hw/mem/nvdimm.c
eepro100
   hw/net/eepro100.c
virtio-gpu
   hw/display/virtio-gpu-base.c
   hw/display/virtio-gpu-pci.c
   hw/display/virtio-vga.c
fw_cfg
   hw/nvram/fw_cfg.c
XIVE
   hw/intc/spapr_xive.c
   hw/intc/spapr_xive_kvm.c
   hw/intc/xive.c
Audio
   audio/audio.c
   hw/audio/intel-hda.c
block
   block.c
   block/backup.c
   block/block-backend.c
   block/commit.c
   block/crypto.c
   block/dirty-bitmap.c
   block/io.c
   block/mirror.c
   block/qapi.c
   block/snapshot.c
   block/throttle-groups.c
   block/throttle.c
   block/vxhs.c
   blockdev.c
   blockjob.c
   hw/block/onenand.c
   job.c
scsi
   scsi/pr-manager-helper.c
chardev
   chardev/char-socket.c
   chardev/char.c
   chardev/spice.c
cmdline
   util/qemu-option.c
Dump
   dump/dump.c
   dump/win_dump.c
Memory API
   memory.c
SPICE
   hw/display/qxl.c
Graphics
   ui/input-barrier.c
   ui/input.c
   ui/vnc.c
Main loop
   util/main-loop.c
   vl.c
Human Monitor (HMP)
   monitor/misc.c
net
   net/can/can_host.c
   net/dump.c
   net/filter-buffer.c
   net/filter.c
   net/net.c
   net/netmap.c
   net/tap.c
hostmem
   backends/hostmem-file.c
   backends/hostmem-memfd.c
   backends/hostmem.c
cryptodev
   backends/cryptodev-vhost-user.c
   backends/cryptodev.c
QAPI
   qapi/qapi-visit-core.c
   qapi/qmp-dispatch.c
   qapi/string-input-visitor.c
qga
   qga/commands-posix.c
QOM
   hw/core/qdev-properties-system.c
   hw/core/qdev-properties.c
   hw/core/qdev.c
   qdev-monitor.c
   qom/object.c
   qom/object_interfaces.c
   qom/qom-qobject.c
QMP
   monitor/qmp-cmds.c
SLIRP
   net/slirp.c
Tracing
   trace/qmp.c
TPM
   hw/tpm/tpm_util.c
   tpm.c
Migration
   migration/migration.c
   migration/ram.c
   migration/rdma.c
   migration/savevm.c
   migration/socket.c
Cryptography
   crypto/block-luks.c
   crypto/secret.c
   crypto/tlssession.c
I/O Channels
   io/dns-resolver.c
   io/net-listener.c
Sockets
   util/qemu-sockets.c
colo
   migration/colo.c
Record/replay
   block/blkreplay.c
VMDK
   block/vmdk.c
RBD
   block/rbd.c
Sheepdog
   block/sheepdog.c
VHDX
   block/vhdx-log.c
   block/vhdx.c
VDI
   block/vdi.c
iSCSI
   block/iscsi.c
nbd
   include/block/nbd.h
   block/nbd.c
   nbd/client.c
   nbd/server.c
NFS
   block/nfs.c
SSH
   block/ssh.c
CURL
   block/curl.c
GLUSTER
   block/gluster.c
NVMe Block Driver
   block/nvme.c
Bootdevice
   bootdevice.c
Quorum
   block/quorum.c
blklogwrites
   block/blklogwrites.c
blkverify
   block/blkverify.c
parallels
   block/parallels.c
qed
   block/qed.c
raw
   block/file-posix.c
   block/file-win32.c
   block/raw-format.c
qcow2
   block/qcow2-bitmap.c
   block/qcow2.c
qcow
   block/qcow.c
blkdebug
   block/blkdebug.c
vpc
   block/vpc.c
vvfat
   block/vvfat.c
Replication
   block/replication.c
   replication.c
PVRDMA
   hw/rdma/vmw/pvrdma_main.c
hw/core/bus.c
   hw/core/bus.c
hw/cpu/core.c
   hw/cpu/core.c
hw/sd/ssi-sd.c
   hw/sd/ssi-sd.c
iothread.c
   iothread.c
memory_mapping.c
   memory_mapping.c
target/tilegx/cpu.c
   target/tilegx/cpu.c
tests/test-image-locking.c
   tests/test-image-locking.c
util/qemu-config.c
   util/qemu-config.c


Vladimir Sementsov-Ogievskiy (126):
  hw/core/loader-fit: fix freeing errp in fit_load_fdt
  net/net: Clean up variable shadowing in net_client_init()
  error: rename errp to errp_in where it is IN-argument
  hmp: drop Error pointer indirection in hmp_handle_error
  vnc: drop Error pointer indirection in vnc_client_io_error
  qdev-monitor: well form error hint helpers
  nbd: well form nbd_iter_channel_error errp handler
  ppc: well form kvmppc_hint_smt_possible error hint helper
  9pfs: well form error hint helpers
  hw/core/qdev: cleanup Error ** variables
  block/snapshot: rename Error ** parameter to more common errp
  hw/i386/amd_iommu: rename Error ** parameter to more common errp
  qga: rename Error ** parameter to more common errp
  monitor/qmp-cmds: rename Error ** parameter to more common errp
  hw/s390x: rename Error ** parameter to more common errp
  hw/sd: rename Error ** parameter to more common errp
  hw/tpm: rename Error ** parameter to more common errp
  hw/usb: rename Error ** parameter to more common errp
  include/block/snapshot.h: rename Error ** parameter to more common
    errp
  include/qom/object.h: rename Error ** parameter to more common errp
  qapi/error: add (Error **errp) cleaning APIs
  backends/cryptodev: drop local_err from cryptodev_backend_complete()
  hw/vfio/ap: drop local_err from vfio_ap_realize
  error: auto propagated local_err
  scripts: add coccinelle script to use auto propagated errp
  python: add commit-per-subsystem.py
  misc: introduce ERRP_AUTO_PROPAGATE
  s390x: introduce ERRP_AUTO_PROPAGATE
  tcg: introduce ERRP_AUTO_PROPAGATE
  kvm: introduce ERRP_AUTO_PROPAGATE
  xen: introduce ERRP_AUTO_PROPAGATE
  Hosts: introduce ERRP_AUTO_PROPAGATE
  ARM Machines: introduce ERRP_AUTO_PROPAGATE
  MIPS Machines: introduce ERRP_AUTO_PROPAGATE
  PowerPC Machines: introduce ERRP_AUTO_PROPAGATE
  SPARC Machines: introduce ERRP_AUTO_PROPAGATE
  S390 Machines: introduce ERRP_AUTO_PROPAGATE
  X86 Machines: introduce ERRP_AUTO_PROPAGATE
  IDE: introduce ERRP_AUTO_PROPAGATE
  Floppy: introduce ERRP_AUTO_PROPAGATE
  IPack: introduce ERRP_AUTO_PROPAGATE
  PCI: introduce ERRP_AUTO_PROPAGATE
  ACPI/SMBIOS: introduce ERRP_AUTO_PROPAGATE
  Network devices: introduce ERRP_AUTO_PROPAGATE
  pflash: introduce ERRP_AUTO_PROPAGATE
  SCSI: introduce ERRP_AUTO_PROPAGATE
  SD (Secure Card): introduce ERRP_AUTO_PROPAGATE
  USB: introduce ERRP_AUTO_PROPAGATE
  USB (serial adapter): introduce ERRP_AUTO_PROPAGATE
  VFIO: introduce ERRP_AUTO_PROPAGATE
  vfio-ccw: introduce ERRP_AUTO_PROPAGATE
  vhost: introduce ERRP_AUTO_PROPAGATE
  virtio: introduce ERRP_AUTO_PROPAGATE
  virtio-9p: introduce ERRP_AUTO_PROPAGATE
  virtio-blk: introduce ERRP_AUTO_PROPAGATE
  virtio-ccw: introduce ERRP_AUTO_PROPAGATE
  virtio-input: introduce ERRP_AUTO_PROPAGATE
  virtio-serial: introduce ERRP_AUTO_PROPAGATE
  virtio-rng: introduce ERRP_AUTO_PROPAGATE
  megasas: introduce ERRP_AUTO_PROPAGATE
  NVDIMM: introduce ERRP_AUTO_PROPAGATE
  eepro100: introduce ERRP_AUTO_PROPAGATE
  virtio-gpu: introduce ERRP_AUTO_PROPAGATE
  fw_cfg: introduce ERRP_AUTO_PROPAGATE
  XIVE: introduce ERRP_AUTO_PROPAGATE
  Audio: introduce ERRP_AUTO_PROPAGATE
  block: introduce ERRP_AUTO_PROPAGATE
  scsi: introduce ERRP_AUTO_PROPAGATE
  chardev: introduce ERRP_AUTO_PROPAGATE
  cmdline: introduce ERRP_AUTO_PROPAGATE
  Dump: introduce ERRP_AUTO_PROPAGATE
  Memory API: introduce ERRP_AUTO_PROPAGATE
  SPICE: introduce ERRP_AUTO_PROPAGATE
  Graphics: introduce ERRP_AUTO_PROPAGATE
  Main loop: introduce ERRP_AUTO_PROPAGATE
  Human Monitor (HMP): introduce ERRP_AUTO_PROPAGATE
  net: introduce ERRP_AUTO_PROPAGATE
  hostmem: introduce ERRP_AUTO_PROPAGATE
  cryptodev: introduce ERRP_AUTO_PROPAGATE
  QAPI: introduce ERRP_AUTO_PROPAGATE
  qga: introduce ERRP_AUTO_PROPAGATE
  QOM: introduce ERRP_AUTO_PROPAGATE
  QMP: introduce ERRP_AUTO_PROPAGATE
  SLIRP: introduce ERRP_AUTO_PROPAGATE
  Tracing: introduce ERRP_AUTO_PROPAGATE
  TPM: introduce ERRP_AUTO_PROPAGATE
  Migration: introduce ERRP_AUTO_PROPAGATE
  Cryptography: introduce ERRP_AUTO_PROPAGATE
  I/O Channels: introduce ERRP_AUTO_PROPAGATE
  Sockets: introduce ERRP_AUTO_PROPAGATE
  colo: introduce ERRP_AUTO_PROPAGATE
  Record/replay: introduce ERRP_AUTO_PROPAGATE
  VMDK: introduce ERRP_AUTO_PROPAGATE
  RBD: introduce ERRP_AUTO_PROPAGATE
  Sheepdog: introduce ERRP_AUTO_PROPAGATE
  VHDX: introduce ERRP_AUTO_PROPAGATE
  VDI: introduce ERRP_AUTO_PROPAGATE
  iSCSI: introduce ERRP_AUTO_PROPAGATE
  nbd: introduce ERRP_AUTO_PROPAGATE
  NFS: introduce ERRP_AUTO_PROPAGATE
  SSH: introduce ERRP_AUTO_PROPAGATE
  CURL: introduce ERRP_AUTO_PROPAGATE
  GLUSTER: introduce ERRP_AUTO_PROPAGATE
  NVMe Block Driver: introduce ERRP_AUTO_PROPAGATE
  Bootdevice: introduce ERRP_AUTO_PROPAGATE
  Quorum: introduce ERRP_AUTO_PROPAGATE
  blklogwrites: introduce ERRP_AUTO_PROPAGATE
  blkverify: introduce ERRP_AUTO_PROPAGATE
  parallels: introduce ERRP_AUTO_PROPAGATE
  qed: introduce ERRP_AUTO_PROPAGATE
  raw: introduce ERRP_AUTO_PROPAGATE
  qcow2: introduce ERRP_AUTO_PROPAGATE
  qcow: introduce ERRP_AUTO_PROPAGATE
  blkdebug: introduce ERRP_AUTO_PROPAGATE
  vpc: introduce ERRP_AUTO_PROPAGATE
  vvfat: introduce ERRP_AUTO_PROPAGATE
  Replication: introduce ERRP_AUTO_PROPAGATE
  PVRDMA: introduce ERRP_AUTO_PROPAGATE
  hw/core/bus.c: introduce ERRP_AUTO_PROPAGATE
  hw/cpu/core.c: introduce ERRP_AUTO_PROPAGATE
  hw/sd/ssi-sd.c: introduce ERRP_AUTO_PROPAGATE
  iothread.c: introduce ERRP_AUTO_PROPAGATE
  memory_mapping.c: introduce ERRP_AUTO_PROPAGATE
  target/tilegx/cpu.c: introduce ERRP_AUTO_PROPAGATE
  tests/test-image-locking.c: introduce ERRP_AUTO_PROPAGATE
  util/qemu-config.c: introduce ERRP_AUTO_PROPAGATE


CC: Gerd Hoffmann <kraxel@redhat.com>
CC: "Gonglei (Arei)" <arei.gonglei@huawei.com>
CC: Eduardo Habkost <ehabkost@redhat.com>
CC: Igor Mammedov <imammedo@redhat.com>
CC: Laurent Vivier <lvivier@redhat.com>
CC: Amit Shah <amit@kernel.org>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Max Reitz <mreitz@redhat.com>
CC: John Snow <jsnow@redhat.com>
CC: Ari Sundholm <ari@tuxera.com>
CC: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Stefan Hajnoczi <stefanha@redhat.com>
CC: Fam Zheng <fam@euphon.net>
CC: Stefan Weil <sw@weilnetz.de>
CC: Ronnie Sahlberg <ronniesahlberg@gmail.com>
CC: Peter Lieven <pl@kamp.de>
CC: Eric Blake <eblake@redhat.com>
CC: "Denis V. Lunev" <den@openvz.org>
CC: Markus Armbruster <armbru@redhat.com>
CC: Alberto Garcia <berto@igalia.com>
CC: Jason Dillaman <dillaman@redhat.com>
CC: Wen Congyang <wencongyang2@huawei.com>
CC: Xie Changlong <xiechanglong.d@gmail.com>
CC: Liu Yuan <namei.unix@gmail.com>
CC: "Richard W.M. Jones" <rjones@redhat.com>
CC: Jeff Cody <codyprime@gmail.com>
CC: "Marc-André Lureau" <marcandre.lureau@redhat.com>
CC: "Daniel P. Berrangé" <berrange@redhat.com>
CC: Richard Henderson <rth@twiddle.net>
CC: Greg Kurz <groug@kaod.org>
CC: "Michael S. Tsirkin" <mst@redhat.com>
CC: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
CC: Beniamino Galvani <b.galvani@gmail.com>
CC: Peter Maydell <peter.maydell@linaro.org>
CC: "Cédric Le Goater" <clg@kaod.org>
CC: Andrew Jeffery <andrew@aj.id.au>
CC: Joel Stanley <joel@jms.id.au>
CC: Andrew Baumann <Andrew.Baumann@microsoft.com>
CC: "Philippe Mathieu-Daudé" <philmd@redhat.com>
CC: Antony Pavlov <antonynpavlov@gmail.com>
CC: Jean-Christophe Dubois <jcd@tribudubois.net>
CC: Peter Chubb <peter.chubb@nicta.com.au>
CC: Subbaraya Sundeep <sundeep.lkml@gmail.com>
CC: Eric Auger <eric.auger@redhat.com>
CC: Alistair Francis <alistair@alistair23.me>
CC: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Anthony Perard <anthony.perard@citrix.com>
CC: Paul Durrant <paul@xen.org>
CC: Paul Burton <pburton@wavecomp.com>
CC: Aleksandar Rikalo <arikalo@wavecomp.com>
CC: Chris Wulff <crwulff@gmail.com>
CC: Marek Vasut <marex@denx.de>
CC: David Gibson <david@gibson.dropbear.id.au>
CC: Cornelia Huck <cohuck@redhat.com>
CC: Halil Pasic <pasic@linux.ibm.com>
CC: Christian Borntraeger <borntraeger@de.ibm.com>
CC: "Hervé Poussineau" <hpoussin@reactos.org>
CC: Xiao Guangrong <xiaoguangrong.eric@gmail.com>
CC: Aurelien Jarno <aurelien@aurel32.net>
CC: Aleksandar Markovic <amarkovic@wavecomp.com>
CC: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
CC: Jason Wang <jasowang@redhat.com>
CC: Laszlo Ersek <lersek@redhat.com>
CC: Yuval Shaia <yuval.shaia@oracle.com>
CC: Palmer Dabbelt <palmer@sifive.com>
CC: Sagar Karandikar <sagark@eecs.berkeley.edu>
CC: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
CC: David Hildenbrand <david@redhat.com>
CC: Thomas Huth <thuth@redhat.com>
CC: Eric Farman <farman@linux.ibm.com>
CC: Matthew Rosato <mjrosato@linux.ibm.com>
CC: Hannes Reinecke <hare@suse.com>
CC: Michael Walle <michael@walle.cc>
CC: Artyom Tarasenko <atar4qemu@gmail.com>
CC: Stefan Berger <stefanb@linux.ibm.com>
CC: Samuel Thibault <samuel.thibault@ens-lyon.org>
CC: Alex Williamson <alex.williamson@redhat.com>
CC: Tony Krowiak <akrowiak@linux.ibm.com>
CC: Pierre Morel <pmorel@linux.ibm.com>
CC: Michael Roth <mdroth@linux.vnet.ibm.com>
CC: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
CC: Juan Quintela <quintela@redhat.com>
CC: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
CC: Luigi Rizzo <rizzo@iet.unipi.it>
CC: Giuseppe Lettieri <g.lettieri@iet.unipi.it>
CC: Vincenzo Maffione <v.maffione@gmail.com>
CC: Jan Kiszka <jan.kiszka@siemens.com>
CC: Anthony Green <green@moxielogic.com>
CC: Stafford Horne <shorne@gmail.com>
CC: Guan Xuetao <gxt@mprc.pku.edu.cn>
CC: Max Filippov <jcmvbkbc@gmail.com>
CC: qemu-block@nongnu.org
CC: integration@gluster.org
CC: sheepdog@lists.wpkg.org
CC: qemu-arm@nongnu.org
CC: xen-devel@lists.xenproject.org
CC: qemu-ppc@nongnu.org
CC: qemu-s390x@nongnu.org
CC: qemu-riscv@nongnu.org

 include/block/nbd.h                           |   1 +
 include/block/snapshot.h                      |   2 +-
 include/monitor/hmp.h                         |   2 +-
 include/qapi/error.h                          |  69 ++++-
 include/qom/object.h                          |   4 +-
 target/ppc/kvm_ppc.h                          |   4 +-
 ui/vnc.h                                      |   2 +-
 audio/audio.c                                 |  12 +-
 backends/cryptodev-vhost-user.c               |  10 +-
 backends/cryptodev.c                          |  25 +-
 backends/hostmem-file.c                       |  21 +-
 backends/hostmem-memfd.c                      |  18 +-
 backends/hostmem.c                            |  41 ++-
 backends/rng.c                                |   7 +-
 block.c                                       | 225 +++++++---------
 block/backup.c                                |   1 +
 block/blkdebug.c                              |  36 ++-
 block/blklogwrites.c                          |  22 +-
 block/blkreplay.c                             |   7 +-
 block/blkverify.c                             |  17 +-
 block/block-backend.c                         |  19 +-
 block/commit.c                                |   7 +-
 block/crypto.c                                |  14 +-
 block/curl.c                                  |   7 +-
 block/dirty-bitmap.c                          |   1 +
 block/file-posix.c                            |  79 +++---
 block/file-win32.c                            |  29 +-
 block/gluster.c                               |  69 +++--
 block/io.c                                    |  12 +-
 block/iscsi.c                                 |  36 ++-
 block/mirror.c                                |  19 +-
 block/nbd.c                                   |  59 ++--
 block/nfs.c                                   |   7 +-
 block/nvme.c                                  |  19 +-
 block/parallels.c                             |  30 +--
 block/qapi.c                                  |  26 +-
 block/qcow.c                                  |  17 +-
 block/qcow2-bitmap.c                          |   9 +-
 block/qcow2.c                                 |  98 +++----
 block/qed.c                                   |  18 +-
 block/quorum.c                                |  23 +-
 block/raw-format.c                            |   7 +-
 block/rbd.c                                   |  29 +-
 block/replication.c                           |  40 ++-
 block/sheepdog.c                              |  73 +++--
 block/snapshot.c                              |  20 +-
 block/ssh.c                                   |  12 +-
 block/throttle-groups.c                       |  24 +-
 block/throttle.c                              |   7 +-
 block/vdi.c                                   |  15 +-
 block/vhdx-log.c                              |   1 +
 block/vhdx.c                                  |  22 +-
 block/vmdk.c                                  |  41 ++-
 block/vpc.c                                   |  28 +-
 block/vvfat.c                                 |  12 +-
 block/vxhs.c                                  |  23 +-
 blockdev.c                                    | 252 ++++++++----------
 blockjob.c                                    |   8 +-
 bootdevice.c                                  |  31 +--
 chardev/char-socket.c                         |   7 +-
 chardev/char.c                                |  20 +-
 chardev/spice.c                               |   1 +
 crypto/block-luks.c                           |  56 ++--
 crypto/secret.c                               |  17 +-
 crypto/tlssession.c                           |   7 +-
 dump/dump-hmp-cmds.c                          |   4 +-
 dump/dump.c                                   | 151 +++++------
 dump/win_dump.c                               |  29 +-
 exec.c                                        |  21 +-
 hw/9pfs/9p-local.c                            |  12 +-
 hw/9pfs/9p-proxy.c                            |   5 +-
 hw/9pfs/9p.c                                  |   1 +
 hw/acpi/core.c                                |  18 +-
 hw/acpi/cpu_hotplug.c                         |   2 +-
 hw/acpi/ich9.c                                |  30 +--
 hw/acpi/memory_hotplug.c                      |   7 +-
 hw/arm/allwinner-a10.c                        |  27 +-
 hw/arm/armv7m.c                               |  52 ++--
 hw/arm/aspeed_soc.c                           |   1 +
 hw/arm/bcm2835_peripherals.c                  |  85 +++---
 hw/arm/bcm2836.c                              |  41 ++-
 hw/arm/digic.c                                |  22 +-
 hw/arm/fsl-imx25.c                            |  62 ++---
 hw/arm/fsl-imx31.c                            |  57 ++--
 hw/arm/fsl-imx6.c                             |  81 +++---
 hw/arm/integratorcp.c                         |   7 +-
 hw/arm/msf2-soc.c                             |  22 +-
 hw/arm/nrf51_soc.c                            |  47 ++--
 hw/arm/smmu-common.c                          |   7 +-
 hw/arm/smmuv3.c                               |   7 +-
 hw/arm/stm32f205_soc.c                        |  39 ++-
 hw/arm/virt.c                                 |   2 +
 hw/arm/xlnx-versal-virt.c                     |   7 +-
 hw/arm/xlnx-zynqmp.c                          |  86 +++---
 hw/audio/intel-hda.c                          |  13 +-
 hw/block/dataplane/virtio-blk.c               |   1 +
 hw/block/dataplane/xen-block.c                |  17 +-
 hw/block/fdc.c                                |  19 +-
 hw/block/onenand.c                            |   7 +-
 hw/block/pflash_cfi01.c                       |   7 +-
 hw/block/pflash_cfi02.c                       |   7 +-
 hw/block/vhost-user-blk.c                     |   6 +-
 hw/block/virtio-blk.c                         |   7 +-
 hw/block/xen-block.c                          | 119 ++++-----
 hw/char/debugcon.c                            |   7 +-
 hw/char/serial-pci-multi.c                    |   7 +-
 hw/char/serial-pci.c                          |   7 +-
 hw/char/virtio-serial-bus.c                   |   7 +-
 hw/core/bus.c                                 |  15 +-
 hw/core/loader-fit.c                          |   7 +-
 hw/core/machine-hmp-cmds.c                    |   6 +-
 hw/core/machine.c                             |  21 +-
 hw/core/numa.c                                |  51 ++--
 hw/core/qdev-properties-system.c              |  28 +-
 hw/core/qdev-properties.c                     |  89 +++----
 hw/core/qdev.c                                |  58 ++--
 hw/cpu/a15mpcore.c                            |   7 +-
 hw/cpu/a9mpcore.c                             |  27 +-
 hw/cpu/arm11mpcore.c                          |  22 +-
 hw/cpu/core.c                                 |  14 +-
 hw/cpu/realview_mpcore.c                      |  12 +-
 hw/display/bcm2835_fb.c                       |   6 +-
 hw/display/qxl.c                              |   7 +-
 hw/display/virtio-gpu-base.c                  |   7 +-
 hw/display/virtio-gpu-pci.c                   |   7 +-
 hw/display/virtio-vga.c                       |   7 +-
 hw/dma/bcm2835_dma.c                          |   6 +-
 hw/dma/xilinx_axidma.c                        |  22 +-
 hw/gpio/aspeed_gpio.c                         |   7 +-
 hw/gpio/bcm2835_gpio.c                        |  10 +-
 hw/i386/amd_iommu.c                           |  14 +-
 hw/i386/pc.c                                  | 120 ++++-----
 hw/ide/qdev.c                                 |  16 +-
 hw/input/virtio-input.c                       |  14 +-
 hw/intc/apic_common.c                         |   7 +-
 hw/intc/arm_gic.c                             |   7 +-
 hw/intc/arm_gic_kvm.c                         |  12 +-
 hw/intc/arm_gicv3.c                           |  12 +-
 hw/intc/arm_gicv3_its_kvm.c                   |   7 +-
 hw/intc/arm_gicv3_kvm.c                       |  17 +-
 hw/intc/armv7m_nvic.c                         |  12 +-
 hw/intc/nios2_iic.c                           |   6 +-
 hw/intc/pnv_xive.c                            |  15 +-
 hw/intc/realview_gic.c                        |   7 +-
 hw/intc/s390_flic_kvm.c                       |   9 +-
 hw/intc/spapr_xive.c                          |  12 +-
 hw/intc/spapr_xive_kvm.c                      |  55 ++--
 hw/intc/xics.c                                |  28 +-
 hw/intc/xics_kvm.c                            |  30 +--
 hw/intc/xics_pnv.c                            |   7 +-
 hw/intc/xics_spapr.c                          |   7 +-
 hw/intc/xive.c                                |  27 +-
 hw/ipack/ipack.c                              |   5 +-
 hw/isa/pc87312.c                              |   7 +-
 hw/mem/memory-device.c                        |  20 +-
 hw/mem/nvdimm.c                               |  25 +-
 hw/mem/pc-dimm.c                              |  23 +-
 hw/microblaze/xlnx-zynqmp-pmu.c               |  12 +-
 hw/mips/cps.c                                 |  46 ++--
 hw/misc/bcm2835_mbox.c                        |   6 +-
 hw/misc/bcm2835_property.c                    |  10 +-
 hw/misc/ivshmem.c                             |  37 ++-
 hw/misc/macio/macio.c                         |  68 ++---
 hw/misc/msf2-sysreg.c                         |   1 +
 hw/misc/tmp105.c                              |   7 +-
 hw/misc/tmp421.c                              |   7 +-
 hw/net/dp8393x.c                              |   7 +-
 hw/net/eepro100.c                             |   7 +-
 hw/net/ne2000-isa.c                           |  17 +-
 hw/net/xilinx_axienet.c                       |  22 +-
 hw/nvram/fw_cfg.c                             |  14 +-
 hw/nvram/nrf51_nvm.c                          |   7 +-
 hw/pci-bridge/gen_pcie_root_port.c            |   7 +-
 hw/pci-bridge/pci_bridge_dev.c                |  13 +-
 hw/pci-bridge/pci_expander_bridge.c           |   7 +-
 hw/pci-bridge/pcie_pci_bridge.c               |   8 +-
 hw/pci-bridge/pcie_root_port.c                |   1 +
 hw/pci-host/piix.c                            |   7 +-
 hw/pci/pci.c                                  |  19 +-
 hw/pci/pcie.c                                 |   7 +-
 hw/pci/shpc.c                                 |  14 +-
 hw/ppc/e500.c                                 |   7 +-
 hw/ppc/mac_newworld.c                         |   1 +
 hw/ppc/pnv.c                                  | 109 ++++----
 hw/ppc/pnv_core.c                             |  23 +-
 hw/ppc/pnv_homer.c                            |   5 +-
 hw/ppc/pnv_lpc.c                              |  26 +-
 hw/ppc/pnv_occ.c                              |   5 +-
 hw/ppc/pnv_psi.c                              |  23 +-
 hw/ppc/spapr.c                                | 133 ++++-----
 hw/ppc/spapr_caps.c                           |  57 ++--
 hw/ppc/spapr_cpu_core.c                       |  36 ++-
 hw/ppc/spapr_drc.c                            |  48 ++--
 hw/ppc/spapr_irq.c                            |  98 +++----
 hw/ppc/spapr_pci.c                            |  97 +++----
 hw/ppc/spapr_vio.c                            |  12 +-
 hw/rdma/vmw/pvrdma_main.c                     |   1 +
 hw/riscv/riscv_hart.c                         |   7 +-
 hw/riscv/sifive_e.c                           |   7 +-
 hw/riscv/sifive_u.c                           |  11 +-
 hw/s390x/3270-ccw.c                           |  13 +-
 hw/s390x/css-bridge.c                         |   7 +-
 hw/s390x/css.c                                |   7 +-
 hw/s390x/event-facility.c                     |   2 +-
 hw/s390x/ipl.c                                |  24 +-
 hw/s390x/s390-ccw.c                           |  19 +-
 hw/s390x/s390-pci-bus.c                       |  37 ++-
 hw/s390x/s390-skeys.c                         |   7 +-
 hw/s390x/s390-stattrib.c                      |   3 +-
 hw/s390x/s390-virtio-ccw.c                    |  11 +-
 hw/s390x/sclp.c                               |  15 +-
 hw/s390x/tod-kvm.c                            |  14 +-
 hw/s390x/virtio-ccw-crypto.c                  |   7 +-
 hw/s390x/virtio-ccw-rng.c                     |   7 +-
 hw/s390x/virtio-ccw.c                         |  13 +-
 hw/scsi/esp-pci.c                             |   7 +-
 hw/scsi/megasas.c                             |  11 +-
 hw/scsi/mptsas.c                              |  13 +-
 hw/scsi/scsi-bus.c                            |  24 +-
 hw/scsi/scsi-disk.c                           |   8 +-
 hw/scsi/scsi-generic.c                        |   1 +
 hw/scsi/vhost-scsi.c                          |  12 +-
 hw/scsi/vhost-user-scsi.c                     |   7 +-
 hw/scsi/virtio-scsi.c                         |   7 +-
 hw/sd/milkymist-memcard.c                     |  11 +-
 hw/sd/sdhci-pci.c                             |   7 +-
 hw/sd/sdhci.c                                 |  23 +-
 hw/sd/ssi-sd.c                                |  14 +-
 hw/smbios/smbios.c                            |  42 ++-
 hw/sparc/sun4m.c                              |  21 +-
 hw/sparc64/sun4u.c                            |   7 +-
 hw/timer/aspeed_timer.c                       |   6 +-
 hw/tpm/tpm_emulator.c                         |   8 +-
 hw/tpm/tpm_util.c                             |   7 +-
 hw/usb/bus.c                                  |  37 ++-
 hw/usb/ccid-card-emulated.c                   |   1 +
 hw/usb/dev-network.c                          |   2 +-
 hw/usb/dev-serial.c                           |   7 +-
 hw/usb/dev-smartcard-reader.c                 |  14 +-
 hw/usb/dev-storage.c                          |  17 +-
 hw/usb/hcd-ohci-pci.c                         |   7 +-
 hw/usb/hcd-ohci.c                             |  14 +-
 hw/usb/hcd-uhci.c                             |   7 +-
 hw/usb/hcd-xhci.c                             |  13 +-
 hw/vfio/ap.c                                  |  16 +-
 hw/vfio/ccw.c                                 |  24 +-
 hw/vfio/common.c                              |   3 +
 hw/vfio/pci-quirks.c                          |   8 +-
 hw/vfio/pci.c                                 |  42 ++-
 hw/vfio/platform.c                            |   1 +
 hw/virtio/vhost-vsock.c                       |   1 +
 hw/virtio/virtio-balloon.c                    |  35 ++-
 hw/virtio/virtio-bus.c                        |  17 +-
 hw/virtio/virtio-pci.c                        |   2 +
 hw/virtio/virtio-rng-pci.c                    |   7 +-
 hw/virtio/virtio-rng.c                        |   7 +-
 hw/virtio/virtio.c                            |  19 +-
 hw/watchdog/wdt_aspeed.c                      |   5 +-
 hw/xen/xen-backend.c                          |   7 +-
 hw/xen/xen-bus.c                              |  92 +++----
 hw/xen/xen-host-pci-device.c                  |  27 +-
 hw/xen/xen_pt.c                               |  25 +-
 hw/xen/xen_pt_config_init.c                   |  20 +-
 io/dns-resolver.c                             |   7 +-
 io/net-listener.c                             |   7 +-
 iothread.c                                    |  27 +-
 job.c                                         |   7 +-
 memory.c                                      |  63 ++---
 memory_mapping.c                              |   7 +-
 migration/colo.c                              |  38 ++-
 migration/migration.c                         |  39 ++-
 migration/ram.c                               |  13 +-
 migration/rdma.c                              |  13 +-
 migration/savevm.c                            |   2 +
 migration/socket.c                            |  18 +-
 monitor/hmp-cmds.c                            | 155 ++++++-----
 monitor/misc.c                                |   9 +-
 monitor/qmp-cmds.c                            |   9 +-
 nbd/client.c                                  |   5 +
 nbd/server.c                                  |   5 +
 net/can/can_host.c                            |   7 +-
 net/dump.c                                    |  15 +-
 net/filter-buffer.c                           |  15 +-
 net/filter.c                                  |   7 +-
 net/net.c                                     |  58 ++--
 net/netmap.c                                  |   7 +-
 net/slirp.c                                   |   7 +-
 net/tap.c                                     |  47 ++--
 qapi/qapi-visit-core.c                        |  56 ++--
 qapi/qmp-dispatch.c                           |   7 +-
 qapi/string-input-visitor.c                   |   7 +-
 qdev-monitor.c                                |  69 +++--
 qga/commands-posix.c                          | 222 +++++++--------
 qga/commands-win32.c                          | 141 +++++-----
 qga/commands.c                                |  12 +-
 qom/object.c                                  | 246 ++++++++---------
 qom/object_interfaces.c                       |  27 +-
 qom/qom-hmp-cmds.c                            |   4 +-
 qom/qom-qobject.c                             |   7 +-
 replication.c                                 |  28 +-
 scsi/pr-manager-helper.c                      |   7 +-
 target/alpha/cpu.c                            |   7 +-
 target/arm/cpu.c                              |   7 +-
 target/arm/cpu64.c                            |  11 +-
 target/cris/cpu.c                             |   7 +-
 target/hppa/cpu.c                             |   7 +-
 target/i386/cpu.c                             | 117 ++++----
 target/lm32/cpu.c                             |   7 +-
 target/m68k/cpu.c                             |   7 +-
 target/microblaze/cpu.c                       |   7 +-
 target/mips/cpu.c                             |   7 +-
 target/moxie/cpu.c                            |   7 +-
 target/nios2/cpu.c                            |   7 +-
 target/openrisc/cpu.c                         |   7 +-
 target/ppc/compat.c                           |  20 +-
 target/ppc/kvm.c                              |  14 +-
 target/ppc/translate_init.inc.c               |  26 +-
 target/riscv/cpu.c                            |   7 +-
 target/s390x/cpu.c                            |  26 +-
 target/s390x/cpu_models.c                     |   2 +
 target/sh4/cpu.c                              |   7 +-
 target/sparc/cpu.c                            |  14 +-
 target/tilegx/cpu.c                           |   7 +-
 target/tricore/cpu.c                          |   7 +-
 target/unicore32/cpu.c                        |   7 +-
 target/xtensa/cpu.c                           |   7 +-
 tests/test-image-locking.c                    |   7 +-
 tpm.c                                         |   7 +-
 trace/qmp.c                                   |  14 +-
 ui/input-barrier.c                            |   7 +-
 ui/input.c                                    |  14 +-
 ui/vnc.c                                      |  39 ++-
 util/error.c                                  |  30 +--
 util/main-loop.c                              |   5 +-
 util/oslib-posix.c                            |   6 +-
 util/qemu-config.c                            |  29 +-
 util/qemu-option.c                            |  59 ++--
 util/qemu-sockets.c                           |  31 +--
 vl.c                                          |  14 +-
 python/commit-per-subsystem.py                | 204 ++++++++++++++
 scripts/coccinelle/auto-propagated-errp.cocci | 118 ++++++++
 341 files changed, 3851 insertions(+), 4455 deletions(-)
 create mode 100755 python/commit-per-subsystem.py
 create mode 100644 scripts/coccinelle/auto-propagated-errp.cocci

-- 
2.21.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* [Xen-devel] [RFC v5 024/126] error: auto propagated local_err
  2019-10-11 16:03 [Xen-devel] [RFC v5 000/126] error: auto propagated local_err Vladimir Sementsov-Ogievskiy
@ 2019-10-11 16:04 ` Vladimir Sementsov-Ogievskiy
  2019-11-08 21:10   ` Marc-André Lureau
  2019-12-04 14:59   ` Markus Armbruster
  2019-10-11 16:04 ` [Xen-devel] [RFC v5 025/126] scripts: add coccinelle script to use auto propagated errp Vladimir Sementsov-Ogievskiy
                   ` (5 subsequent siblings)
  6 siblings, 2 replies; 34+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2019-10-11 16:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Ronnie Sahlberg, Jeff Cody, Jan Kiszka, Eric Blake,
	Alberto Garcia, Hailiang Zhang, qemu-block, Aleksandar Rikalo,
	Halil Pasic, Hervé Poussineau, Anthony Perard,
	Samuel Thibault, Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Stefan Hajnoczi, John Snow,
	Richard Henderson, Kevin Wolf, vsementsov, Andrew Jeffery,
	Chris Wulff, Subbaraya Sundeep, Michael Walle, qemu-ppc,
	Bastian Koppelmann, Igor Mammedov, Fam Zheng, Peter Maydell,
	sheepdog, Matthew Rosato, David Hildenbrand, Palmer Dabbelt,
	Thomas Huth, Max Filippov, Denis V. Lunev, Hannes Reinecke,
	Stefano Stabellini, Gonglei (Arei),
	Marcel Apfelbaum, Liu Yuan, Artyom Tarasenko, Eric Farman,
	Amit Shah, Stefan Weil, Greg Kurz, Yuval Shaia, qemu-s390x,
	qemu-arm, Peter Chubb, Cédric Le Goater, Stafford Horne,
	qemu-riscv, Cornelia Huck, Aleksandar Markovic, Aurelien Jarno,
	Paul Burton, Sagar Karandikar, Paul Durrant, Jason Wang,
	Gerd Hoffmann, Edgar E. Iglesias, Guan Xuetao, Ari Sundholm,
	Juan Quintela, Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Laszlo Ersek, Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Michael S. Tsirkin, Mark Cave-Ayland, Vincenzo Maffione,
	Marek Vasut, armbru, Marc-André Lureau, Alistair Francis,
	Pavel Dovgalyuk, Giuseppe Lettieri, Luigi Rizzo, David Gibson,
	Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

Here is introduced ERRP_AUTO_PROPAGATE macro, to be used at start of
functions with errp OUT parameter.

It has three goals:

1. Fix issue with error_fatal & error_prepend/error_append_hint: user
can't see this additional information, because exit() happens in
error_setg earlier than information is added. [Reported by Greg Kurz]

2. Fix issue with error_abort & error_propagate: when we wrap
error_abort by local_err+error_propagate, resulting coredump will
refer to error_propagate and not to the place where error happened.
(the macro itself doesn't fix the issue, but it allows to [3.] drop all
local_err+error_propagate pattern, which will definitely fix the issue)
[Reported by Kevin Wolf]

3. Drop local_err+error_propagate pattern, which is used to workaround
void functions with errp parameter, when caller wants to know resulting
status. (Note: actually these functions could be merely updated to
return int error code).

To achieve these goals, we need to add invocation of the macro at start
of functions, which needs error_prepend/error_append_hint (1.); add
invocation of the macro at start of functions which do
local_err+error_propagate scenario the check errors, drop local errors
from them and just use *errp instead (2., 3.).

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---

CC: Gerd Hoffmann <kraxel@redhat.com>
CC: "Gonglei (Arei)" <arei.gonglei@huawei.com>
CC: Eduardo Habkost <ehabkost@redhat.com>
CC: Igor Mammedov <imammedo@redhat.com>
CC: Laurent Vivier <lvivier@redhat.com>
CC: Amit Shah <amit@kernel.org>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Max Reitz <mreitz@redhat.com>
CC: John Snow <jsnow@redhat.com>
CC: Ari Sundholm <ari@tuxera.com>
CC: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Stefan Hajnoczi <stefanha@redhat.com>
CC: Fam Zheng <fam@euphon.net>
CC: Stefan Weil <sw@weilnetz.de>
CC: Ronnie Sahlberg <ronniesahlberg@gmail.com>
CC: Peter Lieven <pl@kamp.de>
CC: Eric Blake <eblake@redhat.com>
CC: "Denis V. Lunev" <den@openvz.org>
CC: Markus Armbruster <armbru@redhat.com>
CC: Alberto Garcia <berto@igalia.com>
CC: Jason Dillaman <dillaman@redhat.com>
CC: Wen Congyang <wencongyang2@huawei.com>
CC: Xie Changlong <xiechanglong.d@gmail.com>
CC: Liu Yuan <namei.unix@gmail.com>
CC: "Richard W.M. Jones" <rjones@redhat.com>
CC: Jeff Cody <codyprime@gmail.com>
CC: "Marc-André Lureau" <marcandre.lureau@redhat.com>
CC: "Daniel P. Berrangé" <berrange@redhat.com>
CC: Richard Henderson <rth@twiddle.net>
CC: Greg Kurz <groug@kaod.org>
CC: "Michael S. Tsirkin" <mst@redhat.com>
CC: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
CC: Beniamino Galvani <b.galvani@gmail.com>
CC: Peter Maydell <peter.maydell@linaro.org>
CC: "Cédric Le Goater" <clg@kaod.org>
CC: Andrew Jeffery <andrew@aj.id.au>
CC: Joel Stanley <joel@jms.id.au>
CC: Andrew Baumann <Andrew.Baumann@microsoft.com>
CC: "Philippe Mathieu-Daudé" <philmd@redhat.com>
CC: Antony Pavlov <antonynpavlov@gmail.com>
CC: Jean-Christophe Dubois <jcd@tribudubois.net>
CC: Peter Chubb <peter.chubb@nicta.com.au>
CC: Subbaraya Sundeep <sundeep.lkml@gmail.com>
CC: Eric Auger <eric.auger@redhat.com>
CC: Alistair Francis <alistair@alistair23.me>
CC: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Anthony Perard <anthony.perard@citrix.com>
CC: Paul Durrant <paul@xen.org>
CC: Paul Burton <pburton@wavecomp.com>
CC: Aleksandar Rikalo <arikalo@wavecomp.com>
CC: Chris Wulff <crwulff@gmail.com>
CC: Marek Vasut <marex@denx.de>
CC: David Gibson <david@gibson.dropbear.id.au>
CC: Cornelia Huck <cohuck@redhat.com>
CC: Halil Pasic <pasic@linux.ibm.com>
CC: Christian Borntraeger <borntraeger@de.ibm.com>
CC: "Hervé Poussineau" <hpoussin@reactos.org>
CC: Xiao Guangrong <xiaoguangrong.eric@gmail.com>
CC: Aurelien Jarno <aurelien@aurel32.net>
CC: Aleksandar Markovic <amarkovic@wavecomp.com>
CC: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
CC: Jason Wang <jasowang@redhat.com>
CC: Laszlo Ersek <lersek@redhat.com>
CC: Yuval Shaia <yuval.shaia@oracle.com>
CC: Palmer Dabbelt <palmer@sifive.com>
CC: Sagar Karandikar <sagark@eecs.berkeley.edu>
CC: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
CC: David Hildenbrand <david@redhat.com>
CC: Thomas Huth <thuth@redhat.com>
CC: Eric Farman <farman@linux.ibm.com>
CC: Matthew Rosato <mjrosato@linux.ibm.com>
CC: Hannes Reinecke <hare@suse.com>
CC: Michael Walle <michael@walle.cc>
CC: Artyom Tarasenko <atar4qemu@gmail.com>
CC: Stefan Berger <stefanb@linux.ibm.com>
CC: Samuel Thibault <samuel.thibault@ens-lyon.org>
CC: Alex Williamson <alex.williamson@redhat.com>
CC: Tony Krowiak <akrowiak@linux.ibm.com>
CC: Pierre Morel <pmorel@linux.ibm.com>
CC: Michael Roth <mdroth@linux.vnet.ibm.com>
CC: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
CC: Juan Quintela <quintela@redhat.com>
CC: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
CC: Luigi Rizzo <rizzo@iet.unipi.it>
CC: Giuseppe Lettieri <g.lettieri@iet.unipi.it>
CC: Vincenzo Maffione <v.maffione@gmail.com>
CC: Jan Kiszka <jan.kiszka@siemens.com>
CC: Anthony Green <green@moxielogic.com>
CC: Stafford Horne <shorne@gmail.com>
CC: Guan Xuetao <gxt@mprc.pku.edu.cn>
CC: Max Filippov <jcmvbkbc@gmail.com>
CC: qemu-block@nongnu.org
CC: integration@gluster.org
CC: sheepdog@lists.wpkg.org
CC: qemu-arm@nongnu.org
CC: xen-devel@lists.xenproject.org
CC: qemu-ppc@nongnu.org
CC: qemu-s390x@nongnu.org
CC: qemu-riscv@nongnu.org

 include/qapi/error.h | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/include/qapi/error.h b/include/qapi/error.h
index d6898d833b..47238d9065 100644
--- a/include/qapi/error.h
+++ b/include/qapi/error.h
@@ -345,6 +345,44 @@ void error_set_internal(Error **errp,
                         ErrorClass err_class, const char *fmt, ...)
     GCC_FMT_ATTR(6, 7);
 
+typedef struct ErrorPropagator {
+    Error *local_err;
+    Error **errp;
+} ErrorPropagator;
+
+static inline void error_propagator_cleanup(ErrorPropagator *prop)
+{
+    error_propagate(prop->errp, prop->local_err);
+}
+
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(ErrorPropagator, error_propagator_cleanup);
+
+/*
+ * ERRP_AUTO_PROPAGATE
+ *
+ * This macro is created to be the first line of a function with Error **errp
+ * OUT parameter. It's needed only in cases where we want to use error_prepend,
+ * error_append_hint or dereference *errp. It's still safe (but useless) in
+ * other cases.
+ *
+ * If errp is NULL or points to error_fatal, it is rewritten to point to a
+ * local Error object, which will be automatically propagated to the original
+ * errp on function exit (see error_propagator_cleanup).
+ *
+ * After invocation of this macro it is always safe to dereference errp
+ * (as it's not NULL anymore) and to add information (by error_prepend or
+ * error_append_hint)
+ * (as, if it was error_fatal, we swapped it with a local_error to be
+ * propagated on cleanup).
+ *
+ * Note: we don't wrap the error_abort case, as we want resulting coredump
+ * to point to the place where the error happened, not to error_propagate.
+ */
+#define ERRP_AUTO_PROPAGATE()                                  \
+    g_auto(ErrorPropagator) _auto_errp_prop = {.errp = errp};  \
+    errp = ((errp == NULL || *errp == error_fatal)             \
+            ? &_auto_errp_prop.local_err : errp)
+
 /*
  * Special error destination to abort on error.
  * See error_setg() and error_propagate() for details.
-- 
2.21.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [Xen-devel] [RFC v5 025/126] scripts: add coccinelle script to use auto propagated errp
  2019-10-11 16:03 [Xen-devel] [RFC v5 000/126] error: auto propagated local_err Vladimir Sementsov-Ogievskiy
  2019-10-11 16:04 ` [Xen-devel] [RFC v5 024/126] " Vladimir Sementsov-Ogievskiy
@ 2019-10-11 16:04 ` Vladimir Sementsov-Ogievskiy
  2019-10-11 17:12   ` Eric Blake
  2019-10-11 16:04 ` [Xen-devel] [RFC v5 026/126] python: add commit-per-subsystem.py Vladimir Sementsov-Ogievskiy
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 34+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2019-10-11 16:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Ronnie Sahlberg, Jeff Cody, Jan Kiszka, Eric Blake,
	Alberto Garcia, Hailiang Zhang, qemu-block, Aleksandar Rikalo,
	Halil Pasic, Hervé Poussineau, Anthony Perard,
	Samuel Thibault, Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Stefan Hajnoczi, John Snow,
	Richard Henderson, Kevin Wolf, vsementsov, Andrew Jeffery,
	Chris Wulff, Subbaraya Sundeep, Michael Walle, qemu-ppc,
	Bastian Koppelmann, Igor Mammedov, Fam Zheng, Peter Maydell,
	sheepdog, Matthew Rosato, David Hildenbrand, Palmer Dabbelt,
	Thomas Huth, Max Filippov, Denis V. Lunev, Hannes Reinecke,
	Stefano Stabellini, Gonglei (Arei),
	Marcel Apfelbaum, Liu Yuan, Artyom Tarasenko, Eric Farman,
	Amit Shah, Stefan Weil, Greg Kurz, Yuval Shaia, qemu-s390x,
	qemu-arm, Peter Chubb, Cédric Le Goater, Stafford Horne,
	qemu-riscv, Cornelia Huck, Aleksandar Markovic, Aurelien Jarno,
	Paul Burton, Sagar Karandikar, Paul Durrant, Jason Wang,
	Gerd Hoffmann, Edgar E. Iglesias, Guan Xuetao, Ari Sundholm,
	Juan Quintela, Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Laszlo Ersek, Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Michael S. Tsirkin, Mark Cave-Ayland, Vincenzo Maffione,
	Marek Vasut, armbru, Marc-André Lureau, Alistair Francis,
	Pavel Dovgalyuk, Giuseppe Lettieri, Luigi Rizzo, David Gibson,
	Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---

CC: Gerd Hoffmann <kraxel@redhat.com>
CC: "Gonglei (Arei)" <arei.gonglei@huawei.com>
CC: Eduardo Habkost <ehabkost@redhat.com>
CC: Igor Mammedov <imammedo@redhat.com>
CC: Laurent Vivier <lvivier@redhat.com>
CC: Amit Shah <amit@kernel.org>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Max Reitz <mreitz@redhat.com>
CC: John Snow <jsnow@redhat.com>
CC: Ari Sundholm <ari@tuxera.com>
CC: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Stefan Hajnoczi <stefanha@redhat.com>
CC: Fam Zheng <fam@euphon.net>
CC: Stefan Weil <sw@weilnetz.de>
CC: Ronnie Sahlberg <ronniesahlberg@gmail.com>
CC: Peter Lieven <pl@kamp.de>
CC: Eric Blake <eblake@redhat.com>
CC: "Denis V. Lunev" <den@openvz.org>
CC: Markus Armbruster <armbru@redhat.com>
CC: Alberto Garcia <berto@igalia.com>
CC: Jason Dillaman <dillaman@redhat.com>
CC: Wen Congyang <wencongyang2@huawei.com>
CC: Xie Changlong <xiechanglong.d@gmail.com>
CC: Liu Yuan <namei.unix@gmail.com>
CC: "Richard W.M. Jones" <rjones@redhat.com>
CC: Jeff Cody <codyprime@gmail.com>
CC: "Marc-André Lureau" <marcandre.lureau@redhat.com>
CC: "Daniel P. Berrangé" <berrange@redhat.com>
CC: Richard Henderson <rth@twiddle.net>
CC: Greg Kurz <groug@kaod.org>
CC: "Michael S. Tsirkin" <mst@redhat.com>
CC: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
CC: Beniamino Galvani <b.galvani@gmail.com>
CC: Peter Maydell <peter.maydell@linaro.org>
CC: "Cédric Le Goater" <clg@kaod.org>
CC: Andrew Jeffery <andrew@aj.id.au>
CC: Joel Stanley <joel@jms.id.au>
CC: Andrew Baumann <Andrew.Baumann@microsoft.com>
CC: "Philippe Mathieu-Daudé" <philmd@redhat.com>
CC: Antony Pavlov <antonynpavlov@gmail.com>
CC: Jean-Christophe Dubois <jcd@tribudubois.net>
CC: Peter Chubb <peter.chubb@nicta.com.au>
CC: Subbaraya Sundeep <sundeep.lkml@gmail.com>
CC: Eric Auger <eric.auger@redhat.com>
CC: Alistair Francis <alistair@alistair23.me>
CC: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Anthony Perard <anthony.perard@citrix.com>
CC: Paul Durrant <paul@xen.org>
CC: Paul Burton <pburton@wavecomp.com>
CC: Aleksandar Rikalo <arikalo@wavecomp.com>
CC: Chris Wulff <crwulff@gmail.com>
CC: Marek Vasut <marex@denx.de>
CC: David Gibson <david@gibson.dropbear.id.au>
CC: Cornelia Huck <cohuck@redhat.com>
CC: Halil Pasic <pasic@linux.ibm.com>
CC: Christian Borntraeger <borntraeger@de.ibm.com>
CC: "Hervé Poussineau" <hpoussin@reactos.org>
CC: Xiao Guangrong <xiaoguangrong.eric@gmail.com>
CC: Aurelien Jarno <aurelien@aurel32.net>
CC: Aleksandar Markovic <amarkovic@wavecomp.com>
CC: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
CC: Jason Wang <jasowang@redhat.com>
CC: Laszlo Ersek <lersek@redhat.com>
CC: Yuval Shaia <yuval.shaia@oracle.com>
CC: Palmer Dabbelt <palmer@sifive.com>
CC: Sagar Karandikar <sagark@eecs.berkeley.edu>
CC: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
CC: David Hildenbrand <david@redhat.com>
CC: Thomas Huth <thuth@redhat.com>
CC: Eric Farman <farman@linux.ibm.com>
CC: Matthew Rosato <mjrosato@linux.ibm.com>
CC: Hannes Reinecke <hare@suse.com>
CC: Michael Walle <michael@walle.cc>
CC: Artyom Tarasenko <atar4qemu@gmail.com>
CC: Stefan Berger <stefanb@linux.ibm.com>
CC: Samuel Thibault <samuel.thibault@ens-lyon.org>
CC: Alex Williamson <alex.williamson@redhat.com>
CC: Tony Krowiak <akrowiak@linux.ibm.com>
CC: Pierre Morel <pmorel@linux.ibm.com>
CC: Michael Roth <mdroth@linux.vnet.ibm.com>
CC: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
CC: Juan Quintela <quintela@redhat.com>
CC: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
CC: Luigi Rizzo <rizzo@iet.unipi.it>
CC: Giuseppe Lettieri <g.lettieri@iet.unipi.it>
CC: Vincenzo Maffione <v.maffione@gmail.com>
CC: Jan Kiszka <jan.kiszka@siemens.com>
CC: Anthony Green <green@moxielogic.com>
CC: Stafford Horne <shorne@gmail.com>
CC: Guan Xuetao <gxt@mprc.pku.edu.cn>
CC: Max Filippov <jcmvbkbc@gmail.com>
CC: qemu-block@nongnu.org
CC: integration@gluster.org
CC: sheepdog@lists.wpkg.org
CC: qemu-arm@nongnu.org
CC: xen-devel@lists.xenproject.org
CC: qemu-ppc@nongnu.org
CC: qemu-s390x@nongnu.org
CC: qemu-riscv@nongnu.org

 scripts/coccinelle/auto-propagated-errp.cocci | 118 ++++++++++++++++++
 1 file changed, 118 insertions(+)
 create mode 100644 scripts/coccinelle/auto-propagated-errp.cocci

diff --git a/scripts/coccinelle/auto-propagated-errp.cocci b/scripts/coccinelle/auto-propagated-errp.cocci
new file mode 100644
index 0000000000..d9731620aa
--- /dev/null
+++ b/scripts/coccinelle/auto-propagated-errp.cocci
@@ -0,0 +1,118 @@
+@rule0@
+// Add invocation to errp-functions where necessary
+identifier fn, local_err;
+symbol errp;
+@@
+
+ fn(..., Error **errp, ...)
+ {
++   ERRP_AUTO_PROPAGATE();
+    <+...
+(
+    error_append_hint(errp, ...);
+|
+    error_prepend(errp, ...);
+|
+    Error *local_err = NULL;
+)
+    ...+>
+ }
+
+@@
+// Drop doubled invocation
+identifier rule0.fn;
+@@
+
+ fn(...)
+{
+-   ERRP_AUTO_PROPAGATE();
+    ERRP_AUTO_PROPAGATE();
+    ...
+}
+
+@rule1@
+// Drop local_err
+identifier fn, local_err;
+symbol errp;
+@@
+
+ fn(..., Error **errp, ...)
+ {
+     <...
+-    Error *local_err = NULL;
+     ...>
+ }
+
+@@
+// Handle pattern with goto, otherwise we'll finish up
+// with labels at function end which will not compile.
+identifier rule1.fn;
+identifier rule1.local_err;
+identifier OUT;
+@@
+
+ fn(...)
+ {
+     <...
+-    goto OUT;
++    return;
+     ...>
+- OUT:
+-    error_propagate(errp, local_err);
+ }
+
+@@
+identifier rule1.fn;
+identifier rule1.local_err;
+@@
+
+ fn(...)
+ {
+     <...
+(
+-    error_free(local_err);
+-    local_err = NULL;
++    error_free_errp(errp);
+|
+-    error_free(local_err);
++    error_free_errp(errp);
+|
+-    error_report_err(local_err);
++    error_report_errp(errp);
+|
+-    warn_report_err(local_err);
++    warn_report_errp(errp);
+|
+-    error_propagate_prepend(errp, local_err,
++    error_prepend(errp,
+                              ...);
+|
+-    error_propagate(errp, local_err);
+)
+     ...>
+ }
+
+@@
+identifier rule1.fn;
+identifier rule1.local_err;
+@@
+
+ fn(...)
+ {
+     <...
+(
+-    &local_err
++    errp
+|
+-    local_err
++    *errp
+)
+     ...>
+ }
+
+@@
+symbol errp;
+@@
+
+- *errp != NULL
++ *errp
-- 
2.21.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [Xen-devel] [RFC v5 026/126] python: add commit-per-subsystem.py
  2019-10-11 16:03 [Xen-devel] [RFC v5 000/126] error: auto propagated local_err Vladimir Sementsov-Ogievskiy
  2019-10-11 16:04 ` [Xen-devel] [RFC v5 024/126] " Vladimir Sementsov-Ogievskiy
  2019-10-11 16:04 ` [Xen-devel] [RFC v5 025/126] scripts: add coccinelle script to use auto propagated errp Vladimir Sementsov-Ogievskiy
@ 2019-10-11 16:04 ` Vladimir Sementsov-Ogievskiy
  2019-11-08 21:18   ` Marc-André Lureau
                     ` (2 more replies)
  2019-10-11 16:04 ` [Xen-devel] [RFC v5 031/126] xen: introduce ERRP_AUTO_PROPAGATE Vladimir Sementsov-Ogievskiy
                   ` (3 subsequent siblings)
  6 siblings, 3 replies; 34+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2019-10-11 16:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Ronnie Sahlberg, Jeff Cody, Jan Kiszka, Eric Blake,
	Alberto Garcia, Hailiang Zhang, qemu-block, Aleksandar Rikalo,
	Halil Pasic, Hervé Poussineau, Anthony Perard,
	Samuel Thibault, Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Stefan Hajnoczi, John Snow,
	Richard Henderson, Kevin Wolf, vsementsov, Andrew Jeffery,
	Chris Wulff, Subbaraya Sundeep, Michael Walle, qemu-ppc,
	Bastian Koppelmann, Igor Mammedov, Fam Zheng, Peter Maydell,
	sheepdog, Matthew Rosato, David Hildenbrand, Palmer Dabbelt,
	Thomas Huth, Max Filippov, Denis V. Lunev, Hannes Reinecke,
	Stefano Stabellini, Gonglei (Arei),
	Marcel Apfelbaum, Liu Yuan, Artyom Tarasenko, Eric Farman,
	Amit Shah, Stefan Weil, Greg Kurz, Yuval Shaia, qemu-s390x,
	qemu-arm, Peter Chubb, Cédric Le Goater, Stafford Horne,
	qemu-riscv, Cornelia Huck, Aleksandar Markovic, Aurelien Jarno,
	Paul Burton, Sagar Karandikar, Paul Durrant, Jason Wang,
	Gerd Hoffmann, Edgar E. Iglesias, Guan Xuetao, Ari Sundholm,
	Juan Quintela, Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Laszlo Ersek, Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Michael S. Tsirkin, Mark Cave-Ayland, Vincenzo Maffione,
	Marek Vasut, armbru, Marc-André Lureau, Alistair Francis,
	Pavel Dovgalyuk, Giuseppe Lettieri, Luigi Rizzo, David Gibson,
	Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

Add script to automatically commit tree-wide changes per-subsystem.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---

CC: Gerd Hoffmann <kraxel@redhat.com>
CC: "Gonglei (Arei)" <arei.gonglei@huawei.com>
CC: Eduardo Habkost <ehabkost@redhat.com>
CC: Igor Mammedov <imammedo@redhat.com>
CC: Laurent Vivier <lvivier@redhat.com>
CC: Amit Shah <amit@kernel.org>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Max Reitz <mreitz@redhat.com>
CC: John Snow <jsnow@redhat.com>
CC: Ari Sundholm <ari@tuxera.com>
CC: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Stefan Hajnoczi <stefanha@redhat.com>
CC: Fam Zheng <fam@euphon.net>
CC: Stefan Weil <sw@weilnetz.de>
CC: Ronnie Sahlberg <ronniesahlberg@gmail.com>
CC: Peter Lieven <pl@kamp.de>
CC: Eric Blake <eblake@redhat.com>
CC: "Denis V. Lunev" <den@openvz.org>
CC: Markus Armbruster <armbru@redhat.com>
CC: Alberto Garcia <berto@igalia.com>
CC: Jason Dillaman <dillaman@redhat.com>
CC: Wen Congyang <wencongyang2@huawei.com>
CC: Xie Changlong <xiechanglong.d@gmail.com>
CC: Liu Yuan <namei.unix@gmail.com>
CC: "Richard W.M. Jones" <rjones@redhat.com>
CC: Jeff Cody <codyprime@gmail.com>
CC: "Marc-André Lureau" <marcandre.lureau@redhat.com>
CC: "Daniel P. Berrangé" <berrange@redhat.com>
CC: Richard Henderson <rth@twiddle.net>
CC: Greg Kurz <groug@kaod.org>
CC: "Michael S. Tsirkin" <mst@redhat.com>
CC: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
CC: Beniamino Galvani <b.galvani@gmail.com>
CC: Peter Maydell <peter.maydell@linaro.org>
CC: "Cédric Le Goater" <clg@kaod.org>
CC: Andrew Jeffery <andrew@aj.id.au>
CC: Joel Stanley <joel@jms.id.au>
CC: Andrew Baumann <Andrew.Baumann@microsoft.com>
CC: "Philippe Mathieu-Daudé" <philmd@redhat.com>
CC: Antony Pavlov <antonynpavlov@gmail.com>
CC: Jean-Christophe Dubois <jcd@tribudubois.net>
CC: Peter Chubb <peter.chubb@nicta.com.au>
CC: Subbaraya Sundeep <sundeep.lkml@gmail.com>
CC: Eric Auger <eric.auger@redhat.com>
CC: Alistair Francis <alistair@alistair23.me>
CC: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Anthony Perard <anthony.perard@citrix.com>
CC: Paul Durrant <paul@xen.org>
CC: Paul Burton <pburton@wavecomp.com>
CC: Aleksandar Rikalo <arikalo@wavecomp.com>
CC: Chris Wulff <crwulff@gmail.com>
CC: Marek Vasut <marex@denx.de>
CC: David Gibson <david@gibson.dropbear.id.au>
CC: Cornelia Huck <cohuck@redhat.com>
CC: Halil Pasic <pasic@linux.ibm.com>
CC: Christian Borntraeger <borntraeger@de.ibm.com>
CC: "Hervé Poussineau" <hpoussin@reactos.org>
CC: Xiao Guangrong <xiaoguangrong.eric@gmail.com>
CC: Aurelien Jarno <aurelien@aurel32.net>
CC: Aleksandar Markovic <amarkovic@wavecomp.com>
CC: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
CC: Jason Wang <jasowang@redhat.com>
CC: Laszlo Ersek <lersek@redhat.com>
CC: Yuval Shaia <yuval.shaia@oracle.com>
CC: Palmer Dabbelt <palmer@sifive.com>
CC: Sagar Karandikar <sagark@eecs.berkeley.edu>
CC: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
CC: David Hildenbrand <david@redhat.com>
CC: Thomas Huth <thuth@redhat.com>
CC: Eric Farman <farman@linux.ibm.com>
CC: Matthew Rosato <mjrosato@linux.ibm.com>
CC: Hannes Reinecke <hare@suse.com>
CC: Michael Walle <michael@walle.cc>
CC: Artyom Tarasenko <atar4qemu@gmail.com>
CC: Stefan Berger <stefanb@linux.ibm.com>
CC: Samuel Thibault <samuel.thibault@ens-lyon.org>
CC: Alex Williamson <alex.williamson@redhat.com>
CC: Tony Krowiak <akrowiak@linux.ibm.com>
CC: Pierre Morel <pmorel@linux.ibm.com>
CC: Michael Roth <mdroth@linux.vnet.ibm.com>
CC: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
CC: Juan Quintela <quintela@redhat.com>
CC: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
CC: Luigi Rizzo <rizzo@iet.unipi.it>
CC: Giuseppe Lettieri <g.lettieri@iet.unipi.it>
CC: Vincenzo Maffione <v.maffione@gmail.com>
CC: Jan Kiszka <jan.kiszka@siemens.com>
CC: Anthony Green <green@moxielogic.com>
CC: Stafford Horne <shorne@gmail.com>
CC: Guan Xuetao <gxt@mprc.pku.edu.cn>
CC: Max Filippov <jcmvbkbc@gmail.com>
CC: qemu-block@nongnu.org
CC: integration@gluster.org
CC: sheepdog@lists.wpkg.org
CC: qemu-arm@nongnu.org
CC: xen-devel@lists.xenproject.org
CC: qemu-ppc@nongnu.org
CC: qemu-s390x@nongnu.org
CC: qemu-riscv@nongnu.org

 python/commit-per-subsystem.py | 204 +++++++++++++++++++++++++++++++++
 1 file changed, 204 insertions(+)
 create mode 100755 python/commit-per-subsystem.py

diff --git a/python/commit-per-subsystem.py b/python/commit-per-subsystem.py
new file mode 100755
index 0000000000..2ccf84cb15
--- /dev/null
+++ b/python/commit-per-subsystem.py
@@ -0,0 +1,204 @@
+#!/usr/bin/env python3
+#
+# Copyright (c) 2019 Virtuozzo International GmbH
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+import subprocess
+import sys
+import os
+import glob
+
+
+def git_add(pattern):
+    subprocess.run(['git', 'add', pattern])
+
+
+def git_commit(msg):
+    subprocess.run(['git', 'commit', '-m', msg], capture_output=True)
+
+
+def git_changed_files():
+    ret = subprocess.check_output(['git', 'diff', '--name-only'], encoding='utf-8').split('\n')
+    if ret[-1] == '':
+        del ret[-1]
+    return ret
+
+
+maintainers = sys.argv[1]
+message = sys.argv[2].strip()
+
+subsystem = None
+
+remap = {
+    'Block layer core': 'block',
+    'Block Jobs': 'block',
+    'Dirty Bitmaps': 'block',
+    'Block QAPI, monitor, command line': 'block',
+    'Block I/O path': 'block',
+    'Throttling infrastructure': 'block',
+    'Architecture support': 's390x',
+    'Guest CPU Cores (KVM)': 'kvm',
+    'Guest CPU Cores (Xen)': 'xen',
+    'Guest CPU cores (TCG)': 'tcg',
+    'Network Block Device (NBD)': 'nbd',
+    'Parallel NOR Flash devices': 'pflash',
+    'Firmware configuration (fw_cfg)': 'fw_cfg',
+    'Block SCSI subsystem': 'scsi',
+    'Network device backends': 'net',
+    'Netmap network backend': 'net',
+    'Host Memory Backends': 'hostmem',
+    'Cryptodev Backends': 'cryptodev',
+    'QEMU Guest Agent': 'qga',
+    'COLO Framework': 'colo',
+    'Command line option argument parsing': 'cmdline',
+    'Character device backends': 'chardev'
+}
+
+
+class Maintainers:
+    def add(self, subsystem, path, mapper, mapper_name, glob_count=1):
+        if subsystem in remap:
+            subsystem = remap[subsystem]
+        if subsystem not in self.subsystems:
+            self.subsystems.append(subsystem)
+
+        if path[-1] == '/':
+            path = path[:-1]
+
+        if path in mapper:
+            if mapper[path][1] == glob_count:
+                print('Warning: "{}" both in "{}" and "{}" in {} mapper with '
+                      'same glob-count={}. {} ignored for this path.'.format(
+                        path, mapper[path][0], subsystem, mapper_name, glob_count,
+                          subsystem))
+                return
+            if mapper[path][1] < glob_count:
+                # silently ignore worse match
+                return
+
+        mapper[path] = (subsystem, glob_count)
+
+    def __init__(self, file_name):
+        self.map_file = {}
+        self.map_glob_file = {}
+        self.map_dir = {}
+        self.map_glob_dir = {}
+        self.map_unmaintained_dir = {
+            'python': ('python', 1),
+            'hw/misc': ('misc', 1)
+        }
+        self.subsystems = ['python', 'misc']
+        subsystem = None
+
+        with open(file_name) as f:
+            mode2 = False
+            prevline = ''
+            for line in f:
+                line = line.rstrip()
+                if not line:
+                    continue
+                if len(line) >= 2 and line[1] == ':':
+                    if line[0] == 'F':
+                        fname = line[3:]
+                        if fname in ['*', '*/']:
+                            continue
+                        if os.path.isfile(fname):
+                            self.add(subsystem, fname, self.map_file, 'file')
+                        elif os.path.isdir(fname):
+                            self.add(subsystem, fname, self.map_dir, 'dir')
+                        else:
+                            paths = glob.glob(fname)
+                            if not paths:
+                                print('Warning: nothing corresponds to "{}"'.format(fname))
+                                continue
+
+                            n = len(paths)
+                            for f in paths:
+                                if os.path.isfile(f):
+                                    self.add(subsystem, f, self.map_glob_file, 'glob-file', n)
+                                else:
+                                    assert os.path.isdir(f)
+                                    self.add(subsystem, f, self.map_glob_dir, 'glob-dir', n)
+                elif line[:3] == '---':
+                    subsystem = prevline
+                    if subsystem == 'Devices':
+                        mode2 = True
+                elif mode2:
+                    subsystem = line
+                prevline = line
+
+    def find_in_map_dir(self, file_name, mapper):
+        while file_name != '' and file_name not in mapper:
+            file_name = os.path.dirname(file_name)
+
+        return None if file_name == '' else mapper[file_name][0]
+
+    def find_in_map_file(self, file_name, mapper):
+        if file_name in mapper:
+            return mapper[file_name][0]
+
+    def find_subsystem(self, file_name):
+        s = self.find_in_map_file(file_name, self.map_file)
+        if s is not None:
+            return s
+
+        s = self.find_in_map_file(file_name, self.map_glob_file)
+        if s is not None:
+            return s
+
+        s = self.find_in_map_dir(file_name, self.map_dir)
+        if s is not None:
+            return s
+
+        s = self.find_in_map_dir(file_name, self.map_glob_dir)
+        if s is not None:
+            return s
+
+        s = self.find_in_map_dir(file_name, self.map_unmaintained_dir)
+        if s is not None:
+            return s
+
+        self.subsystems.append(file_name)
+        return file_name
+
+
+def commit(subsystem):
+    msg = subsystem
+    if msg in remap:
+        msg = remap[msg]
+    msg += ': ' + message
+    git_commit(msg)
+
+mnt = Maintainers(maintainers)
+res = {}
+for f in git_changed_files():
+    s = mnt.find_subsystem(f)
+    if s in res:
+        res[s].append(f)
+    else:
+        res[s] = [f]
+
+for s in mnt.subsystems:
+    if s in res:
+        print(s)
+        for f in res[s]:
+            print('  ', f)
+
+for s in mnt.subsystems:
+    if s in res:
+        for f in res[s]:
+            git_add(f)
+        commit(s)
-- 
2.21.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* [Xen-devel] [RFC v5 031/126] xen: introduce ERRP_AUTO_PROPAGATE
  2019-10-11 16:03 [Xen-devel] [RFC v5 000/126] error: auto propagated local_err Vladimir Sementsov-Ogievskiy
                   ` (2 preceding siblings ...)
  2019-10-11 16:04 ` [Xen-devel] [RFC v5 026/126] python: add commit-per-subsystem.py Vladimir Sementsov-Ogievskiy
@ 2019-10-11 16:04 ` Vladimir Sementsov-Ogievskiy
  2019-11-20 15:38   ` Anthony PERARD
  2019-10-11 17:02 ` [Xen-devel] [RFC v5 000/126] error: auto propagated local_err Eric Blake
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 34+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2019-10-11 16:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, vsementsov, qemu-block, Paul Durrant, armbru,
	Greg Kurz, Stefano Stabellini, Stefan Hajnoczi, Anthony Perard,
	xen-devel, Max Reitz

If we want to add some info to errp (by error_prepend() or
error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro.
Otherwise, this info will not be added when errp == &fatal_err
(the program will exit prior to the error_append_hint() or
error_prepend() call).  Fix such cases.

If we want to check error after errp-function call, we need to
introduce local_err and than propagate it to errp. Instead, use
ERRP_AUTO_PROPAGATE macro, benefits are:
1. No need of explicit error_propagate call
2. No need of explicit local_err variable: use errp directly
3. ERRP_AUTO_PROPAGATE leaves errp as is if it's not NULL or
   &error_fatel, this means that we don't break error_abort
   (we'll abort on error_set, not on error_propagate)

This commit (together with its neighbors) was generated by

for f in $(git grep -l errp \*.[ch]); do \
    spatch --sp-file scripts/coccinelle/auto-propagated-errp.cocci \
    --macro-file scripts/cocci-macro-file.h --in-place --no-show-diff $f; \
done;

then fix a bit of compilation problems: coccinelle for some reason
leaves several
f() {
    ...
    goto out;
    ...
    out:
}
patterns, with "out:" at function end.

then
./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)"

(auto-msg was a file with this commit message)

Still, for backporting it may be more comfortable to use only the first
command and then do one huge commit.

Reported-by: Kevin Wolf <kwolf@redhat.com>
Reported-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
 hw/block/dataplane/xen-block.c |  17 ++---
 hw/block/xen-block.c           | 119 ++++++++++++++-------------------
 hw/xen/xen-backend.c           |   7 +-
 hw/xen/xen-bus.c               |  92 ++++++++++++-------------
 hw/xen/xen-host-pci-device.c   |  27 ++++----
 hw/xen/xen_pt.c                |  25 +++----
 hw/xen/xen_pt_config_init.c    |  20 +++---
 7 files changed, 139 insertions(+), 168 deletions(-)

diff --git a/hw/block/dataplane/xen-block.c b/hw/block/dataplane/xen-block.c
index 3b9caeb2fa..c38e3c3d85 100644
--- a/hw/block/dataplane/xen-block.c
+++ b/hw/block/dataplane/xen-block.c
@@ -727,8 +727,8 @@ void xen_block_dataplane_start(XenBlockDataPlane *dataplane,
                                unsigned int protocol,
                                Error **errp)
 {
+    ERRP_AUTO_PROPAGATE();
     XenDevice *xendev = dataplane->xendev;
-    Error *local_err = NULL;
     unsigned int ring_size;
     unsigned int i;
 
@@ -764,9 +764,8 @@ void xen_block_dataplane_start(XenBlockDataPlane *dataplane,
     }
 
     xen_device_set_max_grant_refs(xendev, dataplane->nr_ring_ref,
-                                  &local_err);
-    if (local_err) {
-        error_propagate(errp, local_err);
+                                  errp);
+    if (*errp) {
         goto stop;
     }
 
@@ -774,9 +773,8 @@ void xen_block_dataplane_start(XenBlockDataPlane *dataplane,
                                               dataplane->ring_ref,
                                               dataplane->nr_ring_ref,
                                               PROT_READ | PROT_WRITE,
-                                              &local_err);
-    if (local_err) {
-        error_propagate(errp, local_err);
+                                              errp);
+    if (*errp) {
         goto stop;
     }
 
@@ -809,9 +807,8 @@ void xen_block_dataplane_start(XenBlockDataPlane *dataplane,
     dataplane->event_channel =
         xen_device_bind_event_channel(xendev, dataplane->ctx, event_channel,
                                       xen_block_dataplane_event, dataplane,
-                                      &local_err);
-    if (local_err) {
-        error_propagate(errp, local_err);
+                                      errp);
+    if (*errp) {
         goto stop;
     }
 
diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c
index 879fc310a4..8f4165edd9 100644
--- a/hw/block/xen-block.c
+++ b/hw/block/xen-block.c
@@ -194,6 +194,7 @@ static const BlockDevOps xen_block_dev_ops = {
 
 static void xen_block_realize(XenDevice *xendev, Error **errp)
 {
+    ERRP_AUTO_PROPAGATE();
     XenBlockDevice *blockdev = XEN_BLOCK_DEVICE(xendev);
     XenBlockDeviceClass *blockdev_class =
         XEN_BLOCK_DEVICE_GET_CLASS(xendev);
@@ -201,7 +202,6 @@ static void xen_block_realize(XenDevice *xendev, Error **errp)
     XenBlockVdev *vdev = &blockdev->props.vdev;
     BlockConf *conf = &blockdev->props.conf;
     BlockBackend *blk = conf->blk;
-    Error *local_err = NULL;
 
     if (vdev->type == XEN_BLOCK_VDEV_TYPE_INVALID) {
         error_setg(errp, "vdev property not set");
@@ -211,9 +211,8 @@ static void xen_block_realize(XenDevice *xendev, Error **errp)
     trace_xen_block_realize(type, vdev->disk, vdev->partition);
 
     if (blockdev_class->realize) {
-        blockdev_class->realize(blockdev, &local_err);
-        if (local_err) {
-            error_propagate(errp, local_err);
+        blockdev_class->realize(blockdev, errp);
+        if (*errp) {
             return;
         }
     }
@@ -283,8 +282,8 @@ static void xen_block_frontend_changed(XenDevice *xendev,
                                        enum xenbus_state frontend_state,
                                        Error **errp)
 {
+    ERRP_AUTO_PROPAGATE();
     enum xenbus_state backend_state = xen_device_backend_get_state(xendev);
-    Error *local_err = NULL;
 
     switch (frontend_state) {
     case XenbusStateInitialised:
@@ -293,15 +292,13 @@ static void xen_block_frontend_changed(XenDevice *xendev,
             break;
         }
 
-        xen_block_disconnect(xendev, &local_err);
-        if (local_err) {
-            error_propagate(errp, local_err);
+        xen_block_disconnect(xendev, errp);
+        if (*errp) {
             break;
         }
 
-        xen_block_connect(xendev, &local_err);
-        if (local_err) {
-            error_propagate(errp, local_err);
+        xen_block_connect(xendev, errp);
+        if (*errp) {
             break;
         }
 
@@ -314,9 +311,8 @@ static void xen_block_frontend_changed(XenDevice *xendev,
 
     case XenbusStateClosed:
     case XenbusStateUnknown:
-        xen_block_disconnect(xendev, &local_err);
-        if (local_err) {
-            error_propagate(errp, local_err);
+        xen_block_disconnect(xendev, errp);
+        if (*errp) {
             break;
         }
 
@@ -403,10 +399,10 @@ static int vbd_name_to_disk(const char *name, const char **endp,
 static void xen_block_set_vdev(Object *obj, Visitor *v, const char *name,
                                void *opaque, Error **errp)
 {
+    ERRP_AUTO_PROPAGATE();
     DeviceState *dev = DEVICE(obj);
     Property *prop = opaque;
     XenBlockVdev *vdev = qdev_get_prop_ptr(dev, prop);
-    Error *local_err = NULL;
     char *str, *p;
     const char *end;
 
@@ -415,9 +411,8 @@ static void xen_block_set_vdev(Object *obj, Visitor *v, const char *name,
         return;
     }
 
-    visit_type_str(v, name, &str, &local_err);
-    if (local_err) {
-        error_propagate(errp, local_err);
+    visit_type_str(v, name, &str, errp);
+    if (*errp) {
         return;
     }
 
@@ -671,9 +666,9 @@ static void xen_block_blockdev_del(const char *node_name, Error **errp)
 static char *xen_block_blockdev_add(const char *id, QDict *qdict,
                                     Error **errp)
 {
+    ERRP_AUTO_PROPAGATE();
     const char *driver = qdict_get_try_str(qdict, "driver");
     BlockdevOptions *options = NULL;
-    Error *local_err = NULL;
     char *node_name;
     Visitor *v;
 
@@ -688,18 +683,16 @@ static char *xen_block_blockdev_add(const char *id, QDict *qdict,
     trace_xen_block_blockdev_add(node_name);
 
     v = qobject_input_visitor_new(QOBJECT(qdict));
-    visit_type_BlockdevOptions(v, NULL, &options, &local_err);
+    visit_type_BlockdevOptions(v, NULL, &options, errp);
     visit_free(v);
 
-    if (local_err) {
-        error_propagate(errp, local_err);
+    if (*errp) {
         goto fail;
     }
 
-    qmp_blockdev_add(options, &local_err);
+    qmp_blockdev_add(options, errp);
 
-    if (local_err) {
-        error_propagate(errp, local_err);
+    if (*errp) {
         goto fail;
     }
 
@@ -718,14 +711,12 @@ fail:
 
 static void xen_block_drive_destroy(XenBlockDrive *drive, Error **errp)
 {
+    ERRP_AUTO_PROPAGATE();
     char *node_name = drive->node_name;
 
     if (node_name) {
-        Error *local_err = NULL;
-
-        xen_block_blockdev_del(node_name, &local_err);
-        if (local_err) {
-            error_propagate(errp, local_err);
+        xen_block_blockdev_del(node_name, errp);
+        if (*errp) {
             return;
         }
         g_free(node_name);
@@ -739,6 +730,7 @@ static XenBlockDrive *xen_block_drive_create(const char *id,
                                              const char *device_type,
                                              QDict *opts, Error **errp)
 {
+    ERRP_AUTO_PROPAGATE();
     const char *params = qdict_get_try_str(opts, "params");
     const char *mode = qdict_get_try_str(opts, "mode");
     const char *direct_io_safe = qdict_get_try_str(opts, "direct-io-safe");
@@ -746,7 +738,6 @@ static XenBlockDrive *xen_block_drive_create(const char *id,
     char *driver = NULL;
     char *filename = NULL;
     XenBlockDrive *drive = NULL;
-    Error *local_err = NULL;
     QDict *file_layer;
     QDict *driver_layer;
 
@@ -825,13 +816,12 @@ static XenBlockDrive *xen_block_drive_create(const char *id,
 
     g_assert(!drive->node_name);
     drive->node_name = xen_block_blockdev_add(drive->id, driver_layer,
-                                              &local_err);
+                                              errp);
 
     qobject_unref(driver_layer);
 
 done:
-    if (local_err) {
-        error_propagate(errp, local_err);
+    if (*errp) {
         xen_block_drive_destroy(drive, NULL);
         return NULL;
     }
@@ -856,15 +846,13 @@ static void xen_block_iothread_destroy(XenBlockIOThread *iothread,
 static XenBlockIOThread *xen_block_iothread_create(const char *id,
                                                    Error **errp)
 {
+    ERRP_AUTO_PROPAGATE();
     XenBlockIOThread *iothread = g_new(XenBlockIOThread, 1);
-    Error *local_err = NULL;
 
     iothread->id = g_strdup(id);
 
-    qmp_object_add(TYPE_IOTHREAD, id, false, NULL, &local_err);
-    if (local_err) {
-        error_propagate(errp, local_err);
-
+    qmp_object_add(TYPE_IOTHREAD, id, false, NULL, errp);
+    if (*errp) {
         g_free(iothread->id);
         g_free(iothread);
         return NULL;
@@ -876,6 +864,7 @@ static XenBlockIOThread *xen_block_iothread_create(const char *id,
 static void xen_block_device_create(XenBackendInstance *backend,
                                     QDict *opts, Error **errp)
 {
+    ERRP_AUTO_PROPAGATE();
     XenBus *xenbus = xen_backend_get_bus(backend);
     const char *name = xen_backend_get_name(backend);
     unsigned long number;
@@ -883,7 +872,6 @@ static void xen_block_device_create(XenBackendInstance *backend,
     XenBlockDrive *drive = NULL;
     XenBlockIOThread *iothread = NULL;
     XenDevice *xendev = NULL;
-    Error *local_err = NULL;
     const char *type;
     XenBlockDevice *blockdev;
 
@@ -915,15 +903,15 @@ static void xen_block_device_create(XenBackendInstance *backend,
         goto fail;
     }
 
-    drive = xen_block_drive_create(vdev, device_type, opts, &local_err);
+    drive = xen_block_drive_create(vdev, device_type, opts, errp);
     if (!drive) {
-        error_propagate_prepend(errp, local_err, "failed to create drive: ");
+        error_prepend(errp, "failed to create drive: ");
         goto fail;
     }
 
-    iothread = xen_block_iothread_create(vdev, &local_err);
-    if (local_err) {
-        error_propagate_prepend(errp, local_err,
+    iothread = xen_block_iothread_create(vdev, errp);
+    if (*errp) {
+        error_prepend(errp,
                                 "failed to create iothread: ");
         goto fail;
     }
@@ -931,24 +919,24 @@ static void xen_block_device_create(XenBackendInstance *backend,
     xendev = XEN_DEVICE(qdev_create(BUS(xenbus), type));
     blockdev = XEN_BLOCK_DEVICE(xendev);
 
-    object_property_set_str(OBJECT(xendev), vdev, "vdev", &local_err);
-    if (local_err) {
-        error_propagate_prepend(errp, local_err, "failed to set 'vdev': ");
+    object_property_set_str(OBJECT(xendev), vdev, "vdev", errp);
+    if (*errp) {
+        error_prepend(errp, "failed to set 'vdev': ");
         goto fail;
     }
 
     object_property_set_str(OBJECT(xendev),
                             xen_block_drive_get_node_name(drive), "drive",
-                            &local_err);
-    if (local_err) {
-        error_propagate_prepend(errp, local_err, "failed to set 'drive': ");
+                            errp);
+    if (*errp) {
+        error_prepend(errp, "failed to set 'drive': ");
         goto fail;
     }
 
     object_property_set_str(OBJECT(xendev), iothread->id, "iothread",
-                            &local_err);
-    if (local_err) {
-        error_propagate_prepend(errp, local_err,
+                            errp);
+    if (*errp) {
+        error_prepend(errp,
                                 "failed to set 'iothread': ");
         goto fail;
     }
@@ -956,9 +944,9 @@ static void xen_block_device_create(XenBackendInstance *backend,
     blockdev->iothread = iothread;
     blockdev->drive = drive;
 
-    object_property_set_bool(OBJECT(xendev), true, "realized", &local_err);
-    if (local_err) {
-        error_propagate_prepend(errp, local_err,
+    object_property_set_bool(OBJECT(xendev), true, "realized", errp);
+    if (*errp) {
+        error_prepend(errp,
                                 "realization of device %s failed: ",
                                 type);
         goto fail;
@@ -984,6 +972,7 @@ fail:
 static void xen_block_device_destroy(XenBackendInstance *backend,
                                      Error **errp)
 {
+    ERRP_AUTO_PROPAGATE();
     XenDevice *xendev = xen_backend_get_device(backend);
     XenBlockDevice *blockdev = XEN_BLOCK_DEVICE(xendev);
     XenBlockVdev *vdev = &blockdev->props.vdev;
@@ -995,22 +984,18 @@ static void xen_block_device_destroy(XenBackendInstance *backend,
     object_unparent(OBJECT(xendev));
 
     if (iothread) {
-        Error *local_err = NULL;
-
-        xen_block_iothread_destroy(iothread, &local_err);
-        if (local_err) {
-            error_propagate_prepend(errp, local_err,
+        xen_block_iothread_destroy(iothread, errp);
+        if (*errp) {
+            error_prepend(errp,
                                 "failed to destroy iothread: ");
             return;
         }
     }
 
     if (drive) {
-        Error *local_err = NULL;
-
-        xen_block_drive_destroy(drive, &local_err);
-        if (local_err) {
-            error_propagate_prepend(errp, local_err,
+        xen_block_drive_destroy(drive, errp);
+        if (*errp) {
+            error_prepend(errp,
                                 "failed to destroy drive: ");
         }
     }
diff --git a/hw/xen/xen-backend.c b/hw/xen/xen-backend.c
index da065f81b7..1cc0694053 100644
--- a/hw/xen/xen-backend.c
+++ b/hw/xen/xen-backend.c
@@ -98,9 +98,9 @@ static void xen_backend_list_remove(XenBackendInstance *backend)
 void xen_backend_device_create(XenBus *xenbus, const char *type,
                                const char *name, QDict *opts, Error **errp)
 {
+    ERRP_AUTO_PROPAGATE();
     const XenBackendImpl *impl = xen_backend_table_lookup(type);
     XenBackendInstance *backend;
-    Error *local_error = NULL;
 
     if (!impl) {
         return;
@@ -110,9 +110,8 @@ void xen_backend_device_create(XenBus *xenbus, const char *type,
     backend->xenbus = xenbus;
     backend->name = g_strdup(name);
 
-    impl->create(backend, opts, &local_error);
-    if (local_error) {
-        error_propagate(errp, local_error);
+    impl->create(backend, opts, errp);
+    if (*errp) {
         g_free(backend->name);
         g_free(backend);
         return;
diff --git a/hw/xen/xen-bus.c b/hw/xen/xen-bus.c
index c2ad22a42d..ceecf0dacb 100644
--- a/hw/xen/xen-bus.c
+++ b/hw/xen/xen-bus.c
@@ -53,9 +53,9 @@ static char *xen_device_get_frontend_path(XenDevice *xendev)
 
 static void xen_device_unplug(XenDevice *xendev, Error **errp)
 {
+    ERRP_AUTO_PROPAGATE();
     XenBus *xenbus = XEN_BUS(qdev_get_parent_bus(DEVICE(xendev)));
     const char *type = object_get_typename(OBJECT(xendev));
-    Error *local_err = NULL;
     xs_transaction_t tid;
 
     trace_xen_device_unplug(type, xendev->name);
@@ -69,14 +69,14 @@ again:
     }
 
     xs_node_printf(xenbus->xsh, tid, xendev->backend_path, "online",
-                   &local_err, "%u", 0);
-    if (local_err) {
+                   errp, "%u", 0);
+    if (*errp) {
         goto abort;
     }
 
     xs_node_printf(xenbus->xsh, tid, xendev->backend_path, "state",
-                   &local_err, "%u", XenbusStateClosing);
-    if (local_err) {
+                   errp, "%u", XenbusStateClosing);
+    if (*errp) {
         goto abort;
     }
 
@@ -96,7 +96,6 @@ abort:
      * from ending the transaction.
      */
     xs_transaction_end(xenbus->xsh, tid, true);
-    error_propagate(errp, local_err);
 }
 
 static void xen_bus_print_dev(Monitor *mon, DeviceState *dev, int indent)
@@ -205,15 +204,13 @@ static XenWatch *watch_list_add(XenWatchList *watch_list, const char *node,
                                 const char *key, XenWatchHandler handler,
                                 void *opaque, Error **errp)
 {
+    ERRP_AUTO_PROPAGATE();
     XenWatch *watch = new_watch(node, key, handler, opaque);
-    Error *local_err = NULL;
 
     notifier_list_add(&watch_list->notifiers, &watch->notifier);
 
-    xs_node_watch(watch_list->xsh, node, key, watch->token, &local_err);
-    if (local_err) {
-        error_propagate(errp, local_err);
-
+    xs_node_watch(watch_list->xsh, node, key, watch->token, errp);
+    if (*errp) {
         notifier_remove(&watch->notifier);
         free_watch(watch);
 
@@ -255,11 +252,11 @@ static void xen_bus_backend_create(XenBus *xenbus, const char *type,
                                    const char *name, char *path,
                                    Error **errp)
 {
+    ERRP_AUTO_PROPAGATE();
     xs_transaction_t tid;
     char **key;
     QDict *opts;
     unsigned int i, n;
-    Error *local_err = NULL;
 
     trace_xen_bus_backend_create(type, path);
 
@@ -314,11 +311,11 @@ again:
         return;
     }
 
-    xen_backend_device_create(xenbus, type, name, opts, &local_err);
+    xen_backend_device_create(xenbus, type, name, opts, errp);
     qobject_unref(opts);
 
-    if (local_err) {
-        error_propagate_prepend(errp, local_err,
+    if (*errp) {
+        error_prepend(errp,
                                 "failed to create '%s' device '%s': ",
                                 type, name);
     }
@@ -451,9 +448,9 @@ static void xen_bus_unrealize(BusState *bus, Error **errp)
 
 static void xen_bus_realize(BusState *bus, Error **errp)
 {
+    ERRP_AUTO_PROPAGATE();
     XenBus *xenbus = XEN_BUS(bus);
     unsigned int domid;
-    Error *local_err = NULL;
 
     trace_xen_bus_realize();
 
@@ -476,10 +473,10 @@ static void xen_bus_realize(BusState *bus, Error **errp)
 
     xenbus->backend_watch =
         xen_bus_add_watch(xenbus, "", /* domain root node */
-                          "backend", xen_bus_backend_changed, &local_err);
-    if (local_err) {
+                          "backend", xen_bus_backend_changed, errp);
+    if (*errp) {
         /* This need not be treated as a hard error so don't propagate */
-        error_reportf_err(local_err,
+        error_reportf_err(*errp,
                           "failed to set up enumeration watch: ");
     }
 
@@ -692,9 +689,9 @@ static void xen_device_remove_watch(XenDevice *xendev, XenWatch *watch,
 
 static void xen_device_backend_create(XenDevice *xendev, Error **errp)
 {
+    ERRP_AUTO_PROPAGATE();
     XenBus *xenbus = XEN_BUS(qdev_get_parent_bus(DEVICE(xendev)));
     struct xs_permissions perms[2];
-    Error *local_err = NULL;
 
     xendev->backend_path = xen_device_get_backend_path(xendev);
 
@@ -706,9 +703,9 @@ static void xen_device_backend_create(XenDevice *xendev, Error **errp)
     g_assert(xenbus->xsh);
 
     xs_node_create(xenbus->xsh, XBT_NULL, xendev->backend_path, perms,
-                   ARRAY_SIZE(perms), &local_err);
-    if (local_err) {
-        error_propagate_prepend(errp, local_err,
+                   ARRAY_SIZE(perms), errp);
+    if (*errp) {
+        error_prepend(errp,
                                 "failed to create backend: ");
         return;
     }
@@ -716,9 +713,9 @@ static void xen_device_backend_create(XenDevice *xendev, Error **errp)
     xendev->backend_state_watch =
         xen_device_add_watch(xendev, xendev->backend_path,
                              "state", xen_device_backend_changed,
-                             &local_err);
-    if (local_err) {
-        error_propagate_prepend(errp, local_err,
+                             errp);
+    if (*errp) {
+        error_prepend(errp,
                                 "failed to watch backend state: ");
         return;
     }
@@ -726,9 +723,9 @@ static void xen_device_backend_create(XenDevice *xendev, Error **errp)
     xendev->backend_online_watch =
         xen_device_add_watch(xendev, xendev->backend_path,
                              "online", xen_device_backend_changed,
-                             &local_err);
-    if (local_err) {
-        error_propagate_prepend(errp, local_err,
+                             errp);
+    if (*errp) {
+        error_prepend(errp,
                                 "failed to watch backend online: ");
         return;
     }
@@ -866,9 +863,9 @@ static bool xen_device_frontend_exists(XenDevice *xendev)
 
 static void xen_device_frontend_create(XenDevice *xendev, Error **errp)
 {
+    ERRP_AUTO_PROPAGATE();
     XenBus *xenbus = XEN_BUS(qdev_get_parent_bus(DEVICE(xendev)));
     struct xs_permissions perms[2];
-    Error *local_err = NULL;
 
     xendev->frontend_path = xen_device_get_frontend_path(xendev);
 
@@ -885,9 +882,9 @@ static void xen_device_frontend_create(XenDevice *xendev, Error **errp)
         g_assert(xenbus->xsh);
 
         xs_node_create(xenbus->xsh, XBT_NULL, xendev->frontend_path, perms,
-                       ARRAY_SIZE(perms), &local_err);
-        if (local_err) {
-            error_propagate_prepend(errp, local_err,
+                       ARRAY_SIZE(perms), errp);
+        if (*errp) {
+            error_prepend(errp,
                                     "failed to create frontend: ");
             return;
         }
@@ -895,9 +892,9 @@ static void xen_device_frontend_create(XenDevice *xendev, Error **errp)
 
     xendev->frontend_state_watch =
         xen_device_add_watch(xendev, xendev->frontend_path, "state",
-                             xen_device_frontend_changed, &local_err);
-    if (local_err) {
-        error_propagate_prepend(errp, local_err,
+                             xen_device_frontend_changed, errp);
+    if (*errp) {
+        error_prepend(errp,
                                 "failed to watch frontend state: ");
     }
 }
@@ -1228,11 +1225,11 @@ static void xen_device_exit(Notifier *n, void *data)
 
 static void xen_device_realize(DeviceState *dev, Error **errp)
 {
+    ERRP_AUTO_PROPAGATE();
     XenDevice *xendev = XEN_DEVICE(dev);
     XenDeviceClass *xendev_class = XEN_DEVICE_GET_CLASS(xendev);
     XenBus *xenbus = XEN_BUS(qdev_get_parent_bus(DEVICE(xendev)));
     const char *type = object_get_typename(OBJECT(xendev));
-    Error *local_err = NULL;
 
     if (xendev->frontend_id == DOMID_INVALID) {
         xendev->frontend_id = xen_domid;
@@ -1248,9 +1245,9 @@ static void xen_device_realize(DeviceState *dev, Error **errp)
         goto unrealize;
     }
 
-    xendev->name = xendev_class->get_name(xendev, &local_err);
-    if (local_err) {
-        error_propagate_prepend(errp, local_err,
+    xendev->name = xendev_class->get_name(xendev, errp);
+    if (*errp) {
+        error_prepend(errp,
                                 "failed to get device name: ");
         goto unrealize;
     }
@@ -1274,22 +1271,19 @@ static void xen_device_realize(DeviceState *dev, Error **errp)
     xendev->feature_grant_copy =
         (xengnttab_grant_copy(xendev->xgth, 0, NULL) == 0);
 
-    xen_device_backend_create(xendev, &local_err);
-    if (local_err) {
-        error_propagate(errp, local_err);
+    xen_device_backend_create(xendev, errp);
+    if (*errp) {
         goto unrealize;
     }
 
-    xen_device_frontend_create(xendev, &local_err);
-    if (local_err) {
-        error_propagate(errp, local_err);
+    xen_device_frontend_create(xendev, errp);
+    if (*errp) {
         goto unrealize;
     }
 
     if (xendev_class->realize) {
-        xendev_class->realize(xendev, &local_err);
-        if (local_err) {
-            error_propagate(errp, local_err);
+        xendev_class->realize(xendev, errp);
+        if (*errp) {
             goto unrealize;
         }
     }
diff --git a/hw/xen/xen-host-pci-device.c b/hw/xen/xen-host-pci-device.c
index 1b44dcafaf..02379c341c 100644
--- a/hw/xen/xen-host-pci-device.c
+++ b/hw/xen/xen-host-pci-device.c
@@ -333,8 +333,8 @@ void xen_host_pci_device_get(XenHostPCIDevice *d, uint16_t domain,
                              uint8_t bus, uint8_t dev, uint8_t func,
                              Error **errp)
 {
+    ERRP_AUTO_PROPAGATE();
     unsigned int v;
-    Error *err = NULL;
 
     d->config_fd = -1;
     d->domain = domain;
@@ -342,36 +342,36 @@ void xen_host_pci_device_get(XenHostPCIDevice *d, uint16_t domain,
     d->dev = dev;
     d->func = func;
 
-    xen_host_pci_config_open(d, &err);
-    if (err) {
+    xen_host_pci_config_open(d, errp);
+    if (*errp) {
         goto error;
     }
 
-    xen_host_pci_get_resource(d, &err);
-    if (err) {
+    xen_host_pci_get_resource(d, errp);
+    if (*errp) {
         goto error;
     }
 
-    xen_host_pci_get_hex_value(d, "vendor", &v, &err);
-    if (err) {
+    xen_host_pci_get_hex_value(d, "vendor", &v, errp);
+    if (*errp) {
         goto error;
     }
     d->vendor_id = v;
 
-    xen_host_pci_get_hex_value(d, "device", &v, &err);
-    if (err) {
+    xen_host_pci_get_hex_value(d, "device", &v, errp);
+    if (*errp) {
         goto error;
     }
     d->device_id = v;
 
-    xen_host_pci_get_dec_value(d, "irq", &v, &err);
-    if (err) {
+    xen_host_pci_get_dec_value(d, "irq", &v, errp);
+    if (*errp) {
         goto error;
     }
     d->irq = v;
 
-    xen_host_pci_get_hex_value(d, "class", &v, &err);
-    if (err) {
+    xen_host_pci_get_hex_value(d, "class", &v, errp);
+    if (*errp) {
         goto error;
     }
     d->class_code = v;
@@ -381,7 +381,6 @@ void xen_host_pci_device_get(XenHostPCIDevice *d, uint16_t domain,
     return;
 
 error:
-    error_propagate(errp, err);
 
     if (d->config_fd >= 0) {
         close(d->config_fd);
diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index 8fbaf2eae9..4bf9353bcb 100644
--- a/hw/xen/xen_pt.c
+++ b/hw/xen/xen_pt.c
@@ -765,12 +765,12 @@ static void xen_pt_destroy(PCIDevice *d) {
 
 static void xen_pt_realize(PCIDevice *d, Error **errp)
 {
+    ERRP_AUTO_PROPAGATE();
     XenPCIPassthroughState *s = XEN_PT_DEVICE(d);
     int i, rc = 0;
     uint8_t machine_irq = 0, scratch;
     uint16_t cmd = 0;
     int pirq = XEN_PT_UNASSIGNED_PIRQ;
-    Error *err = NULL;
 
     /* register real device */
     XEN_PT_LOG(d, "Assigning real physical device %02x:%02x.%d"
@@ -781,10 +781,9 @@ static void xen_pt_realize(PCIDevice *d, Error **errp)
     xen_host_pci_device_get(&s->real_device,
                             s->hostaddr.domain, s->hostaddr.bus,
                             s->hostaddr.slot, s->hostaddr.function,
-                            &err);
-    if (err) {
-        error_append_hint(&err, "Failed to \"open\" the real pci device");
-        error_propagate(errp, err);
+                            errp);
+    if (*errp) {
+        error_append_hint(errp, "Failed to \"open\" the real pci device");
         return;
     }
 
@@ -811,11 +810,10 @@ static void xen_pt_realize(PCIDevice *d, Error **errp)
             return;
         }
 
-        xen_pt_setup_vga(s, &s->real_device, &err);
-        if (err) {
-            error_append_hint(&err, "Setup VGA BIOS of passthrough"
-                    " GFX failed");
-            error_propagate(errp, err);
+        xen_pt_setup_vga(s, &s->real_device, errp);
+        if (*errp) {
+            error_append_hint(errp, "Setup VGA BIOS of passthrough"
+                              " GFX failed");
             xen_host_pci_device_put(&s->real_device);
             return;
         }
@@ -828,10 +826,9 @@ static void xen_pt_realize(PCIDevice *d, Error **errp)
     xen_pt_register_regions(s, &cmd);
 
     /* reinitialize each config register to be emulated */
-    xen_pt_config_init(s, &err);
-    if (err) {
-        error_append_hint(&err, "PCI Config space initialisation failed");
-        error_propagate(errp, err);
+    xen_pt_config_init(s, errp);
+    if (*errp) {
+        error_append_hint(errp, "PCI Config space initialisation failed");
         rc = -1;
         goto err_out;
     }
diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c
index 31ec5add1d..af3fbd1bfb 100644
--- a/hw/xen/xen_pt_config_init.c
+++ b/hw/xen/xen_pt_config_init.c
@@ -2008,8 +2008,8 @@ static void xen_pt_config_reg_init(XenPCIPassthroughState *s,
 
 void xen_pt_config_init(XenPCIPassthroughState *s, Error **errp)
 {
+    ERRP_AUTO_PROPAGATE();
     int i, rc;
-    Error *err = NULL;
 
     QLIST_INIT(&s->reg_grps);
 
@@ -2052,10 +2052,9 @@ void xen_pt_config_init(XenPCIPassthroughState *s, Error **errp)
                                                   reg_grp_offset,
                                                   &reg_grp_entry->size);
             if (rc < 0) {
-                error_setg(&err, "Failed to initialize %d/%zu, type = 0x%x,"
+                error_setg(errp, "Failed to initialize %d/%zu, type = 0x%x,"
                            " rc: %d", i, ARRAY_SIZE(xen_pt_emu_reg_grps),
                            xen_pt_emu_reg_grps[i].grp_type, rc);
-                error_propagate(errp, err);
                 xen_pt_config_delete(s);
                 return;
             }
@@ -2068,13 +2067,14 @@ void xen_pt_config_init(XenPCIPassthroughState *s, Error **errp)
 
                 /* initialize capability register */
                 for (j = 0; regs->size != 0; j++, regs++) {
-                    xen_pt_config_reg_init(s, reg_grp_entry, regs, &err);
-                    if (err) {
-                        error_append_hint(&err, "Failed to init register %d"
-                                " offsets 0x%x in grp_type = 0x%x (%d/%zu)", j,
-                                regs->offset, xen_pt_emu_reg_grps[i].grp_type,
-                                i, ARRAY_SIZE(xen_pt_emu_reg_grps));
-                        error_propagate(errp, err);
+                    xen_pt_config_reg_init(s, reg_grp_entry, regs, errp);
+                    if (*errp) {
+                        error_append_hint(errp, "Failed to init register %d"
+                                          " offsets 0x%x in grp_type = 0x%x (%d/%zu)",
+                                          j,
+                                          regs->offset,
+                                          xen_pt_emu_reg_grps[i].grp_type,
+                                          i, ARRAY_SIZE(xen_pt_emu_reg_grps));
                         xen_pt_config_delete(s);
                         return;
                     }
-- 
2.21.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 000/126] error: auto propagated local_err
  2019-10-11 16:03 [Xen-devel] [RFC v5 000/126] error: auto propagated local_err Vladimir Sementsov-Ogievskiy
                   ` (3 preceding siblings ...)
  2019-10-11 16:04 ` [Xen-devel] [RFC v5 031/126] xen: introduce ERRP_AUTO_PROPAGATE Vladimir Sementsov-Ogievskiy
@ 2019-10-11 17:02 ` Eric Blake
  2019-10-14  8:37   ` Vladimir Sementsov-Ogievskiy
  2019-11-08 15:30 ` Vladimir Sementsov-Ogievskiy
  2019-11-28  8:54 ` Markus Armbruster
  6 siblings, 1 reply; 34+ messages in thread
From: Eric Blake @ 2019-10-11 17:02 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy, qemu-devel
  Cc: Stefan Hajnoczi, Jeff Cody, Jan Kiszka, Alberto Garcia,
	Hailiang Zhang, qemu-block, Aleksandar Rikalo, Halil Pasic,
	Hervé Poussineau, Anthony Perard, Samuel Thibault,
	Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Ronnie Sahlberg, John Snow,
	Richard Henderson, Kevin Wolf, Andrew Jeffery, Chris Wulff,
	Subbaraya Sundeep, Michael Walle, qemu-ppc, Bastian Koppelmann,
	Igor Mammedov, Fam Zheng, Peter Maydell, sheepdog,
	Matthew Rosato, David Hildenbrand, Palmer Dabbelt, Thomas Huth,
	Max Filippov, Denis V. Lunev, Hannes Reinecke,
	Stefano Stabellini, Gonglei (Arei),
	Marcel Apfelbaum, Liu Yuan, Artyom Tarasenko, Eric Farman,
	Amit Shah, Stefan Weil, Greg Kurz, Yuval Shaia, qemu-s390x,
	qemu-arm, Peter Chubb, Cédric Le Goater, Stafford Horne,
	qemu-riscv, Cornelia Huck, Aleksandar Markovic, Aurelien Jarno,
	Paul Burton, Sagar Karandikar, Paul Durrant, Jason Wang,
	Gerd Hoffmann, Edgar E. Iglesias, Guan Xuetao, Ari Sundholm,
	Juan Quintela, Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Laszlo Ersek, Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Michael S. Tsirkin, Mark Cave-Ayland, Vincenzo Maffione,
	Marek Vasut, armbru, Marc-André Lureau, Alistair Francis,
	Pavel Dovgalyuk, Giuseppe Lettieri, Luigi Rizzo, David Gibson,
	Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

On 10/11/19 11:03 AM, Vladimir Sementsov-Ogievskiy wrote:
> Hi all!
> 
> At the request of Markus: full version of errp propagation. Let's look
> at it. Cover as much as possible, except inserting macro invocation
> where it's not necessary.
> 
> It's huge, and so it's an RFC.

Is there a repo containing these patches, to make it easier to play with 
them locally without having to 'git am' the entire 126 messages?


>   util/qemu-sockets.c                           |  31 +--
>   vl.c                                          |  14 +-
>   python/commit-per-subsystem.py                | 204 ++++++++++++++
>   scripts/coccinelle/auto-propagated-errp.cocci | 118 ++++++++
>   341 files changed, 3851 insertions(+), 4455 deletions(-)
>   create mode 100755 python/commit-per-subsystem.py
>   create mode 100644 scripts/coccinelle/auto-propagated-errp.cocci

So, whether or not we take commit-per-subsystem.py, the overall series 
appears to be a nice reduction in lines of code.

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

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 025/126] scripts: add coccinelle script to use auto propagated errp
  2019-10-11 16:04 ` [Xen-devel] [RFC v5 025/126] scripts: add coccinelle script to use auto propagated errp Vladimir Sementsov-Ogievskiy
@ 2019-10-11 17:12   ` Eric Blake
  2019-10-11 18:15     ` Eric Blake
  2019-10-14  8:19     ` Vladimir Sementsov-Ogievskiy
  0 siblings, 2 replies; 34+ messages in thread
From: Eric Blake @ 2019-10-11 17:12 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy, qemu-devel
  Cc: Stefan Hajnoczi, Jeff Cody, Jan Kiszka, Alberto Garcia,
	Hailiang Zhang, qemu-block, Aleksandar Rikalo, Halil Pasic,
	Hervé Poussineau, Anthony Perard, Samuel Thibault,
	Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Ronnie Sahlberg, John Snow,
	Richard Henderson, Kevin Wolf, Andrew Jeffery, Chris Wulff,
	Subbaraya Sundeep, Michael Walle, qemu-ppc, Bastian Koppelmann,
	Igor Mammedov, Fam Zheng, Peter Maydell, sheepdog,
	Matthew Rosato, David Hildenbrand, Palmer Dabbelt, Thomas Huth,
	Max Filippov, Denis V. Lunev, Hannes Reinecke,
	Stefano Stabellini, Gonglei (Arei),
	Marcel Apfelbaum, Liu Yuan, Artyom Tarasenko, Eric Farman,
	Amit Shah, Stefan Weil, Greg Kurz, Yuval Shaia, qemu-s390x,
	qemu-arm, Peter Chubb, Cédric Le Goater, Stafford Horne,
	qemu-riscv, Cornelia Huck, Aleksandar Markovic, Aurelien Jarno,
	Paul Burton, Sagar Karandikar, Paul Durrant, Jason Wang,
	Gerd Hoffmann, Edgar E. Iglesias, Guan Xuetao, Ari Sundholm,
	Juan Quintela, Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Laszlo Ersek, Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Michael S. Tsirkin, Mark Cave-Ayland, Vincenzo Maffione,
	Marek Vasut, armbru, Marc-André Lureau, Alistair Francis,
	Pavel Dovgalyuk, Giuseppe Lettieri, Luigi Rizzo, David Gibson,
	Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

On 10/11/19 11:04 AM, Vladimir Sementsov-Ogievskiy wrote:
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
> 

>   scripts/coccinelle/auto-propagated-errp.cocci | 118 ++++++++++++++++++
>   1 file changed, 118 insertions(+)
>   create mode 100644 scripts/coccinelle/auto-propagated-errp.cocci
> 
> diff --git a/scripts/coccinelle/auto-propagated-errp.cocci b/scripts/coccinelle/auto-propagated-errp.cocci
> new file mode 100644
> index 0000000000..d9731620aa
> --- /dev/null
> +++ b/scripts/coccinelle/auto-propagated-errp.cocci

> +@rule1@
> +// Drop local_err
> +identifier fn, local_err;
> +symbol errp;
> +@@
> +
> + fn(..., Error **errp, ...)
> + {
> +     <...
> +-    Error *local_err = NULL;
> +     ...>
> + }
> +

So our goal is to automate removal of all local_err (including when it 
is spelled err)...

> +@@
> +// Handle pattern with goto, otherwise we'll finish up
> +// with labels at function end which will not compile.
> +identifier rule1.fn;
> +identifier rule1.local_err;
> +identifier OUT;
> +@@
> +
> + fn(...)
> + {
> +     <...
> +-    goto OUT;
> ++    return;
> +     ...>
> +- OUT:
> +-    error_propagate(errp, local_err);
> + }
> +

this dangling label cleanup makes sense

> +@@
> +identifier rule1.fn;
> +identifier rule1.local_err;
> +@@
> +
> + fn(...)
> + {
> +     <...
> +(
> +-    error_free(local_err);
> +-    local_err = NULL;
> ++    error_free_errp(errp);

This does not make sense - error_free_errp() is not defined prior to 
this series or anywhere in patches 1-24, if I'm reading it correctly.

> +|
> +-    error_free(local_err);
> ++    error_free_errp(errp);

and again

> +|
> +-    error_report_err(local_err);
> ++    error_report_errp(errp);
> +|
> +-    warn_report_err(local_err);
> ++    warn_report_errp(errp);
> +|
> +-    error_propagate_prepend(errp, local_err,
> ++    error_prepend(errp,
> +                              ...);
> +|
> +-    error_propagate(errp, local_err);
> +)
> +     ...>
> + }
> +

It looks like once this script is run, error_propagate_prepend() will 
have no clients.  Is there a non-generated cleanup patch that removes it 
(and once it is removed, it can also be removed from the .cocci script 
as no further clients will reappear later)?


> +@@
> +identifier rule1.fn;
> +identifier rule1.local_err;
> +@@
> +
> + fn(...)
> + {
> +     <...
> +(
> +-    &local_err
> ++    errp
> +|
> +-    local_err
> ++    *errp
> +)
> +     ...>
> + }
> +
> +@@
> +symbol errp;
> +@@
> +
> +- *errp != NULL
> ++ *errp
> 

Seems to make sense.

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

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 025/126] scripts: add coccinelle script to use auto propagated errp
  2019-10-11 17:12   ` Eric Blake
@ 2019-10-11 18:15     ` Eric Blake
  2019-10-14  8:19     ` Vladimir Sementsov-Ogievskiy
  1 sibling, 0 replies; 34+ messages in thread
From: Eric Blake @ 2019-10-11 18:15 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy, qemu-devel
  Cc: Stefan Hajnoczi, Jeff Cody, Jan Kiszka, Alberto Garcia,
	Hailiang Zhang, qemu-block, Aleksandar Rikalo, Halil Pasic,
	Hervé Poussineau, Anthony Perard, Samuel Thibault,
	Laszlo Ersek, Jason Wang, Laurent Vivier, Eduardo Habkost,
	Xie Changlong, Peter Lieven, Dr. David Alan Gilbert,
	Beniamino Galvani, Eric Auger, Alex Williamson, Ronnie Sahlberg,
	John Snow, Richard Henderson, Kevin Wolf, Andrew Jeffery,
	Chris Wulff, Subbaraya Sundeep, Michael Walle, qemu-ppc,
	Bastian Koppelmann, Igor Mammedov, Fam Zheng, Peter Maydell,
	sheepdog, Matthew Rosato, David Hildenbrand, Palmer Dabbelt,
	Thomas Huth, Max Filippov, Denis V. Lunev, Hannes Reinecke,
	Stefano Stabellini, Gonglei (Arei),
	Liu Yuan, Artyom Tarasenko, Eric Farman, Amit Shah, Stefan Weil,
	Greg Kurz, Yuval Shaia, qemu-s390x, qemu-arm, Peter Chubb,
	Cédric Le Goater, Stafford Horne, qemu-riscv, Cornelia Huck,
	Aleksandar Markovic, Aurelien Jarno, Paul Burton,
	Sagar Karandikar, Paul Durrant, Anthony Green, Gerd Hoffmann,
	Edgar E. Iglesias, Guan Xuetao, Ari Sundholm, Juan Quintela,
	Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Philippe Mathieu-Daudé,
	Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Michael S. Tsirkin, Mark Cave-Ayland, Vincenzo Maffione,
	Marek Vasut, armbru, Marc-André Lureau, Alistair Francis,
	Pavel Dovgalyuk, Giuseppe Lettieri, Luigi Rizzo, David Gibson,
	Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

On 10/11/19 12:12 PM, Eric Blake wrote:
> On 10/11/19 11:04 AM, Vladimir Sementsov-Ogievskiy wrote:
>> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>> ---
>>

>> +@@
>> +identifier rule1.fn;
>> +identifier rule1.local_err;
>> +@@
>> +
>> + fn(...)
>> + {
>> +     <...
>> +(
>> +-    error_free(local_err);
>> +-    local_err = NULL;
>> ++    error_free_errp(errp);
> 
> This does not make sense - error_free_errp() is not defined prior to 
> this series or anywhere in patches 1-24, if I'm reading it correctly.

Apologies - I sent my reply to this message before 21/126 showed up in 
my inbox, and didn't realize that I had skipped over sequencing.  This 
part is fine after all, but it points to the perils of reviewing a 
thread as it comes in piecemeal, vs. reviewing an actual branch with all 
patches instantly available.

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

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 025/126] scripts: add coccinelle script to use auto propagated errp
  2019-10-11 17:12   ` Eric Blake
  2019-10-11 18:15     ` Eric Blake
@ 2019-10-14  8:19     ` Vladimir Sementsov-Ogievskiy
  2019-10-14 14:00       ` Eric Blake
  1 sibling, 1 reply; 34+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2019-10-14  8:19 UTC (permalink / raw)
  To: Eric Blake, qemu-devel
  Cc: Stefan Hajnoczi, Jeff Cody, Jan Kiszka, Alberto Garcia,
	Hailiang Zhang, qemu-block, Aleksandar Rikalo, Halil Pasic,
	Hervé Poussineau, Anthony Perard, Samuel Thibault,
	Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Ronnie Sahlberg, John Snow,
	Richard Henderson, Kevin Wolf, Andrew Jeffery, Chris Wulff,
	Subbaraya Sundeep, Michael Walle, qemu-ppc, Bastian Koppelmann,
	Igor Mammedov, Fam Zheng, Peter Maydell, sheepdog,
	Matthew Rosato, David Hildenbrand, Palmer Dabbelt, Thomas Huth,
	Max Filippov, Hannes Reinecke, Stefano Stabellini, Gonglei (Arei),
	Marcel Apfelbaum, Liu Yuan, Artyom Tarasenko, Eric Farman,
	Amit Shah, Stefan Weil, Greg Kurz, Yuval Shaia, qemu-s390x,
	qemu-arm, Peter Chubb, Cédric Le Goater, Stafford Horne,
	qemu-riscv, Cornelia Huck, Aleksandar Markovic, Aurelien Jarno,
	Paul Burton, Sagar Karandikar, Paul Durrant, Jason Wang,
	Gerd Hoffmann, Edgar E. Iglesias, Guan Xuetao, Ari Sundholm,
	Juan Quintela, Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Laszlo Ersek, Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Denis Lunev, Michael S. Tsirkin, Mark Cave-Ayland,
	Vincenzo Maffione, Marek Vasut, armbru, Marc-André Lureau,
	Alistair Francis, Pavel Dovgalyuk, Giuseppe Lettieri,
	Luigi Rizzo, David Gibson, Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

11.10.2019 20:12, Eric Blake wrote:
> On 10/11/19 11:04 AM, Vladimir Sementsov-Ogievskiy wrote:
>> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>> ---
>>
> 
>>   scripts/coccinelle/auto-propagated-errp.cocci | 118 ++++++++++++++++++
>>   1 file changed, 118 insertions(+)
>>   create mode 100644 scripts/coccinelle/auto-propagated-errp.cocci
>>
>> diff --git a/scripts/coccinelle/auto-propagated-errp.cocci b/scripts/coccinelle/auto-propagated-errp.cocci
>> new file mode 100644
>> index 0000000000..d9731620aa
>> --- /dev/null
>> +++ b/scripts/coccinelle/auto-propagated-errp.cocci
> 
>> +@rule1@
>> +// Drop local_err
>> +identifier fn, local_err;
>> +symbol errp;
>> +@@
>> +
>> + fn(..., Error **errp, ...)
>> + {
>> +     <...
>> +-    Error *local_err = NULL;
>> +     ...>
>> + }
>> +
> 
> So our goal is to automate removal of all local_err (including when it is spelled err)...
> 
>> +@@
>> +// Handle pattern with goto, otherwise we'll finish up
>> +// with labels at function end which will not compile.
>> +identifier rule1.fn;
>> +identifier rule1.local_err;
>> +identifier OUT;
>> +@@
>> +
>> + fn(...)
>> + {
>> +     <...
>> +-    goto OUT;
>> ++    return;
>> +     ...>
>> +- OUT:
>> +-    error_propagate(errp, local_err);
>> + }
>> +
> 
> this dangling label cleanup makes sense
> 
>> +@@
>> +identifier rule1.fn;
>> +identifier rule1.local_err;
>> +@@
>> +
>> + fn(...)
>> + {
>> +     <...
>> +(
>> +-    error_free(local_err);
>> +-    local_err = NULL;
>> ++    error_free_errp(errp);
> 
> This does not make sense - error_free_errp() is not defined prior to this series or anywhere in patches 1-24, if I'm reading it correctly.
> 
>> +|
>> +-    error_free(local_err);
>> ++    error_free_errp(errp);
> 
> and again
> 
>> +|
>> +-    error_report_err(local_err);
>> ++    error_report_errp(errp);
>> +|
>> +-    warn_report_err(local_err);
>> ++    warn_report_errp(errp);
>> +|
>> +-    error_propagate_prepend(errp, local_err,
>> ++    error_prepend(errp,
>> +                              ...);
>> +|
>> +-    error_propagate(errp, local_err);
>> +)
>> +     ...>
>> + }
>> +
> 
> It looks like once this script is run, error_propagate_prepend() will have no clients.

No, it still have a bit, when working with error_copy, and/or moving errors from/to structures.

> Is there a non-generated cleanup patch that removes it (and once it is removed, it can also be removed from the .cocci script as no further clients will reappear later)?

Maybe.

> 
> 
>> +@@
>> +identifier rule1.fn;
>> +identifier rule1.local_err;
>> +@@
>> +
>> + fn(...)
>> + {
>> +     <...
>> +(
>> +-    &local_err
>> ++    errp
>> +|
>> +-    local_err
>> ++    *errp
>> +)
>> +     ...>
>> + }
>> +
>> +@@
>> +symbol errp;
>> +@@
>> +
>> +- *errp != NULL
>> ++ *errp
>>
> 
> Seems to make sense.
> 


-- 
Best regards,
Vladimir
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 000/126] error: auto propagated local_err
  2019-10-11 17:02 ` [Xen-devel] [RFC v5 000/126] error: auto propagated local_err Eric Blake
@ 2019-10-14  8:37   ` Vladimir Sementsov-Ogievskiy
  0 siblings, 0 replies; 34+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2019-10-14  8:37 UTC (permalink / raw)
  To: Eric Blake, qemu-devel
  Cc: Stefan Hajnoczi, Jeff Cody, Jan Kiszka, Alberto Garcia,
	Hailiang Zhang, qemu-block, Aleksandar Rikalo, Halil Pasic,
	Hervé Poussineau, Anthony Perard, Samuel Thibault,
	Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Ronnie Sahlberg, John Snow,
	Richard Henderson, Kevin Wolf, Andrew Jeffery, Chris Wulff,
	Subbaraya Sundeep, Michael Walle, qemu-ppc, Bastian Koppelmann,
	Igor Mammedov, Fam Zheng, Peter Maydell, sheepdog,
	Matthew Rosato, David Hildenbrand, Palmer Dabbelt, Thomas Huth,
	Max Filippov, Hannes Reinecke, Stefano Stabellini, Gonglei (Arei),
	Marcel Apfelbaum, Liu Yuan, Artyom Tarasenko, Eric Farman,
	Amit Shah, Stefan Weil, Greg Kurz, Yuval Shaia, qemu-s390x,
	qemu-arm, Peter Chubb, Cédric Le Goater, Stafford Horne,
	qemu-riscv, Cornelia Huck, Aleksandar Markovic, Aurelien Jarno,
	Paul Burton, Sagar Karandikar, Paul Durrant, Jason Wang,
	Gerd Hoffmann, Edgar E. Iglesias, Guan Xuetao, Ari Sundholm,
	Juan Quintela, Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Laszlo Ersek, Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Denis Lunev, Michael S. Tsirkin, Mark Cave-Ayland,
	Vincenzo Maffione, Marek Vasut, armbru, Marc-André Lureau,
	Alistair Francis, Pavel Dovgalyuk, Giuseppe Lettieri,
	Luigi Rizzo, David Gibson, Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

11.10.2019 20:02, Eric Blake wrote:
> On 10/11/19 11:03 AM, Vladimir Sementsov-Ogievskiy wrote:
>> Hi all!
>>
>> At the request of Markus: full version of errp propagation. Let's look
>> at it. Cover as much as possible, except inserting macro invocation
>> where it's not necessary.
>>
>> It's huge, and so it's an RFC.
> 
> Is there a repo containing these patches, to make it easier to play with them locally without having to 'git am' the entire 126 messages?

Done:

https://src.openvz.org/users/vsementsov/repos/qemu/browse

https://src.openvz.org/scm/~vsementsov/qemu.git #tag up-auto-local-err-v5

> 
> 
>>   util/qemu-sockets.c                           |  31 +--
>>   vl.c                                          |  14 +-
>>   python/commit-per-subsystem.py                | 204 ++++++++++++++
>>   scripts/coccinelle/auto-propagated-errp.cocci | 118 ++++++++
>>   341 files changed, 3851 insertions(+), 4455 deletions(-)
>>   create mode 100755 python/commit-per-subsystem.py
>>   create mode 100644 scripts/coccinelle/auto-propagated-errp.cocci
> 
> So, whether or not we take commit-per-subsystem.py, the overall series appears to be a nice reduction in lines of code.
> 


-- 
Best regards,
Vladimir
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 025/126] scripts: add coccinelle script to use auto propagated errp
  2019-10-14  8:19     ` Vladimir Sementsov-Ogievskiy
@ 2019-10-14 14:00       ` Eric Blake
  0 siblings, 0 replies; 34+ messages in thread
From: Eric Blake @ 2019-10-14 14:00 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy, qemu-devel
  Cc: Stefan Hajnoczi, Jeff Cody, Jan Kiszka, Alberto Garcia,
	Hailiang Zhang, qemu-block, Aleksandar Rikalo, Halil Pasic,
	Hervé Poussineau, Anthony Perard, Samuel Thibault,
	Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Ronnie Sahlberg, John Snow,
	Richard Henderson, Kevin Wolf, Andrew Jeffery, Chris Wulff,
	Subbaraya Sundeep, Michael Walle, qemu-ppc, Bastian Koppelmann,
	Igor Mammedov, Fam Zheng, Peter Maydell, sheepdog,
	Matthew Rosato, David Hildenbrand, Palmer Dabbelt, Thomas Huth,
	Max Filippov, Hannes Reinecke, Stefano Stabellini, Gonglei (Arei),
	Marcel Apfelbaum, Liu Yuan, Artyom Tarasenko, Eric Farman,
	Amit Shah, Stefan Weil, Greg Kurz, Yuval Shaia, qemu-s390x,
	qemu-arm, Peter Chubb, Cédric Le Goater, Stafford Horne,
	qemu-riscv, Cornelia Huck, Aleksandar Markovic, Aurelien Jarno,
	Paul Burton, Sagar Karandikar, Paul Durrant, Jason Wang,
	Gerd Hoffmann, Edgar E. Iglesias, Guan Xuetao, Ari Sundholm,
	Juan Quintela, Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Laszlo Ersek, Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Denis Lunev, Michael S. Tsirkin, Mark Cave-Ayland,
	Vincenzo Maffione, Marek Vasut, armbru, Marc-André Lureau,
	Alistair Francis, Pavel Dovgalyuk, Giuseppe Lettieri,
	Luigi Rizzo, David Gibson, Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

On 10/14/19 3:19 AM, Vladimir Sementsov-Ogievskiy wrote:

>>> +|
>>> +-    error_propagate(errp, local_err);
>>> +)
>>> +     ...>
>>> + }
>>> +
>>
>> It looks like once this script is run, error_propagate_prepend() will have no clients.
> 
> No, it still have a bit, when working with error_copy, and/or moving errors from/to structures.

No public clients. So can we turn it into a static function only used by 
error.c?

> 
>> Is there a non-generated cleanup patch that removes it (and once it is removed, it can also be removed from the .cocci script as no further clients will reappear later)?
> 
> Maybe.
> 

Basically, if we can get error_propagate out of error.h, that's a good 
sign.  But it's not a show-stopper if we can't do it for some legitimate 
reason (such a reason might include that the definition of the 
ERRP_AUTO_PROPAGATE macro is easier to write if error_propagate remains 
in the .h), so we'll just have to see what is possible.

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

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 000/126] error: auto propagated local_err
  2019-10-11 16:03 [Xen-devel] [RFC v5 000/126] error: auto propagated local_err Vladimir Sementsov-Ogievskiy
                   ` (4 preceding siblings ...)
  2019-10-11 17:02 ` [Xen-devel] [RFC v5 000/126] error: auto propagated local_err Eric Blake
@ 2019-11-08 15:30 ` Vladimir Sementsov-Ogievskiy
  2019-11-08 18:57   ` Marc-André Lureau
  2019-11-20  9:50   ` Vladimir Sementsov-Ogievskiy
  2019-11-28  8:54 ` Markus Armbruster
  6 siblings, 2 replies; 34+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2019-11-08 15:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: Ronnie Sahlberg, Jeff Cody, Jan Kiszka, Eric Blake,
	Alberto Garcia, Hailiang Zhang, qemu-block, Aleksandar Rikalo,
	Halil Pasic, Hervé Poussineau, Anthony Perard,
	Samuel Thibault, Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Stefan Hajnoczi, John Snow,
	Richard Henderson, Kevin Wolf, Andrew Jeffery, Chris Wulff,
	Subbaraya Sundeep, Michael Walle, qemu-ppc, Bastian Koppelmann,
	Igor Mammedov, Fam Zheng, Peter Maydell, sheepdog,
	Matthew Rosato, David Hildenbrand, Palmer Dabbelt, Thomas Huth,
	Max Filippov, Hannes Reinecke, Stefano Stabellini, Gonglei (Arei),
	Marcel Apfelbaum, Liu Yuan, Artyom Tarasenko, Eric Farman,
	Amit Shah, Stefan Weil, Greg Kurz, Yuval Shaia, qemu-s390x,
	qemu-arm, Peter Chubb, Cédric Le Goater, Stafford Horne,
	qemu-riscv, Cornelia Huck, Aleksandar Markovic, Aurelien Jarno,
	Paul Burton, Sagar Karandikar, Paul Durrant, Jason Wang,
	Gerd Hoffmann, Edgar E. Iglesias, Guan Xuetao, Ari Sundholm,
	Juan Quintela, Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Laszlo Ersek, Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Denis Lunev, Michael S. Tsirkin, Mark Cave-Ayland,
	Vincenzo Maffione, Marek Vasut, armbru, Marc-André Lureau,
	Alistair Francis, Pavel Dovgalyuk, Giuseppe Lettieri,
	Luigi Rizzo, David Gibson, Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

Finally, what is the plan?

Markus what do you think?

Now a lot of patches are reviewed, but a lot of are not.

Is there any hope that all patches will be reviewed? Should I resend the
whole series, or may be reduce it to reviewed subsystems only?

11.10.2019 19:03, Vladimir Sementsov-Ogievskiy wrote:
> Hi all!
> 
> At the request of Markus: full version of errp propagation. Let's look
> at it. Cover as much as possible, except inserting macro invocation
> where it's not necessary.
> 
> It's huge, and so it's an RFC.
> 
> In v5 I've added a lot more preparation cleanups:
> 01-23 are preparation cleanups
>    01: not changed, keep Eric's r-b
>    02: improve commit msg [Markus], keep Eric's r-b
>    03: changed, only error API here, drop r-b
> 24 is core macro
>    - improve cover letter, wording and macro code style
>    - keep Eric's r-b
> 25-26: automation scripts
>     - commit-per-subsystem changed a lot. it's a draft, don't bother too
>       much with it
>     - coccinelle: add support of error_propagate_prepend
> 
> 27-126: generated patches
> 
> ====
> 
> Here is a proposal of auto propagation for local_err, to not call
> error_propagate on every exit point, when we deal with local_err.
> 
> There are also two issues with errp:
> 
> 1. error_fatal & error_append_hint/error_prepend: user can't see this
> additional info, because exit() happens in error_setg earlier than info
> is added. [Reported by Greg Kurz]
> 
> 2. error_abort & error_propagate: when we wrap
> error_abort by local_err+error_propagate, resulting coredump will
> refer to error_propagate and not to the place where error happened.
> (the macro itself don't fix the issue, but it allows to [3.] drop all
> local_err+error_propagate pattern, which will definitely fix the issue)
> [Reported by Kevin Wolf]
> 
> ====
> 
> Generated patches split:
> 
> misc
>     hw/misc/ivshmem.c
>     hw/misc/tmp105.c
>     hw/misc/tmp421.c
> s390x
>     hw/intc/s390_flic_kvm.c
>     hw/s390x/3270-ccw.c
>     hw/s390x/css-bridge.c
>     hw/s390x/css.c
>     hw/s390x/s390-skeys.c
>     hw/s390x/s390-virtio-ccw.c
>     hw/s390x/sclp.c
>     hw/s390x/tod-kvm.c
>     hw/vfio/ccw.c
>     target/s390x/cpu.c
> tcg
>     exec.c
>     hw/arm/armv7m.c
>     hw/arm/smmu-common.c
>     hw/arm/smmuv3.c
>     hw/cpu/a15mpcore.c
>     hw/cpu/a9mpcore.c
>     hw/cpu/arm11mpcore.c
>     hw/i386/pc.c
>     hw/intc/nios2_iic.c
>     hw/mips/cps.c
>     hw/riscv/riscv_hart.c
>     hw/riscv/sifive_e.c
>     hw/riscv/sifive_u.c
>     hw/sd/milkymist-memcard.c
>     target/alpha/cpu.c
>     target/arm/cpu.c
>     target/arm/cpu64.c
>     target/cris/cpu.c
>     target/hppa/cpu.c
>     target/i386/cpu.c
>     target/lm32/cpu.c
>     target/m68k/cpu.c
>     target/microblaze/cpu.c
>     target/mips/cpu.c
>     target/moxie/cpu.c
>     target/nios2/cpu.c
>     target/openrisc/cpu.c
>     target/ppc/compat.c
>     target/ppc/translate_init.inc.c
>     target/riscv/cpu.c
>     target/sh4/cpu.c
>     target/sparc/cpu.c
>     target/tricore/cpu.c
>     target/unicore32/cpu.c
>     target/xtensa/cpu.c
> kvm
>     target/ppc/kvm.c
>     target/s390x/cpu_models.c
> xen
>     hw/block/dataplane/xen-block.c
>     hw/block/xen-block.c
>     hw/xen/xen-backend.c
>     hw/xen/xen-bus.c
>     hw/xen/xen-host-pci-device.c
>     hw/xen/xen_pt.c
>     hw/xen/xen_pt_config_init.c
> Hosts
>     qga/commands-win32.c
>     util/oslib-posix.c
> ARM Machines
>     hw/arm/allwinner-a10.c
>     hw/arm/aspeed_soc.c
>     hw/arm/bcm2835_peripherals.c
>     hw/arm/bcm2836.c
>     hw/arm/digic.c
>     hw/arm/fsl-imx25.c
>     hw/arm/fsl-imx31.c
>     hw/arm/fsl-imx6.c
>     hw/arm/integratorcp.c
>     hw/arm/msf2-soc.c
>     hw/arm/nrf51_soc.c
>     hw/arm/stm32f205_soc.c
>     hw/arm/virt.c
>     hw/arm/xlnx-versal-virt.c
>     hw/arm/xlnx-zynqmp.c
>     hw/cpu/realview_mpcore.c
>     hw/display/bcm2835_fb.c
>     hw/dma/bcm2835_dma.c
>     hw/dma/xilinx_axidma.c
>     hw/gpio/aspeed_gpio.c
>     hw/gpio/bcm2835_gpio.c
>     hw/intc/arm_gic.c
>     hw/intc/arm_gic_kvm.c
>     hw/intc/arm_gicv3.c
>     hw/intc/arm_gicv3_its_kvm.c
>     hw/intc/arm_gicv3_kvm.c
>     hw/intc/armv7m_nvic.c
>     hw/intc/realview_gic.c
>     hw/microblaze/xlnx-zynqmp-pmu.c
>     hw/misc/bcm2835_mbox.c
>     hw/misc/bcm2835_property.c
>     hw/misc/msf2-sysreg.c
>     hw/net/xilinx_axienet.c
>     hw/nvram/nrf51_nvm.c
>     hw/timer/aspeed_timer.c
>     hw/watchdog/wdt_aspeed.c
> MIPS Machines
>     hw/core/loader-fit.c
> PowerPC Machines
>     hw/intc/pnv_xive.c
>     hw/intc/xics.c
>     hw/intc/xics_kvm.c
>     hw/intc/xics_pnv.c
>     hw/intc/xics_spapr.c
>     hw/isa/pc87312.c
>     hw/misc/macio/macio.c
>     hw/ppc/e500.c
>     hw/ppc/mac_newworld.c
>     hw/ppc/pnv.c
>     hw/ppc/pnv_core.c
>     hw/ppc/pnv_homer.c
>     hw/ppc/pnv_lpc.c
>     hw/ppc/pnv_occ.c
>     hw/ppc/pnv_psi.c
>     hw/ppc/spapr.c
>     hw/ppc/spapr_caps.c
>     hw/ppc/spapr_cpu_core.c
>     hw/ppc/spapr_drc.c
>     hw/ppc/spapr_irq.c
>     hw/ppc/spapr_pci.c
>     hw/ppc/spapr_vio.c
> SPARC Machines
>     hw/sparc/sun4m.c
>     hw/sparc64/sun4u.c
> S390 Machines
>     hw/s390x/ipl.c
>     hw/s390x/s390-pci-bus.c
> X86 Machines
>     hw/acpi/ich9.c
>     hw/char/debugcon.c
>     hw/char/serial-pci-multi.c
>     hw/char/serial-pci.c
>     hw/core/machine.c
>     hw/core/numa.c
>     hw/intc/apic_common.c
>     hw/pci-host/piix.c
> IDE
>     hw/ide/qdev.c
> Floppy
>     hw/block/fdc.c
> IPack
>     hw/ipack/ipack.c
> PCI
>     hw/pci-bridge/gen_pcie_root_port.c
>     hw/pci-bridge/pci_bridge_dev.c
>     hw/pci-bridge/pci_expander_bridge.c
>     hw/pci-bridge/pcie_pci_bridge.c
>     hw/pci-bridge/pcie_root_port.c
>     hw/pci/pci.c
>     hw/pci/pcie.c
>     hw/pci/shpc.c
> ACPI/SMBIOS
>     hw/acpi/core.c
>     hw/acpi/cpu_hotplug.c
>     hw/acpi/memory_hotplug.c
>     hw/mem/memory-device.c
>     hw/mem/pc-dimm.c
>     hw/smbios/smbios.c
> Network devices
>     hw/net/dp8393x.c
>     hw/net/ne2000-isa.c
> pflash
>     hw/block/pflash_cfi01.c
>     hw/block/pflash_cfi02.c
> SCSI
>     hw/scsi/esp-pci.c
>     hw/scsi/mptsas.c
>     hw/scsi/scsi-bus.c
>     hw/scsi/scsi-disk.c
>     hw/scsi/scsi-generic.c
>     hw/scsi/virtio-scsi.c
> SD (Secure Card)
>     hw/sd/sdhci-pci.c
>     hw/sd/sdhci.c
> USB
>     hw/usb/bus.c
>     hw/usb/ccid-card-emulated.c
>     hw/usb/dev-smartcard-reader.c
>     hw/usb/dev-storage.c
>     hw/usb/hcd-ohci-pci.c
>     hw/usb/hcd-ohci.c
>     hw/usb/hcd-uhci.c
>     hw/usb/hcd-xhci.c
> USB (serial adapter)
>     hw/usb/dev-serial.c
> VFIO
>     hw/vfio/common.c
>     hw/vfio/pci-quirks.c
>     hw/vfio/pci.c
>     hw/vfio/platform.c
> vfio-ccw
>     hw/s390x/s390-ccw.c
> vhost
>     hw/block/vhost-user-blk.c
>     hw/scsi/vhost-scsi.c
>     hw/scsi/vhost-user-scsi.c
>     hw/virtio/vhost-vsock.c
> virtio
>     hw/virtio/virtio-balloon.c
>     hw/virtio/virtio-bus.c
>     hw/virtio/virtio-pci.c
>     hw/virtio/virtio-rng-pci.c
>     hw/virtio/virtio.c
> virtio-9p
>     hw/9pfs/9p-local.c
>     hw/9pfs/9p.c
> virtio-blk
>     hw/block/dataplane/virtio-blk.c
>     hw/block/virtio-blk.c
> virtio-ccw
>     hw/s390x/virtio-ccw-crypto.c
>     hw/s390x/virtio-ccw-rng.c
>     hw/s390x/virtio-ccw.c
> virtio-input
>     hw/input/virtio-input.c
> virtio-serial
>     hw/char/virtio-serial-bus.c
> virtio-rng
>     backends/rng.c
>     hw/virtio/virtio-rng.c
> megasas
>     hw/scsi/megasas.c
> NVDIMM
>     hw/mem/nvdimm.c
> eepro100
>     hw/net/eepro100.c
> virtio-gpu
>     hw/display/virtio-gpu-base.c
>     hw/display/virtio-gpu-pci.c
>     hw/display/virtio-vga.c
> fw_cfg
>     hw/nvram/fw_cfg.c
> XIVE
>     hw/intc/spapr_xive.c
>     hw/intc/spapr_xive_kvm.c
>     hw/intc/xive.c
> Audio
>     audio/audio.c
>     hw/audio/intel-hda.c
> block
>     block.c
>     block/backup.c
>     block/block-backend.c
>     block/commit.c
>     block/crypto.c
>     block/dirty-bitmap.c
>     block/io.c
>     block/mirror.c
>     block/qapi.c
>     block/snapshot.c
>     block/throttle-groups.c
>     block/throttle.c
>     block/vxhs.c
>     blockdev.c
>     blockjob.c
>     hw/block/onenand.c
>     job.c
> scsi
>     scsi/pr-manager-helper.c
> chardev
>     chardev/char-socket.c
>     chardev/char.c
>     chardev/spice.c
> cmdline
>     util/qemu-option.c
> Dump
>     dump/dump.c
>     dump/win_dump.c
> Memory API
>     memory.c
> SPICE
>     hw/display/qxl.c
> Graphics
>     ui/input-barrier.c
>     ui/input.c
>     ui/vnc.c
> Main loop
>     util/main-loop.c
>     vl.c
> Human Monitor (HMP)
>     monitor/misc.c
> net
>     net/can/can_host.c
>     net/dump.c
>     net/filter-buffer.c
>     net/filter.c
>     net/net.c
>     net/netmap.c
>     net/tap.c
> hostmem
>     backends/hostmem-file.c
>     backends/hostmem-memfd.c
>     backends/hostmem.c
> cryptodev
>     backends/cryptodev-vhost-user.c
>     backends/cryptodev.c
> QAPI
>     qapi/qapi-visit-core.c
>     qapi/qmp-dispatch.c
>     qapi/string-input-visitor.c
> qga
>     qga/commands-posix.c
> QOM
>     hw/core/qdev-properties-system.c
>     hw/core/qdev-properties.c
>     hw/core/qdev.c
>     qdev-monitor.c
>     qom/object.c
>     qom/object_interfaces.c
>     qom/qom-qobject.c
> QMP
>     monitor/qmp-cmds.c
> SLIRP
>     net/slirp.c
> Tracing
>     trace/qmp.c
> TPM
>     hw/tpm/tpm_util.c
>     tpm.c
> Migration
>     migration/migration.c
>     migration/ram.c
>     migration/rdma.c
>     migration/savevm.c
>     migration/socket.c
> Cryptography
>     crypto/block-luks.c
>     crypto/secret.c
>     crypto/tlssession.c
> I/O Channels
>     io/dns-resolver.c
>     io/net-listener.c
> Sockets
>     util/qemu-sockets.c
> colo
>     migration/colo.c
> Record/replay
>     block/blkreplay.c
> VMDK
>     block/vmdk.c
> RBD
>     block/rbd.c
> Sheepdog
>     block/sheepdog.c
> VHDX
>     block/vhdx-log.c
>     block/vhdx.c
> VDI
>     block/vdi.c
> iSCSI
>     block/iscsi.c
> nbd
>     include/block/nbd.h
>     block/nbd.c
>     nbd/client.c
>     nbd/server.c
> NFS
>     block/nfs.c
> SSH
>     block/ssh.c
> CURL
>     block/curl.c
> GLUSTER
>     block/gluster.c
> NVMe Block Driver
>     block/nvme.c
> Bootdevice
>     bootdevice.c
> Quorum
>     block/quorum.c
> blklogwrites
>     block/blklogwrites.c
> blkverify
>     block/blkverify.c
> parallels
>     block/parallels.c
> qed
>     block/qed.c
> raw
>     block/file-posix.c
>     block/file-win32.c
>     block/raw-format.c
> qcow2
>     block/qcow2-bitmap.c
>     block/qcow2.c
> qcow
>     block/qcow.c
> blkdebug
>     block/blkdebug.c
> vpc
>     block/vpc.c
> vvfat
>     block/vvfat.c
> Replication
>     block/replication.c
>     replication.c
> PVRDMA
>     hw/rdma/vmw/pvrdma_main.c
> hw/core/bus.c
>     hw/core/bus.c
> hw/cpu/core.c
>     hw/cpu/core.c
> hw/sd/ssi-sd.c
>     hw/sd/ssi-sd.c
> iothread.c
>     iothread.c
> memory_mapping.c
>     memory_mapping.c
> target/tilegx/cpu.c
>     target/tilegx/cpu.c
> tests/test-image-locking.c
>     tests/test-image-locking.c
> util/qemu-config.c
>     util/qemu-config.c
> 
> 
> Vladimir Sementsov-Ogievskiy (126):
>    hw/core/loader-fit: fix freeing errp in fit_load_fdt
>    net/net: Clean up variable shadowing in net_client_init()
>    error: rename errp to errp_in where it is IN-argument
>    hmp: drop Error pointer indirection in hmp_handle_error
>    vnc: drop Error pointer indirection in vnc_client_io_error
>    qdev-monitor: well form error hint helpers
>    nbd: well form nbd_iter_channel_error errp handler
>    ppc: well form kvmppc_hint_smt_possible error hint helper
>    9pfs: well form error hint helpers
>    hw/core/qdev: cleanup Error ** variables
>    block/snapshot: rename Error ** parameter to more common errp
>    hw/i386/amd_iommu: rename Error ** parameter to more common errp
>    qga: rename Error ** parameter to more common errp
>    monitor/qmp-cmds: rename Error ** parameter to more common errp
>    hw/s390x: rename Error ** parameter to more common errp
>    hw/sd: rename Error ** parameter to more common errp
>    hw/tpm: rename Error ** parameter to more common errp
>    hw/usb: rename Error ** parameter to more common errp
>    include/block/snapshot.h: rename Error ** parameter to more common
>      errp
>    include/qom/object.h: rename Error ** parameter to more common errp
>    qapi/error: add (Error **errp) cleaning APIs
>    backends/cryptodev: drop local_err from cryptodev_backend_complete()
>    hw/vfio/ap: drop local_err from vfio_ap_realize
>    error: auto propagated local_err
>    scripts: add coccinelle script to use auto propagated errp
>    python: add commit-per-subsystem.py
>    misc: introduce ERRP_AUTO_PROPAGATE
>    s390x: introduce ERRP_AUTO_PROPAGATE
>    tcg: introduce ERRP_AUTO_PROPAGATE
>    kvm: introduce ERRP_AUTO_PROPAGATE
>    xen: introduce ERRP_AUTO_PROPAGATE
>    Hosts: introduce ERRP_AUTO_PROPAGATE
>    ARM Machines: introduce ERRP_AUTO_PROPAGATE
>    MIPS Machines: introduce ERRP_AUTO_PROPAGATE
>    PowerPC Machines: introduce ERRP_AUTO_PROPAGATE
>    SPARC Machines: introduce ERRP_AUTO_PROPAGATE
>    S390 Machines: introduce ERRP_AUTO_PROPAGATE
>    X86 Machines: introduce ERRP_AUTO_PROPAGATE
>    IDE: introduce ERRP_AUTO_PROPAGATE
>    Floppy: introduce ERRP_AUTO_PROPAGATE
>    IPack: introduce ERRP_AUTO_PROPAGATE
>    PCI: introduce ERRP_AUTO_PROPAGATE
>    ACPI/SMBIOS: introduce ERRP_AUTO_PROPAGATE
>    Network devices: introduce ERRP_AUTO_PROPAGATE
>    pflash: introduce ERRP_AUTO_PROPAGATE
>    SCSI: introduce ERRP_AUTO_PROPAGATE
>    SD (Secure Card): introduce ERRP_AUTO_PROPAGATE
>    USB: introduce ERRP_AUTO_PROPAGATE
>    USB (serial adapter): introduce ERRP_AUTO_PROPAGATE
>    VFIO: introduce ERRP_AUTO_PROPAGATE
>    vfio-ccw: introduce ERRP_AUTO_PROPAGATE
>    vhost: introduce ERRP_AUTO_PROPAGATE
>    virtio: introduce ERRP_AUTO_PROPAGATE
>    virtio-9p: introduce ERRP_AUTO_PROPAGATE
>    virtio-blk: introduce ERRP_AUTO_PROPAGATE
>    virtio-ccw: introduce ERRP_AUTO_PROPAGATE
>    virtio-input: introduce ERRP_AUTO_PROPAGATE
>    virtio-serial: introduce ERRP_AUTO_PROPAGATE
>    virtio-rng: introduce ERRP_AUTO_PROPAGATE
>    megasas: introduce ERRP_AUTO_PROPAGATE
>    NVDIMM: introduce ERRP_AUTO_PROPAGATE
>    eepro100: introduce ERRP_AUTO_PROPAGATE
>    virtio-gpu: introduce ERRP_AUTO_PROPAGATE
>    fw_cfg: introduce ERRP_AUTO_PROPAGATE
>    XIVE: introduce ERRP_AUTO_PROPAGATE
>    Audio: introduce ERRP_AUTO_PROPAGATE
>    block: introduce ERRP_AUTO_PROPAGATE
>    scsi: introduce ERRP_AUTO_PROPAGATE
>    chardev: introduce ERRP_AUTO_PROPAGATE
>    cmdline: introduce ERRP_AUTO_PROPAGATE
>    Dump: introduce ERRP_AUTO_PROPAGATE
>    Memory API: introduce ERRP_AUTO_PROPAGATE
>    SPICE: introduce ERRP_AUTO_PROPAGATE
>    Graphics: introduce ERRP_AUTO_PROPAGATE
>    Main loop: introduce ERRP_AUTO_PROPAGATE
>    Human Monitor (HMP): introduce ERRP_AUTO_PROPAGATE
>    net: introduce ERRP_AUTO_PROPAGATE
>    hostmem: introduce ERRP_AUTO_PROPAGATE
>    cryptodev: introduce ERRP_AUTO_PROPAGATE
>    QAPI: introduce ERRP_AUTO_PROPAGATE
>    qga: introduce ERRP_AUTO_PROPAGATE
>    QOM: introduce ERRP_AUTO_PROPAGATE
>    QMP: introduce ERRP_AUTO_PROPAGATE
>    SLIRP: introduce ERRP_AUTO_PROPAGATE
>    Tracing: introduce ERRP_AUTO_PROPAGATE
>    TPM: introduce ERRP_AUTO_PROPAGATE
>    Migration: introduce ERRP_AUTO_PROPAGATE
>    Cryptography: introduce ERRP_AUTO_PROPAGATE
>    I/O Channels: introduce ERRP_AUTO_PROPAGATE
>    Sockets: introduce ERRP_AUTO_PROPAGATE
>    colo: introduce ERRP_AUTO_PROPAGATE
>    Record/replay: introduce ERRP_AUTO_PROPAGATE
>    VMDK: introduce ERRP_AUTO_PROPAGATE
>    RBD: introduce ERRP_AUTO_PROPAGATE
>    Sheepdog: introduce ERRP_AUTO_PROPAGATE
>    VHDX: introduce ERRP_AUTO_PROPAGATE
>    VDI: introduce ERRP_AUTO_PROPAGATE
>    iSCSI: introduce ERRP_AUTO_PROPAGATE
>    nbd: introduce ERRP_AUTO_PROPAGATE
>    NFS: introduce ERRP_AUTO_PROPAGATE
>    SSH: introduce ERRP_AUTO_PROPAGATE
>    CURL: introduce ERRP_AUTO_PROPAGATE
>    GLUSTER: introduce ERRP_AUTO_PROPAGATE
>    NVMe Block Driver: introduce ERRP_AUTO_PROPAGATE
>    Bootdevice: introduce ERRP_AUTO_PROPAGATE
>    Quorum: introduce ERRP_AUTO_PROPAGATE
>    blklogwrites: introduce ERRP_AUTO_PROPAGATE
>    blkverify: introduce ERRP_AUTO_PROPAGATE
>    parallels: introduce ERRP_AUTO_PROPAGATE
>    qed: introduce ERRP_AUTO_PROPAGATE
>    raw: introduce ERRP_AUTO_PROPAGATE
>    qcow2: introduce ERRP_AUTO_PROPAGATE
>    qcow: introduce ERRP_AUTO_PROPAGATE
>    blkdebug: introduce ERRP_AUTO_PROPAGATE
>    vpc: introduce ERRP_AUTO_PROPAGATE
>    vvfat: introduce ERRP_AUTO_PROPAGATE
>    Replication: introduce ERRP_AUTO_PROPAGATE
>    PVRDMA: introduce ERRP_AUTO_PROPAGATE
>    hw/core/bus.c: introduce ERRP_AUTO_PROPAGATE
>    hw/cpu/core.c: introduce ERRP_AUTO_PROPAGATE
>    hw/sd/ssi-sd.c: introduce ERRP_AUTO_PROPAGATE
>    iothread.c: introduce ERRP_AUTO_PROPAGATE
>    memory_mapping.c: introduce ERRP_AUTO_PROPAGATE
>    target/tilegx/cpu.c: introduce ERRP_AUTO_PROPAGATE
>    tests/test-image-locking.c: introduce ERRP_AUTO_PROPAGATE
>    util/qemu-config.c: introduce ERRP_AUTO_PROPAGATE
> 
> 
> CC: Gerd Hoffmann <kraxel@redhat.com>
> CC: "Gonglei (Arei)" <arei.gonglei@huawei.com>
> CC: Eduardo Habkost <ehabkost@redhat.com>
> CC: Igor Mammedov <imammedo@redhat.com>
> CC: Laurent Vivier <lvivier@redhat.com>
> CC: Amit Shah <amit@kernel.org>
> CC: Kevin Wolf <kwolf@redhat.com>
> CC: Max Reitz <mreitz@redhat.com>
> CC: John Snow <jsnow@redhat.com>
> CC: Ari Sundholm <ari@tuxera.com>
> CC: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
> CC: Paolo Bonzini <pbonzini@redhat.com>
> CC: Stefan Hajnoczi <stefanha@redhat.com>
> CC: Fam Zheng <fam@euphon.net>
> CC: Stefan Weil <sw@weilnetz.de>
> CC: Ronnie Sahlberg <ronniesahlberg@gmail.com>
> CC: Peter Lieven <pl@kamp.de>
> CC: Eric Blake <eblake@redhat.com>
> CC: "Denis V. Lunev" <den@openvz.org>
> CC: Markus Armbruster <armbru@redhat.com>
> CC: Alberto Garcia <berto@igalia.com>
> CC: Jason Dillaman <dillaman@redhat.com>
> CC: Wen Congyang <wencongyang2@huawei.com>
> CC: Xie Changlong <xiechanglong.d@gmail.com>
> CC: Liu Yuan <namei.unix@gmail.com>
> CC: "Richard W.M. Jones" <rjones@redhat.com>
> CC: Jeff Cody <codyprime@gmail.com>
> CC: "Marc-André Lureau" <marcandre.lureau@redhat.com>
> CC: "Daniel P. Berrangé" <berrange@redhat.com>
> CC: Richard Henderson <rth@twiddle.net>
> CC: Greg Kurz <groug@kaod.org>
> CC: "Michael S. Tsirkin" <mst@redhat.com>
> CC: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> CC: Beniamino Galvani <b.galvani@gmail.com>
> CC: Peter Maydell <peter.maydell@linaro.org>
> CC: "Cédric Le Goater" <clg@kaod.org>
> CC: Andrew Jeffery <andrew@aj.id.au>
> CC: Joel Stanley <joel@jms.id.au>
> CC: Andrew Baumann <Andrew.Baumann@microsoft.com>
> CC: "Philippe Mathieu-Daudé" <philmd@redhat.com>
> CC: Antony Pavlov <antonynpavlov@gmail.com>
> CC: Jean-Christophe Dubois <jcd@tribudubois.net>
> CC: Peter Chubb <peter.chubb@nicta.com.au>
> CC: Subbaraya Sundeep <sundeep.lkml@gmail.com>
> CC: Eric Auger <eric.auger@redhat.com>
> CC: Alistair Francis <alistair@alistair23.me>
> CC: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
> CC: Stefano Stabellini <sstabellini@kernel.org>
> CC: Anthony Perard <anthony.perard@citrix.com>
> CC: Paul Durrant <paul@xen.org>
> CC: Paul Burton <pburton@wavecomp.com>
> CC: Aleksandar Rikalo <arikalo@wavecomp.com>
> CC: Chris Wulff <crwulff@gmail.com>
> CC: Marek Vasut <marex@denx.de>
> CC: David Gibson <david@gibson.dropbear.id.au>
> CC: Cornelia Huck <cohuck@redhat.com>
> CC: Halil Pasic <pasic@linux.ibm.com>
> CC: Christian Borntraeger <borntraeger@de.ibm.com>
> CC: "Hervé Poussineau" <hpoussin@reactos.org>
> CC: Xiao Guangrong <xiaoguangrong.eric@gmail.com>
> CC: Aurelien Jarno <aurelien@aurel32.net>
> CC: Aleksandar Markovic <amarkovic@wavecomp.com>
> CC: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> CC: Jason Wang <jasowang@redhat.com>
> CC: Laszlo Ersek <lersek@redhat.com>
> CC: Yuval Shaia <yuval.shaia@oracle.com>
> CC: Palmer Dabbelt <palmer@sifive.com>
> CC: Sagar Karandikar <sagark@eecs.berkeley.edu>
> CC: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
> CC: David Hildenbrand <david@redhat.com>
> CC: Thomas Huth <thuth@redhat.com>
> CC: Eric Farman <farman@linux.ibm.com>
> CC: Matthew Rosato <mjrosato@linux.ibm.com>
> CC: Hannes Reinecke <hare@suse.com>
> CC: Michael Walle <michael@walle.cc>
> CC: Artyom Tarasenko <atar4qemu@gmail.com>
> CC: Stefan Berger <stefanb@linux.ibm.com>
> CC: Samuel Thibault <samuel.thibault@ens-lyon.org>
> CC: Alex Williamson <alex.williamson@redhat.com>
> CC: Tony Krowiak <akrowiak@linux.ibm.com>
> CC: Pierre Morel <pmorel@linux.ibm.com>
> CC: Michael Roth <mdroth@linux.vnet.ibm.com>
> CC: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
> CC: Juan Quintela <quintela@redhat.com>
> CC: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> CC: Luigi Rizzo <rizzo@iet.unipi.it>
> CC: Giuseppe Lettieri <g.lettieri@iet.unipi.it>
> CC: Vincenzo Maffione <v.maffione@gmail.com>
> CC: Jan Kiszka <jan.kiszka@siemens.com>
> CC: Anthony Green <green@moxielogic.com>
> CC: Stafford Horne <shorne@gmail.com>
> CC: Guan Xuetao <gxt@mprc.pku.edu.cn>
> CC: Max Filippov <jcmvbkbc@gmail.com>
> CC: qemu-block@nongnu.org
> CC: integration@gluster.org
> CC: sheepdog@lists.wpkg.org
> CC: qemu-arm@nongnu.org
> CC: xen-devel@lists.xenproject.org
> CC: qemu-ppc@nongnu.org
> CC: qemu-s390x@nongnu.org
> CC: qemu-riscv@nongnu.org
> 
>   include/block/nbd.h                           |   1 +
>   include/block/snapshot.h                      |   2 +-
>   include/monitor/hmp.h                         |   2 +-
>   include/qapi/error.h                          |  69 ++++-
>   include/qom/object.h                          |   4 +-
>   target/ppc/kvm_ppc.h                          |   4 +-
>   ui/vnc.h                                      |   2 +-
>   audio/audio.c                                 |  12 +-
>   backends/cryptodev-vhost-user.c               |  10 +-
>   backends/cryptodev.c                          |  25 +-
>   backends/hostmem-file.c                       |  21 +-
>   backends/hostmem-memfd.c                      |  18 +-
>   backends/hostmem.c                            |  41 ++-
>   backends/rng.c                                |   7 +-
>   block.c                                       | 225 +++++++---------
>   block/backup.c                                |   1 +
>   block/blkdebug.c                              |  36 ++-
>   block/blklogwrites.c                          |  22 +-
>   block/blkreplay.c                             |   7 +-
>   block/blkverify.c                             |  17 +-
>   block/block-backend.c                         |  19 +-
>   block/commit.c                                |   7 +-
>   block/crypto.c                                |  14 +-
>   block/curl.c                                  |   7 +-
>   block/dirty-bitmap.c                          |   1 +
>   block/file-posix.c                            |  79 +++---
>   block/file-win32.c                            |  29 +-
>   block/gluster.c                               |  69 +++--
>   block/io.c                                    |  12 +-
>   block/iscsi.c                                 |  36 ++-
>   block/mirror.c                                |  19 +-
>   block/nbd.c                                   |  59 ++--
>   block/nfs.c                                   |   7 +-
>   block/nvme.c                                  |  19 +-
>   block/parallels.c                             |  30 +--
>   block/qapi.c                                  |  26 +-
>   block/qcow.c                                  |  17 +-
>   block/qcow2-bitmap.c                          |   9 +-
>   block/qcow2.c                                 |  98 +++----
>   block/qed.c                                   |  18 +-
>   block/quorum.c                                |  23 +-
>   block/raw-format.c                            |   7 +-
>   block/rbd.c                                   |  29 +-
>   block/replication.c                           |  40 ++-
>   block/sheepdog.c                              |  73 +++--
>   block/snapshot.c                              |  20 +-
>   block/ssh.c                                   |  12 +-
>   block/throttle-groups.c                       |  24 +-
>   block/throttle.c                              |   7 +-
>   block/vdi.c                                   |  15 +-
>   block/vhdx-log.c                              |   1 +
>   block/vhdx.c                                  |  22 +-
>   block/vmdk.c                                  |  41 ++-
>   block/vpc.c                                   |  28 +-
>   block/vvfat.c                                 |  12 +-
>   block/vxhs.c                                  |  23 +-
>   blockdev.c                                    | 252 ++++++++----------
>   blockjob.c                                    |   8 +-
>   bootdevice.c                                  |  31 +--
>   chardev/char-socket.c                         |   7 +-
>   chardev/char.c                                |  20 +-
>   chardev/spice.c                               |   1 +
>   crypto/block-luks.c                           |  56 ++--
>   crypto/secret.c                               |  17 +-
>   crypto/tlssession.c                           |   7 +-
>   dump/dump-hmp-cmds.c                          |   4 +-
>   dump/dump.c                                   | 151 +++++------
>   dump/win_dump.c                               |  29 +-
>   exec.c                                        |  21 +-
>   hw/9pfs/9p-local.c                            |  12 +-
>   hw/9pfs/9p-proxy.c                            |   5 +-
>   hw/9pfs/9p.c                                  |   1 +
>   hw/acpi/core.c                                |  18 +-
>   hw/acpi/cpu_hotplug.c                         |   2 +-
>   hw/acpi/ich9.c                                |  30 +--
>   hw/acpi/memory_hotplug.c                      |   7 +-
>   hw/arm/allwinner-a10.c                        |  27 +-
>   hw/arm/armv7m.c                               |  52 ++--
>   hw/arm/aspeed_soc.c                           |   1 +
>   hw/arm/bcm2835_peripherals.c                  |  85 +++---
>   hw/arm/bcm2836.c                              |  41 ++-
>   hw/arm/digic.c                                |  22 +-
>   hw/arm/fsl-imx25.c                            |  62 ++---
>   hw/arm/fsl-imx31.c                            |  57 ++--
>   hw/arm/fsl-imx6.c                             |  81 +++---
>   hw/arm/integratorcp.c                         |   7 +-
>   hw/arm/msf2-soc.c                             |  22 +-
>   hw/arm/nrf51_soc.c                            |  47 ++--
>   hw/arm/smmu-common.c                          |   7 +-
>   hw/arm/smmuv3.c                               |   7 +-
>   hw/arm/stm32f205_soc.c                        |  39 ++-
>   hw/arm/virt.c                                 |   2 +
>   hw/arm/xlnx-versal-virt.c                     |   7 +-
>   hw/arm/xlnx-zynqmp.c                          |  86 +++---
>   hw/audio/intel-hda.c                          |  13 +-
>   hw/block/dataplane/virtio-blk.c               |   1 +
>   hw/block/dataplane/xen-block.c                |  17 +-
>   hw/block/fdc.c                                |  19 +-
>   hw/block/onenand.c                            |   7 +-
>   hw/block/pflash_cfi01.c                       |   7 +-
>   hw/block/pflash_cfi02.c                       |   7 +-
>   hw/block/vhost-user-blk.c                     |   6 +-
>   hw/block/virtio-blk.c                         |   7 +-
>   hw/block/xen-block.c                          | 119 ++++-----
>   hw/char/debugcon.c                            |   7 +-
>   hw/char/serial-pci-multi.c                    |   7 +-
>   hw/char/serial-pci.c                          |   7 +-
>   hw/char/virtio-serial-bus.c                   |   7 +-
>   hw/core/bus.c                                 |  15 +-
>   hw/core/loader-fit.c                          |   7 +-
>   hw/core/machine-hmp-cmds.c                    |   6 +-
>   hw/core/machine.c                             |  21 +-
>   hw/core/numa.c                                |  51 ++--
>   hw/core/qdev-properties-system.c              |  28 +-
>   hw/core/qdev-properties.c                     |  89 +++----
>   hw/core/qdev.c                                |  58 ++--
>   hw/cpu/a15mpcore.c                            |   7 +-
>   hw/cpu/a9mpcore.c                             |  27 +-
>   hw/cpu/arm11mpcore.c                          |  22 +-
>   hw/cpu/core.c                                 |  14 +-
>   hw/cpu/realview_mpcore.c                      |  12 +-
>   hw/display/bcm2835_fb.c                       |   6 +-
>   hw/display/qxl.c                              |   7 +-
>   hw/display/virtio-gpu-base.c                  |   7 +-
>   hw/display/virtio-gpu-pci.c                   |   7 +-
>   hw/display/virtio-vga.c                       |   7 +-
>   hw/dma/bcm2835_dma.c                          |   6 +-
>   hw/dma/xilinx_axidma.c                        |  22 +-
>   hw/gpio/aspeed_gpio.c                         |   7 +-
>   hw/gpio/bcm2835_gpio.c                        |  10 +-
>   hw/i386/amd_iommu.c                           |  14 +-
>   hw/i386/pc.c                                  | 120 ++++-----
>   hw/ide/qdev.c                                 |  16 +-
>   hw/input/virtio-input.c                       |  14 +-
>   hw/intc/apic_common.c                         |   7 +-
>   hw/intc/arm_gic.c                             |   7 +-
>   hw/intc/arm_gic_kvm.c                         |  12 +-
>   hw/intc/arm_gicv3.c                           |  12 +-
>   hw/intc/arm_gicv3_its_kvm.c                   |   7 +-
>   hw/intc/arm_gicv3_kvm.c                       |  17 +-
>   hw/intc/armv7m_nvic.c                         |  12 +-
>   hw/intc/nios2_iic.c                           |   6 +-
>   hw/intc/pnv_xive.c                            |  15 +-
>   hw/intc/realview_gic.c                        |   7 +-
>   hw/intc/s390_flic_kvm.c                       |   9 +-
>   hw/intc/spapr_xive.c                          |  12 +-
>   hw/intc/spapr_xive_kvm.c                      |  55 ++--
>   hw/intc/xics.c                                |  28 +-
>   hw/intc/xics_kvm.c                            |  30 +--
>   hw/intc/xics_pnv.c                            |   7 +-
>   hw/intc/xics_spapr.c                          |   7 +-
>   hw/intc/xive.c                                |  27 +-
>   hw/ipack/ipack.c                              |   5 +-
>   hw/isa/pc87312.c                              |   7 +-
>   hw/mem/memory-device.c                        |  20 +-
>   hw/mem/nvdimm.c                               |  25 +-
>   hw/mem/pc-dimm.c                              |  23 +-
>   hw/microblaze/xlnx-zynqmp-pmu.c               |  12 +-
>   hw/mips/cps.c                                 |  46 ++--
>   hw/misc/bcm2835_mbox.c                        |   6 +-
>   hw/misc/bcm2835_property.c                    |  10 +-
>   hw/misc/ivshmem.c                             |  37 ++-
>   hw/misc/macio/macio.c                         |  68 ++---
>   hw/misc/msf2-sysreg.c                         |   1 +
>   hw/misc/tmp105.c                              |   7 +-
>   hw/misc/tmp421.c                              |   7 +-
>   hw/net/dp8393x.c                              |   7 +-
>   hw/net/eepro100.c                             |   7 +-
>   hw/net/ne2000-isa.c                           |  17 +-
>   hw/net/xilinx_axienet.c                       |  22 +-
>   hw/nvram/fw_cfg.c                             |  14 +-
>   hw/nvram/nrf51_nvm.c                          |   7 +-
>   hw/pci-bridge/gen_pcie_root_port.c            |   7 +-
>   hw/pci-bridge/pci_bridge_dev.c                |  13 +-
>   hw/pci-bridge/pci_expander_bridge.c           |   7 +-
>   hw/pci-bridge/pcie_pci_bridge.c               |   8 +-
>   hw/pci-bridge/pcie_root_port.c                |   1 +
>   hw/pci-host/piix.c                            |   7 +-
>   hw/pci/pci.c                                  |  19 +-
>   hw/pci/pcie.c                                 |   7 +-
>   hw/pci/shpc.c                                 |  14 +-
>   hw/ppc/e500.c                                 |   7 +-
>   hw/ppc/mac_newworld.c                         |   1 +
>   hw/ppc/pnv.c                                  | 109 ++++----
>   hw/ppc/pnv_core.c                             |  23 +-
>   hw/ppc/pnv_homer.c                            |   5 +-
>   hw/ppc/pnv_lpc.c                              |  26 +-
>   hw/ppc/pnv_occ.c                              |   5 +-
>   hw/ppc/pnv_psi.c                              |  23 +-
>   hw/ppc/spapr.c                                | 133 ++++-----
>   hw/ppc/spapr_caps.c                           |  57 ++--
>   hw/ppc/spapr_cpu_core.c                       |  36 ++-
>   hw/ppc/spapr_drc.c                            |  48 ++--
>   hw/ppc/spapr_irq.c                            |  98 +++----
>   hw/ppc/spapr_pci.c                            |  97 +++----
>   hw/ppc/spapr_vio.c                            |  12 +-
>   hw/rdma/vmw/pvrdma_main.c                     |   1 +
>   hw/riscv/riscv_hart.c                         |   7 +-
>   hw/riscv/sifive_e.c                           |   7 +-
>   hw/riscv/sifive_u.c                           |  11 +-
>   hw/s390x/3270-ccw.c                           |  13 +-
>   hw/s390x/css-bridge.c                         |   7 +-
>   hw/s390x/css.c                                |   7 +-
>   hw/s390x/event-facility.c                     |   2 +-
>   hw/s390x/ipl.c                                |  24 +-
>   hw/s390x/s390-ccw.c                           |  19 +-
>   hw/s390x/s390-pci-bus.c                       |  37 ++-
>   hw/s390x/s390-skeys.c                         |   7 +-
>   hw/s390x/s390-stattrib.c                      |   3 +-
>   hw/s390x/s390-virtio-ccw.c                    |  11 +-
>   hw/s390x/sclp.c                               |  15 +-
>   hw/s390x/tod-kvm.c                            |  14 +-
>   hw/s390x/virtio-ccw-crypto.c                  |   7 +-
>   hw/s390x/virtio-ccw-rng.c                     |   7 +-
>   hw/s390x/virtio-ccw.c                         |  13 +-
>   hw/scsi/esp-pci.c                             |   7 +-
>   hw/scsi/megasas.c                             |  11 +-
>   hw/scsi/mptsas.c                              |  13 +-
>   hw/scsi/scsi-bus.c                            |  24 +-
>   hw/scsi/scsi-disk.c                           |   8 +-
>   hw/scsi/scsi-generic.c                        |   1 +
>   hw/scsi/vhost-scsi.c                          |  12 +-
>   hw/scsi/vhost-user-scsi.c                     |   7 +-
>   hw/scsi/virtio-scsi.c                         |   7 +-
>   hw/sd/milkymist-memcard.c                     |  11 +-
>   hw/sd/sdhci-pci.c                             |   7 +-
>   hw/sd/sdhci.c                                 |  23 +-
>   hw/sd/ssi-sd.c                                |  14 +-
>   hw/smbios/smbios.c                            |  42 ++-
>   hw/sparc/sun4m.c                              |  21 +-
>   hw/sparc64/sun4u.c                            |   7 +-
>   hw/timer/aspeed_timer.c                       |   6 +-
>   hw/tpm/tpm_emulator.c                         |   8 +-
>   hw/tpm/tpm_util.c                             |   7 +-
>   hw/usb/bus.c                                  |  37 ++-
>   hw/usb/ccid-card-emulated.c                   |   1 +
>   hw/usb/dev-network.c                          |   2 +-
>   hw/usb/dev-serial.c                           |   7 +-
>   hw/usb/dev-smartcard-reader.c                 |  14 +-
>   hw/usb/dev-storage.c                          |  17 +-
>   hw/usb/hcd-ohci-pci.c                         |   7 +-
>   hw/usb/hcd-ohci.c                             |  14 +-
>   hw/usb/hcd-uhci.c                             |   7 +-
>   hw/usb/hcd-xhci.c                             |  13 +-
>   hw/vfio/ap.c                                  |  16 +-
>   hw/vfio/ccw.c                                 |  24 +-
>   hw/vfio/common.c                              |   3 +
>   hw/vfio/pci-quirks.c                          |   8 +-
>   hw/vfio/pci.c                                 |  42 ++-
>   hw/vfio/platform.c                            |   1 +
>   hw/virtio/vhost-vsock.c                       |   1 +
>   hw/virtio/virtio-balloon.c                    |  35 ++-
>   hw/virtio/virtio-bus.c                        |  17 +-
>   hw/virtio/virtio-pci.c                        |   2 +
>   hw/virtio/virtio-rng-pci.c                    |   7 +-
>   hw/virtio/virtio-rng.c                        |   7 +-
>   hw/virtio/virtio.c                            |  19 +-
>   hw/watchdog/wdt_aspeed.c                      |   5 +-
>   hw/xen/xen-backend.c                          |   7 +-
>   hw/xen/xen-bus.c                              |  92 +++----
>   hw/xen/xen-host-pci-device.c                  |  27 +-
>   hw/xen/xen_pt.c                               |  25 +-
>   hw/xen/xen_pt_config_init.c                   |  20 +-
>   io/dns-resolver.c                             |   7 +-
>   io/net-listener.c                             |   7 +-
>   iothread.c                                    |  27 +-
>   job.c                                         |   7 +-
>   memory.c                                      |  63 ++---
>   memory_mapping.c                              |   7 +-
>   migration/colo.c                              |  38 ++-
>   migration/migration.c                         |  39 ++-
>   migration/ram.c                               |  13 +-
>   migration/rdma.c                              |  13 +-
>   migration/savevm.c                            |   2 +
>   migration/socket.c                            |  18 +-
>   monitor/hmp-cmds.c                            | 155 ++++++-----
>   monitor/misc.c                                |   9 +-
>   monitor/qmp-cmds.c                            |   9 +-
>   nbd/client.c                                  |   5 +
>   nbd/server.c                                  |   5 +
>   net/can/can_host.c                            |   7 +-
>   net/dump.c                                    |  15 +-
>   net/filter-buffer.c                           |  15 +-
>   net/filter.c                                  |   7 +-
>   net/net.c                                     |  58 ++--
>   net/netmap.c                                  |   7 +-
>   net/slirp.c                                   |   7 +-
>   net/tap.c                                     |  47 ++--
>   qapi/qapi-visit-core.c                        |  56 ++--
>   qapi/qmp-dispatch.c                           |   7 +-
>   qapi/string-input-visitor.c                   |   7 +-
>   qdev-monitor.c                                |  69 +++--
>   qga/commands-posix.c                          | 222 +++++++--------
>   qga/commands-win32.c                          | 141 +++++-----
>   qga/commands.c                                |  12 +-
>   qom/object.c                                  | 246 ++++++++---------
>   qom/object_interfaces.c                       |  27 +-
>   qom/qom-hmp-cmds.c                            |   4 +-
>   qom/qom-qobject.c                             |   7 +-
>   replication.c                                 |  28 +-
>   scsi/pr-manager-helper.c                      |   7 +-
>   target/alpha/cpu.c                            |   7 +-
>   target/arm/cpu.c                              |   7 +-
>   target/arm/cpu64.c                            |  11 +-
>   target/cris/cpu.c                             |   7 +-
>   target/hppa/cpu.c                             |   7 +-
>   target/i386/cpu.c                             | 117 ++++----
>   target/lm32/cpu.c                             |   7 +-
>   target/m68k/cpu.c                             |   7 +-
>   target/microblaze/cpu.c                       |   7 +-
>   target/mips/cpu.c                             |   7 +-
>   target/moxie/cpu.c                            |   7 +-
>   target/nios2/cpu.c                            |   7 +-
>   target/openrisc/cpu.c                         |   7 +-
>   target/ppc/compat.c                           |  20 +-
>   target/ppc/kvm.c                              |  14 +-
>   target/ppc/translate_init.inc.c               |  26 +-
>   target/riscv/cpu.c                            |   7 +-
>   target/s390x/cpu.c                            |  26 +-
>   target/s390x/cpu_models.c                     |   2 +
>   target/sh4/cpu.c                              |   7 +-
>   target/sparc/cpu.c                            |  14 +-
>   target/tilegx/cpu.c                           |   7 +-
>   target/tricore/cpu.c                          |   7 +-
>   target/unicore32/cpu.c                        |   7 +-
>   target/xtensa/cpu.c                           |   7 +-
>   tests/test-image-locking.c                    |   7 +-
>   tpm.c                                         |   7 +-
>   trace/qmp.c                                   |  14 +-
>   ui/input-barrier.c                            |   7 +-
>   ui/input.c                                    |  14 +-
>   ui/vnc.c                                      |  39 ++-
>   util/error.c                                  |  30 +--
>   util/main-loop.c                              |   5 +-
>   util/oslib-posix.c                            |   6 +-
>   util/qemu-config.c                            |  29 +-
>   util/qemu-option.c                            |  59 ++--
>   util/qemu-sockets.c                           |  31 +--
>   vl.c                                          |  14 +-
>   python/commit-per-subsystem.py                | 204 ++++++++++++++
>   scripts/coccinelle/auto-propagated-errp.cocci | 118 ++++++++
>   341 files changed, 3851 insertions(+), 4455 deletions(-)
>   create mode 100755 python/commit-per-subsystem.py
>   create mode 100644 scripts/coccinelle/auto-propagated-errp.cocci
> 


-- 
Best regards,
Vladimir
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 000/126] error: auto propagated local_err
  2019-11-08 15:30 ` Vladimir Sementsov-Ogievskiy
@ 2019-11-08 18:57   ` Marc-André Lureau
  2019-11-12 13:46     ` Cornelia Huck
  2019-11-20  9:50   ` Vladimir Sementsov-Ogievskiy
  1 sibling, 1 reply; 34+ messages in thread
From: Marc-André Lureau @ 2019-11-08 18:57 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy
  Cc: Ronnie Sahlberg, Jeff Cody, Jan Kiszka, Eric Blake,
	Alberto Garcia, Hailiang Zhang, qemu-block, Aleksandar Rikalo,
	Halil Pasic, Hervé Poussineau, Anthony Perard,
	Samuel Thibault, Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Stefan Hajnoczi, John Snow,
	Richard Henderson, Kevin Wolf, Andrew Jeffery, Chris Wulff,
	Subbaraya Sundeep, Michael Walle, qemu-ppc, Bastian Koppelmann,
	Igor Mammedov, Fam Zheng, Peter Maydell, sheepdog,
	Matthew Rosato, David Hildenbrand, Palmer Dabbelt, Eric Farman,
	Max Filippov, Hannes Reinecke, Stefano Stabellini, Gonglei (Arei),
	Marcel Apfelbaum, Liu Yuan, Artyom Tarasenko, Thomas Huth,
	Amit Shah, Stefan Weil, Greg Kurz, Yuval Shaia, qemu-s390x,
	qemu-arm, Peter Chubb, Cédric Le Goater, Stafford Horne,
	qemu-riscv, Cornelia Huck, Aleksandar Markovic, Aurelien Jarno,
	Paul Burton, Sagar Karandikar, Paul Durrant, Jason Wang,
	Gerd Hoffmann, Edgar E. Iglesias, Guan Xuetao, Ari Sundholm,
	Juan Quintela, Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Laszlo Ersek, Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Denis Lunev, Michael S. Tsirkin, Mark Cave-Ayland, qemu-devel,
	Vincenzo Maffione, Marek Vasut, armbru, Alistair Francis,
	Pavel Dovgalyuk, Giuseppe Lettieri, Luigi Rizzo, David Gibson,
	Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

Hi

On Fri, Nov 8, 2019 at 7:31 PM Vladimir Sementsov-Ogievskiy
<vsementsov@virtuozzo.com> wrote:
>
> Finally, what is the plan?
>
> Markus what do you think?
>
> Now a lot of patches are reviewed, but a lot of are not.
>
> Is there any hope that all patches will be reviewed? Should I resend the
> whole series, or may be reduce it to reviewed subsystems only?

I don't think we have well established rules for whole-tree cleanups
like this. In the past, several cleanup series got lost.

It will take ages to get every subsystem maintainer to review the
patches. Most likely, since they are quite systematic, there isn't
much to say and it is easy to miss something that has some hidden
ramifications. Perhaps whole-tree cleanups should require at least 2
reviewers to bypass the subsytem maintainer review? But my past
experience with this kind of exercice doesn't encourage me, and
probably I am not the only one.

>
> 11.10.2019 19:03, Vladimir Sementsov-Ogievskiy wrote:
> > Hi all!
> >
> > At the request of Markus: full version of errp propagation. Let's look
> > at it. Cover as much as possible, except inserting macro invocation
> > where it's not necessary.
> >
> > It's huge, and so it's an RFC.
> >
> > In v5 I've added a lot more preparation cleanups:
> > 01-23 are preparation cleanups
> >    01: not changed, keep Eric's r-b
> >    02: improve commit msg [Markus], keep Eric's r-b
> >    03: changed, only error API here, drop r-b
> > 24 is core macro
> >    - improve cover letter, wording and macro code style
> >    - keep Eric's r-b
> > 25-26: automation scripts
> >     - commit-per-subsystem changed a lot. it's a draft, don't bother too
> >       much with it
> >     - coccinelle: add support of error_propagate_prepend
> >
> > 27-126: generated patches
> >
> > ====
> >
> > Here is a proposal of auto propagation for local_err, to not call
> > error_propagate on every exit point, when we deal with local_err.
> >
> > There are also two issues with errp:
> >
> > 1. error_fatal & error_append_hint/error_prepend: user can't see this
> > additional info, because exit() happens in error_setg earlier than info
> > is added. [Reported by Greg Kurz]
> >
> > 2. error_abort & error_propagate: when we wrap
> > error_abort by local_err+error_propagate, resulting coredump will
> > refer to error_propagate and not to the place where error happened.
> > (the macro itself don't fix the issue, but it allows to [3.] drop all
> > local_err+error_propagate pattern, which will definitely fix the issue)
> > [Reported by Kevin Wolf]
> >
> > ====
> >
> > Generated patches split:
> >
> > misc
> >     hw/misc/ivshmem.c
> >     hw/misc/tmp105.c
> >     hw/misc/tmp421.c
> > s390x
> >     hw/intc/s390_flic_kvm.c
> >     hw/s390x/3270-ccw.c
> >     hw/s390x/css-bridge.c
> >     hw/s390x/css.c
> >     hw/s390x/s390-skeys.c
> >     hw/s390x/s390-virtio-ccw.c
> >     hw/s390x/sclp.c
> >     hw/s390x/tod-kvm.c
> >     hw/vfio/ccw.c
> >     target/s390x/cpu.c
> > tcg
> >     exec.c
> >     hw/arm/armv7m.c
> >     hw/arm/smmu-common.c
> >     hw/arm/smmuv3.c
> >     hw/cpu/a15mpcore.c
> >     hw/cpu/a9mpcore.c
> >     hw/cpu/arm11mpcore.c
> >     hw/i386/pc.c
> >     hw/intc/nios2_iic.c
> >     hw/mips/cps.c
> >     hw/riscv/riscv_hart.c
> >     hw/riscv/sifive_e.c
> >     hw/riscv/sifive_u.c
> >     hw/sd/milkymist-memcard.c
> >     target/alpha/cpu.c
> >     target/arm/cpu.c
> >     target/arm/cpu64.c
> >     target/cris/cpu.c
> >     target/hppa/cpu.c
> >     target/i386/cpu.c
> >     target/lm32/cpu.c
> >     target/m68k/cpu.c
> >     target/microblaze/cpu.c
> >     target/mips/cpu.c
> >     target/moxie/cpu.c
> >     target/nios2/cpu.c
> >     target/openrisc/cpu.c
> >     target/ppc/compat.c
> >     target/ppc/translate_init.inc.c
> >     target/riscv/cpu.c
> >     target/sh4/cpu.c
> >     target/sparc/cpu.c
> >     target/tricore/cpu.c
> >     target/unicore32/cpu.c
> >     target/xtensa/cpu.c
> > kvm
> >     target/ppc/kvm.c
> >     target/s390x/cpu_models.c
> > xen
> >     hw/block/dataplane/xen-block.c
> >     hw/block/xen-block.c
> >     hw/xen/xen-backend.c
> >     hw/xen/xen-bus.c
> >     hw/xen/xen-host-pci-device.c
> >     hw/xen/xen_pt.c
> >     hw/xen/xen_pt_config_init.c
> > Hosts
> >     qga/commands-win32.c
> >     util/oslib-posix.c
> > ARM Machines
> >     hw/arm/allwinner-a10.c
> >     hw/arm/aspeed_soc.c
> >     hw/arm/bcm2835_peripherals.c
> >     hw/arm/bcm2836.c
> >     hw/arm/digic.c
> >     hw/arm/fsl-imx25.c
> >     hw/arm/fsl-imx31.c
> >     hw/arm/fsl-imx6.c
> >     hw/arm/integratorcp.c
> >     hw/arm/msf2-soc.c
> >     hw/arm/nrf51_soc.c
> >     hw/arm/stm32f205_soc.c
> >     hw/arm/virt.c
> >     hw/arm/xlnx-versal-virt.c
> >     hw/arm/xlnx-zynqmp.c
> >     hw/cpu/realview_mpcore.c
> >     hw/display/bcm2835_fb.c
> >     hw/dma/bcm2835_dma.c
> >     hw/dma/xilinx_axidma.c
> >     hw/gpio/aspeed_gpio.c
> >     hw/gpio/bcm2835_gpio.c
> >     hw/intc/arm_gic.c
> >     hw/intc/arm_gic_kvm.c
> >     hw/intc/arm_gicv3.c
> >     hw/intc/arm_gicv3_its_kvm.c
> >     hw/intc/arm_gicv3_kvm.c
> >     hw/intc/armv7m_nvic.c
> >     hw/intc/realview_gic.c
> >     hw/microblaze/xlnx-zynqmp-pmu.c
> >     hw/misc/bcm2835_mbox.c
> >     hw/misc/bcm2835_property.c
> >     hw/misc/msf2-sysreg.c
> >     hw/net/xilinx_axienet.c
> >     hw/nvram/nrf51_nvm.c
> >     hw/timer/aspeed_timer.c
> >     hw/watchdog/wdt_aspeed.c
> > MIPS Machines
> >     hw/core/loader-fit.c
> > PowerPC Machines
> >     hw/intc/pnv_xive.c
> >     hw/intc/xics.c
> >     hw/intc/xics_kvm.c
> >     hw/intc/xics_pnv.c
> >     hw/intc/xics_spapr.c
> >     hw/isa/pc87312.c
> >     hw/misc/macio/macio.c
> >     hw/ppc/e500.c
> >     hw/ppc/mac_newworld.c
> >     hw/ppc/pnv.c
> >     hw/ppc/pnv_core.c
> >     hw/ppc/pnv_homer.c
> >     hw/ppc/pnv_lpc.c
> >     hw/ppc/pnv_occ.c
> >     hw/ppc/pnv_psi.c
> >     hw/ppc/spapr.c
> >     hw/ppc/spapr_caps.c
> >     hw/ppc/spapr_cpu_core.c
> >     hw/ppc/spapr_drc.c
> >     hw/ppc/spapr_irq.c
> >     hw/ppc/spapr_pci.c
> >     hw/ppc/spapr_vio.c
> > SPARC Machines
> >     hw/sparc/sun4m.c
> >     hw/sparc64/sun4u.c
> > S390 Machines
> >     hw/s390x/ipl.c
> >     hw/s390x/s390-pci-bus.c
> > X86 Machines
> >     hw/acpi/ich9.c
> >     hw/char/debugcon.c
> >     hw/char/serial-pci-multi.c
> >     hw/char/serial-pci.c
> >     hw/core/machine.c
> >     hw/core/numa.c
> >     hw/intc/apic_common.c
> >     hw/pci-host/piix.c
> > IDE
> >     hw/ide/qdev.c
> > Floppy
> >     hw/block/fdc.c
> > IPack
> >     hw/ipack/ipack.c
> > PCI
> >     hw/pci-bridge/gen_pcie_root_port.c
> >     hw/pci-bridge/pci_bridge_dev.c
> >     hw/pci-bridge/pci_expander_bridge.c
> >     hw/pci-bridge/pcie_pci_bridge.c
> >     hw/pci-bridge/pcie_root_port.c
> >     hw/pci/pci.c
> >     hw/pci/pcie.c
> >     hw/pci/shpc.c
> > ACPI/SMBIOS
> >     hw/acpi/core.c
> >     hw/acpi/cpu_hotplug.c
> >     hw/acpi/memory_hotplug.c
> >     hw/mem/memory-device.c
> >     hw/mem/pc-dimm.c
> >     hw/smbios/smbios.c
> > Network devices
> >     hw/net/dp8393x.c
> >     hw/net/ne2000-isa.c
> > pflash
> >     hw/block/pflash_cfi01.c
> >     hw/block/pflash_cfi02.c
> > SCSI
> >     hw/scsi/esp-pci.c
> >     hw/scsi/mptsas.c
> >     hw/scsi/scsi-bus.c
> >     hw/scsi/scsi-disk.c
> >     hw/scsi/scsi-generic.c
> >     hw/scsi/virtio-scsi.c
> > SD (Secure Card)
> >     hw/sd/sdhci-pci.c
> >     hw/sd/sdhci.c
> > USB
> >     hw/usb/bus.c
> >     hw/usb/ccid-card-emulated.c
> >     hw/usb/dev-smartcard-reader.c
> >     hw/usb/dev-storage.c
> >     hw/usb/hcd-ohci-pci.c
> >     hw/usb/hcd-ohci.c
> >     hw/usb/hcd-uhci.c
> >     hw/usb/hcd-xhci.c
> > USB (serial adapter)
> >     hw/usb/dev-serial.c
> > VFIO
> >     hw/vfio/common.c
> >     hw/vfio/pci-quirks.c
> >     hw/vfio/pci.c
> >     hw/vfio/platform.c
> > vfio-ccw
> >     hw/s390x/s390-ccw.c
> > vhost
> >     hw/block/vhost-user-blk.c
> >     hw/scsi/vhost-scsi.c
> >     hw/scsi/vhost-user-scsi.c
> >     hw/virtio/vhost-vsock.c
> > virtio
> >     hw/virtio/virtio-balloon.c
> >     hw/virtio/virtio-bus.c
> >     hw/virtio/virtio-pci.c
> >     hw/virtio/virtio-rng-pci.c
> >     hw/virtio/virtio.c
> > virtio-9p
> >     hw/9pfs/9p-local.c
> >     hw/9pfs/9p.c
> > virtio-blk
> >     hw/block/dataplane/virtio-blk.c
> >     hw/block/virtio-blk.c
> > virtio-ccw
> >     hw/s390x/virtio-ccw-crypto.c
> >     hw/s390x/virtio-ccw-rng.c
> >     hw/s390x/virtio-ccw.c
> > virtio-input
> >     hw/input/virtio-input.c
> > virtio-serial
> >     hw/char/virtio-serial-bus.c
> > virtio-rng
> >     backends/rng.c
> >     hw/virtio/virtio-rng.c
> > megasas
> >     hw/scsi/megasas.c
> > NVDIMM
> >     hw/mem/nvdimm.c
> > eepro100
> >     hw/net/eepro100.c
> > virtio-gpu
> >     hw/display/virtio-gpu-base.c
> >     hw/display/virtio-gpu-pci.c
> >     hw/display/virtio-vga.c
> > fw_cfg
> >     hw/nvram/fw_cfg.c
> > XIVE
> >     hw/intc/spapr_xive.c
> >     hw/intc/spapr_xive_kvm.c
> >     hw/intc/xive.c
> > Audio
> >     audio/audio.c
> >     hw/audio/intel-hda.c
> > block
> >     block.c
> >     block/backup.c
> >     block/block-backend.c
> >     block/commit.c
> >     block/crypto.c
> >     block/dirty-bitmap.c
> >     block/io.c
> >     block/mirror.c
> >     block/qapi.c
> >     block/snapshot.c
> >     block/throttle-groups.c
> >     block/throttle.c
> >     block/vxhs.c
> >     blockdev.c
> >     blockjob.c
> >     hw/block/onenand.c
> >     job.c
> > scsi
> >     scsi/pr-manager-helper.c
> > chardev
> >     chardev/char-socket.c
> >     chardev/char.c
> >     chardev/spice.c
> > cmdline
> >     util/qemu-option.c
> > Dump
> >     dump/dump.c
> >     dump/win_dump.c
> > Memory API
> >     memory.c
> > SPICE
> >     hw/display/qxl.c
> > Graphics
> >     ui/input-barrier.c
> >     ui/input.c
> >     ui/vnc.c
> > Main loop
> >     util/main-loop.c
> >     vl.c
> > Human Monitor (HMP)
> >     monitor/misc.c
> > net
> >     net/can/can_host.c
> >     net/dump.c
> >     net/filter-buffer.c
> >     net/filter.c
> >     net/net.c
> >     net/netmap.c
> >     net/tap.c
> > hostmem
> >     backends/hostmem-file.c
> >     backends/hostmem-memfd.c
> >     backends/hostmem.c
> > cryptodev
> >     backends/cryptodev-vhost-user.c
> >     backends/cryptodev.c
> > QAPI
> >     qapi/qapi-visit-core.c
> >     qapi/qmp-dispatch.c
> >     qapi/string-input-visitor.c
> > qga
> >     qga/commands-posix.c
> > QOM
> >     hw/core/qdev-properties-system.c
> >     hw/core/qdev-properties.c
> >     hw/core/qdev.c
> >     qdev-monitor.c
> >     qom/object.c
> >     qom/object_interfaces.c
> >     qom/qom-qobject.c
> > QMP
> >     monitor/qmp-cmds.c
> > SLIRP
> >     net/slirp.c
> > Tracing
> >     trace/qmp.c
> > TPM
> >     hw/tpm/tpm_util.c
> >     tpm.c
> > Migration
> >     migration/migration.c
> >     migration/ram.c
> >     migration/rdma.c
> >     migration/savevm.c
> >     migration/socket.c
> > Cryptography
> >     crypto/block-luks.c
> >     crypto/secret.c
> >     crypto/tlssession.c
> > I/O Channels
> >     io/dns-resolver.c
> >     io/net-listener.c
> > Sockets
> >     util/qemu-sockets.c
> > colo
> >     migration/colo.c
> > Record/replay
> >     block/blkreplay.c
> > VMDK
> >     block/vmdk.c
> > RBD
> >     block/rbd.c
> > Sheepdog
> >     block/sheepdog.c
> > VHDX
> >     block/vhdx-log.c
> >     block/vhdx.c
> > VDI
> >     block/vdi.c
> > iSCSI
> >     block/iscsi.c
> > nbd
> >     include/block/nbd.h
> >     block/nbd.c
> >     nbd/client.c
> >     nbd/server.c
> > NFS
> >     block/nfs.c
> > SSH
> >     block/ssh.c
> > CURL
> >     block/curl.c
> > GLUSTER
> >     block/gluster.c
> > NVMe Block Driver
> >     block/nvme.c
> > Bootdevice
> >     bootdevice.c
> > Quorum
> >     block/quorum.c
> > blklogwrites
> >     block/blklogwrites.c
> > blkverify
> >     block/blkverify.c
> > parallels
> >     block/parallels.c
> > qed
> >     block/qed.c
> > raw
> >     block/file-posix.c
> >     block/file-win32.c
> >     block/raw-format.c
> > qcow2
> >     block/qcow2-bitmap.c
> >     block/qcow2.c
> > qcow
> >     block/qcow.c
> > blkdebug
> >     block/blkdebug.c
> > vpc
> >     block/vpc.c
> > vvfat
> >     block/vvfat.c
> > Replication
> >     block/replication.c
> >     replication.c
> > PVRDMA
> >     hw/rdma/vmw/pvrdma_main.c
> > hw/core/bus.c
> >     hw/core/bus.c
> > hw/cpu/core.c
> >     hw/cpu/core.c
> > hw/sd/ssi-sd.c
> >     hw/sd/ssi-sd.c
> > iothread.c
> >     iothread.c
> > memory_mapping.c
> >     memory_mapping.c
> > target/tilegx/cpu.c
> >     target/tilegx/cpu.c
> > tests/test-image-locking.c
> >     tests/test-image-locking.c
> > util/qemu-config.c
> >     util/qemu-config.c
> >
> >
> > Vladimir Sementsov-Ogievskiy (126):
> >    hw/core/loader-fit: fix freeing errp in fit_load_fdt
> >    net/net: Clean up variable shadowing in net_client_init()
> >    error: rename errp to errp_in where it is IN-argument
> >    hmp: drop Error pointer indirection in hmp_handle_error
> >    vnc: drop Error pointer indirection in vnc_client_io_error
> >    qdev-monitor: well form error hint helpers
> >    nbd: well form nbd_iter_channel_error errp handler
> >    ppc: well form kvmppc_hint_smt_possible error hint helper
> >    9pfs: well form error hint helpers
> >    hw/core/qdev: cleanup Error ** variables
> >    block/snapshot: rename Error ** parameter to more common errp
> >    hw/i386/amd_iommu: rename Error ** parameter to more common errp
> >    qga: rename Error ** parameter to more common errp
> >    monitor/qmp-cmds: rename Error ** parameter to more common errp
> >    hw/s390x: rename Error ** parameter to more common errp
> >    hw/sd: rename Error ** parameter to more common errp
> >    hw/tpm: rename Error ** parameter to more common errp
> >    hw/usb: rename Error ** parameter to more common errp
> >    include/block/snapshot.h: rename Error ** parameter to more common
> >      errp
> >    include/qom/object.h: rename Error ** parameter to more common errp
> >    qapi/error: add (Error **errp) cleaning APIs
> >    backends/cryptodev: drop local_err from cryptodev_backend_complete()
> >    hw/vfio/ap: drop local_err from vfio_ap_realize
> >    error: auto propagated local_err
> >    scripts: add coccinelle script to use auto propagated errp
> >    python: add commit-per-subsystem.py
> >    misc: introduce ERRP_AUTO_PROPAGATE
> >    s390x: introduce ERRP_AUTO_PROPAGATE
> >    tcg: introduce ERRP_AUTO_PROPAGATE
> >    kvm: introduce ERRP_AUTO_PROPAGATE
> >    xen: introduce ERRP_AUTO_PROPAGATE
> >    Hosts: introduce ERRP_AUTO_PROPAGATE
> >    ARM Machines: introduce ERRP_AUTO_PROPAGATE
> >    MIPS Machines: introduce ERRP_AUTO_PROPAGATE
> >    PowerPC Machines: introduce ERRP_AUTO_PROPAGATE
> >    SPARC Machines: introduce ERRP_AUTO_PROPAGATE
> >    S390 Machines: introduce ERRP_AUTO_PROPAGATE
> >    X86 Machines: introduce ERRP_AUTO_PROPAGATE
> >    IDE: introduce ERRP_AUTO_PROPAGATE
> >    Floppy: introduce ERRP_AUTO_PROPAGATE
> >    IPack: introduce ERRP_AUTO_PROPAGATE
> >    PCI: introduce ERRP_AUTO_PROPAGATE
> >    ACPI/SMBIOS: introduce ERRP_AUTO_PROPAGATE
> >    Network devices: introduce ERRP_AUTO_PROPAGATE
> >    pflash: introduce ERRP_AUTO_PROPAGATE
> >    SCSI: introduce ERRP_AUTO_PROPAGATE
> >    SD (Secure Card): introduce ERRP_AUTO_PROPAGATE
> >    USB: introduce ERRP_AUTO_PROPAGATE
> >    USB (serial adapter): introduce ERRP_AUTO_PROPAGATE
> >    VFIO: introduce ERRP_AUTO_PROPAGATE
> >    vfio-ccw: introduce ERRP_AUTO_PROPAGATE
> >    vhost: introduce ERRP_AUTO_PROPAGATE
> >    virtio: introduce ERRP_AUTO_PROPAGATE
> >    virtio-9p: introduce ERRP_AUTO_PROPAGATE
> >    virtio-blk: introduce ERRP_AUTO_PROPAGATE
> >    virtio-ccw: introduce ERRP_AUTO_PROPAGATE
> >    virtio-input: introduce ERRP_AUTO_PROPAGATE
> >    virtio-serial: introduce ERRP_AUTO_PROPAGATE
> >    virtio-rng: introduce ERRP_AUTO_PROPAGATE
> >    megasas: introduce ERRP_AUTO_PROPAGATE
> >    NVDIMM: introduce ERRP_AUTO_PROPAGATE
> >    eepro100: introduce ERRP_AUTO_PROPAGATE
> >    virtio-gpu: introduce ERRP_AUTO_PROPAGATE
> >    fw_cfg: introduce ERRP_AUTO_PROPAGATE
> >    XIVE: introduce ERRP_AUTO_PROPAGATE
> >    Audio: introduce ERRP_AUTO_PROPAGATE
> >    block: introduce ERRP_AUTO_PROPAGATE
> >    scsi: introduce ERRP_AUTO_PROPAGATE
> >    chardev: introduce ERRP_AUTO_PROPAGATE
> >    cmdline: introduce ERRP_AUTO_PROPAGATE
> >    Dump: introduce ERRP_AUTO_PROPAGATE
> >    Memory API: introduce ERRP_AUTO_PROPAGATE
> >    SPICE: introduce ERRP_AUTO_PROPAGATE
> >    Graphics: introduce ERRP_AUTO_PROPAGATE
> >    Main loop: introduce ERRP_AUTO_PROPAGATE
> >    Human Monitor (HMP): introduce ERRP_AUTO_PROPAGATE
> >    net: introduce ERRP_AUTO_PROPAGATE
> >    hostmem: introduce ERRP_AUTO_PROPAGATE
> >    cryptodev: introduce ERRP_AUTO_PROPAGATE
> >    QAPI: introduce ERRP_AUTO_PROPAGATE
> >    qga: introduce ERRP_AUTO_PROPAGATE
> >    QOM: introduce ERRP_AUTO_PROPAGATE
> >    QMP: introduce ERRP_AUTO_PROPAGATE
> >    SLIRP: introduce ERRP_AUTO_PROPAGATE
> >    Tracing: introduce ERRP_AUTO_PROPAGATE
> >    TPM: introduce ERRP_AUTO_PROPAGATE
> >    Migration: introduce ERRP_AUTO_PROPAGATE
> >    Cryptography: introduce ERRP_AUTO_PROPAGATE
> >    I/O Channels: introduce ERRP_AUTO_PROPAGATE
> >    Sockets: introduce ERRP_AUTO_PROPAGATE
> >    colo: introduce ERRP_AUTO_PROPAGATE
> >    Record/replay: introduce ERRP_AUTO_PROPAGATE
> >    VMDK: introduce ERRP_AUTO_PROPAGATE
> >    RBD: introduce ERRP_AUTO_PROPAGATE
> >    Sheepdog: introduce ERRP_AUTO_PROPAGATE
> >    VHDX: introduce ERRP_AUTO_PROPAGATE
> >    VDI: introduce ERRP_AUTO_PROPAGATE
> >    iSCSI: introduce ERRP_AUTO_PROPAGATE
> >    nbd: introduce ERRP_AUTO_PROPAGATE
> >    NFS: introduce ERRP_AUTO_PROPAGATE
> >    SSH: introduce ERRP_AUTO_PROPAGATE
> >    CURL: introduce ERRP_AUTO_PROPAGATE
> >    GLUSTER: introduce ERRP_AUTO_PROPAGATE
> >    NVMe Block Driver: introduce ERRP_AUTO_PROPAGATE
> >    Bootdevice: introduce ERRP_AUTO_PROPAGATE
> >    Quorum: introduce ERRP_AUTO_PROPAGATE
> >    blklogwrites: introduce ERRP_AUTO_PROPAGATE
> >    blkverify: introduce ERRP_AUTO_PROPAGATE
> >    parallels: introduce ERRP_AUTO_PROPAGATE
> >    qed: introduce ERRP_AUTO_PROPAGATE
> >    raw: introduce ERRP_AUTO_PROPAGATE
> >    qcow2: introduce ERRP_AUTO_PROPAGATE
> >    qcow: introduce ERRP_AUTO_PROPAGATE
> >    blkdebug: introduce ERRP_AUTO_PROPAGATE
> >    vpc: introduce ERRP_AUTO_PROPAGATE
> >    vvfat: introduce ERRP_AUTO_PROPAGATE
> >    Replication: introduce ERRP_AUTO_PROPAGATE
> >    PVRDMA: introduce ERRP_AUTO_PROPAGATE
> >    hw/core/bus.c: introduce ERRP_AUTO_PROPAGATE
> >    hw/cpu/core.c: introduce ERRP_AUTO_PROPAGATE
> >    hw/sd/ssi-sd.c: introduce ERRP_AUTO_PROPAGATE
> >    iothread.c: introduce ERRP_AUTO_PROPAGATE
> >    memory_mapping.c: introduce ERRP_AUTO_PROPAGATE
> >    target/tilegx/cpu.c: introduce ERRP_AUTO_PROPAGATE
> >    tests/test-image-locking.c: introduce ERRP_AUTO_PROPAGATE
> >    util/qemu-config.c: introduce ERRP_AUTO_PROPAGATE
> >
> >
> > CC: Gerd Hoffmann <kraxel@redhat.com>
> > CC: "Gonglei (Arei)" <arei.gonglei@huawei.com>
> > CC: Eduardo Habkost <ehabkost@redhat.com>
> > CC: Igor Mammedov <imammedo@redhat.com>
> > CC: Laurent Vivier <lvivier@redhat.com>
> > CC: Amit Shah <amit@kernel.org>
> > CC: Kevin Wolf <kwolf@redhat.com>
> > CC: Max Reitz <mreitz@redhat.com>
> > CC: John Snow <jsnow@redhat.com>
> > CC: Ari Sundholm <ari@tuxera.com>
> > CC: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
> > CC: Paolo Bonzini <pbonzini@redhat.com>
> > CC: Stefan Hajnoczi <stefanha@redhat.com>
> > CC: Fam Zheng <fam@euphon.net>
> > CC: Stefan Weil <sw@weilnetz.de>
> > CC: Ronnie Sahlberg <ronniesahlberg@gmail.com>
> > CC: Peter Lieven <pl@kamp.de>
> > CC: Eric Blake <eblake@redhat.com>
> > CC: "Denis V. Lunev" <den@openvz.org>
> > CC: Markus Armbruster <armbru@redhat.com>
> > CC: Alberto Garcia <berto@igalia.com>
> > CC: Jason Dillaman <dillaman@redhat.com>
> > CC: Wen Congyang <wencongyang2@huawei.com>
> > CC: Xie Changlong <xiechanglong.d@gmail.com>
> > CC: Liu Yuan <namei.unix@gmail.com>
> > CC: "Richard W.M. Jones" <rjones@redhat.com>
> > CC: Jeff Cody <codyprime@gmail.com>
> > CC: "Marc-André Lureau" <marcandre.lureau@redhat.com>
> > CC: "Daniel P. Berrangé" <berrange@redhat.com>
> > CC: Richard Henderson <rth@twiddle.net>
> > CC: Greg Kurz <groug@kaod.org>
> > CC: "Michael S. Tsirkin" <mst@redhat.com>
> > CC: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> > CC: Beniamino Galvani <b.galvani@gmail.com>
> > CC: Peter Maydell <peter.maydell@linaro.org>
> > CC: "Cédric Le Goater" <clg@kaod.org>
> > CC: Andrew Jeffery <andrew@aj.id.au>
> > CC: Joel Stanley <joel@jms.id.au>
> > CC: Andrew Baumann <Andrew.Baumann@microsoft.com>
> > CC: "Philippe Mathieu-Daudé" <philmd@redhat.com>
> > CC: Antony Pavlov <antonynpavlov@gmail.com>
> > CC: Jean-Christophe Dubois <jcd@tribudubois.net>
> > CC: Peter Chubb <peter.chubb@nicta.com.au>
> > CC: Subbaraya Sundeep <sundeep.lkml@gmail.com>
> > CC: Eric Auger <eric.auger@redhat.com>
> > CC: Alistair Francis <alistair@alistair23.me>
> > CC: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
> > CC: Stefano Stabellini <sstabellini@kernel.org>
> > CC: Anthony Perard <anthony.perard@citrix.com>
> > CC: Paul Durrant <paul@xen.org>
> > CC: Paul Burton <pburton@wavecomp.com>
> > CC: Aleksandar Rikalo <arikalo@wavecomp.com>
> > CC: Chris Wulff <crwulff@gmail.com>
> > CC: Marek Vasut <marex@denx.de>
> > CC: David Gibson <david@gibson.dropbear.id.au>
> > CC: Cornelia Huck <cohuck@redhat.com>
> > CC: Halil Pasic <pasic@linux.ibm.com>
> > CC: Christian Borntraeger <borntraeger@de.ibm.com>
> > CC: "Hervé Poussineau" <hpoussin@reactos.org>
> > CC: Xiao Guangrong <xiaoguangrong.eric@gmail.com>
> > CC: Aurelien Jarno <aurelien@aurel32.net>
> > CC: Aleksandar Markovic <amarkovic@wavecomp.com>
> > CC: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> > CC: Jason Wang <jasowang@redhat.com>
> > CC: Laszlo Ersek <lersek@redhat.com>
> > CC: Yuval Shaia <yuval.shaia@oracle.com>
> > CC: Palmer Dabbelt <palmer@sifive.com>
> > CC: Sagar Karandikar <sagark@eecs.berkeley.edu>
> > CC: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
> > CC: David Hildenbrand <david@redhat.com>
> > CC: Thomas Huth <thuth@redhat.com>
> > CC: Eric Farman <farman@linux.ibm.com>
> > CC: Matthew Rosato <mjrosato@linux.ibm.com>
> > CC: Hannes Reinecke <hare@suse.com>
> > CC: Michael Walle <michael@walle.cc>
> > CC: Artyom Tarasenko <atar4qemu@gmail.com>
> > CC: Stefan Berger <stefanb@linux.ibm.com>
> > CC: Samuel Thibault <samuel.thibault@ens-lyon.org>
> > CC: Alex Williamson <alex.williamson@redhat.com>
> > CC: Tony Krowiak <akrowiak@linux.ibm.com>
> > CC: Pierre Morel <pmorel@linux.ibm.com>
> > CC: Michael Roth <mdroth@linux.vnet.ibm.com>
> > CC: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
> > CC: Juan Quintela <quintela@redhat.com>
> > CC: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> > CC: Luigi Rizzo <rizzo@iet.unipi.it>
> > CC: Giuseppe Lettieri <g.lettieri@iet.unipi.it>
> > CC: Vincenzo Maffione <v.maffione@gmail.com>
> > CC: Jan Kiszka <jan.kiszka@siemens.com>
> > CC: Anthony Green <green@moxielogic.com>
> > CC: Stafford Horne <shorne@gmail.com>
> > CC: Guan Xuetao <gxt@mprc.pku.edu.cn>
> > CC: Max Filippov <jcmvbkbc@gmail.com>
> > CC: qemu-block@nongnu.org
> > CC: integration@gluster.org
> > CC: sheepdog@lists.wpkg.org
> > CC: qemu-arm@nongnu.org
> > CC: xen-devel@lists.xenproject.org
> > CC: qemu-ppc@nongnu.org
> > CC: qemu-s390x@nongnu.org
> > CC: qemu-riscv@nongnu.org
> >
> >   include/block/nbd.h                           |   1 +
> >   include/block/snapshot.h                      |   2 +-
> >   include/monitor/hmp.h                         |   2 +-
> >   include/qapi/error.h                          |  69 ++++-
> >   include/qom/object.h                          |   4 +-
> >   target/ppc/kvm_ppc.h                          |   4 +-
> >   ui/vnc.h                                      |   2 +-
> >   audio/audio.c                                 |  12 +-
> >   backends/cryptodev-vhost-user.c               |  10 +-
> >   backends/cryptodev.c                          |  25 +-
> >   backends/hostmem-file.c                       |  21 +-
> >   backends/hostmem-memfd.c                      |  18 +-
> >   backends/hostmem.c                            |  41 ++-
> >   backends/rng.c                                |   7 +-
> >   block.c                                       | 225 +++++++---------
> >   block/backup.c                                |   1 +
> >   block/blkdebug.c                              |  36 ++-
> >   block/blklogwrites.c                          |  22 +-
> >   block/blkreplay.c                             |   7 +-
> >   block/blkverify.c                             |  17 +-
> >   block/block-backend.c                         |  19 +-
> >   block/commit.c                                |   7 +-
> >   block/crypto.c                                |  14 +-
> >   block/curl.c                                  |   7 +-
> >   block/dirty-bitmap.c                          |   1 +
> >   block/file-posix.c                            |  79 +++---
> >   block/file-win32.c                            |  29 +-
> >   block/gluster.c                               |  69 +++--
> >   block/io.c                                    |  12 +-
> >   block/iscsi.c                                 |  36 ++-
> >   block/mirror.c                                |  19 +-
> >   block/nbd.c                                   |  59 ++--
> >   block/nfs.c                                   |   7 +-
> >   block/nvme.c                                  |  19 +-
> >   block/parallels.c                             |  30 +--
> >   block/qapi.c                                  |  26 +-
> >   block/qcow.c                                  |  17 +-
> >   block/qcow2-bitmap.c                          |   9 +-
> >   block/qcow2.c                                 |  98 +++----
> >   block/qed.c                                   |  18 +-
> >   block/quorum.c                                |  23 +-
> >   block/raw-format.c                            |   7 +-
> >   block/rbd.c                                   |  29 +-
> >   block/replication.c                           |  40 ++-
> >   block/sheepdog.c                              |  73 +++--
> >   block/snapshot.c                              |  20 +-
> >   block/ssh.c                                   |  12 +-
> >   block/throttle-groups.c                       |  24 +-
> >   block/throttle.c                              |   7 +-
> >   block/vdi.c                                   |  15 +-
> >   block/vhdx-log.c                              |   1 +
> >   block/vhdx.c                                  |  22 +-
> >   block/vmdk.c                                  |  41 ++-
> >   block/vpc.c                                   |  28 +-
> >   block/vvfat.c                                 |  12 +-
> >   block/vxhs.c                                  |  23 +-
> >   blockdev.c                                    | 252 ++++++++----------
> >   blockjob.c                                    |   8 +-
> >   bootdevice.c                                  |  31 +--
> >   chardev/char-socket.c                         |   7 +-
> >   chardev/char.c                                |  20 +-
> >   chardev/spice.c                               |   1 +
> >   crypto/block-luks.c                           |  56 ++--
> >   crypto/secret.c                               |  17 +-
> >   crypto/tlssession.c                           |   7 +-
> >   dump/dump-hmp-cmds.c                          |   4 +-
> >   dump/dump.c                                   | 151 +++++------
> >   dump/win_dump.c                               |  29 +-
> >   exec.c                                        |  21 +-
> >   hw/9pfs/9p-local.c                            |  12 +-
> >   hw/9pfs/9p-proxy.c                            |   5 +-
> >   hw/9pfs/9p.c                                  |   1 +
> >   hw/acpi/core.c                                |  18 +-
> >   hw/acpi/cpu_hotplug.c                         |   2 +-
> >   hw/acpi/ich9.c                                |  30 +--
> >   hw/acpi/memory_hotplug.c                      |   7 +-
> >   hw/arm/allwinner-a10.c                        |  27 +-
> >   hw/arm/armv7m.c                               |  52 ++--
> >   hw/arm/aspeed_soc.c                           |   1 +
> >   hw/arm/bcm2835_peripherals.c                  |  85 +++---
> >   hw/arm/bcm2836.c                              |  41 ++-
> >   hw/arm/digic.c                                |  22 +-
> >   hw/arm/fsl-imx25.c                            |  62 ++---
> >   hw/arm/fsl-imx31.c                            |  57 ++--
> >   hw/arm/fsl-imx6.c                             |  81 +++---
> >   hw/arm/integratorcp.c                         |   7 +-
> >   hw/arm/msf2-soc.c                             |  22 +-
> >   hw/arm/nrf51_soc.c                            |  47 ++--
> >   hw/arm/smmu-common.c                          |   7 +-
> >   hw/arm/smmuv3.c                               |   7 +-
> >   hw/arm/stm32f205_soc.c                        |  39 ++-
> >   hw/arm/virt.c                                 |   2 +
> >   hw/arm/xlnx-versal-virt.c                     |   7 +-
> >   hw/arm/xlnx-zynqmp.c                          |  86 +++---
> >   hw/audio/intel-hda.c                          |  13 +-
> >   hw/block/dataplane/virtio-blk.c               |   1 +
> >   hw/block/dataplane/xen-block.c                |  17 +-
> >   hw/block/fdc.c                                |  19 +-
> >   hw/block/onenand.c                            |   7 +-
> >   hw/block/pflash_cfi01.c                       |   7 +-
> >   hw/block/pflash_cfi02.c                       |   7 +-
> >   hw/block/vhost-user-blk.c                     |   6 +-
> >   hw/block/virtio-blk.c                         |   7 +-
> >   hw/block/xen-block.c                          | 119 ++++-----
> >   hw/char/debugcon.c                            |   7 +-
> >   hw/char/serial-pci-multi.c                    |   7 +-
> >   hw/char/serial-pci.c                          |   7 +-
> >   hw/char/virtio-serial-bus.c                   |   7 +-
> >   hw/core/bus.c                                 |  15 +-
> >   hw/core/loader-fit.c                          |   7 +-
> >   hw/core/machine-hmp-cmds.c                    |   6 +-
> >   hw/core/machine.c                             |  21 +-
> >   hw/core/numa.c                                |  51 ++--
> >   hw/core/qdev-properties-system.c              |  28 +-
> >   hw/core/qdev-properties.c                     |  89 +++----
> >   hw/core/qdev.c                                |  58 ++--
> >   hw/cpu/a15mpcore.c                            |   7 +-
> >   hw/cpu/a9mpcore.c                             |  27 +-
> >   hw/cpu/arm11mpcore.c                          |  22 +-
> >   hw/cpu/core.c                                 |  14 +-
> >   hw/cpu/realview_mpcore.c                      |  12 +-
> >   hw/display/bcm2835_fb.c                       |   6 +-
> >   hw/display/qxl.c                              |   7 +-
> >   hw/display/virtio-gpu-base.c                  |   7 +-
> >   hw/display/virtio-gpu-pci.c                   |   7 +-
> >   hw/display/virtio-vga.c                       |   7 +-
> >   hw/dma/bcm2835_dma.c                          |   6 +-
> >   hw/dma/xilinx_axidma.c                        |  22 +-
> >   hw/gpio/aspeed_gpio.c                         |   7 +-
> >   hw/gpio/bcm2835_gpio.c                        |  10 +-
> >   hw/i386/amd_iommu.c                           |  14 +-
> >   hw/i386/pc.c                                  | 120 ++++-----
> >   hw/ide/qdev.c                                 |  16 +-
> >   hw/input/virtio-input.c                       |  14 +-
> >   hw/intc/apic_common.c                         |   7 +-
> >   hw/intc/arm_gic.c                             |   7 +-
> >   hw/intc/arm_gic_kvm.c                         |  12 +-
> >   hw/intc/arm_gicv3.c                           |  12 +-
> >   hw/intc/arm_gicv3_its_kvm.c                   |   7 +-
> >   hw/intc/arm_gicv3_kvm.c                       |  17 +-
> >   hw/intc/armv7m_nvic.c                         |  12 +-
> >   hw/intc/nios2_iic.c                           |   6 +-
> >   hw/intc/pnv_xive.c                            |  15 +-
> >   hw/intc/realview_gic.c                        |   7 +-
> >   hw/intc/s390_flic_kvm.c                       |   9 +-
> >   hw/intc/spapr_xive.c                          |  12 +-
> >   hw/intc/spapr_xive_kvm.c                      |  55 ++--
> >   hw/intc/xics.c                                |  28 +-
> >   hw/intc/xics_kvm.c                            |  30 +--
> >   hw/intc/xics_pnv.c                            |   7 +-
> >   hw/intc/xics_spapr.c                          |   7 +-
> >   hw/intc/xive.c                                |  27 +-
> >   hw/ipack/ipack.c                              |   5 +-
> >   hw/isa/pc87312.c                              |   7 +-
> >   hw/mem/memory-device.c                        |  20 +-
> >   hw/mem/nvdimm.c                               |  25 +-
> >   hw/mem/pc-dimm.c                              |  23 +-
> >   hw/microblaze/xlnx-zynqmp-pmu.c               |  12 +-
> >   hw/mips/cps.c                                 |  46 ++--
> >   hw/misc/bcm2835_mbox.c                        |   6 +-
> >   hw/misc/bcm2835_property.c                    |  10 +-
> >   hw/misc/ivshmem.c                             |  37 ++-
> >   hw/misc/macio/macio.c                         |  68 ++---
> >   hw/misc/msf2-sysreg.c                         |   1 +
> >   hw/misc/tmp105.c                              |   7 +-
> >   hw/misc/tmp421.c                              |   7 +-
> >   hw/net/dp8393x.c                              |   7 +-
> >   hw/net/eepro100.c                             |   7 +-
> >   hw/net/ne2000-isa.c                           |  17 +-
> >   hw/net/xilinx_axienet.c                       |  22 +-
> >   hw/nvram/fw_cfg.c                             |  14 +-
> >   hw/nvram/nrf51_nvm.c                          |   7 +-
> >   hw/pci-bridge/gen_pcie_root_port.c            |   7 +-
> >   hw/pci-bridge/pci_bridge_dev.c                |  13 +-
> >   hw/pci-bridge/pci_expander_bridge.c           |   7 +-
> >   hw/pci-bridge/pcie_pci_bridge.c               |   8 +-
> >   hw/pci-bridge/pcie_root_port.c                |   1 +
> >   hw/pci-host/piix.c                            |   7 +-
> >   hw/pci/pci.c                                  |  19 +-
> >   hw/pci/pcie.c                                 |   7 +-
> >   hw/pci/shpc.c                                 |  14 +-
> >   hw/ppc/e500.c                                 |   7 +-
> >   hw/ppc/mac_newworld.c                         |   1 +
> >   hw/ppc/pnv.c                                  | 109 ++++----
> >   hw/ppc/pnv_core.c                             |  23 +-
> >   hw/ppc/pnv_homer.c                            |   5 +-
> >   hw/ppc/pnv_lpc.c                              |  26 +-
> >   hw/ppc/pnv_occ.c                              |   5 +-
> >   hw/ppc/pnv_psi.c                              |  23 +-
> >   hw/ppc/spapr.c                                | 133 ++++-----
> >   hw/ppc/spapr_caps.c                           |  57 ++--
> >   hw/ppc/spapr_cpu_core.c                       |  36 ++-
> >   hw/ppc/spapr_drc.c                            |  48 ++--
> >   hw/ppc/spapr_irq.c                            |  98 +++----
> >   hw/ppc/spapr_pci.c                            |  97 +++----
> >   hw/ppc/spapr_vio.c                            |  12 +-
> >   hw/rdma/vmw/pvrdma_main.c                     |   1 +
> >   hw/riscv/riscv_hart.c                         |   7 +-
> >   hw/riscv/sifive_e.c                           |   7 +-
> >   hw/riscv/sifive_u.c                           |  11 +-
> >   hw/s390x/3270-ccw.c                           |  13 +-
> >   hw/s390x/css-bridge.c                         |   7 +-
> >   hw/s390x/css.c                                |   7 +-
> >   hw/s390x/event-facility.c                     |   2 +-
> >   hw/s390x/ipl.c                                |  24 +-
> >   hw/s390x/s390-ccw.c                           |  19 +-
> >   hw/s390x/s390-pci-bus.c                       |  37 ++-
> >   hw/s390x/s390-skeys.c                         |   7 +-
> >   hw/s390x/s390-stattrib.c                      |   3 +-
> >   hw/s390x/s390-virtio-ccw.c                    |  11 +-
> >   hw/s390x/sclp.c                               |  15 +-
> >   hw/s390x/tod-kvm.c                            |  14 +-
> >   hw/s390x/virtio-ccw-crypto.c                  |   7 +-
> >   hw/s390x/virtio-ccw-rng.c                     |   7 +-
> >   hw/s390x/virtio-ccw.c                         |  13 +-
> >   hw/scsi/esp-pci.c                             |   7 +-
> >   hw/scsi/megasas.c                             |  11 +-
> >   hw/scsi/mptsas.c                              |  13 +-
> >   hw/scsi/scsi-bus.c                            |  24 +-
> >   hw/scsi/scsi-disk.c                           |   8 +-
> >   hw/scsi/scsi-generic.c                        |   1 +
> >   hw/scsi/vhost-scsi.c                          |  12 +-
> >   hw/scsi/vhost-user-scsi.c                     |   7 +-
> >   hw/scsi/virtio-scsi.c                         |   7 +-
> >   hw/sd/milkymist-memcard.c                     |  11 +-
> >   hw/sd/sdhci-pci.c                             |   7 +-
> >   hw/sd/sdhci.c                                 |  23 +-
> >   hw/sd/ssi-sd.c                                |  14 +-
> >   hw/smbios/smbios.c                            |  42 ++-
> >   hw/sparc/sun4m.c                              |  21 +-
> >   hw/sparc64/sun4u.c                            |   7 +-
> >   hw/timer/aspeed_timer.c                       |   6 +-
> >   hw/tpm/tpm_emulator.c                         |   8 +-
> >   hw/tpm/tpm_util.c                             |   7 +-
> >   hw/usb/bus.c                                  |  37 ++-
> >   hw/usb/ccid-card-emulated.c                   |   1 +
> >   hw/usb/dev-network.c                          |   2 +-
> >   hw/usb/dev-serial.c                           |   7 +-
> >   hw/usb/dev-smartcard-reader.c                 |  14 +-
> >   hw/usb/dev-storage.c                          |  17 +-
> >   hw/usb/hcd-ohci-pci.c                         |   7 +-
> >   hw/usb/hcd-ohci.c                             |  14 +-
> >   hw/usb/hcd-uhci.c                             |   7 +-
> >   hw/usb/hcd-xhci.c                             |  13 +-
> >   hw/vfio/ap.c                                  |  16 +-
> >   hw/vfio/ccw.c                                 |  24 +-
> >   hw/vfio/common.c                              |   3 +
> >   hw/vfio/pci-quirks.c                          |   8 +-
> >   hw/vfio/pci.c                                 |  42 ++-
> >   hw/vfio/platform.c                            |   1 +
> >   hw/virtio/vhost-vsock.c                       |   1 +
> >   hw/virtio/virtio-balloon.c                    |  35 ++-
> >   hw/virtio/virtio-bus.c                        |  17 +-
> >   hw/virtio/virtio-pci.c                        |   2 +
> >   hw/virtio/virtio-rng-pci.c                    |   7 +-
> >   hw/virtio/virtio-rng.c                        |   7 +-
> >   hw/virtio/virtio.c                            |  19 +-
> >   hw/watchdog/wdt_aspeed.c                      |   5 +-
> >   hw/xen/xen-backend.c                          |   7 +-
> >   hw/xen/xen-bus.c                              |  92 +++----
> >   hw/xen/xen-host-pci-device.c                  |  27 +-
> >   hw/xen/xen_pt.c                               |  25 +-
> >   hw/xen/xen_pt_config_init.c                   |  20 +-
> >   io/dns-resolver.c                             |   7 +-
> >   io/net-listener.c                             |   7 +-
> >   iothread.c                                    |  27 +-
> >   job.c                                         |   7 +-
> >   memory.c                                      |  63 ++---
> >   memory_mapping.c                              |   7 +-
> >   migration/colo.c                              |  38 ++-
> >   migration/migration.c                         |  39 ++-
> >   migration/ram.c                               |  13 +-
> >   migration/rdma.c                              |  13 +-
> >   migration/savevm.c                            |   2 +
> >   migration/socket.c                            |  18 +-
> >   monitor/hmp-cmds.c                            | 155 ++++++-----
> >   monitor/misc.c                                |   9 +-
> >   monitor/qmp-cmds.c                            |   9 +-
> >   nbd/client.c                                  |   5 +
> >   nbd/server.c                                  |   5 +
> >   net/can/can_host.c                            |   7 +-
> >   net/dump.c                                    |  15 +-
> >   net/filter-buffer.c                           |  15 +-
> >   net/filter.c                                  |   7 +-
> >   net/net.c                                     |  58 ++--
> >   net/netmap.c                                  |   7 +-
> >   net/slirp.c                                   |   7 +-
> >   net/tap.c                                     |  47 ++--
> >   qapi/qapi-visit-core.c                        |  56 ++--
> >   qapi/qmp-dispatch.c                           |   7 +-
> >   qapi/string-input-visitor.c                   |   7 +-
> >   qdev-monitor.c                                |  69 +++--
> >   qga/commands-posix.c                          | 222 +++++++--------
> >   qga/commands-win32.c                          | 141 +++++-----
> >   qga/commands.c                                |  12 +-
> >   qom/object.c                                  | 246 ++++++++---------
> >   qom/object_interfaces.c                       |  27 +-
> >   qom/qom-hmp-cmds.c                            |   4 +-
> >   qom/qom-qobject.c                             |   7 +-
> >   replication.c                                 |  28 +-
> >   scsi/pr-manager-helper.c                      |   7 +-
> >   target/alpha/cpu.c                            |   7 +-
> >   target/arm/cpu.c                              |   7 +-
> >   target/arm/cpu64.c                            |  11 +-
> >   target/cris/cpu.c                             |   7 +-
> >   target/hppa/cpu.c                             |   7 +-
> >   target/i386/cpu.c                             | 117 ++++----
> >   target/lm32/cpu.c                             |   7 +-
> >   target/m68k/cpu.c                             |   7 +-
> >   target/microblaze/cpu.c                       |   7 +-
> >   target/mips/cpu.c                             |   7 +-
> >   target/moxie/cpu.c                            |   7 +-
> >   target/nios2/cpu.c                            |   7 +-
> >   target/openrisc/cpu.c                         |   7 +-
> >   target/ppc/compat.c                           |  20 +-
> >   target/ppc/kvm.c                              |  14 +-
> >   target/ppc/translate_init.inc.c               |  26 +-
> >   target/riscv/cpu.c                            |   7 +-
> >   target/s390x/cpu.c                            |  26 +-
> >   target/s390x/cpu_models.c                     |   2 +
> >   target/sh4/cpu.c                              |   7 +-
> >   target/sparc/cpu.c                            |  14 +-
> >   target/tilegx/cpu.c                           |   7 +-
> >   target/tricore/cpu.c                          |   7 +-
> >   target/unicore32/cpu.c                        |   7 +-
> >   target/xtensa/cpu.c                           |   7 +-
> >   tests/test-image-locking.c                    |   7 +-
> >   tpm.c                                         |   7 +-
> >   trace/qmp.c                                   |  14 +-
> >   ui/input-barrier.c                            |   7 +-
> >   ui/input.c                                    |  14 +-
> >   ui/vnc.c                                      |  39 ++-
> >   util/error.c                                  |  30 +--
> >   util/main-loop.c                              |   5 +-
> >   util/oslib-posix.c                            |   6 +-
> >   util/qemu-config.c                            |  29 +-
> >   util/qemu-option.c                            |  59 ++--
> >   util/qemu-sockets.c                           |  31 +--
> >   vl.c                                          |  14 +-
> >   python/commit-per-subsystem.py                | 204 ++++++++++++++
> >   scripts/coccinelle/auto-propagated-errp.cocci | 118 ++++++++
> >   341 files changed, 3851 insertions(+), 4455 deletions(-)
> >   create mode 100755 python/commit-per-subsystem.py
> >   create mode 100644 scripts/coccinelle/auto-propagated-errp.cocci
> >
>
>
> --
> Best regards,
> Vladimir

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 024/126] error: auto propagated local_err
  2019-10-11 16:04 ` [Xen-devel] [RFC v5 024/126] " Vladimir Sementsov-Ogievskiy
@ 2019-11-08 21:10   ` Marc-André Lureau
  2019-11-08 22:45     ` Eric Blake
  2019-12-04 14:59   ` Markus Armbruster
  1 sibling, 1 reply; 34+ messages in thread
From: Marc-André Lureau @ 2019-11-08 21:10 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy
  Cc: Ronnie Sahlberg, Jeff Cody, Jan Kiszka, Alberto Garcia,
	Hailiang Zhang, open list:Block layer core, Aleksandar Rikalo,
	Halil Pasic, Hervé Poussineau, Anthony Perard,
	Samuel Thibault, Laszlo Ersek, Jason Wang, Laurent Vivier,
	Eduardo Habkost, Xie Changlong, Peter Lieven,
	Dr. David Alan Gilbert, Beniamino Galvani, Eric Auger,
	Alex Williamson, Stefan Hajnoczi, John Snow, Richard Henderson,
	Kevin Wolf, Andrew Jeffery, Chris Wulff, Subbaraya Sundeep,
	Michael Walle, open list:sPAPR pseries, Bastian Koppelmann,
	Igor Mammedov, Fam Zheng, Peter Maydell, sheepdog,
	Matthew Rosato, David Hildenbrand, Palmer Dabbelt, Eric Farman,
	Max Filippov, Denis V. Lunev, Hannes Reinecke,
	Stefano Stabellini, Gonglei (Arei),
	Liu Yuan, Artyom Tarasenko, Thomas Huth, Amit Shah, Stefan Weil,
	Greg Kurz, Yuval Shaia, Qemu-s390x list, open list:ARM,
	Peter Chubb, Cédric Le Goater, Stafford Horne, qemu-riscv,
	Cornelia Huck, Aleksandar Markovic, Aurelien Jarno, Paul Burton,
	Sagar Karandikar, Paul Durrant, Anthony Green, Gerd Hoffmann,
	Edgar E. Iglesias, Guan Xuetao, Ari Sundholm, Juan Quintela,
	Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Philippe Mathieu-Daudé,
	Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Michael S. Tsirkin, Mark Cave-Ayland, QEMU, Vincenzo Maffione,
	Marek Vasut, Markus Armbruster, Alistair Francis,
	Pavel Dovgalyuk, Giuseppe Lettieri, Luigi Rizzo, David Gibson,
	Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

On Fri, Oct 11, 2019 at 10:11 PM Vladimir Sementsov-Ogievskiy
<vsementsov@virtuozzo.com> wrote:
>
> Here is introduced ERRP_AUTO_PROPAGATE macro, to be used at start of
> functions with errp OUT parameter.
>
> It has three goals:
>
> 1. Fix issue with error_fatal & error_prepend/error_append_hint: user
> can't see this additional information, because exit() happens in
> error_setg earlier than information is added. [Reported by Greg Kurz]
>
> 2. Fix issue with error_abort & error_propagate: when we wrap
> error_abort by local_err+error_propagate, resulting coredump will
> refer to error_propagate and not to the place where error happened.
> (the macro itself doesn't fix the issue, but it allows to [3.] drop all
> local_err+error_propagate pattern, which will definitely fix the issue)
> [Reported by Kevin Wolf]
>
> 3. Drop local_err+error_propagate pattern, which is used to workaround
> void functions with errp parameter, when caller wants to know resulting
> status. (Note: actually these functions could be merely updated to
> return int error code).
>
> To achieve these goals, we need to add invocation of the macro at start
> of functions, which needs error_prepend/error_append_hint (1.); add
> invocation of the macro at start of functions which do
> local_err+error_propagate scenario the check errors, drop local errors
> from them and just use *errp instead (2., 3.).
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> Reviewed-by: Eric Blake <eblake@redhat.com>
> ---
>
> CC: Gerd Hoffmann <kraxel@redhat.com>
> CC: "Gonglei (Arei)" <arei.gonglei@huawei.com>
> CC: Eduardo Habkost <ehabkost@redhat.com>
> CC: Igor Mammedov <imammedo@redhat.com>
> CC: Laurent Vivier <lvivier@redhat.com>
> CC: Amit Shah <amit@kernel.org>
> CC: Kevin Wolf <kwolf@redhat.com>
> CC: Max Reitz <mreitz@redhat.com>
> CC: John Snow <jsnow@redhat.com>
> CC: Ari Sundholm <ari@tuxera.com>
> CC: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
> CC: Paolo Bonzini <pbonzini@redhat.com>
> CC: Stefan Hajnoczi <stefanha@redhat.com>
> CC: Fam Zheng <fam@euphon.net>
> CC: Stefan Weil <sw@weilnetz.de>
> CC: Ronnie Sahlberg <ronniesahlberg@gmail.com>
> CC: Peter Lieven <pl@kamp.de>
> CC: Eric Blake <eblake@redhat.com>
> CC: "Denis V. Lunev" <den@openvz.org>
> CC: Markus Armbruster <armbru@redhat.com>
> CC: Alberto Garcia <berto@igalia.com>
> CC: Jason Dillaman <dillaman@redhat.com>
> CC: Wen Congyang <wencongyang2@huawei.com>
> CC: Xie Changlong <xiechanglong.d@gmail.com>
> CC: Liu Yuan <namei.unix@gmail.com>
> CC: "Richard W.M. Jones" <rjones@redhat.com>
> CC: Jeff Cody <codyprime@gmail.com>
> CC: "Marc-André Lureau" <marcandre.lureau@redhat.com>
> CC: "Daniel P. Berrangé" <berrange@redhat.com>
> CC: Richard Henderson <rth@twiddle.net>
> CC: Greg Kurz <groug@kaod.org>
> CC: "Michael S. Tsirkin" <mst@redhat.com>
> CC: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> CC: Beniamino Galvani <b.galvani@gmail.com>
> CC: Peter Maydell <peter.maydell@linaro.org>
> CC: "Cédric Le Goater" <clg@kaod.org>
> CC: Andrew Jeffery <andrew@aj.id.au>
> CC: Joel Stanley <joel@jms.id.au>
> CC: Andrew Baumann <Andrew.Baumann@microsoft.com>
> CC: "Philippe Mathieu-Daudé" <philmd@redhat.com>
> CC: Antony Pavlov <antonynpavlov@gmail.com>
> CC: Jean-Christophe Dubois <jcd@tribudubois.net>
> CC: Peter Chubb <peter.chubb@nicta.com.au>
> CC: Subbaraya Sundeep <sundeep.lkml@gmail.com>
> CC: Eric Auger <eric.auger@redhat.com>
> CC: Alistair Francis <alistair@alistair23.me>
> CC: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
> CC: Stefano Stabellini <sstabellini@kernel.org>
> CC: Anthony Perard <anthony.perard@citrix.com>
> CC: Paul Durrant <paul@xen.org>
> CC: Paul Burton <pburton@wavecomp.com>
> CC: Aleksandar Rikalo <arikalo@wavecomp.com>
> CC: Chris Wulff <crwulff@gmail.com>
> CC: Marek Vasut <marex@denx.de>
> CC: David Gibson <david@gibson.dropbear.id.au>
> CC: Cornelia Huck <cohuck@redhat.com>
> CC: Halil Pasic <pasic@linux.ibm.com>
> CC: Christian Borntraeger <borntraeger@de.ibm.com>
> CC: "Hervé Poussineau" <hpoussin@reactos.org>
> CC: Xiao Guangrong <xiaoguangrong.eric@gmail.com>
> CC: Aurelien Jarno <aurelien@aurel32.net>
> CC: Aleksandar Markovic <amarkovic@wavecomp.com>
> CC: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> CC: Jason Wang <jasowang@redhat.com>
> CC: Laszlo Ersek <lersek@redhat.com>
> CC: Yuval Shaia <yuval.shaia@oracle.com>
> CC: Palmer Dabbelt <palmer@sifive.com>
> CC: Sagar Karandikar <sagark@eecs.berkeley.edu>
> CC: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
> CC: David Hildenbrand <david@redhat.com>
> CC: Thomas Huth <thuth@redhat.com>
> CC: Eric Farman <farman@linux.ibm.com>
> CC: Matthew Rosato <mjrosato@linux.ibm.com>
> CC: Hannes Reinecke <hare@suse.com>
> CC: Michael Walle <michael@walle.cc>
> CC: Artyom Tarasenko <atar4qemu@gmail.com>
> CC: Stefan Berger <stefanb@linux.ibm.com>
> CC: Samuel Thibault <samuel.thibault@ens-lyon.org>
> CC: Alex Williamson <alex.williamson@redhat.com>
> CC: Tony Krowiak <akrowiak@linux.ibm.com>
> CC: Pierre Morel <pmorel@linux.ibm.com>
> CC: Michael Roth <mdroth@linux.vnet.ibm.com>
> CC: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
> CC: Juan Quintela <quintela@redhat.com>
> CC: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> CC: Luigi Rizzo <rizzo@iet.unipi.it>
> CC: Giuseppe Lettieri <g.lettieri@iet.unipi.it>
> CC: Vincenzo Maffione <v.maffione@gmail.com>
> CC: Jan Kiszka <jan.kiszka@siemens.com>
> CC: Anthony Green <green@moxielogic.com>
> CC: Stafford Horne <shorne@gmail.com>
> CC: Guan Xuetao <gxt@mprc.pku.edu.cn>
> CC: Max Filippov <jcmvbkbc@gmail.com>
> CC: qemu-block@nongnu.org
> CC: integration@gluster.org
> CC: sheepdog@lists.wpkg.org
> CC: qemu-arm@nongnu.org
> CC: xen-devel@lists.xenproject.org
> CC: qemu-ppc@nongnu.org
> CC: qemu-s390x@nongnu.org
> CC: qemu-riscv@nongnu.org
>
>  include/qapi/error.h | 38 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 38 insertions(+)
>
> diff --git a/include/qapi/error.h b/include/qapi/error.h
> index d6898d833b..47238d9065 100644
> --- a/include/qapi/error.h
> +++ b/include/qapi/error.h
> @@ -345,6 +345,44 @@ void error_set_internal(Error **errp,
>                          ErrorClass err_class, const char *fmt, ...)
>      GCC_FMT_ATTR(6, 7);
>
> +typedef struct ErrorPropagator {
> +    Error *local_err;
> +    Error **errp;
> +} ErrorPropagator;
> +
> +static inline void error_propagator_cleanup(ErrorPropagator *prop)
> +{
> +    error_propagate(prop->errp, prop->local_err);
> +}
> +
> +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(ErrorPropagator, error_propagator_cleanup);
> +
> +/*
> + * ERRP_AUTO_PROPAGATE
> + *
> + * This macro is created to be the first line of a function with Error **errp
> + * OUT parameter. It's needed only in cases where we want to use error_prepend,
> + * error_append_hint or dereference *errp. It's still safe (but useless) in
> + * other cases.
> + *
> + * If errp is NULL or points to error_fatal, it is rewritten to point to a
> + * local Error object, which will be automatically propagated to the original
> + * errp on function exit (see error_propagator_cleanup).
> + *
> + * After invocation of this macro it is always safe to dereference errp
> + * (as it's not NULL anymore) and to add information (by error_prepend or
> + * error_append_hint)
> + * (as, if it was error_fatal, we swapped it with a local_error to be
> + * propagated on cleanup).

Nice improvements. Minor drawback, the abort()/exit() will now take
place when going out of scope and running the cleanup instead of error
location. Not a big problem I guess.

> + *
> + * Note: we don't wrap the error_abort case, as we want resulting coredump
> + * to point to the place where the error happened, not to error_propagate.
> + */
> +#define ERRP_AUTO_PROPAGATE()                                  \
> +    g_auto(ErrorPropagator) _auto_errp_prop = {.errp = errp};  \
> +    errp = ((errp == NULL || *errp == error_fatal)             \
> +            ? &_auto_errp_prop.local_err : errp)
> +
>  /*
>   * Special error destination to abort on error.
>   * See error_setg() and error_propagate() for details.
> --
> 2.21.0
>
>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>


-- 
Marc-André Lureau

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 026/126] python: add commit-per-subsystem.py
  2019-10-11 16:04 ` [Xen-devel] [RFC v5 026/126] python: add commit-per-subsystem.py Vladimir Sementsov-Ogievskiy
@ 2019-11-08 21:18   ` Marc-André Lureau
  2019-11-11 16:37   ` Aleksandar Markovic
  2019-11-12 13:08   ` Cornelia Huck
  2 siblings, 0 replies; 34+ messages in thread
From: Marc-André Lureau @ 2019-11-08 21:18 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy
  Cc: Ronnie Sahlberg, Jeff Cody, Jan Kiszka, Alberto Garcia,
	Hailiang Zhang, open list:Block layer core, Aleksandar Rikalo,
	Halil Pasic, Hervé Poussineau, Anthony Perard,
	Samuel Thibault, Laszlo Ersek, Jason Wang, Laurent Vivier,
	Eduardo Habkost, Xie Changlong, Peter Lieven,
	Dr. David Alan Gilbert, Beniamino Galvani, Eric Auger,
	Alex Williamson, Stefan Hajnoczi, John Snow, Richard Henderson,
	Kevin Wolf, Andrew Jeffery, Chris Wulff, Subbaraya Sundeep,
	Michael Walle, open list:sPAPR pseries, Bastian Koppelmann,
	Igor Mammedov, Fam Zheng, Peter Maydell, sheepdog,
	Matthew Rosato, David Hildenbrand, Palmer Dabbelt, Eric Farman,
	Max Filippov, Denis V. Lunev, Hannes Reinecke,
	Stefano Stabellini, Gonglei (Arei),
	Liu Yuan, Artyom Tarasenko, Thomas Huth, Amit Shah, Stefan Weil,
	Greg Kurz, Yuval Shaia, Qemu-s390x list, open list:ARM,
	Peter Chubb, Cédric Le Goater, Stafford Horne, qemu-riscv,
	Cornelia Huck, Aleksandar Markovic, Aurelien Jarno, Paul Burton,
	Sagar Karandikar, Paul Durrant, Anthony Green, Gerd Hoffmann,
	Edgar E. Iglesias, Guan Xuetao, Ari Sundholm, Juan Quintela,
	Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Philippe Mathieu-Daudé,
	Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Michael S. Tsirkin, Mark Cave-Ayland, QEMU, Vincenzo Maffione,
	Marek Vasut, Markus Armbruster, Alistair Francis,
	Pavel Dovgalyuk, Giuseppe Lettieri, Luigi Rizzo, David Gibson,
	Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

Hi

On Fri, Oct 11, 2019 at 9:11 PM Vladimir Sementsov-Ogievskiy
<vsementsov@virtuozzo.com> wrote:
>
> Add script to automatically commit tree-wide changes per-subsystem.

Oh interesting! I guess it could use a --help or a larger commit
message to explain a bit what it does (I imagine from the rest of the
series, but someone looking at the script without context may wonder;)

You could also fix some pep8/pylint/pycodestyle

>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
>
> CC: Gerd Hoffmann <kraxel@redhat.com>
> CC: "Gonglei (Arei)" <arei.gonglei@huawei.com>
> CC: Eduardo Habkost <ehabkost@redhat.com>
> CC: Igor Mammedov <imammedo@redhat.com>
> CC: Laurent Vivier <lvivier@redhat.com>
> CC: Amit Shah <amit@kernel.org>
> CC: Kevin Wolf <kwolf@redhat.com>
> CC: Max Reitz <mreitz@redhat.com>
> CC: John Snow <jsnow@redhat.com>
> CC: Ari Sundholm <ari@tuxera.com>
> CC: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
> CC: Paolo Bonzini <pbonzini@redhat.com>
> CC: Stefan Hajnoczi <stefanha@redhat.com>
> CC: Fam Zheng <fam@euphon.net>
> CC: Stefan Weil <sw@weilnetz.de>
> CC: Ronnie Sahlberg <ronniesahlberg@gmail.com>
> CC: Peter Lieven <pl@kamp.de>
> CC: Eric Blake <eblake@redhat.com>
> CC: "Denis V. Lunev" <den@openvz.org>
> CC: Markus Armbruster <armbru@redhat.com>
> CC: Alberto Garcia <berto@igalia.com>
> CC: Jason Dillaman <dillaman@redhat.com>
> CC: Wen Congyang <wencongyang2@huawei.com>
> CC: Xie Changlong <xiechanglong.d@gmail.com>
> CC: Liu Yuan <namei.unix@gmail.com>
> CC: "Richard W.M. Jones" <rjones@redhat.com>
> CC: Jeff Cody <codyprime@gmail.com>
> CC: "Marc-André Lureau" <marcandre.lureau@redhat.com>
> CC: "Daniel P. Berrangé" <berrange@redhat.com>
> CC: Richard Henderson <rth@twiddle.net>
> CC: Greg Kurz <groug@kaod.org>
> CC: "Michael S. Tsirkin" <mst@redhat.com>
> CC: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> CC: Beniamino Galvani <b.galvani@gmail.com>
> CC: Peter Maydell <peter.maydell@linaro.org>
> CC: "Cédric Le Goater" <clg@kaod.org>
> CC: Andrew Jeffery <andrew@aj.id.au>
> CC: Joel Stanley <joel@jms.id.au>
> CC: Andrew Baumann <Andrew.Baumann@microsoft.com>
> CC: "Philippe Mathieu-Daudé" <philmd@redhat.com>
> CC: Antony Pavlov <antonynpavlov@gmail.com>
> CC: Jean-Christophe Dubois <jcd@tribudubois.net>
> CC: Peter Chubb <peter.chubb@nicta.com.au>
> CC: Subbaraya Sundeep <sundeep.lkml@gmail.com>
> CC: Eric Auger <eric.auger@redhat.com>
> CC: Alistair Francis <alistair@alistair23.me>
> CC: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
> CC: Stefano Stabellini <sstabellini@kernel.org>
> CC: Anthony Perard <anthony.perard@citrix.com>
> CC: Paul Durrant <paul@xen.org>
> CC: Paul Burton <pburton@wavecomp.com>
> CC: Aleksandar Rikalo <arikalo@wavecomp.com>
> CC: Chris Wulff <crwulff@gmail.com>
> CC: Marek Vasut <marex@denx.de>
> CC: David Gibson <david@gibson.dropbear.id.au>
> CC: Cornelia Huck <cohuck@redhat.com>
> CC: Halil Pasic <pasic@linux.ibm.com>
> CC: Christian Borntraeger <borntraeger@de.ibm.com>
> CC: "Hervé Poussineau" <hpoussin@reactos.org>
> CC: Xiao Guangrong <xiaoguangrong.eric@gmail.com>
> CC: Aurelien Jarno <aurelien@aurel32.net>
> CC: Aleksandar Markovic <amarkovic@wavecomp.com>
> CC: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> CC: Jason Wang <jasowang@redhat.com>
> CC: Laszlo Ersek <lersek@redhat.com>
> CC: Yuval Shaia <yuval.shaia@oracle.com>
> CC: Palmer Dabbelt <palmer@sifive.com>
> CC: Sagar Karandikar <sagark@eecs.berkeley.edu>
> CC: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
> CC: David Hildenbrand <david@redhat.com>
> CC: Thomas Huth <thuth@redhat.com>
> CC: Eric Farman <farman@linux.ibm.com>
> CC: Matthew Rosato <mjrosato@linux.ibm.com>
> CC: Hannes Reinecke <hare@suse.com>
> CC: Michael Walle <michael@walle.cc>
> CC: Artyom Tarasenko <atar4qemu@gmail.com>
> CC: Stefan Berger <stefanb@linux.ibm.com>
> CC: Samuel Thibault <samuel.thibault@ens-lyon.org>
> CC: Alex Williamson <alex.williamson@redhat.com>
> CC: Tony Krowiak <akrowiak@linux.ibm.com>
> CC: Pierre Morel <pmorel@linux.ibm.com>
> CC: Michael Roth <mdroth@linux.vnet.ibm.com>
> CC: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
> CC: Juan Quintela <quintela@redhat.com>
> CC: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> CC: Luigi Rizzo <rizzo@iet.unipi.it>
> CC: Giuseppe Lettieri <g.lettieri@iet.unipi.it>
> CC: Vincenzo Maffione <v.maffione@gmail.com>
> CC: Jan Kiszka <jan.kiszka@siemens.com>
> CC: Anthony Green <green@moxielogic.com>
> CC: Stafford Horne <shorne@gmail.com>
> CC: Guan Xuetao <gxt@mprc.pku.edu.cn>
> CC: Max Filippov <jcmvbkbc@gmail.com>
> CC: qemu-block@nongnu.org
> CC: integration@gluster.org
> CC: sheepdog@lists.wpkg.org
> CC: qemu-arm@nongnu.org
> CC: xen-devel@lists.xenproject.org
> CC: qemu-ppc@nongnu.org
> CC: qemu-s390x@nongnu.org
> CC: qemu-riscv@nongnu.org
>
>  python/commit-per-subsystem.py | 204 +++++++++++++++++++++++++++++++++
>  1 file changed, 204 insertions(+)
>  create mode 100755 python/commit-per-subsystem.py
>
> diff --git a/python/commit-per-subsystem.py b/python/commit-per-subsystem.py
> new file mode 100755
> index 0000000000..2ccf84cb15
> --- /dev/null
> +++ b/python/commit-per-subsystem.py
> @@ -0,0 +1,204 @@
> +#!/usr/bin/env python3
> +#
> +# Copyright (c) 2019 Virtuozzo International GmbH
> +#
> +# This program is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation; either version 2 of the License, or
> +# (at your option) any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program.  If not, see <http://www.gnu.org/licenses/>.
> +#
> +
> +import subprocess
> +import sys
> +import os
> +import glob
> +
> +
> +def git_add(pattern):
> +    subprocess.run(['git', 'add', pattern])
> +
> +
> +def git_commit(msg):
> +    subprocess.run(['git', 'commit', '-m', msg], capture_output=True)
> +
> +
> +def git_changed_files():
> +    ret = subprocess.check_output(['git', 'diff', '--name-only'], encoding='utf-8').split('\n')
> +    if ret[-1] == '':
> +        del ret[-1]
> +    return ret
> +
> +
> +maintainers = sys.argv[1]
> +message = sys.argv[2].strip()
> +
> +subsystem = None
> +
> +remap = {
> +    'Block layer core': 'block',
> +    'Block Jobs': 'block',
> +    'Dirty Bitmaps': 'block',
> +    'Block QAPI, monitor, command line': 'block',
> +    'Block I/O path': 'block',
> +    'Throttling infrastructure': 'block',
> +    'Architecture support': 's390x',
> +    'Guest CPU Cores (KVM)': 'kvm',
> +    'Guest CPU Cores (Xen)': 'xen',
> +    'Guest CPU cores (TCG)': 'tcg',
> +    'Network Block Device (NBD)': 'nbd',
> +    'Parallel NOR Flash devices': 'pflash',
> +    'Firmware configuration (fw_cfg)': 'fw_cfg',
> +    'Block SCSI subsystem': 'scsi',
> +    'Network device backends': 'net',
> +    'Netmap network backend': 'net',
> +    'Host Memory Backends': 'hostmem',
> +    'Cryptodev Backends': 'cryptodev',
> +    'QEMU Guest Agent': 'qga',
> +    'COLO Framework': 'colo',
> +    'Command line option argument parsing': 'cmdline',
> +    'Character device backends': 'chardev'
> +}
> +
> +
> +class Maintainers:
> +    def add(self, subsystem, path, mapper, mapper_name, glob_count=1):
> +        if subsystem in remap:
> +            subsystem = remap[subsystem]
> +        if subsystem not in self.subsystems:
> +            self.subsystems.append(subsystem)
> +
> +        if path[-1] == '/':
> +            path = path[:-1]
> +
> +        if path in mapper:
> +            if mapper[path][1] == glob_count:
> +                print('Warning: "{}" both in "{}" and "{}" in {} mapper with '
> +                      'same glob-count={}. {} ignored for this path.'.format(
> +                        path, mapper[path][0], subsystem, mapper_name, glob_count,
> +                          subsystem))
> +                return
> +            if mapper[path][1] < glob_count:
> +                # silently ignore worse match
> +                return
> +
> +        mapper[path] = (subsystem, glob_count)
> +
> +    def __init__(self, file_name):
> +        self.map_file = {}
> +        self.map_glob_file = {}
> +        self.map_dir = {}
> +        self.map_glob_dir = {}
> +        self.map_unmaintained_dir = {
> +            'python': ('python', 1),
> +            'hw/misc': ('misc', 1)
> +        }
> +        self.subsystems = ['python', 'misc']
> +        subsystem = None
> +
> +        with open(file_name) as f:
> +            mode2 = False
> +            prevline = ''
> +            for line in f:
> +                line = line.rstrip()
> +                if not line:
> +                    continue
> +                if len(line) >= 2 and line[1] == ':':
> +                    if line[0] == 'F':
> +                        fname = line[3:]
> +                        if fname in ['*', '*/']:
> +                            continue
> +                        if os.path.isfile(fname):
> +                            self.add(subsystem, fname, self.map_file, 'file')
> +                        elif os.path.isdir(fname):
> +                            self.add(subsystem, fname, self.map_dir, 'dir')
> +                        else:
> +                            paths = glob.glob(fname)
> +                            if not paths:
> +                                print('Warning: nothing corresponds to "{}"'.format(fname))
> +                                continue
> +
> +                            n = len(paths)
> +                            for f in paths:
> +                                if os.path.isfile(f):
> +                                    self.add(subsystem, f, self.map_glob_file, 'glob-file', n)
> +                                else:
> +                                    assert os.path.isdir(f)
> +                                    self.add(subsystem, f, self.map_glob_dir, 'glob-dir', n)
> +                elif line[:3] == '---':
> +                    subsystem = prevline
> +                    if subsystem == 'Devices':
> +                        mode2 = True
> +                elif mode2:
> +                    subsystem = line
> +                prevline = line
> +
> +    def find_in_map_dir(self, file_name, mapper):
> +        while file_name != '' and file_name not in mapper:
> +            file_name = os.path.dirname(file_name)
> +
> +        return None if file_name == '' else mapper[file_name][0]
> +
> +    def find_in_map_file(self, file_name, mapper):
> +        if file_name in mapper:
> +            return mapper[file_name][0]
> +
> +    def find_subsystem(self, file_name):
> +        s = self.find_in_map_file(file_name, self.map_file)
> +        if s is not None:
> +            return s
> +
> +        s = self.find_in_map_file(file_name, self.map_glob_file)
> +        if s is not None:
> +            return s
> +
> +        s = self.find_in_map_dir(file_name, self.map_dir)
> +        if s is not None:
> +            return s
> +
> +        s = self.find_in_map_dir(file_name, self.map_glob_dir)
> +        if s is not None:
> +            return s
> +
> +        s = self.find_in_map_dir(file_name, self.map_unmaintained_dir)
> +        if s is not None:
> +            return s
> +
> +        self.subsystems.append(file_name)
> +        return file_name
> +
> +
> +def commit(subsystem):
> +    msg = subsystem
> +    if msg in remap:
> +        msg = remap[msg]
> +    msg += ': ' + message
> +    git_commit(msg)
> +
> +mnt = Maintainers(maintainers)
> +res = {}
> +for f in git_changed_files():
> +    s = mnt.find_subsystem(f)
> +    if s in res:
> +        res[s].append(f)
> +    else:
> +        res[s] = [f]
> +
> +for s in mnt.subsystems:
> +    if s in res:
> +        print(s)
> +        for f in res[s]:
> +            print('  ', f)
> +
> +for s in mnt.subsystems:
> +    if s in res:
> +        for f in res[s]:
> +            git_add(f)
> +        commit(s)
> --
> 2.21.0
>
>


-- 
Marc-André Lureau

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 024/126] error: auto propagated local_err
  2019-11-08 21:10   ` Marc-André Lureau
@ 2019-11-08 22:45     ` Eric Blake
  0 siblings, 0 replies; 34+ messages in thread
From: Eric Blake @ 2019-11-08 22:45 UTC (permalink / raw)
  To: Marc-André Lureau, Vladimir Sementsov-Ogievskiy
  Cc: Stefan Hajnoczi, Jan Kiszka, Hailiang Zhang,
	open list:Block layer core, Aleksandar Rikalo, Halil Pasic,
	Hervé Poussineau, Anthony Perard, Samuel Thibault,
	Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Ronnie Sahlberg, Richard Henderson,
	Kevin Wolf, Andrew Jeffery, Chris Wulff, Subbaraya Sundeep,
	Michael Walle, open list:sPAPR pseries, Bastian Koppelmann,
	Igor Mammedov, Fam Zheng, Peter Maydell, sheepdog,
	Matthew Rosato, David Hildenbrand, Palmer Dabbelt, Max Filippov,
	Denis V. Lunev, Hannes Reinecke, Stefano Stabellini,
	Gonglei (Arei),
	Liu Yuan, Artyom Tarasenko, Thomas Huth, Amit Shah, Stefan Weil,
	Greg Kurz, Yuval Shaia, Qemu-s390x list, open list:ARM,
	Peter Chubb, Cédric Le Goater, Stafford Horne, qemu-riscv,
	Cornelia Huck, Aleksandar Markovic, Aurelien Jarno, Paul Burton,
	Sagar Karandikar, Paul Durrant, Jason Wang, Gerd Hoffmann,
	Edgar E. Iglesias, Guan Xuetao, Juan Quintela, Michael Roth,
	Christian Borntraeger, Joel Stanley, Antony Pavlov, xen-devel,
	integration, Laszlo Ersek, Andrew Baumann, Max Reitz,
	Michael S. Tsirkin, Mark Cave-Ayland, QEMU, Vincenzo Maffione,
	Marek Vasut, Markus Armbruster, Alistair Francis,
	Pavel Dovgalyuk, Giuseppe Lettieri, Luigi Rizzo, David Gibson,
	Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

On 11/8/19 3:10 PM, Marc-André Lureau wrote:

>> +/*
>> + * ERRP_AUTO_PROPAGATE
>> + *
>> + * This macro is created to be the first line of a function with Error **errp
>> + * OUT parameter. It's needed only in cases where we want to use error_prepend,
>> + * error_append_hint or dereference *errp. It's still safe (but useless) in
>> + * other cases.
>> + *
>> + * If errp is NULL or points to error_fatal, it is rewritten to point to a
>> + * local Error object, which will be automatically propagated to the original
>> + * errp on function exit (see error_propagator_cleanup).
>> + *
>> + * After invocation of this macro it is always safe to dereference errp
>> + * (as it's not NULL anymore) and to add information (by error_prepend or
>> + * error_append_hint)
>> + * (as, if it was error_fatal, we swapped it with a local_error to be
>> + * propagated on cleanup).
> 
> Nice improvements. Minor drawback, the abort()/exit() will now take
> place when going out of scope and running the cleanup instead of error
> location. Not a big problem I guess.

Your assessment is not quite right:

Any abort() will happen at the leaf node (because we are no longer 
wrapping thing into a local err and skipping error_propagate altogether 
for &error_abort).

You are correct that any exit() will now happen during cleanup, but that 
is an undetectable change (there is no stack trace present for 
&error_fatal, so calling error_propagate at a later point in time does 
not affect the observable end behavior).

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


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 026/126] python: add commit-per-subsystem.py
  2019-10-11 16:04 ` [Xen-devel] [RFC v5 026/126] python: add commit-per-subsystem.py Vladimir Sementsov-Ogievskiy
  2019-11-08 21:18   ` Marc-André Lureau
@ 2019-11-11 16:37   ` Aleksandar Markovic
  2019-11-12 13:08   ` Cornelia Huck
  2 siblings, 0 replies; 34+ messages in thread
From: Aleksandar Markovic @ 2019-11-11 16:37 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy
  Cc: Ronnie Sahlberg, Jeff Cody, Jan Kiszka, Alberto Garcia,
	Hailiang Zhang, qemu-block, Aleksandar Rikalo, Halil Pasic,
	Hervé Poussineau, Anthony Perard, Samuel Thibault,
	Laszlo Ersek, Jason Wang, Laurent Vivier, Eduardo Habkost,
	Xie Changlong, Peter Lieven, Dr. David Alan Gilbert,
	Beniamino Galvani, Eric Auger, Alex Williamson, Stefan Hajnoczi,
	John Snow, Richard Henderson, Kevin Wolf, Andrew Jeffery,
	Chris Wulff, Subbaraya Sundeep, Michael Walle, qemu-ppc,
	Bastian Koppelmann, Igor Mammedov, Fam Zheng, Peter Maydell,
	sheepdog, Matthew Rosato, David Hildenbrand, Palmer Dabbelt,
	Eric Farman, Max Filippov, Denis V. Lunev, Hannes Reinecke,
	Stefano Stabellini, Gonglei (Arei),
	Liu Yuan, Artyom Tarasenko, Thomas Huth, Amit Shah, Stefan Weil,
	Greg Kurz, Yuval Shaia, qemu-s390x, qemu-arm, Peter Chubb,
	Cédric Le Goater, Stafford Horne, qemu-riscv, Cornelia Huck,
	Aleksandar Markovic, Aurelien Jarno, Paul Burton,
	Sagar Karandikar, Paul Durrant, Anthony Green, Gerd Hoffmann,
	Edgar E. Iglesias, Guan Xuetao, Ari Sundholm, Juan Quintela,
	Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Philippe Mathieu-Daudé,
	Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Michael S. Tsirkin, Mark Cave-Ayland, qemu-devel,
	Vincenzo Maffione, Marek Vasut, armbru, Marc-André Lureau,
	Alistair Francis, Pavel Dovgalyuk, Giuseppe Lettieri,
	Luigi Rizzo, David Gibson, Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger


[-- Attachment #1.1: Type: text/plain, Size: 12606 bytes --]

On Friday, October 11, 2019, Vladimir Sementsov-Ogievskiy <
vsementsov@virtuozzo.com> wrote:

> Add script to automatically commit tree-wide changes per-subsystem.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---


Great idea!

Can you just add a comment somewhere close to the top of the file on script
usage? Or "--help" option? If you would like to be the script maintainer,
please change the MAINTAINERS too.

Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>


>
> CC: Gerd Hoffmann <kraxel@redhat.com>
> CC: "Gonglei (Arei)" <arei.gonglei@huawei.com>
> CC: Eduardo Habkost <ehabkost@redhat.com>
> CC: Igor Mammedov <imammedo@redhat.com>
> CC: Laurent Vivier <lvivier@redhat.com>
> CC: Amit Shah <amit@kernel.org>
> CC: Kevin Wolf <kwolf@redhat.com>
> CC: Max Reitz <mreitz@redhat.com>
> CC: John Snow <jsnow@redhat.com>
> CC: Ari Sundholm <ari@tuxera.com>
> CC: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
> CC: Paolo Bonzini <pbonzini@redhat.com>
> CC: Stefan Hajnoczi <stefanha@redhat.com>
> CC: Fam Zheng <fam@euphon.net>
> CC: Stefan Weil <sw@weilnetz.de>
> CC: Ronnie Sahlberg <ronniesahlberg@gmail.com>
> CC: Peter Lieven <pl@kamp.de>
> CC: Eric Blake <eblake@redhat.com>
> CC: "Denis V. Lunev" <den@openvz.org>
> CC: Markus Armbruster <armbru@redhat.com>
> CC: Alberto Garcia <berto@igalia.com>
> CC: Jason Dillaman <dillaman@redhat.com>
> CC: Wen Congyang <wencongyang2@huawei.com>
> CC: Xie Changlong <xiechanglong.d@gmail.com>
> CC: Liu Yuan <namei.unix@gmail.com>
> CC: "Richard W.M. Jones" <rjones@redhat.com>
> CC: Jeff Cody <codyprime@gmail.com>
> CC: "Marc-André Lureau" <marcandre.lureau@redhat.com>
> CC: "Daniel P. Berrangé" <berrange@redhat.com>
> CC: Richard Henderson <rth@twiddle.net>
> CC: Greg Kurz <groug@kaod.org>
> CC: "Michael S. Tsirkin" <mst@redhat.com>
> CC: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> CC: Beniamino Galvani <b.galvani@gmail.com>
> CC: Peter Maydell <peter.maydell@linaro.org>
> CC: "Cédric Le Goater" <clg@kaod.org>
> CC: Andrew Jeffery <andrew@aj.id.au>
> CC: Joel Stanley <joel@jms.id.au>
> CC: Andrew Baumann <Andrew.Baumann@microsoft.com>
> CC: "Philippe Mathieu-Daudé" <philmd@redhat.com>
> CC: Antony Pavlov <antonynpavlov@gmail.com>
> CC: Jean-Christophe Dubois <jcd@tribudubois.net>
> CC: Peter Chubb <peter.chubb@nicta.com.au>
> CC: Subbaraya Sundeep <sundeep.lkml@gmail.com>
> CC: Eric Auger <eric.auger@redhat.com>
> CC: Alistair Francis <alistair@alistair23.me>
> CC: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
> CC: Stefano Stabellini <sstabellini@kernel.org>
> CC: Anthony Perard <anthony.perard@citrix.com>
> CC: Paul Durrant <paul@xen.org>
> CC: Paul Burton <pburton@wavecomp.com>
> CC: Aleksandar Rikalo <arikalo@wavecomp.com>
> CC: Chris Wulff <crwulff@gmail.com>
> CC: Marek Vasut <marex@denx.de>
> CC: David Gibson <david@gibson.dropbear.id.au>
> CC: Cornelia Huck <cohuck@redhat.com>
> CC: Halil Pasic <pasic@linux.ibm.com>
> CC: Christian Borntraeger <borntraeger@de.ibm.com>
> CC: "Hervé Poussineau" <hpoussin@reactos.org>
> CC: Xiao Guangrong <xiaoguangrong.eric@gmail.com>
> CC: Aurelien Jarno <aurelien@aurel32.net>
> CC: Aleksandar Markovic <amarkovic@wavecomp.com>
> CC: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> CC: Jason Wang <jasowang@redhat.com>
> CC: Laszlo Ersek <lersek@redhat.com>
> CC: Yuval Shaia <yuval.shaia@oracle.com>
> CC: Palmer Dabbelt <palmer@sifive.com>
> CC: Sagar Karandikar <sagark@eecs.berkeley.edu>
> CC: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
> CC: David Hildenbrand <david@redhat.com>
> CC: Thomas Huth <thuth@redhat.com>
> CC: Eric Farman <farman@linux.ibm.com>
> CC: Matthew Rosato <mjrosato@linux.ibm.com>
> CC: Hannes Reinecke <hare@suse.com>
> CC: Michael Walle <michael@walle.cc>
> CC: Artyom Tarasenko <atar4qemu@gmail.com>
> CC: Stefan Berger <stefanb@linux.ibm.com>
> CC: Samuel Thibault <samuel.thibault@ens-lyon.org>
> CC: Alex Williamson <alex.williamson@redhat.com>
> CC: Tony Krowiak <akrowiak@linux.ibm.com>
> CC: Pierre Morel <pmorel@linux.ibm.com>
> CC: Michael Roth <mdroth@linux.vnet.ibm.com>
> CC: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
> CC: Juan Quintela <quintela@redhat.com>
> CC: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> CC: Luigi Rizzo <rizzo@iet.unipi.it>
> CC: Giuseppe Lettieri <g.lettieri@iet.unipi.it>
> CC: Vincenzo Maffione <v.maffione@gmail.com>
> CC: Jan Kiszka <jan.kiszka@siemens.com>
> CC: Anthony Green <green@moxielogic.com>
> CC: Stafford Horne <shorne@gmail.com>
> CC: Guan Xuetao <gxt@mprc.pku.edu.cn>
> CC: Max Filippov <jcmvbkbc@gmail.com>
> CC: qemu-block@nongnu.org
> CC: integration@gluster.org
> CC: sheepdog@lists.wpkg.org
> CC: qemu-arm@nongnu.org
> CC: xen-devel@lists.xenproject.org
> CC: qemu-ppc@nongnu.org
> CC: qemu-s390x@nongnu.org
> CC: qemu-riscv@nongnu.org
>
>  python/commit-per-subsystem.py | 204 +++++++++++++++++++++++++++++++++
>  1 file changed, 204 insertions(+)
>  create mode 100755 python/commit-per-subsystem.py
>
> diff --git a/python/commit-per-subsystem.py b/python/commit-per-subsystem.
> py
> new file mode 100755
> index 0000000000..2ccf84cb15
> --- /dev/null
> +++ b/python/commit-per-subsystem.py
> @@ -0,0 +1,204 @@
> +#!/usr/bin/env python3
> +#
> +# Copyright (c) 2019 Virtuozzo International GmbH
> +#
> +# This program is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation; either version 2 of the License, or
> +# (at your option) any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program.  If not, see <http://www.gnu.org/licenses/>.
> +#
> +
> +import subprocess
> +import sys
> +import os
> +import glob
> +
> +
> +def git_add(pattern):
> +    subprocess.run(['git', 'add', pattern])
> +
> +
> +def git_commit(msg):
> +    subprocess.run(['git', 'commit', '-m', msg], capture_output=True)
> +
> +
> +def git_changed_files():
> +    ret = subprocess.check_output(['git', 'diff', '--name-only'],
> encoding='utf-8').split('\n')
> +    if ret[-1] == '':
> +        del ret[-1]
> +    return ret
> +
> +
> +maintainers = sys.argv[1]
> +message = sys.argv[2].strip()
> +
> +subsystem = None
> +
> +remap = {
> +    'Block layer core': 'block',
> +    'Block Jobs': 'block',
> +    'Dirty Bitmaps': 'block',
> +    'Block QAPI, monitor, command line': 'block',
> +    'Block I/O path': 'block',
> +    'Throttling infrastructure': 'block',
> +    'Architecture support': 's390x',
> +    'Guest CPU Cores (KVM)': 'kvm',
> +    'Guest CPU Cores (Xen)': 'xen',
> +    'Guest CPU cores (TCG)': 'tcg',
> +    'Network Block Device (NBD)': 'nbd',
> +    'Parallel NOR Flash devices': 'pflash',
> +    'Firmware configuration (fw_cfg)': 'fw_cfg',
> +    'Block SCSI subsystem': 'scsi',
> +    'Network device backends': 'net',
> +    'Netmap network backend': 'net',
> +    'Host Memory Backends': 'hostmem',
> +    'Cryptodev Backends': 'cryptodev',
> +    'QEMU Guest Agent': 'qga',
> +    'COLO Framework': 'colo',
> +    'Command line option argument parsing': 'cmdline',
> +    'Character device backends': 'chardev'
> +}
> +
> +
> +class Maintainers:
> +    def add(self, subsystem, path, mapper, mapper_name, glob_count=1):
> +        if subsystem in remap:
> +            subsystem = remap[subsystem]
> +        if subsystem not in self.subsystems:
> +            self.subsystems.append(subsystem)
> +
> +        if path[-1] == '/':
> +            path = path[:-1]
> +
> +        if path in mapper:
> +            if mapper[path][1] == glob_count:
> +                print('Warning: "{}" both in "{}" and "{}" in {} mapper
> with '
> +                      'same glob-count={}. {} ignored for this
> path.'.format(
> +                        path, mapper[path][0], subsystem, mapper_name,
> glob_count,
> +                          subsystem))
> +                return
> +            if mapper[path][1] < glob_count:
> +                # silently ignore worse match
> +                return
> +
> +        mapper[path] = (subsystem, glob_count)
> +
> +    def __init__(self, file_name):
> +        self.map_file = {}
> +        self.map_glob_file = {}
> +        self.map_dir = {}
> +        self.map_glob_dir = {}
> +        self.map_unmaintained_dir = {
> +            'python': ('python', 1),
> +            'hw/misc': ('misc', 1)
> +        }
> +        self.subsystems = ['python', 'misc']
> +        subsystem = None
> +
> +        with open(file_name) as f:
> +            mode2 = False
> +            prevline = ''
> +            for line in f:
> +                line = line.rstrip()
> +                if not line:
> +                    continue
> +                if len(line) >= 2 and line[1] == ':':
> +                    if line[0] == 'F':
> +                        fname = line[3:]
> +                        if fname in ['*', '*/']:
> +                            continue
> +                        if os.path.isfile(fname):
> +                            self.add(subsystem, fname, self.map_file,
> 'file')
> +                        elif os.path.isdir(fname):
> +                            self.add(subsystem, fname, self.map_dir,
> 'dir')
> +                        else:
> +                            paths = glob.glob(fname)
> +                            if not paths:
> +                                print('Warning: nothing corresponds to
> "{}"'.format(fname))
> +                                continue
> +
> +                            n = len(paths)
> +                            for f in paths:
> +                                if os.path.isfile(f):
> +                                    self.add(subsystem, f,
> self.map_glob_file, 'glob-file', n)
> +                                else:
> +                                    assert os.path.isdir(f)
> +                                    self.add(subsystem, f,
> self.map_glob_dir, 'glob-dir', n)
> +                elif line[:3] == '---':
> +                    subsystem = prevline
> +                    if subsystem == 'Devices':
> +                        mode2 = True
> +                elif mode2:
> +                    subsystem = line
> +                prevline = line
> +
> +    def find_in_map_dir(self, file_name, mapper):
> +        while file_name != '' and file_name not in mapper:
> +            file_name = os.path.dirname(file_name)
> +
> +        return None if file_name == '' else mapper[file_name][0]
> +
> +    def find_in_map_file(self, file_name, mapper):
> +        if file_name in mapper:
> +            return mapper[file_name][0]
> +
> +    def find_subsystem(self, file_name):
> +        s = self.find_in_map_file(file_name, self.map_file)
> +        if s is not None:
> +            return s
> +
> +        s = self.find_in_map_file(file_name, self.map_glob_file)
> +        if s is not None:
> +            return s
> +
> +        s = self.find_in_map_dir(file_name, self.map_dir)
> +        if s is not None:
> +            return s
> +
> +        s = self.find_in_map_dir(file_name, self.map_glob_dir)
> +        if s is not None:
> +            return s
> +
> +        s = self.find_in_map_dir(file_name, self.map_unmaintained_dir)
> +        if s is not None:
> +            return s
> +
> +        self.subsystems.append(file_name)
> +        return file_name
> +
> +
> +def commit(subsystem):
> +    msg = subsystem
> +    if msg in remap:
> +        msg = remap[msg]
> +    msg += ': ' + message
> +    git_commit(msg)
> +
> +mnt = Maintainers(maintainers)
> +res = {}
> +for f in git_changed_files():
> +    s = mnt.find_subsystem(f)
> +    if s in res:
> +        res[s].append(f)
> +    else:
> +        res[s] = [f]
> +
> +for s in mnt.subsystems:
> +    if s in res:
> +        print(s)
> +        for f in res[s]:
> +            print('  ', f)
> +
> +for s in mnt.subsystems:
> +    if s in res:
> +        for f in res[s]:
> +            git_add(f)
> +        commit(s)
> --
> 2.21.0
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 20180 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 026/126] python: add commit-per-subsystem.py
  2019-10-11 16:04 ` [Xen-devel] [RFC v5 026/126] python: add commit-per-subsystem.py Vladimir Sementsov-Ogievskiy
  2019-11-08 21:18   ` Marc-André Lureau
  2019-11-11 16:37   ` Aleksandar Markovic
@ 2019-11-12 13:08   ` Cornelia Huck
  2 siblings, 0 replies; 34+ messages in thread
From: Cornelia Huck @ 2019-11-12 13:08 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy
  Cc: Ronnie Sahlberg, Jeff Cody, Jan Kiszka, Eric Blake,
	Alberto Garcia, Hailiang Zhang, qemu-block, Aleksandar Rikalo,
	Halil Pasic, Hervé Poussineau, Anthony Perard,
	Samuel Thibault, Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Stefan Hajnoczi, John Snow,
	Richard Henderson, Kevin Wolf, Andrew Jeffery, Chris Wulff,
	Subbaraya Sundeep, Michael Walle, qemu-ppc, Bastian Koppelmann,
	Igor Mammedov, Fam Zheng, Peter Maydell, sheepdog,
	Matthew Rosato, David Hildenbrand, Palmer Dabbelt, Eric Farman,
	Max Filippov, Denis V. Lunev, Hannes Reinecke,
	Stefano Stabellini, Gonglei (Arei),
	Marcel Apfelbaum, Liu Yuan, Artyom Tarasenko, Thomas Huth,
	Amit Shah, Stefan Weil, Greg Kurz, Yuval Shaia, qemu-s390x,
	qemu-arm, Peter Chubb, Cédric Le Goater, Stafford Horne,
	qemu-riscv, Aleksandar Markovic, Aurelien Jarno, Paul Burton,
	Sagar Karandikar, Paul Durrant, Jason Wang, Gerd Hoffmann,
	Edgar E. Iglesias, Guan Xuetao, Ari Sundholm, Juan Quintela,
	Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Laszlo Ersek, Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Michael S. Tsirkin, Mark Cave-Ayland, qemu-devel,
	Vincenzo Maffione, Marek Vasut, armbru, Marc-André Lureau,
	Alistair Francis, Pavel Dovgalyuk, Giuseppe Lettieri,
	Luigi Rizzo, David Gibson, Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

On Fri, 11 Oct 2019 19:04:12 +0300
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> wrote:

> Add script to automatically commit tree-wide changes per-subsystem.
> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---

I think this still needs some notes as to the supposed usage.


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 000/126] error: auto propagated local_err
  2019-11-08 18:57   ` Marc-André Lureau
@ 2019-11-12 13:46     ` Cornelia Huck
  2019-11-12 15:33       ` Vladimir Sementsov-Ogievskiy
  0 siblings, 1 reply; 34+ messages in thread
From: Cornelia Huck @ 2019-11-12 13:46 UTC (permalink / raw)
  To: Marc-André Lureau
  Cc: Ronnie Sahlberg, Jeff Cody, Jan Kiszka, Eric Blake,
	Alberto Garcia, Hailiang Zhang, qemu-block, Aleksandar Rikalo,
	Halil Pasic, Hervé Poussineau, Anthony Perard,
	Samuel Thibault, Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Stefan Hajnoczi, John Snow,
	Richard Henderson, Kevin Wolf, Vladimir Sementsov-Ogievskiy,
	Andrew Jeffery, Chris Wulff, Subbaraya Sundeep, Michael Walle,
	qemu-ppc, Bastian Koppelmann, Igor Mammedov, Fam Zheng,
	Peter Maydell, sheepdog, Matthew Rosato, David Hildenbrand,
	Palmer Dabbelt, Eric Farman, Max Filippov, Hannes Reinecke,
	Stefano Stabellini, Gonglei (Arei),
	Marcel Apfelbaum, Liu Yuan, Artyom Tarasenko, Thomas Huth,
	Amit Shah, Stefan Weil, Greg Kurz, Yuval Shaia, qemu-s390x,
	qemu-arm, Peter Chubb, Cédric Le Goater, Stafford Horne,
	qemu-riscv, Aleksandar Markovic, Aurelien Jarno, Paul Burton,
	Sagar Karandikar, Paul Durrant, Jason Wang, Gerd Hoffmann,
	Edgar E. Iglesias, Guan Xuetao, Ari Sundholm, Juan Quintela,
	Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Laszlo Ersek, Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Denis Lunev, Michael S. Tsirkin, Mark Cave-Ayland, qemu-devel,
	Vincenzo Maffione, Marek Vasut, armbru, Alistair Francis,
	Pavel Dovgalyuk, Giuseppe Lettieri, Luigi Rizzo, David Gibson,
	Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

On Fri, 8 Nov 2019 22:57:25 +0400
Marc-André Lureau <marcandre.lureau@redhat.com> wrote:

> Hi
> 
> On Fri, Nov 8, 2019 at 7:31 PM Vladimir Sementsov-Ogievskiy
> <vsementsov@virtuozzo.com> wrote:
> >
> > Finally, what is the plan?
> >
> > Markus what do you think?
> >
> > Now a lot of patches are reviewed, but a lot of are not.
> >
> > Is there any hope that all patches will be reviewed? Should I resend the
> > whole series, or may be reduce it to reviewed subsystems only?  
> 
> I don't think we have well established rules for whole-tree cleanups
> like this. In the past, several cleanup series got lost.

Yes, it is always problematic if a series touches a lot of different
subsystems.

> 
> It will take ages to get every subsystem maintainer to review the
> patches. Most likely, since they are quite systematic, there isn't
> much to say and it is easy to miss something that has some hidden
> ramifications. Perhaps whole-tree cleanups should require at least 2
> reviewers to bypass the subsytem maintainer review? But my past
> experience with this kind of exercice doesn't encourage me, and
> probably I am not the only one.

It's not just the reviews; it's easy to miss compile problems on less
mainstream architectures (and even easier to miss functional problems
there, although they are probably less likely with automated rework.)
CI can probably help, but that's something for the future.

Anyway, I've now gotten around to that series; spotted one problem in
s390x code, I think.

One thing that's helpful for such a large series is a git branch that
makes it easy to give the series a quick go. (You can use patchew, but
it takes time before it gets all mails, so just pushing it somewhere
and letting people know is a good idea anyway.)


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 000/126] error: auto propagated local_err
  2019-11-12 13:46     ` Cornelia Huck
@ 2019-11-12 15:33       ` Vladimir Sementsov-Ogievskiy
  0 siblings, 0 replies; 34+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2019-11-12 15:33 UTC (permalink / raw)
  To: Cornelia Huck, Marc-André Lureau
  Cc: Ronnie Sahlberg, Jeff Cody, Jan Kiszka, Eric Blake,
	Alberto Garcia, Hailiang Zhang, qemu-block, Aleksandar Rikalo,
	Halil Pasic, Hervé Poussineau, Anthony Perard,
	Samuel Thibault, Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Stefan Hajnoczi, John Snow,
	Richard Henderson, Kevin Wolf, Andrew Jeffery, Chris Wulff,
	Subbaraya Sundeep, Michael Walle, qemu-ppc, Bastian Koppelmann,
	Igor Mammedov, Fam Zheng, Peter Maydell, sheepdog,
	Matthew Rosato, David Hildenbrand, Palmer Dabbelt, Eric Farman,
	Max Filippov, Hannes Reinecke, Stefano Stabellini, Gonglei (Arei),
	Marcel Apfelbaum, Liu Yuan, Artyom Tarasenko, Thomas Huth,
	Amit Shah, Stefan Weil, Greg Kurz, Yuval Shaia, qemu-s390x,
	qemu-arm, Peter Chubb, Cédric Le Goater, Stafford Horne,
	qemu-riscv, Aleksandar Markovic, Aurelien Jarno, Paul Burton,
	Sagar Karandikar, Paul Durrant, Jason Wang, Gerd Hoffmann,
	Edgar E. Iglesias, Guan Xuetao, Ari Sundholm, Juan Quintela,
	Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Laszlo Ersek, Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Denis Lunev, Michael S. Tsirkin, Mark Cave-Ayland, qemu-devel,
	Vincenzo Maffione, Marek Vasut, armbru, Alistair Francis,
	Pavel Dovgalyuk, Giuseppe Lettieri, Luigi Rizzo, David Gibson,
	Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

12.11.2019 16:46, Cornelia Huck wrote:
> On Fri, 8 Nov 2019 22:57:25 +0400
> Marc-André Lureau <marcandre.lureau@redhat.com> wrote:
> 
>> Hi
>>
>> On Fri, Nov 8, 2019 at 7:31 PM Vladimir Sementsov-Ogievskiy
>> <vsementsov@virtuozzo.com> wrote:
>>>
>>> Finally, what is the plan?
>>>
>>> Markus what do you think?
>>>
>>> Now a lot of patches are reviewed, but a lot of are not.
>>>
>>> Is there any hope that all patches will be reviewed? Should I resend the
>>> whole series, or may be reduce it to reviewed subsystems only?
>>
>> I don't think we have well established rules for whole-tree cleanups
>> like this. In the past, several cleanup series got lost.
> 
> Yes, it is always problematic if a series touches a lot of different
> subsystems.
> 
>>
>> It will take ages to get every subsystem maintainer to review the
>> patches. Most likely, since they are quite systematic, there isn't
>> much to say and it is easy to miss something that has some hidden
>> ramifications. Perhaps whole-tree cleanups should require at least 2
>> reviewers to bypass the subsytem maintainer review? But my past
>> experience with this kind of exercice doesn't encourage me, and
>> probably I am not the only one.
> 
> It's not just the reviews; it's easy to miss compile problems on less
> mainstream architectures (and even easier to miss functional problems
> there, although they are probably less likely with automated rework.)
> CI can probably help, but that's something for the future.
> 
> Anyway, I've now gotten around to that series; spotted one problem in
> s390x code, I think.
> 
> One thing that's helpful for such a large series is a git branch that
> makes it easy to give the series a quick go. (You can use patchew, but
> it takes time before it gets all mails, so just pushing it somewhere
> and letting people know is a good idea anyway.)
> 

Thanks for review!

The series are posted here:

https://src.openvz.org/users/vsementsov/repos/qemu/browse

https://src.openvz.org/scm/~vsementsov/qemu.git #tag up-auto-local-err-v5


-- 
Best regards,
Vladimir
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 000/126] error: auto propagated local_err
  2019-11-08 15:30 ` Vladimir Sementsov-Ogievskiy
  2019-11-08 18:57   ` Marc-André Lureau
@ 2019-11-20  9:50   ` Vladimir Sementsov-Ogievskiy
  2019-11-20 12:59     ` Eric Blake
  1 sibling, 1 reply; 34+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2019-11-20  9:50 UTC (permalink / raw)
  To: qemu-devel
  Cc: Ronnie Sahlberg, Jeff Cody, Jan Kiszka, Eric Blake,
	Alberto Garcia, Hailiang Zhang, qemu-block, Aleksandar Rikalo,
	Halil Pasic, Hervé Poussineau, Anthony Perard,
	Samuel Thibault, Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Stefan Hajnoczi, John Snow,
	Richard Henderson, Kevin Wolf, Andrew Jeffery, Chris Wulff,
	Subbaraya Sundeep, Michael Walle, qemu-ppc, Bastian Koppelmann,
	Igor Mammedov, Fam Zheng, Peter Maydell, sheepdog,
	Matthew Rosato, David Hildenbrand, Palmer Dabbelt, Thomas Huth,
	Max Filippov, Hannes Reinecke, Stefano Stabellini, Gonglei (Arei),
	Marcel Apfelbaum, Liu Yuan, Artyom Tarasenko, Eric Farman,
	Amit Shah, Stefan Weil, Greg Kurz, Yuval Shaia, qemu-s390x,
	qemu-arm, Peter Chubb, Cédric Le Goater, Stafford Horne,
	qemu-riscv, Cornelia Huck, Aleksandar Markovic, Aurelien Jarno,
	Paul Burton, Sagar Karandikar, Paul Durrant, Jason Wang,
	Gerd Hoffmann, Edgar E. Iglesias, Guan Xuetao, Ari Sundholm,
	Juan Quintela, Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Laszlo Ersek, Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Denis Lunev, Michael S. Tsirkin, Mark Cave-Ayland,
	Vincenzo Maffione, Marek Vasut, armbru, Marc-André Lureau,
	Alistair Francis, Pavel Dovgalyuk, Giuseppe Lettieri,
	Luigi Rizzo, David Gibson, Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

Okay...

I think that:

1. A lot of efforts (not only my, I think reviewing is already exceeded generation efforts)
   are made, it would be sad to lose them.

2. It's safe enough to apply only part of generated patches: we just fix error_abort/error_fatal
   in more popular subsystems, what's wrong with that? Why not to cover 80% cases by 20% efforts?

3. It's obviously impossible to merge the whole series. A lot of time passed, series diverges.


So I propose the following plan:

1. I resend small separate series of preparation patches per maintainer. They are good anyway.

2. We commit patch with macro (changing MUST to SHOULD in documentation) and coccinelle script.
    (or that may be combined with the first series from [3.])

3. When one of preparations taken to maintainer's tree, I send generated patches for
    its maintainer.


If no objections during a week, I'll start that plan, hope someone will support it.


08.11.2019 18:30, Vladimir Sementsov-Ogievskiy wrote:
> Finally, what is the plan?
> 
> Markus what do you think?
> 
> Now a lot of patches are reviewed, but a lot of are not.
> 
> Is there any hope that all patches will be reviewed? Should I resend the
> whole series, or may be reduce it to reviewed subsystems only?
> 
> 11.10.2019 19:03, Vladimir Sementsov-Ogievskiy wrote:
>> Hi all!
>>
>> At the request of Markus: full version of errp propagation. Let's look
>> at it. Cover as much as possible, except inserting macro invocation
>> where it's not necessary.
>>
>> It's huge, and so it's an RFC.
>>
>> In v5 I've added a lot more preparation cleanups:
>> 01-23 are preparation cleanups
>>    01: not changed, keep Eric's r-b
>>    02: improve commit msg [Markus], keep Eric's r-b
>>    03: changed, only error API here, drop r-b
>> 24 is core macro
>>    - improve cover letter, wording and macro code style
>>    - keep Eric's r-b
>> 25-26: automation scripts
>>     - commit-per-subsystem changed a lot. it's a draft, don't bother too
>>       much with it
>>     - coccinelle: add support of error_propagate_prepend
>>
>> 27-126: generated patches
>>
>> ====
>>
>> Here is a proposal of auto propagation for local_err, to not call
>> error_propagate on every exit point, when we deal with local_err.
>>
>> There are also two issues with errp:
>>
>> 1. error_fatal & error_append_hint/error_prepend: user can't see this
>> additional info, because exit() happens in error_setg earlier than info
>> is added. [Reported by Greg Kurz]
>>
>> 2. error_abort & error_propagate: when we wrap
>> error_abort by local_err+error_propagate, resulting coredump will
>> refer to error_propagate and not to the place where error happened.
>> (the macro itself don't fix the issue, but it allows to [3.] drop all
>> local_err+error_propagate pattern, which will definitely fix the issue)
>> [Reported by Kevin Wolf]
>>
>> ====
>>
>> Generated patches split:
>>
>> misc
>>     hw/misc/ivshmem.c
>>     hw/misc/tmp105.c
>>     hw/misc/tmp421.c
>> s390x
>>     hw/intc/s390_flic_kvm.c
>>     hw/s390x/3270-ccw.c
>>     hw/s390x/css-bridge.c
>>     hw/s390x/css.c
>>     hw/s390x/s390-skeys.c
>>     hw/s390x/s390-virtio-ccw.c
>>     hw/s390x/sclp.c
>>     hw/s390x/tod-kvm.c
>>     hw/vfio/ccw.c
>>     target/s390x/cpu.c
>> tcg
>>     exec.c
>>     hw/arm/armv7m.c
>>     hw/arm/smmu-common.c
>>     hw/arm/smmuv3.c
>>     hw/cpu/a15mpcore.c
>>     hw/cpu/a9mpcore.c
>>     hw/cpu/arm11mpcore.c
>>     hw/i386/pc.c
>>     hw/intc/nios2_iic.c
>>     hw/mips/cps.c
>>     hw/riscv/riscv_hart.c
>>     hw/riscv/sifive_e.c
>>     hw/riscv/sifive_u.c
>>     hw/sd/milkymist-memcard.c
>>     target/alpha/cpu.c
>>     target/arm/cpu.c
>>     target/arm/cpu64.c
>>     target/cris/cpu.c
>>     target/hppa/cpu.c
>>     target/i386/cpu.c
>>     target/lm32/cpu.c
>>     target/m68k/cpu.c
>>     target/microblaze/cpu.c
>>     target/mips/cpu.c
>>     target/moxie/cpu.c
>>     target/nios2/cpu.c
>>     target/openrisc/cpu.c
>>     target/ppc/compat.c
>>     target/ppc/translate_init.inc.c
>>     target/riscv/cpu.c
>>     target/sh4/cpu.c
>>     target/sparc/cpu.c
>>     target/tricore/cpu.c
>>     target/unicore32/cpu.c
>>     target/xtensa/cpu.c
>> kvm
>>     target/ppc/kvm.c
>>     target/s390x/cpu_models.c
>> xen
>>     hw/block/dataplane/xen-block.c
>>     hw/block/xen-block.c
>>     hw/xen/xen-backend.c
>>     hw/xen/xen-bus.c
>>     hw/xen/xen-host-pci-device.c
>>     hw/xen/xen_pt.c
>>     hw/xen/xen_pt_config_init.c
>> Hosts
>>     qga/commands-win32.c
>>     util/oslib-posix.c
>> ARM Machines
>>     hw/arm/allwinner-a10.c
>>     hw/arm/aspeed_soc.c
>>     hw/arm/bcm2835_peripherals.c
>>     hw/arm/bcm2836.c
>>     hw/arm/digic.c
>>     hw/arm/fsl-imx25.c
>>     hw/arm/fsl-imx31.c
>>     hw/arm/fsl-imx6.c
>>     hw/arm/integratorcp.c
>>     hw/arm/msf2-soc.c
>>     hw/arm/nrf51_soc.c
>>     hw/arm/stm32f205_soc.c
>>     hw/arm/virt.c
>>     hw/arm/xlnx-versal-virt.c
>>     hw/arm/xlnx-zynqmp.c
>>     hw/cpu/realview_mpcore.c
>>     hw/display/bcm2835_fb.c
>>     hw/dma/bcm2835_dma.c
>>     hw/dma/xilinx_axidma.c
>>     hw/gpio/aspeed_gpio.c
>>     hw/gpio/bcm2835_gpio.c
>>     hw/intc/arm_gic.c
>>     hw/intc/arm_gic_kvm.c
>>     hw/intc/arm_gicv3.c
>>     hw/intc/arm_gicv3_its_kvm.c
>>     hw/intc/arm_gicv3_kvm.c
>>     hw/intc/armv7m_nvic.c
>>     hw/intc/realview_gic.c
>>     hw/microblaze/xlnx-zynqmp-pmu.c
>>     hw/misc/bcm2835_mbox.c
>>     hw/misc/bcm2835_property.c
>>     hw/misc/msf2-sysreg.c
>>     hw/net/xilinx_axienet.c
>>     hw/nvram/nrf51_nvm.c
>>     hw/timer/aspeed_timer.c
>>     hw/watchdog/wdt_aspeed.c
>> MIPS Machines
>>     hw/core/loader-fit.c
>> PowerPC Machines
>>     hw/intc/pnv_xive.c
>>     hw/intc/xics.c
>>     hw/intc/xics_kvm.c
>>     hw/intc/xics_pnv.c
>>     hw/intc/xics_spapr.c
>>     hw/isa/pc87312.c
>>     hw/misc/macio/macio.c
>>     hw/ppc/e500.c
>>     hw/ppc/mac_newworld.c
>>     hw/ppc/pnv.c
>>     hw/ppc/pnv_core.c
>>     hw/ppc/pnv_homer.c
>>     hw/ppc/pnv_lpc.c
>>     hw/ppc/pnv_occ.c
>>     hw/ppc/pnv_psi.c
>>     hw/ppc/spapr.c
>>     hw/ppc/spapr_caps.c
>>     hw/ppc/spapr_cpu_core.c
>>     hw/ppc/spapr_drc.c
>>     hw/ppc/spapr_irq.c
>>     hw/ppc/spapr_pci.c
>>     hw/ppc/spapr_vio.c
>> SPARC Machines
>>     hw/sparc/sun4m.c
>>     hw/sparc64/sun4u.c
>> S390 Machines
>>     hw/s390x/ipl.c
>>     hw/s390x/s390-pci-bus.c
>> X86 Machines
>>     hw/acpi/ich9.c
>>     hw/char/debugcon.c
>>     hw/char/serial-pci-multi.c
>>     hw/char/serial-pci.c
>>     hw/core/machine.c
>>     hw/core/numa.c
>>     hw/intc/apic_common.c
>>     hw/pci-host/piix.c
>> IDE
>>     hw/ide/qdev.c
>> Floppy
>>     hw/block/fdc.c
>> IPack
>>     hw/ipack/ipack.c
>> PCI
>>     hw/pci-bridge/gen_pcie_root_port.c
>>     hw/pci-bridge/pci_bridge_dev.c
>>     hw/pci-bridge/pci_expander_bridge.c
>>     hw/pci-bridge/pcie_pci_bridge.c
>>     hw/pci-bridge/pcie_root_port.c
>>     hw/pci/pci.c
>>     hw/pci/pcie.c
>>     hw/pci/shpc.c
>> ACPI/SMBIOS
>>     hw/acpi/core.c
>>     hw/acpi/cpu_hotplug.c
>>     hw/acpi/memory_hotplug.c
>>     hw/mem/memory-device.c
>>     hw/mem/pc-dimm.c
>>     hw/smbios/smbios.c
>> Network devices
>>     hw/net/dp8393x.c
>>     hw/net/ne2000-isa.c
>> pflash
>>     hw/block/pflash_cfi01.c
>>     hw/block/pflash_cfi02.c
>> SCSI
>>     hw/scsi/esp-pci.c
>>     hw/scsi/mptsas.c
>>     hw/scsi/scsi-bus.c
>>     hw/scsi/scsi-disk.c
>>     hw/scsi/scsi-generic.c
>>     hw/scsi/virtio-scsi.c
>> SD (Secure Card)
>>     hw/sd/sdhci-pci.c
>>     hw/sd/sdhci.c
>> USB
>>     hw/usb/bus.c
>>     hw/usb/ccid-card-emulated.c
>>     hw/usb/dev-smartcard-reader.c
>>     hw/usb/dev-storage.c
>>     hw/usb/hcd-ohci-pci.c
>>     hw/usb/hcd-ohci.c
>>     hw/usb/hcd-uhci.c
>>     hw/usb/hcd-xhci.c
>> USB (serial adapter)
>>     hw/usb/dev-serial.c
>> VFIO
>>     hw/vfio/common.c
>>     hw/vfio/pci-quirks.c
>>     hw/vfio/pci.c
>>     hw/vfio/platform.c
>> vfio-ccw
>>     hw/s390x/s390-ccw.c
>> vhost
>>     hw/block/vhost-user-blk.c
>>     hw/scsi/vhost-scsi.c
>>     hw/scsi/vhost-user-scsi.c
>>     hw/virtio/vhost-vsock.c
>> virtio
>>     hw/virtio/virtio-balloon.c
>>     hw/virtio/virtio-bus.c
>>     hw/virtio/virtio-pci.c
>>     hw/virtio/virtio-rng-pci.c
>>     hw/virtio/virtio.c
>> virtio-9p
>>     hw/9pfs/9p-local.c
>>     hw/9pfs/9p.c
>> virtio-blk
>>     hw/block/dataplane/virtio-blk.c
>>     hw/block/virtio-blk.c
>> virtio-ccw
>>     hw/s390x/virtio-ccw-crypto.c
>>     hw/s390x/virtio-ccw-rng.c
>>     hw/s390x/virtio-ccw.c
>> virtio-input
>>     hw/input/virtio-input.c
>> virtio-serial
>>     hw/char/virtio-serial-bus.c
>> virtio-rng
>>     backends/rng.c
>>     hw/virtio/virtio-rng.c
>> megasas
>>     hw/scsi/megasas.c
>> NVDIMM
>>     hw/mem/nvdimm.c
>> eepro100
>>     hw/net/eepro100.c
>> virtio-gpu
>>     hw/display/virtio-gpu-base.c
>>     hw/display/virtio-gpu-pci.c
>>     hw/display/virtio-vga.c
>> fw_cfg
>>     hw/nvram/fw_cfg.c
>> XIVE
>>     hw/intc/spapr_xive.c
>>     hw/intc/spapr_xive_kvm.c
>>     hw/intc/xive.c
>> Audio
>>     audio/audio.c
>>     hw/audio/intel-hda.c
>> block
>>     block.c
>>     block/backup.c
>>     block/block-backend.c
>>     block/commit.c
>>     block/crypto.c
>>     block/dirty-bitmap.c
>>     block/io.c
>>     block/mirror.c
>>     block/qapi.c
>>     block/snapshot.c
>>     block/throttle-groups.c
>>     block/throttle.c
>>     block/vxhs.c
>>     blockdev.c
>>     blockjob.c
>>     hw/block/onenand.c
>>     job.c
>> scsi
>>     scsi/pr-manager-helper.c
>> chardev
>>     chardev/char-socket.c
>>     chardev/char.c
>>     chardev/spice.c
>> cmdline
>>     util/qemu-option.c
>> Dump
>>     dump/dump.c
>>     dump/win_dump.c
>> Memory API
>>     memory.c
>> SPICE
>>     hw/display/qxl.c
>> Graphics
>>     ui/input-barrier.c
>>     ui/input.c
>>     ui/vnc.c
>> Main loop
>>     util/main-loop.c
>>     vl.c
>> Human Monitor (HMP)
>>     monitor/misc.c
>> net
>>     net/can/can_host.c
>>     net/dump.c
>>     net/filter-buffer.c
>>     net/filter.c
>>     net/net.c
>>     net/netmap.c
>>     net/tap.c
>> hostmem
>>     backends/hostmem-file.c
>>     backends/hostmem-memfd.c
>>     backends/hostmem.c
>> cryptodev
>>     backends/cryptodev-vhost-user.c
>>     backends/cryptodev.c
>> QAPI
>>     qapi/qapi-visit-core.c
>>     qapi/qmp-dispatch.c
>>     qapi/string-input-visitor.c
>> qga
>>     qga/commands-posix.c
>> QOM
>>     hw/core/qdev-properties-system.c
>>     hw/core/qdev-properties.c
>>     hw/core/qdev.c
>>     qdev-monitor.c
>>     qom/object.c
>>     qom/object_interfaces.c
>>     qom/qom-qobject.c
>> QMP
>>     monitor/qmp-cmds.c
>> SLIRP
>>     net/slirp.c
>> Tracing
>>     trace/qmp.c
>> TPM
>>     hw/tpm/tpm_util.c
>>     tpm.c
>> Migration
>>     migration/migration.c
>>     migration/ram.c
>>     migration/rdma.c
>>     migration/savevm.c
>>     migration/socket.c
>> Cryptography
>>     crypto/block-luks.c
>>     crypto/secret.c
>>     crypto/tlssession.c
>> I/O Channels
>>     io/dns-resolver.c
>>     io/net-listener.c
>> Sockets
>>     util/qemu-sockets.c
>> colo
>>     migration/colo.c
>> Record/replay
>>     block/blkreplay.c
>> VMDK
>>     block/vmdk.c
>> RBD
>>     block/rbd.c
>> Sheepdog
>>     block/sheepdog.c
>> VHDX
>>     block/vhdx-log.c
>>     block/vhdx.c
>> VDI
>>     block/vdi.c
>> iSCSI
>>     block/iscsi.c
>> nbd
>>     include/block/nbd.h
>>     block/nbd.c
>>     nbd/client.c
>>     nbd/server.c
>> NFS
>>     block/nfs.c
>> SSH
>>     block/ssh.c
>> CURL
>>     block/curl.c
>> GLUSTER
>>     block/gluster.c
>> NVMe Block Driver
>>     block/nvme.c
>> Bootdevice
>>     bootdevice.c
>> Quorum
>>     block/quorum.c
>> blklogwrites
>>     block/blklogwrites.c
>> blkverify
>>     block/blkverify.c
>> parallels
>>     block/parallels.c
>> qed
>>     block/qed.c
>> raw
>>     block/file-posix.c
>>     block/file-win32.c
>>     block/raw-format.c
>> qcow2
>>     block/qcow2-bitmap.c
>>     block/qcow2.c
>> qcow
>>     block/qcow.c
>> blkdebug
>>     block/blkdebug.c
>> vpc
>>     block/vpc.c
>> vvfat
>>     block/vvfat.c
>> Replication
>>     block/replication.c
>>     replication.c
>> PVRDMA
>>     hw/rdma/vmw/pvrdma_main.c
>> hw/core/bus.c
>>     hw/core/bus.c
>> hw/cpu/core.c
>>     hw/cpu/core.c
>> hw/sd/ssi-sd.c
>>     hw/sd/ssi-sd.c
>> iothread.c
>>     iothread.c
>> memory_mapping.c
>>     memory_mapping.c
>> target/tilegx/cpu.c
>>     target/tilegx/cpu.c
>> tests/test-image-locking.c
>>     tests/test-image-locking.c
>> util/qemu-config.c
>>     util/qemu-config.c
>>
>>
>> Vladimir Sementsov-Ogievskiy (126):
>>    hw/core/loader-fit: fix freeing errp in fit_load_fdt
>>    net/net: Clean up variable shadowing in net_client_init()
>>    error: rename errp to errp_in where it is IN-argument
>>    hmp: drop Error pointer indirection in hmp_handle_error
>>    vnc: drop Error pointer indirection in vnc_client_io_error
>>    qdev-monitor: well form error hint helpers
>>    nbd: well form nbd_iter_channel_error errp handler
>>    ppc: well form kvmppc_hint_smt_possible error hint helper
>>    9pfs: well form error hint helpers
>>    hw/core/qdev: cleanup Error ** variables
>>    block/snapshot: rename Error ** parameter to more common errp
>>    hw/i386/amd_iommu: rename Error ** parameter to more common errp
>>    qga: rename Error ** parameter to more common errp
>>    monitor/qmp-cmds: rename Error ** parameter to more common errp
>>    hw/s390x: rename Error ** parameter to more common errp
>>    hw/sd: rename Error ** parameter to more common errp
>>    hw/tpm: rename Error ** parameter to more common errp
>>    hw/usb: rename Error ** parameter to more common errp
>>    include/block/snapshot.h: rename Error ** parameter to more common
>>      errp
>>    include/qom/object.h: rename Error ** parameter to more common errp
>>    qapi/error: add (Error **errp) cleaning APIs
>>    backends/cryptodev: drop local_err from cryptodev_backend_complete()
>>    hw/vfio/ap: drop local_err from vfio_ap_realize
>>    error: auto propagated local_err
>>    scripts: add coccinelle script to use auto propagated errp
>>    python: add commit-per-subsystem.py
>>    misc: introduce ERRP_AUTO_PROPAGATE
>>    s390x: introduce ERRP_AUTO_PROPAGATE
>>    tcg: introduce ERRP_AUTO_PROPAGATE
>>    kvm: introduce ERRP_AUTO_PROPAGATE
>>    xen: introduce ERRP_AUTO_PROPAGATE
>>    Hosts: introduce ERRP_AUTO_PROPAGATE
>>    ARM Machines: introduce ERRP_AUTO_PROPAGATE
>>    MIPS Machines: introduce ERRP_AUTO_PROPAGATE
>>    PowerPC Machines: introduce ERRP_AUTO_PROPAGATE
>>    SPARC Machines: introduce ERRP_AUTO_PROPAGATE
>>    S390 Machines: introduce ERRP_AUTO_PROPAGATE
>>    X86 Machines: introduce ERRP_AUTO_PROPAGATE
>>    IDE: introduce ERRP_AUTO_PROPAGATE
>>    Floppy: introduce ERRP_AUTO_PROPAGATE
>>    IPack: introduce ERRP_AUTO_PROPAGATE
>>    PCI: introduce ERRP_AUTO_PROPAGATE
>>    ACPI/SMBIOS: introduce ERRP_AUTO_PROPAGATE
>>    Network devices: introduce ERRP_AUTO_PROPAGATE
>>    pflash: introduce ERRP_AUTO_PROPAGATE
>>    SCSI: introduce ERRP_AUTO_PROPAGATE
>>    SD (Secure Card): introduce ERRP_AUTO_PROPAGATE
>>    USB: introduce ERRP_AUTO_PROPAGATE
>>    USB (serial adapter): introduce ERRP_AUTO_PROPAGATE
>>    VFIO: introduce ERRP_AUTO_PROPAGATE
>>    vfio-ccw: introduce ERRP_AUTO_PROPAGATE
>>    vhost: introduce ERRP_AUTO_PROPAGATE
>>    virtio: introduce ERRP_AUTO_PROPAGATE
>>    virtio-9p: introduce ERRP_AUTO_PROPAGATE
>>    virtio-blk: introduce ERRP_AUTO_PROPAGATE
>>    virtio-ccw: introduce ERRP_AUTO_PROPAGATE
>>    virtio-input: introduce ERRP_AUTO_PROPAGATE
>>    virtio-serial: introduce ERRP_AUTO_PROPAGATE
>>    virtio-rng: introduce ERRP_AUTO_PROPAGATE
>>    megasas: introduce ERRP_AUTO_PROPAGATE
>>    NVDIMM: introduce ERRP_AUTO_PROPAGATE
>>    eepro100: introduce ERRP_AUTO_PROPAGATE
>>    virtio-gpu: introduce ERRP_AUTO_PROPAGATE
>>    fw_cfg: introduce ERRP_AUTO_PROPAGATE
>>    XIVE: introduce ERRP_AUTO_PROPAGATE
>>    Audio: introduce ERRP_AUTO_PROPAGATE
>>    block: introduce ERRP_AUTO_PROPAGATE
>>    scsi: introduce ERRP_AUTO_PROPAGATE
>>    chardev: introduce ERRP_AUTO_PROPAGATE
>>    cmdline: introduce ERRP_AUTO_PROPAGATE
>>    Dump: introduce ERRP_AUTO_PROPAGATE
>>    Memory API: introduce ERRP_AUTO_PROPAGATE
>>    SPICE: introduce ERRP_AUTO_PROPAGATE
>>    Graphics: introduce ERRP_AUTO_PROPAGATE
>>    Main loop: introduce ERRP_AUTO_PROPAGATE
>>    Human Monitor (HMP): introduce ERRP_AUTO_PROPAGATE
>>    net: introduce ERRP_AUTO_PROPAGATE
>>    hostmem: introduce ERRP_AUTO_PROPAGATE
>>    cryptodev: introduce ERRP_AUTO_PROPAGATE
>>    QAPI: introduce ERRP_AUTO_PROPAGATE
>>    qga: introduce ERRP_AUTO_PROPAGATE
>>    QOM: introduce ERRP_AUTO_PROPAGATE
>>    QMP: introduce ERRP_AUTO_PROPAGATE
>>    SLIRP: introduce ERRP_AUTO_PROPAGATE
>>    Tracing: introduce ERRP_AUTO_PROPAGATE
>>    TPM: introduce ERRP_AUTO_PROPAGATE
>>    Migration: introduce ERRP_AUTO_PROPAGATE
>>    Cryptography: introduce ERRP_AUTO_PROPAGATE
>>    I/O Channels: introduce ERRP_AUTO_PROPAGATE
>>    Sockets: introduce ERRP_AUTO_PROPAGATE
>>    colo: introduce ERRP_AUTO_PROPAGATE
>>    Record/replay: introduce ERRP_AUTO_PROPAGATE
>>    VMDK: introduce ERRP_AUTO_PROPAGATE
>>    RBD: introduce ERRP_AUTO_PROPAGATE
>>    Sheepdog: introduce ERRP_AUTO_PROPAGATE
>>    VHDX: introduce ERRP_AUTO_PROPAGATE
>>    VDI: introduce ERRP_AUTO_PROPAGATE
>>    iSCSI: introduce ERRP_AUTO_PROPAGATE
>>    nbd: introduce ERRP_AUTO_PROPAGATE
>>    NFS: introduce ERRP_AUTO_PROPAGATE
>>    SSH: introduce ERRP_AUTO_PROPAGATE
>>    CURL: introduce ERRP_AUTO_PROPAGATE
>>    GLUSTER: introduce ERRP_AUTO_PROPAGATE
>>    NVMe Block Driver: introduce ERRP_AUTO_PROPAGATE
>>    Bootdevice: introduce ERRP_AUTO_PROPAGATE
>>    Quorum: introduce ERRP_AUTO_PROPAGATE
>>    blklogwrites: introduce ERRP_AUTO_PROPAGATE
>>    blkverify: introduce ERRP_AUTO_PROPAGATE
>>    parallels: introduce ERRP_AUTO_PROPAGATE
>>    qed: introduce ERRP_AUTO_PROPAGATE
>>    raw: introduce ERRP_AUTO_PROPAGATE
>>    qcow2: introduce ERRP_AUTO_PROPAGATE
>>    qcow: introduce ERRP_AUTO_PROPAGATE
>>    blkdebug: introduce ERRP_AUTO_PROPAGATE
>>    vpc: introduce ERRP_AUTO_PROPAGATE
>>    vvfat: introduce ERRP_AUTO_PROPAGATE
>>    Replication: introduce ERRP_AUTO_PROPAGATE
>>    PVRDMA: introduce ERRP_AUTO_PROPAGATE
>>    hw/core/bus.c: introduce ERRP_AUTO_PROPAGATE
>>    hw/cpu/core.c: introduce ERRP_AUTO_PROPAGATE
>>    hw/sd/ssi-sd.c: introduce ERRP_AUTO_PROPAGATE
>>    iothread.c: introduce ERRP_AUTO_PROPAGATE
>>    memory_mapping.c: introduce ERRP_AUTO_PROPAGATE
>>    target/tilegx/cpu.c: introduce ERRP_AUTO_PROPAGATE
>>    tests/test-image-locking.c: introduce ERRP_AUTO_PROPAGATE
>>    util/qemu-config.c: introduce ERRP_AUTO_PROPAGATE
>>
>>
>> CC: Gerd Hoffmann <kraxel@redhat.com>
>> CC: "Gonglei (Arei)" <arei.gonglei@huawei.com>
>> CC: Eduardo Habkost <ehabkost@redhat.com>
>> CC: Igor Mammedov <imammedo@redhat.com>
>> CC: Laurent Vivier <lvivier@redhat.com>
>> CC: Amit Shah <amit@kernel.org>
>> CC: Kevin Wolf <kwolf@redhat.com>
>> CC: Max Reitz <mreitz@redhat.com>
>> CC: John Snow <jsnow@redhat.com>
>> CC: Ari Sundholm <ari@tuxera.com>
>> CC: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
>> CC: Paolo Bonzini <pbonzini@redhat.com>
>> CC: Stefan Hajnoczi <stefanha@redhat.com>
>> CC: Fam Zheng <fam@euphon.net>
>> CC: Stefan Weil <sw@weilnetz.de>
>> CC: Ronnie Sahlberg <ronniesahlberg@gmail.com>
>> CC: Peter Lieven <pl@kamp.de>
>> CC: Eric Blake <eblake@redhat.com>
>> CC: "Denis V. Lunev" <den@openvz.org>
>> CC: Markus Armbruster <armbru@redhat.com>
>> CC: Alberto Garcia <berto@igalia.com>
>> CC: Jason Dillaman <dillaman@redhat.com>
>> CC: Wen Congyang <wencongyang2@huawei.com>
>> CC: Xie Changlong <xiechanglong.d@gmail.com>
>> CC: Liu Yuan <namei.unix@gmail.com>
>> CC: "Richard W.M. Jones" <rjones@redhat.com>
>> CC: Jeff Cody <codyprime@gmail.com>
>> CC: "Marc-André Lureau" <marcandre.lureau@redhat.com>
>> CC: "Daniel P. Berrangé" <berrange@redhat.com>
>> CC: Richard Henderson <rth@twiddle.net>
>> CC: Greg Kurz <groug@kaod.org>
>> CC: "Michael S. Tsirkin" <mst@redhat.com>
>> CC: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
>> CC: Beniamino Galvani <b.galvani@gmail.com>
>> CC: Peter Maydell <peter.maydell@linaro.org>
>> CC: "Cédric Le Goater" <clg@kaod.org>
>> CC: Andrew Jeffery <andrew@aj.id.au>
>> CC: Joel Stanley <joel@jms.id.au>
>> CC: Andrew Baumann <Andrew.Baumann@microsoft.com>
>> CC: "Philippe Mathieu-Daudé" <philmd@redhat.com>
>> CC: Antony Pavlov <antonynpavlov@gmail.com>
>> CC: Jean-Christophe Dubois <jcd@tribudubois.net>
>> CC: Peter Chubb <peter.chubb@nicta.com.au>
>> CC: Subbaraya Sundeep <sundeep.lkml@gmail.com>
>> CC: Eric Auger <eric.auger@redhat.com>
>> CC: Alistair Francis <alistair@alistair23.me>
>> CC: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
>> CC: Stefano Stabellini <sstabellini@kernel.org>
>> CC: Anthony Perard <anthony.perard@citrix.com>
>> CC: Paul Durrant <paul@xen.org>
>> CC: Paul Burton <pburton@wavecomp.com>
>> CC: Aleksandar Rikalo <arikalo@wavecomp.com>
>> CC: Chris Wulff <crwulff@gmail.com>
>> CC: Marek Vasut <marex@denx.de>
>> CC: David Gibson <david@gibson.dropbear.id.au>
>> CC: Cornelia Huck <cohuck@redhat.com>
>> CC: Halil Pasic <pasic@linux.ibm.com>
>> CC: Christian Borntraeger <borntraeger@de.ibm.com>
>> CC: "Hervé Poussineau" <hpoussin@reactos.org>
>> CC: Xiao Guangrong <xiaoguangrong.eric@gmail.com>
>> CC: Aurelien Jarno <aurelien@aurel32.net>
>> CC: Aleksandar Markovic <amarkovic@wavecomp.com>
>> CC: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>> CC: Jason Wang <jasowang@redhat.com>
>> CC: Laszlo Ersek <lersek@redhat.com>
>> CC: Yuval Shaia <yuval.shaia@oracle.com>
>> CC: Palmer Dabbelt <palmer@sifive.com>
>> CC: Sagar Karandikar <sagark@eecs.berkeley.edu>
>> CC: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
>> CC: David Hildenbrand <david@redhat.com>
>> CC: Thomas Huth <thuth@redhat.com>
>> CC: Eric Farman <farman@linux.ibm.com>
>> CC: Matthew Rosato <mjrosato@linux.ibm.com>
>> CC: Hannes Reinecke <hare@suse.com>
>> CC: Michael Walle <michael@walle.cc>
>> CC: Artyom Tarasenko <atar4qemu@gmail.com>
>> CC: Stefan Berger <stefanb@linux.ibm.com>
>> CC: Samuel Thibault <samuel.thibault@ens-lyon.org>
>> CC: Alex Williamson <alex.williamson@redhat.com>
>> CC: Tony Krowiak <akrowiak@linux.ibm.com>
>> CC: Pierre Morel <pmorel@linux.ibm.com>
>> CC: Michael Roth <mdroth@linux.vnet.ibm.com>
>> CC: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
>> CC: Juan Quintela <quintela@redhat.com>
>> CC: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>> CC: Luigi Rizzo <rizzo@iet.unipi.it>
>> CC: Giuseppe Lettieri <g.lettieri@iet.unipi.it>
>> CC: Vincenzo Maffione <v.maffione@gmail.com>
>> CC: Jan Kiszka <jan.kiszka@siemens.com>
>> CC: Anthony Green <green@moxielogic.com>
>> CC: Stafford Horne <shorne@gmail.com>
>> CC: Guan Xuetao <gxt@mprc.pku.edu.cn>
>> CC: Max Filippov <jcmvbkbc@gmail.com>
>> CC: qemu-block@nongnu.org
>> CC: integration@gluster.org
>> CC: sheepdog@lists.wpkg.org
>> CC: qemu-arm@nongnu.org
>> CC: xen-devel@lists.xenproject.org
>> CC: qemu-ppc@nongnu.org
>> CC: qemu-s390x@nongnu.org
>> CC: qemu-riscv@nongnu.org
>>
>>   include/block/nbd.h                           |   1 +
>>   include/block/snapshot.h                      |   2 +-
>>   include/monitor/hmp.h                         |   2 +-
>>   include/qapi/error.h                          |  69 ++++-
>>   include/qom/object.h                          |   4 +-
>>   target/ppc/kvm_ppc.h                          |   4 +-
>>   ui/vnc.h                                      |   2 +-
>>   audio/audio.c                                 |  12 +-
>>   backends/cryptodev-vhost-user.c               |  10 +-
>>   backends/cryptodev.c                          |  25 +-
>>   backends/hostmem-file.c                       |  21 +-
>>   backends/hostmem-memfd.c                      |  18 +-
>>   backends/hostmem.c                            |  41 ++-
>>   backends/rng.c                                |   7 +-
>>   block.c                                       | 225 +++++++---------
>>   block/backup.c                                |   1 +
>>   block/blkdebug.c                              |  36 ++-
>>   block/blklogwrites.c                          |  22 +-
>>   block/blkreplay.c                             |   7 +-
>>   block/blkverify.c                             |  17 +-
>>   block/block-backend.c                         |  19 +-
>>   block/commit.c                                |   7 +-
>>   block/crypto.c                                |  14 +-
>>   block/curl.c                                  |   7 +-
>>   block/dirty-bitmap.c                          |   1 +
>>   block/file-posix.c                            |  79 +++---
>>   block/file-win32.c                            |  29 +-
>>   block/gluster.c                               |  69 +++--
>>   block/io.c                                    |  12 +-
>>   block/iscsi.c                                 |  36 ++-
>>   block/mirror.c                                |  19 +-
>>   block/nbd.c                                   |  59 ++--
>>   block/nfs.c                                   |   7 +-
>>   block/nvme.c                                  |  19 +-
>>   block/parallels.c                             |  30 +--
>>   block/qapi.c                                  |  26 +-
>>   block/qcow.c                                  |  17 +-
>>   block/qcow2-bitmap.c                          |   9 +-
>>   block/qcow2.c                                 |  98 +++----
>>   block/qed.c                                   |  18 +-
>>   block/quorum.c                                |  23 +-
>>   block/raw-format.c                            |   7 +-
>>   block/rbd.c                                   |  29 +-
>>   block/replication.c                           |  40 ++-
>>   block/sheepdog.c                              |  73 +++--
>>   block/snapshot.c                              |  20 +-
>>   block/ssh.c                                   |  12 +-
>>   block/throttle-groups.c                       |  24 +-
>>   block/throttle.c                              |   7 +-
>>   block/vdi.c                                   |  15 +-
>>   block/vhdx-log.c                              |   1 +
>>   block/vhdx.c                                  |  22 +-
>>   block/vmdk.c                                  |  41 ++-
>>   block/vpc.c                                   |  28 +-
>>   block/vvfat.c                                 |  12 +-
>>   block/vxhs.c                                  |  23 +-
>>   blockdev.c                                    | 252 ++++++++----------
>>   blockjob.c                                    |   8 +-
>>   bootdevice.c                                  |  31 +--
>>   chardev/char-socket.c                         |   7 +-
>>   chardev/char.c                                |  20 +-
>>   chardev/spice.c                               |   1 +
>>   crypto/block-luks.c                           |  56 ++--
>>   crypto/secret.c                               |  17 +-
>>   crypto/tlssession.c                           |   7 +-
>>   dump/dump-hmp-cmds.c                          |   4 +-
>>   dump/dump.c                                   | 151 +++++------
>>   dump/win_dump.c                               |  29 +-
>>   exec.c                                        |  21 +-
>>   hw/9pfs/9p-local.c                            |  12 +-
>>   hw/9pfs/9p-proxy.c                            |   5 +-
>>   hw/9pfs/9p.c                                  |   1 +
>>   hw/acpi/core.c                                |  18 +-
>>   hw/acpi/cpu_hotplug.c                         |   2 +-
>>   hw/acpi/ich9.c                                |  30 +--
>>   hw/acpi/memory_hotplug.c                      |   7 +-
>>   hw/arm/allwinner-a10.c                        |  27 +-
>>   hw/arm/armv7m.c                               |  52 ++--
>>   hw/arm/aspeed_soc.c                           |   1 +
>>   hw/arm/bcm2835_peripherals.c                  |  85 +++---
>>   hw/arm/bcm2836.c                              |  41 ++-
>>   hw/arm/digic.c                                |  22 +-
>>   hw/arm/fsl-imx25.c                            |  62 ++---
>>   hw/arm/fsl-imx31.c                            |  57 ++--
>>   hw/arm/fsl-imx6.c                             |  81 +++---
>>   hw/arm/integratorcp.c                         |   7 +-
>>   hw/arm/msf2-soc.c                             |  22 +-
>>   hw/arm/nrf51_soc.c                            |  47 ++--
>>   hw/arm/smmu-common.c                          |   7 +-
>>   hw/arm/smmuv3.c                               |   7 +-
>>   hw/arm/stm32f205_soc.c                        |  39 ++-
>>   hw/arm/virt.c                                 |   2 +
>>   hw/arm/xlnx-versal-virt.c                     |   7 +-
>>   hw/arm/xlnx-zynqmp.c                          |  86 +++---
>>   hw/audio/intel-hda.c                          |  13 +-
>>   hw/block/dataplane/virtio-blk.c               |   1 +
>>   hw/block/dataplane/xen-block.c                |  17 +-
>>   hw/block/fdc.c                                |  19 +-
>>   hw/block/onenand.c                            |   7 +-
>>   hw/block/pflash_cfi01.c                       |   7 +-
>>   hw/block/pflash_cfi02.c                       |   7 +-
>>   hw/block/vhost-user-blk.c                     |   6 +-
>>   hw/block/virtio-blk.c                         |   7 +-
>>   hw/block/xen-block.c                          | 119 ++++-----
>>   hw/char/debugcon.c                            |   7 +-
>>   hw/char/serial-pci-multi.c                    |   7 +-
>>   hw/char/serial-pci.c                          |   7 +-
>>   hw/char/virtio-serial-bus.c                   |   7 +-
>>   hw/core/bus.c                                 |  15 +-
>>   hw/core/loader-fit.c                          |   7 +-
>>   hw/core/machine-hmp-cmds.c                    |   6 +-
>>   hw/core/machine.c                             |  21 +-
>>   hw/core/numa.c                                |  51 ++--
>>   hw/core/qdev-properties-system.c              |  28 +-
>>   hw/core/qdev-properties.c                     |  89 +++----
>>   hw/core/qdev.c                                |  58 ++--
>>   hw/cpu/a15mpcore.c                            |   7 +-
>>   hw/cpu/a9mpcore.c                             |  27 +-
>>   hw/cpu/arm11mpcore.c                          |  22 +-
>>   hw/cpu/core.c                                 |  14 +-
>>   hw/cpu/realview_mpcore.c                      |  12 +-
>>   hw/display/bcm2835_fb.c                       |   6 +-
>>   hw/display/qxl.c                              |   7 +-
>>   hw/display/virtio-gpu-base.c                  |   7 +-
>>   hw/display/virtio-gpu-pci.c                   |   7 +-
>>   hw/display/virtio-vga.c                       |   7 +-
>>   hw/dma/bcm2835_dma.c                          |   6 +-
>>   hw/dma/xilinx_axidma.c                        |  22 +-
>>   hw/gpio/aspeed_gpio.c                         |   7 +-
>>   hw/gpio/bcm2835_gpio.c                        |  10 +-
>>   hw/i386/amd_iommu.c                           |  14 +-
>>   hw/i386/pc.c                                  | 120 ++++-----
>>   hw/ide/qdev.c                                 |  16 +-
>>   hw/input/virtio-input.c                       |  14 +-
>>   hw/intc/apic_common.c                         |   7 +-
>>   hw/intc/arm_gic.c                             |   7 +-
>>   hw/intc/arm_gic_kvm.c                         |  12 +-
>>   hw/intc/arm_gicv3.c                           |  12 +-
>>   hw/intc/arm_gicv3_its_kvm.c                   |   7 +-
>>   hw/intc/arm_gicv3_kvm.c                       |  17 +-
>>   hw/intc/armv7m_nvic.c                         |  12 +-
>>   hw/intc/nios2_iic.c                           |   6 +-
>>   hw/intc/pnv_xive.c                            |  15 +-
>>   hw/intc/realview_gic.c                        |   7 +-
>>   hw/intc/s390_flic_kvm.c                       |   9 +-
>>   hw/intc/spapr_xive.c                          |  12 +-
>>   hw/intc/spapr_xive_kvm.c                      |  55 ++--
>>   hw/intc/xics.c                                |  28 +-
>>   hw/intc/xics_kvm.c                            |  30 +--
>>   hw/intc/xics_pnv.c                            |   7 +-
>>   hw/intc/xics_spapr.c                          |   7 +-
>>   hw/intc/xive.c                                |  27 +-
>>   hw/ipack/ipack.c                              |   5 +-
>>   hw/isa/pc87312.c                              |   7 +-
>>   hw/mem/memory-device.c                        |  20 +-
>>   hw/mem/nvdimm.c                               |  25 +-
>>   hw/mem/pc-dimm.c                              |  23 +-
>>   hw/microblaze/xlnx-zynqmp-pmu.c               |  12 +-
>>   hw/mips/cps.c                                 |  46 ++--
>>   hw/misc/bcm2835_mbox.c                        |   6 +-
>>   hw/misc/bcm2835_property.c                    |  10 +-
>>   hw/misc/ivshmem.c                             |  37 ++-
>>   hw/misc/macio/macio.c                         |  68 ++---
>>   hw/misc/msf2-sysreg.c                         |   1 +
>>   hw/misc/tmp105.c                              |   7 +-
>>   hw/misc/tmp421.c                              |   7 +-
>>   hw/net/dp8393x.c                              |   7 +-
>>   hw/net/eepro100.c                             |   7 +-
>>   hw/net/ne2000-isa.c                           |  17 +-
>>   hw/net/xilinx_axienet.c                       |  22 +-
>>   hw/nvram/fw_cfg.c                             |  14 +-
>>   hw/nvram/nrf51_nvm.c                          |   7 +-
>>   hw/pci-bridge/gen_pcie_root_port.c            |   7 +-
>>   hw/pci-bridge/pci_bridge_dev.c                |  13 +-
>>   hw/pci-bridge/pci_expander_bridge.c           |   7 +-
>>   hw/pci-bridge/pcie_pci_bridge.c               |   8 +-
>>   hw/pci-bridge/pcie_root_port.c                |   1 +
>>   hw/pci-host/piix.c                            |   7 +-
>>   hw/pci/pci.c                                  |  19 +-
>>   hw/pci/pcie.c                                 |   7 +-
>>   hw/pci/shpc.c                                 |  14 +-
>>   hw/ppc/e500.c                                 |   7 +-
>>   hw/ppc/mac_newworld.c                         |   1 +
>>   hw/ppc/pnv.c                                  | 109 ++++----
>>   hw/ppc/pnv_core.c                             |  23 +-
>>   hw/ppc/pnv_homer.c                            |   5 +-
>>   hw/ppc/pnv_lpc.c                              |  26 +-
>>   hw/ppc/pnv_occ.c                              |   5 +-
>>   hw/ppc/pnv_psi.c                              |  23 +-
>>   hw/ppc/spapr.c                                | 133 ++++-----
>>   hw/ppc/spapr_caps.c                           |  57 ++--
>>   hw/ppc/spapr_cpu_core.c                       |  36 ++-
>>   hw/ppc/spapr_drc.c                            |  48 ++--
>>   hw/ppc/spapr_irq.c                            |  98 +++----
>>   hw/ppc/spapr_pci.c                            |  97 +++----
>>   hw/ppc/spapr_vio.c                            |  12 +-
>>   hw/rdma/vmw/pvrdma_main.c                     |   1 +
>>   hw/riscv/riscv_hart.c                         |   7 +-
>>   hw/riscv/sifive_e.c                           |   7 +-
>>   hw/riscv/sifive_u.c                           |  11 +-
>>   hw/s390x/3270-ccw.c                           |  13 +-
>>   hw/s390x/css-bridge.c                         |   7 +-
>>   hw/s390x/css.c                                |   7 +-
>>   hw/s390x/event-facility.c                     |   2 +-
>>   hw/s390x/ipl.c                                |  24 +-
>>   hw/s390x/s390-ccw.c                           |  19 +-
>>   hw/s390x/s390-pci-bus.c                       |  37 ++-
>>   hw/s390x/s390-skeys.c                         |   7 +-
>>   hw/s390x/s390-stattrib.c                      |   3 +-
>>   hw/s390x/s390-virtio-ccw.c                    |  11 +-
>>   hw/s390x/sclp.c                               |  15 +-
>>   hw/s390x/tod-kvm.c                            |  14 +-
>>   hw/s390x/virtio-ccw-crypto.c                  |   7 +-
>>   hw/s390x/virtio-ccw-rng.c                     |   7 +-
>>   hw/s390x/virtio-ccw.c                         |  13 +-
>>   hw/scsi/esp-pci.c                             |   7 +-
>>   hw/scsi/megasas.c                             |  11 +-
>>   hw/scsi/mptsas.c                              |  13 +-
>>   hw/scsi/scsi-bus.c                            |  24 +-
>>   hw/scsi/scsi-disk.c                           |   8 +-
>>   hw/scsi/scsi-generic.c                        |   1 +
>>   hw/scsi/vhost-scsi.c                          |  12 +-
>>   hw/scsi/vhost-user-scsi.c                     |   7 +-
>>   hw/scsi/virtio-scsi.c                         |   7 +-
>>   hw/sd/milkymist-memcard.c                     |  11 +-
>>   hw/sd/sdhci-pci.c                             |   7 +-
>>   hw/sd/sdhci.c                                 |  23 +-
>>   hw/sd/ssi-sd.c                                |  14 +-
>>   hw/smbios/smbios.c                            |  42 ++-
>>   hw/sparc/sun4m.c                              |  21 +-
>>   hw/sparc64/sun4u.c                            |   7 +-
>>   hw/timer/aspeed_timer.c                       |   6 +-
>>   hw/tpm/tpm_emulator.c                         |   8 +-
>>   hw/tpm/tpm_util.c                             |   7 +-
>>   hw/usb/bus.c                                  |  37 ++-
>>   hw/usb/ccid-card-emulated.c                   |   1 +
>>   hw/usb/dev-network.c                          |   2 +-
>>   hw/usb/dev-serial.c                           |   7 +-
>>   hw/usb/dev-smartcard-reader.c                 |  14 +-
>>   hw/usb/dev-storage.c                          |  17 +-
>>   hw/usb/hcd-ohci-pci.c                         |   7 +-
>>   hw/usb/hcd-ohci.c                             |  14 +-
>>   hw/usb/hcd-uhci.c                             |   7 +-
>>   hw/usb/hcd-xhci.c                             |  13 +-
>>   hw/vfio/ap.c                                  |  16 +-
>>   hw/vfio/ccw.c                                 |  24 +-
>>   hw/vfio/common.c                              |   3 +
>>   hw/vfio/pci-quirks.c                          |   8 +-
>>   hw/vfio/pci.c                                 |  42 ++-
>>   hw/vfio/platform.c                            |   1 +
>>   hw/virtio/vhost-vsock.c                       |   1 +
>>   hw/virtio/virtio-balloon.c                    |  35 ++-
>>   hw/virtio/virtio-bus.c                        |  17 +-
>>   hw/virtio/virtio-pci.c                        |   2 +
>>   hw/virtio/virtio-rng-pci.c                    |   7 +-
>>   hw/virtio/virtio-rng.c                        |   7 +-
>>   hw/virtio/virtio.c                            |  19 +-
>>   hw/watchdog/wdt_aspeed.c                      |   5 +-
>>   hw/xen/xen-backend.c                          |   7 +-
>>   hw/xen/xen-bus.c                              |  92 +++----
>>   hw/xen/xen-host-pci-device.c                  |  27 +-
>>   hw/xen/xen_pt.c                               |  25 +-
>>   hw/xen/xen_pt_config_init.c                   |  20 +-
>>   io/dns-resolver.c                             |   7 +-
>>   io/net-listener.c                             |   7 +-
>>   iothread.c                                    |  27 +-
>>   job.c                                         |   7 +-
>>   memory.c                                      |  63 ++---
>>   memory_mapping.c                              |   7 +-
>>   migration/colo.c                              |  38 ++-
>>   migration/migration.c                         |  39 ++-
>>   migration/ram.c                               |  13 +-
>>   migration/rdma.c                              |  13 +-
>>   migration/savevm.c                            |   2 +
>>   migration/socket.c                            |  18 +-
>>   monitor/hmp-cmds.c                            | 155 ++++++-----
>>   monitor/misc.c                                |   9 +-
>>   monitor/qmp-cmds.c                            |   9 +-
>>   nbd/client.c                                  |   5 +
>>   nbd/server.c                                  |   5 +
>>   net/can/can_host.c                            |   7 +-
>>   net/dump.c                                    |  15 +-
>>   net/filter-buffer.c                           |  15 +-
>>   net/filter.c                                  |   7 +-
>>   net/net.c                                     |  58 ++--
>>   net/netmap.c                                  |   7 +-
>>   net/slirp.c                                   |   7 +-
>>   net/tap.c                                     |  47 ++--
>>   qapi/qapi-visit-core.c                        |  56 ++--
>>   qapi/qmp-dispatch.c                           |   7 +-
>>   qapi/string-input-visitor.c                   |   7 +-
>>   qdev-monitor.c                                |  69 +++--
>>   qga/commands-posix.c                          | 222 +++++++--------
>>   qga/commands-win32.c                          | 141 +++++-----
>>   qga/commands.c                                |  12 +-
>>   qom/object.c                                  | 246 ++++++++---------
>>   qom/object_interfaces.c                       |  27 +-
>>   qom/qom-hmp-cmds.c                            |   4 +-
>>   qom/qom-qobject.c                             |   7 +-
>>   replication.c                                 |  28 +-
>>   scsi/pr-manager-helper.c                      |   7 +-
>>   target/alpha/cpu.c                            |   7 +-
>>   target/arm/cpu.c                              |   7 +-
>>   target/arm/cpu64.c                            |  11 +-
>>   target/cris/cpu.c                             |   7 +-
>>   target/hppa/cpu.c                             |   7 +-
>>   target/i386/cpu.c                             | 117 ++++----
>>   target/lm32/cpu.c                             |   7 +-
>>   target/m68k/cpu.c                             |   7 +-
>>   target/microblaze/cpu.c                       |   7 +-
>>   target/mips/cpu.c                             |   7 +-
>>   target/moxie/cpu.c                            |   7 +-
>>   target/nios2/cpu.c                            |   7 +-
>>   target/openrisc/cpu.c                         |   7 +-
>>   target/ppc/compat.c                           |  20 +-
>>   target/ppc/kvm.c                              |  14 +-
>>   target/ppc/translate_init.inc.c               |  26 +-
>>   target/riscv/cpu.c                            |   7 +-
>>   target/s390x/cpu.c                            |  26 +-
>>   target/s390x/cpu_models.c                     |   2 +
>>   target/sh4/cpu.c                              |   7 +-
>>   target/sparc/cpu.c                            |  14 +-
>>   target/tilegx/cpu.c                           |   7 +-
>>   target/tricore/cpu.c                          |   7 +-
>>   target/unicore32/cpu.c                        |   7 +-
>>   target/xtensa/cpu.c                           |   7 +-
>>   tests/test-image-locking.c                    |   7 +-
>>   tpm.c                                         |   7 +-
>>   trace/qmp.c                                   |  14 +-
>>   ui/input-barrier.c                            |   7 +-
>>   ui/input.c                                    |  14 +-
>>   ui/vnc.c                                      |  39 ++-
>>   util/error.c                                  |  30 +--
>>   util/main-loop.c                              |   5 +-
>>   util/oslib-posix.c                            |   6 +-
>>   util/qemu-config.c                            |  29 +-
>>   util/qemu-option.c                            |  59 ++--
>>   util/qemu-sockets.c                           |  31 +--
>>   vl.c                                          |  14 +-
>>   python/commit-per-subsystem.py                | 204 ++++++++++++++
>>   scripts/coccinelle/auto-propagated-errp.cocci | 118 ++++++++
>>   341 files changed, 3851 insertions(+), 4455 deletions(-)
>>   create mode 100755 python/commit-per-subsystem.py
>>   create mode 100644 scripts/coccinelle/auto-propagated-errp.cocci
>>
> 
> 


-- 
Best regards,
Vladimir
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 000/126] error: auto propagated local_err
  2019-11-20  9:50   ` Vladimir Sementsov-Ogievskiy
@ 2019-11-20 12:59     ` Eric Blake
  2019-11-20 13:13       ` Kevin Wolf
  0 siblings, 1 reply; 34+ messages in thread
From: Eric Blake @ 2019-11-20 12:59 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy, qemu-devel
  Cc: Stefan Hajnoczi, Jeff Cody, Jan Kiszka, Alberto Garcia,
	Hailiang Zhang, qemu-block, Aleksandar Rikalo, Halil Pasic,
	Hervé Poussineau, Anthony Perard, Samuel Thibault,
	Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Ronnie Sahlberg, John Snow,
	Richard Henderson, Kevin Wolf, Andrew Jeffery, Chris Wulff,
	Subbaraya Sundeep, Michael Walle, qemu-ppc, Bastian Koppelmann,
	Igor Mammedov, Fam Zheng, Peter Maydell, sheepdog,
	Matthew Rosato, David Hildenbrand, Palmer Dabbelt, Thomas Huth,
	Max Filippov, Hannes Reinecke, Stefano Stabellini, Gonglei (Arei),
	Marcel Apfelbaum, Liu Yuan, Artyom Tarasenko, Eric Farman,
	Amit Shah, Stefan Weil, Greg Kurz, Yuval Shaia, qemu-s390x,
	qemu-arm, Peter Chubb, Cédric Le Goater, Stafford Horne,
	qemu-riscv, Cornelia Huck, Aleksandar Markovic, Aurelien Jarno,
	Paul Burton, Sagar Karandikar, Paul Durrant, Jason Wang,
	Gerd Hoffmann, Edgar E. Iglesias, Guan Xuetao, Ari Sundholm,
	Juan Quintela, Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Laszlo Ersek, Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Denis Lunev, Michael S. Tsirkin, Mark Cave-Ayland,
	Vincenzo Maffione, Marek Vasut, armbru, Marc-André Lureau,
	Alistair Francis, Pavel Dovgalyuk, Giuseppe Lettieri,
	Luigi Rizzo, David Gibson, Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

On 11/20/19 3:50 AM, Vladimir Sementsov-Ogievskiy wrote:
> Okay...
> 
> I think that:
> 
> 1. A lot of efforts (not only my, I think reviewing is already exceeded generation efforts)
>     are made, it would be sad to lose them.
> 
> 2. It's safe enough to apply only part of generated patches: we just fix error_abort/error_fatal
>     in more popular subsystems, what's wrong with that? Why not to cover 80% cases by 20% efforts?
> 
> 3. It's obviously impossible to merge the whole series. A lot of time passed, series diverges.
> 
> 
> So I propose the following plan:
> 
> 1. I resend small separate series of preparation patches per maintainer. They are good anyway.
> 
> 2. We commit patch with macro (changing MUST to SHOULD in documentation) and coccinelle script.
>      (or that may be combined with the first series from [3.])
> 
> 3. When one of preparations taken to maintainer's tree, I send generated patches for
>      its maintainer.

I'd still prefer waiting for direction from Markus.  We've been tied up 
by other things (KVM Forum, 4.2 release), but now that we are in freeze, 
this is actually a GOOD time for Markus to finally get back to this 
series, and there is going to be less rebasing needed if we can apply 
the entire cleanup right as 5.0 development opens in a couple of weeks.


> 
> 
> If no objections during a week, I'll start that plan, hope someone will support it.
> 
> 


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


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 000/126] error: auto propagated local_err
  2019-11-20 12:59     ` Eric Blake
@ 2019-11-20 13:13       ` Kevin Wolf
  0 siblings, 0 replies; 34+ messages in thread
From: Kevin Wolf @ 2019-11-20 13:13 UTC (permalink / raw)
  To: Eric Blake
  Cc: Stefan Hajnoczi, Jeff Cody, Jan Kiszka, Alberto Garcia,
	Hailiang Zhang, qemu-block, Aleksandar Rikalo, Halil Pasic,
	Hervé Poussineau, Anthony Perard, Samuel Thibault,
	Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Ronnie Sahlberg, John Snow,
	Richard Henderson, Vladimir Sementsov-Ogievskiy, Andrew Jeffery,
	Chris Wulff, Subbaraya Sundeep, Michael Walle, qemu-ppc,
	Bastian Koppelmann, Igor Mammedov, Fam Zheng, Peter Maydell,
	sheepdog, Matthew Rosato, David Hildenbrand, Palmer Dabbelt,
	Eric Farman, Max Filippov, Hannes Reinecke, Stefano Stabellini,
	Gonglei (Arei),
	Marcel Apfelbaum, Liu Yuan, Artyom Tarasenko, Thomas Huth,
	Amit Shah, Stefan Weil, Greg Kurz, Yuval Shaia, qemu-s390x,
	qemu-arm, Peter Chubb, Cédric Le Goater, Stafford Horne,
	qemu-riscv, Cornelia Huck, Aleksandar Markovic, Aurelien Jarno,
	Paul Burton, Sagar Karandikar, Paul Durrant, Jason Wang,
	Gerd Hoffmann, Edgar E. Iglesias, Guan Xuetao, Ari Sundholm,
	Juan Quintela, Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Laszlo Ersek, Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Denis Lunev, Michael S. Tsirkin, Mark Cave-Ayland, qemu-devel,
	Vincenzo Maffione, Marek Vasut, armbru, Marc-André Lureau,
	Alistair Francis, Pavel Dovgalyuk, Giuseppe Lettieri,
	Luigi Rizzo, David Gibson, Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

Am 20.11.2019 um 13:59 hat Eric Blake geschrieben:
> On 11/20/19 3:50 AM, Vladimir Sementsov-Ogievskiy wrote:
> > Okay...
> > 
> > I think that:
> > 
> > 1. A lot of efforts (not only my, I think reviewing is already exceeded generation efforts)
> >     are made, it would be sad to lose them.
> > 
> > 2. It's safe enough to apply only part of generated patches: we just fix error_abort/error_fatal
> >     in more popular subsystems, what's wrong with that? Why not to cover 80% cases by 20% efforts?
> > 
> > 3. It's obviously impossible to merge the whole series. A lot of time passed, series diverges.
> > 
> > 
> > So I propose the following plan:
> > 
> > 1. I resend small separate series of preparation patches per maintainer. They are good anyway.
> > 
> > 2. We commit patch with macro (changing MUST to SHOULD in documentation) and coccinelle script.
> >      (or that may be combined with the first series from [3.])
> > 
> > 3. When one of preparations taken to maintainer's tree, I send generated patches for
> >      its maintainer.
> 
> I'd still prefer waiting for direction from Markus.  We've been tied up by
> other things (KVM Forum, 4.2 release), but now that we are in freeze, this
> is actually a GOOD time for Markus to finally get back to this series, and
> there is going to be less rebasing needed if we can apply the entire cleanup
> right as 5.0 development opens in a couple of weeks.

Actually, that's possibly the worst possible time for avoiding conflicts
because during freeze, maintainers are collecting stuff in private
branches for weeks without getting it into master.

If you are the one who gets merged first (what are the odds?), that
solves the problem for you, but then everyone else will get conflicts.

I like Vladimir's new plan.

Kevin


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 031/126] xen: introduce ERRP_AUTO_PROPAGATE
  2019-10-11 16:04 ` [Xen-devel] [RFC v5 031/126] xen: introduce ERRP_AUTO_PROPAGATE Vladimir Sementsov-Ogievskiy
@ 2019-11-20 15:38   ` Anthony PERARD
  0 siblings, 0 replies; 34+ messages in thread
From: Anthony PERARD @ 2019-11-20 15:38 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy
  Cc: Kevin Wolf, Stefano Stabellini, qemu-block, Paul Durrant, armbru,
	Greg Kurz, qemu-devel, Stefan Hajnoczi, xen-devel, Max Reitz

On Fri, Oct 11, 2019 at 07:04:17PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c
> --- a/hw/block/xen-block.c
> +++ b/hw/block/xen-block.c
> @@ -915,15 +903,15 @@ static void xen_block_device_create(XenBackendInstance *backend,
>          goto fail;
>      }
>  
> -    drive = xen_block_drive_create(vdev, device_type, opts, &local_err);
> +    drive = xen_block_drive_create(vdev, device_type, opts, errp);
>      if (!drive) {
> -        error_propagate_prepend(errp, local_err, "failed to create drive: ");
> +        error_prepend(errp, "failed to create drive: ");
>          goto fail;
>      }
>  
> -    iothread = xen_block_iothread_create(vdev, &local_err);
> -    if (local_err) {
> -        error_propagate_prepend(errp, local_err,
> +    iothread = xen_block_iothread_create(vdev, errp);
> +    if (*errp) {
> +        error_prepend(errp,
>                                  "failed to create iothread: ");

These two line could be joined now.

>          goto fail;
>      }

And there are more indentation issues like that in the patch. It would be
nice to fix, but otherwise the patch looks fine:

Acked-by: Anthony PERARD <anthony.perard@citrix.com>

Thanks,

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 000/126] error: auto propagated local_err
  2019-10-11 16:03 [Xen-devel] [RFC v5 000/126] error: auto propagated local_err Vladimir Sementsov-Ogievskiy
                   ` (5 preceding siblings ...)
  2019-11-08 15:30 ` Vladimir Sementsov-Ogievskiy
@ 2019-11-28  8:54 ` Markus Armbruster
  2019-11-28  9:20   ` Vladimir Sementsov-Ogievskiy
  6 siblings, 1 reply; 34+ messages in thread
From: Markus Armbruster @ 2019-11-28  8:54 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy
  Cc: Ronnie Sahlberg, Jeff Cody, Jan Kiszka, Alberto Garcia,
	Hailiang Zhang, qemu-block, Aleksandar Rikalo, Halil Pasic,
	Hervé Poussineau, Anthony Perard, Samuel Thibault,
	Laszlo Ersek, Jason Wang, Laurent Vivier, Eduardo Habkost,
	Xie Changlong, Peter Lieven, Dr. David Alan Gilbert,
	Beniamino Galvani, Eric Auger, Alex Williamson, Stefan Hajnoczi,
	John Snow, Richard Henderson, Kevin Wolf, Andrew Jeffery,
	Chris Wulff, Subbaraya Sundeep, Michael Walle, qemu-ppc,
	Bastian Koppelmann, Igor Mammedov, Fam Zheng, Peter Maydell,
	sheepdog, Matthew Rosato, David Hildenbrand, Palmer Dabbelt,
	Eric Farman, Max Filippov, Denis V. Lunev, Hannes Reinecke,
	Stefano Stabellini, Gonglei (Arei),
	Liu Yuan, Artyom Tarasenko, Thomas Huth, Amit Shah, Stefan Weil,
	Greg Kurz, Yuval Shaia, qemu-s390x, qemu-arm, Peter Chubb,
	Cédric Le Goater, Stafford Horne, qemu-riscv, Cornelia Huck,
	Aleksandar Markovic, Aurelien Jarno, Paul Burton,
	Sagar Karandikar, Paul Durrant, Anthony Green, Gerd Hoffmann,
	Edgar E. Iglesias, Guan Xuetao, Ari Sundholm, Juan Quintela,
	Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Philippe Mathieu-Daudé,
	Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Michael S. Tsirkin, Mark Cave-Ayland, qemu-devel,
	Vincenzo Maffione, Marek Vasut, armbru, Marc-André Lureau,
	Alistair Francis, Pavel Dovgalyuk, Giuseppe Lettieri,
	Luigi Rizzo, David Gibson, Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

Please accept my sincere apologies for taking so long to reply.  A few
thoughts before I dig deeper.

Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:

> Hi all!
>
> At the request of Markus: full version of errp propagation. Let's look
> at it. Cover as much as possible, except inserting macro invocation
> where it's not necessary.
>
> It's huge, and so it's an RFC.

It's a monster.  Best to get it into full view before we commit to
fighting it.

> In v5 I've added a lot more preparation cleanups:
> 01-23 are preparation cleanups
>   01: not changed, keep Eric's r-b
>   02: improve commit msg [Markus], keep Eric's r-b
>   03: changed, only error API here, drop r-b
> 24 is core macro
>   - improve cover letter, wording and macro code style
>   - keep Eric's r-b
> 25-26: automation scripts
>    - commit-per-subsystem changed a lot. it's a draft, don't bother too
>      much with it
>    - coccinelle: add support of error_propagate_prepend
>
> 27-126: generated patches

Splitting up the monster can make fighting it easier.

Your description suggests three high-level parts:

Part 1: Preparation (makes sense by itself)
Part 2: Error interface update (with rules what code should do now)
Part 3: Make the code obey the new rules everywhere

I hope we can get part 1 out of the way quickly.  Diffstat:

 backends/cryptodev.c       |  11 +---
 block/nbd.c                |  10 +--
 block/snapshot.c           |   4 +-
 dump/dump-hmp-cmds.c       |   4 +-
 hw/9pfs/9p-local.c         |   4 +-
 hw/9pfs/9p-proxy.c         |   5 +-
 hw/core/loader-fit.c       |   5 +-
 hw/core/machine-hmp-cmds.c |   6 +-
 hw/core/qdev.c             |  28 ++++----
 hw/i386/amd_iommu.c        |  14 ++--
 hw/ppc/spapr.c             |   2 +-
 hw/s390x/event-facility.c  |   2 +-
 hw/s390x/s390-stattrib.c   |   3 +-
 hw/sd/sdhci.c              |   2 +-
 hw/tpm/tpm_emulator.c      |   8 +--
 hw/usb/dev-network.c       |   2 +-
 hw/vfio/ap.c               |  16 +----
 include/block/snapshot.h   |   2 +-
 include/monitor/hmp.h      |   2 +-
 include/qapi/error.h       |  69 ++++++++++++++++++--
 include/qom/object.h       |   4 +-
 monitor/hmp-cmds.c         | 155 ++++++++++++++++++++++-----------------------
 monitor/qmp-cmds.c         |   2 +-
 net/net.c                  |  17 ++---
 qdev-monitor.c             |  28 ++++----
 qga/commands-posix.c       |   2 +-
 qga/commands-win32.c       |   2 +-
 qga/commands.c             |  12 ++--
 qom/qom-hmp-cmds.c         |   4 +-
 target/ppc/kvm.c           |   6 +-
 target/ppc/kvm_ppc.h       |   4 +-
 ui/vnc.c                   |  20 ++----
 ui/vnc.h                   |   2 +-
 util/error.c               |  30 ++++-----
 34 files changed, 261 insertions(+), 226 deletions(-)

At first glance, I can see bug fixes, non-mechanical cleanups, and
mechanical cleanups.

Within each of these three groups, we have related sub-groups.  For
instance, several patches clean up funny names for the common Error **
parameters.  Several more rename "uncommon" Error ** parameters, to
signal their uncommon role.  I doubt splitting up these subgroups of
related mechanical changes along subsystem lines is worthwhile.

Part 2 needs careful interface review.  Having part 3 ready helps there,
because we can see rather than guess how the interface changes play out.
We really want to get this part right from the start, because if we
don't, we get to do part 3 again.

Part 3 is what makes this a monster.  I understand it's mechanical.  We
can merge it incrementally, but we do want to merge it all, and sooner
rather than later, to avoid a mix of old and new error handling code.
Such mixes inevitably confuse developers, and lead to new instances of
the old patterns creeping in.

I do have doubts about your automated split.

I acknowledge maintainers of active subsystems may want to merge this on
their own terms, to minimize disruption.  Splitting off sub-monsters for
them makes sense.  Splitting off the long tail of less busy subsystems
not so much; it'll only drag out the merging.  Your list below shows 100
parts, and chasing their maintainers is not going to be a fun
experience.

Moreover, using MAINTAINERS to guide an automatic split is a cute idea,
but it falls apart when MAINTAINERS attributes the same file to several
subsystems, which is fairly common.  A sane split requires human touch.

Instead, I'd start with big subsystems with maintainers known to be
sympathetic to this effort.  Split off their sub-monsters, get them
merged.  Iterate until the remainder can be merged in one final push.

> ====
>
> Here is a proposal of auto propagation for local_err, to not call
> error_propagate on every exit point, when we deal with local_err.

More cleverness, less code, avoids one kind of error (forgetting manual
propagate when we should), risks another kind of error (automatic
propagate when we shouldn't).  Tradeoffs, but the general feeling among
reviewers appears to be positive.

> There are also two issues with errp:
>
> 1. error_fatal & error_append_hint/error_prepend: user can't see this
> additional info, because exit() happens in error_setg earlier than info
> is added. [Reported by Greg Kurz]

Yes, broken by design, hurts users.

> 2. error_abort & error_propagate: when we wrap
> error_abort by local_err+error_propagate, resulting coredump will
> refer to error_propagate and not to the place where error happened.
> (the macro itself don't fix the issue, but it allows to [3.] drop all
> local_err+error_propagate pattern, which will definitely fix the issue)
> [Reported by Kevin Wolf]

Yes, broken by design, inconveniences developers.

> ====
>
> Generated patches split:
>
> misc
>    hw/misc/ivshmem.c
>    hw/misc/tmp105.c
>    hw/misc/tmp421.c
[99 more...]


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 000/126] error: auto propagated local_err
  2019-11-28  8:54 ` Markus Armbruster
@ 2019-11-28  9:20   ` Vladimir Sementsov-Ogievskiy
  2019-11-28 12:21     ` Markus Armbruster
  0 siblings, 1 reply; 34+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2019-11-28  9:20 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: Ronnie Sahlberg, Jeff Cody, Jan Kiszka, Alberto Garcia,
	Hailiang Zhang, qemu-block, Aleksandar Rikalo, Halil Pasic,
	Hervé Poussineau, Anthony Perard, Samuel Thibault,
	Laszlo Ersek, Jason Wang, Laurent Vivier, Eduardo Habkost,
	Xie Changlong, Peter Lieven, Dr. David Alan Gilbert,
	Beniamino Galvani, Eric Auger, Alex Williamson, Stefan Hajnoczi,
	John Snow, Richard Henderson, Kevin Wolf, Andrew Jeffery,
	Chris Wulff, Subbaraya Sundeep, Michael Walle, qemu-ppc,
	Bastian Koppelmann, Igor Mammedov, Fam Zheng, Peter Maydell,
	sheepdog, Matthew Rosato, David Hildenbrand, Palmer Dabbelt,
	Eric Farman, Max Filippov, Hannes Reinecke, Stefano Stabellini,
	Gonglei (Arei),
	Liu Yuan, Artyom Tarasenko, Thomas Huth, Amit Shah, Stefan Weil,
	Greg Kurz, Yuval Shaia, qemu-s390x, qemu-arm, Peter Chubb,
	Cédric Le Goater, Stafford Horne, qemu-riscv, Cornelia Huck,
	Aleksandar Markovic, Aurelien Jarno, Paul Burton,
	Sagar Karandikar, Paul Durrant, Anthony Green, Gerd Hoffmann,
	Edgar E. Iglesias, Guan Xuetao, Ari Sundholm, Juan Quintela,
	Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Philippe Mathieu-Daudé,
	Richard W.M. Jones, Andrew Baumann, Max Reitz, Denis Lunev,
	Michael S. Tsirkin, Mark Cave-Ayland, qemu-devel,
	Vincenzo Maffione, Marek Vasut, Marc-André Lureau,
	Alistair Francis, Pavel Dovgalyuk, Giuseppe Lettieri,
	Luigi Rizzo, David Gibson, Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

28.11.2019 11:54, Markus Armbruster wrote:
> Please accept my sincere apologies for taking so long to reply.  A few
> thoughts before I dig deeper.
> 
> Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:
> 
>> Hi all!
>>
>> At the request of Markus: full version of errp propagation. Let's look
>> at it. Cover as much as possible, except inserting macro invocation
>> where it's not necessary.
>>
>> It's huge, and so it's an RFC.
> 
> It's a monster.  Best to get it into full view before we commit to
> fighting it.
> 
>> In v5 I've added a lot more preparation cleanups:
>> 01-23 are preparation cleanups
>>    01: not changed, keep Eric's r-b
>>    02: improve commit msg [Markus], keep Eric's r-b
>>    03: changed, only error API here, drop r-b
>> 24 is core macro
>>    - improve cover letter, wording and macro code style
>>    - keep Eric's r-b
>> 25-26: automation scripts
>>     - commit-per-subsystem changed a lot. it's a draft, don't bother too
>>       much with it
>>     - coccinelle: add support of error_propagate_prepend
>>
>> 27-126: generated patches
> 
> Splitting up the monster can make fighting it easier.
> 
> Your description suggests three high-level parts:
> 
> Part 1: Preparation (makes sense by itself)

I already resent part 1 all patches (handling review comments) in separate as v6.
If it is convenient, I can resend them in one series as v7.

> Part 2: Error interface update (with rules what code should do now)

Note, that patch 21 is actually from part2, not part1.
So Part 2 is 21, 24, 25.
So I wait for your comments and resend (if needed) as separate small series.

And 26 is auto-patch-splitter, but we don't need it now, if we are going
to start from several big subsystems.

> Part 3: Make the code obey the new rules everywhere
> 
> I hope we can get part 1 out of the way quickly.  Diffstat:
> 
>   backends/cryptodev.c       |  11 +---
>   block/nbd.c                |  10 +--
>   block/snapshot.c           |   4 +-
>   dump/dump-hmp-cmds.c       |   4 +-
>   hw/9pfs/9p-local.c         |   4 +-
>   hw/9pfs/9p-proxy.c         |   5 +-
>   hw/core/loader-fit.c       |   5 +-
>   hw/core/machine-hmp-cmds.c |   6 +-
>   hw/core/qdev.c             |  28 ++++----
>   hw/i386/amd_iommu.c        |  14 ++--
>   hw/ppc/spapr.c             |   2 +-
>   hw/s390x/event-facility.c  |   2 +-
>   hw/s390x/s390-stattrib.c   |   3 +-
>   hw/sd/sdhci.c              |   2 +-
>   hw/tpm/tpm_emulator.c      |   8 +--
>   hw/usb/dev-network.c       |   2 +-
>   hw/vfio/ap.c               |  16 +----
>   include/block/snapshot.h   |   2 +-
>   include/monitor/hmp.h      |   2 +-
>   include/qapi/error.h       |  69 ++++++++++++++++++--
>   include/qom/object.h       |   4 +-
>   monitor/hmp-cmds.c         | 155 ++++++++++++++++++++++-----------------------
>   monitor/qmp-cmds.c         |   2 +-
>   net/net.c                  |  17 ++---
>   qdev-monitor.c             |  28 ++++----
>   qga/commands-posix.c       |   2 +-
>   qga/commands-win32.c       |   2 +-
>   qga/commands.c             |  12 ++--
>   qom/qom-hmp-cmds.c         |   4 +-
>   target/ppc/kvm.c           |   6 +-
>   target/ppc/kvm_ppc.h       |   4 +-
>   ui/vnc.c                   |  20 ++----
>   ui/vnc.h                   |   2 +-
>   util/error.c               |  30 ++++-----
>   34 files changed, 261 insertions(+), 226 deletions(-)
> 
> At first glance, I can see bug fixes, non-mechanical cleanups, and
> mechanical cleanups.
> 
> Within each of these three groups, we have related sub-groups.  For
> instance, several patches clean up funny names for the common Error **
> parameters.  Several more rename "uncommon" Error ** parameters, to
> signal their uncommon role.  I doubt splitting up these subgroups of
> related mechanical changes along subsystem lines is worthwhile.
> 
> Part 2 needs careful interface review.  Having part 3 ready helps there,
> because we can see rather than guess how the interface changes play out.
> We really want to get this part right from the start, because if we
> don't, we get to do part 3 again.
> 
> Part 3 is what makes this a monster.  I understand it's mechanical.  We
> can merge it incrementally, but we do want to merge it all, and sooner
> rather than later, to avoid a mix of old and new error handling code.
> Such mixes inevitably confuse developers, and lead to new instances of
> the old patterns creeping in.
> 
> I do have doubts about your automated split.
> 
> I acknowledge maintainers of active subsystems may want to merge this on
> their own terms, to minimize disruption.  Splitting off sub-monsters for
> them makes sense.  Splitting off the long tail of less busy subsystems
> not so much; it'll only drag out the merging.  Your list below shows 100
> parts, and chasing their maintainers is not going to be a fun
> experience.
> 
> Moreover, using MAINTAINERS to guide an automatic split is a cute idea,
> but it falls apart when MAINTAINERS attributes the same file to several
> subsystems, which is fairly common.  A sane split requires human touch.
> 
> Instead, I'd start with big subsystems with maintainers known to be
> sympathetic to this effort.  Split off their sub-monsters, get them
> merged.  Iterate until the remainder can be merged in one final push.

Do you mean to send them as separate per-subsystem series, or all in one,
but limited to some subsystems?

> 
>> ====
>>
>> Here is a proposal of auto propagation for local_err, to not call
>> error_propagate on every exit point, when we deal with local_err.
> 
> More cleverness, less code, avoids one kind of error (forgetting manual
> propagate when we should), risks another kind of error (automatic
> propagate when we shouldn't).  Tradeoffs, but the general feeling among
> reviewers appears to be positive.
> 
>> There are also two issues with errp:
>>
>> 1. error_fatal & error_append_hint/error_prepend: user can't see this
>> additional info, because exit() happens in error_setg earlier than info
>> is added. [Reported by Greg Kurz]
> 
> Yes, broken by design, hurts users.
> 
>> 2. error_abort & error_propagate: when we wrap
>> error_abort by local_err+error_propagate, resulting coredump will
>> refer to error_propagate and not to the place where error happened.
>> (the macro itself don't fix the issue, but it allows to [3.] drop all
>> local_err+error_propagate pattern, which will definitely fix the issue)
>> [Reported by Kevin Wolf]
> 
> Yes, broken by design, inconveniences developers.
> 
>> ====
>>
>> Generated patches split:
>>
>> misc
>>     hw/misc/ivshmem.c
>>     hw/misc/tmp105.c
>>     hw/misc/tmp421.c
> [99 more...]
> 

Thanks!

-- 
Best regards,
Vladimir
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 000/126] error: auto propagated local_err
  2019-11-28  9:20   ` Vladimir Sementsov-Ogievskiy
@ 2019-11-28 12:21     ` Markus Armbruster
  0 siblings, 0 replies; 34+ messages in thread
From: Markus Armbruster @ 2019-11-28 12:21 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy
  Cc: Stefan Hajnoczi, Jeff Cody, Jan Kiszka, Alberto Garcia,
	Hailiang Zhang, qemu-block, Aleksandar Rikalo, Halil Pasic,
	Hervé Poussineau, Anthony Perard, Samuel Thibault,
	Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Ronnie Sahlberg, John Snow,
	Richard Henderson, Kevin Wolf, Andrew Jeffery, Chris Wulff,
	Subbaraya Sundeep, Michael Walle, qemu-ppc, Bastian Koppelmann,
	Igor Mammedov, Fam Zheng, Peter Maydell, sheepdog,
	Matthew Rosato, David Hildenbrand, Palmer Dabbelt, Eric Farman,
	Max Filippov, Hannes Reinecke, Stefano Stabellini, Gonglei (Arei),
	Liu Yuan, Artyom Tarasenko, Thomas Huth, Amit Shah, Stefan Weil,
	Greg Kurz, Yuval Shaia, qemu-s390x, qemu-arm, Peter Chubb,
	Cédric Le Goater, Stafford Horne, qemu-riscv, Cornelia Huck,
	Aleksandar Markovic, Aurelien Jarno, Paul Burton,
	Sagar Karandikar, Paul Durrant, Jason Wang, Gerd Hoffmann,
	Edgar E. Iglesias, Guan Xuetao, Ari Sundholm, Juan Quintela,
	Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Laszlo Ersek, Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Denis Lunev, Michael S. Tsirkin, Mark Cave-Ayland, qemu-devel,
	Vincenzo Maffione, Marek Vasut, Marc-André Lureau,
	Alistair Francis, Pavel Dovgalyuk, Giuseppe Lettieri,
	Luigi Rizzo, David Gibson, Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:

> 28.11.2019 11:54, Markus Armbruster wrote:
>> Please accept my sincere apologies for taking so long to reply.  A few
>> thoughts before I dig deeper.
>> 
>> Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:
>> 
>>> Hi all!
>>>
>>> At the request of Markus: full version of errp propagation. Let's look
>>> at it. Cover as much as possible, except inserting macro invocation
>>> where it's not necessary.
>>>
>>> It's huge, and so it's an RFC.
>> 
>> It's a monster.  Best to get it into full view before we commit to
>> fighting it.
>> 
>>> In v5 I've added a lot more preparation cleanups:
>>> 01-23 are preparation cleanups
>>>    01: not changed, keep Eric's r-b
>>>    02: improve commit msg [Markus], keep Eric's r-b
>>>    03: changed, only error API here, drop r-b
>>> 24 is core macro
>>>    - improve cover letter, wording and macro code style
>>>    - keep Eric's r-b
>>> 25-26: automation scripts
>>>     - commit-per-subsystem changed a lot. it's a draft, don't bother too
>>>       much with it
>>>     - coccinelle: add support of error_propagate_prepend
>>>
>>> 27-126: generated patches
>> 
>> Splitting up the monster can make fighting it easier.
>> 
>> Your description suggests three high-level parts:
>> 
>> Part 1: Preparation (makes sense by itself)
>
> I already resent part 1 all patches (handling review comments) in separate as v6.
> If it is convenient, I can resend them in one series as v7.

Recommend to await review.  The more we can merge without another
respin, the better.

>> Part 2: Error interface update (with rules what code should do now)
>
> Note, that patch 21 is actually from part2, not part1.
> So Part 2 is 21, 24, 25.

Thanks for the heads-up.

> So I wait for your comments and resend (if needed) as separate small series.
>
> And 26 is auto-patch-splitter, but we don't need it now, if we are going
> to start from several big subsystems.
>
>> Part 3: Make the code obey the new rules everywhere
>> 
>> I hope we can get part 1 out of the way quickly.  Diffstat:
>> 
>>   backends/cryptodev.c       |  11 +---
>>   block/nbd.c                |  10 +--
>>   block/snapshot.c           |   4 +-
>>   dump/dump-hmp-cmds.c       |   4 +-
>>   hw/9pfs/9p-local.c         |   4 +-
>>   hw/9pfs/9p-proxy.c         |   5 +-
>>   hw/core/loader-fit.c       |   5 +-
>>   hw/core/machine-hmp-cmds.c |   6 +-
>>   hw/core/qdev.c             |  28 ++++----
>>   hw/i386/amd_iommu.c        |  14 ++--
>>   hw/ppc/spapr.c             |   2 +-
>>   hw/s390x/event-facility.c  |   2 +-
>>   hw/s390x/s390-stattrib.c   |   3 +-
>>   hw/sd/sdhci.c              |   2 +-
>>   hw/tpm/tpm_emulator.c      |   8 +--
>>   hw/usb/dev-network.c       |   2 +-
>>   hw/vfio/ap.c               |  16 +----
>>   include/block/snapshot.h   |   2 +-
>>   include/monitor/hmp.h      |   2 +-
>>   include/qapi/error.h       |  69 ++++++++++++++++++--
>>   include/qom/object.h       |   4 +-
>>   monitor/hmp-cmds.c         | 155 ++++++++++++++++++++++-----------------------
>>   monitor/qmp-cmds.c         |   2 +-
>>   net/net.c                  |  17 ++---
>>   qdev-monitor.c             |  28 ++++----
>>   qga/commands-posix.c       |   2 +-
>>   qga/commands-win32.c       |   2 +-
>>   qga/commands.c             |  12 ++--
>>   qom/qom-hmp-cmds.c         |   4 +-
>>   target/ppc/kvm.c           |   6 +-
>>   target/ppc/kvm_ppc.h       |   4 +-
>>   ui/vnc.c                   |  20 ++----
>>   ui/vnc.h                   |   2 +-
>>   util/error.c               |  30 ++++-----
>>   34 files changed, 261 insertions(+), 226 deletions(-)
>> 
>> At first glance, I can see bug fixes, non-mechanical cleanups, and
>> mechanical cleanups.
>> 
>> Within each of these three groups, we have related sub-groups.  For
>> instance, several patches clean up funny names for the common Error **
>> parameters.  Several more rename "uncommon" Error ** parameters, to
>> signal their uncommon role.  I doubt splitting up these subgroups of
>> related mechanical changes along subsystem lines is worthwhile.
>> 
>> Part 2 needs careful interface review.  Having part 3 ready helps there,
>> because we can see rather than guess how the interface changes play out.
>> We really want to get this part right from the start, because if we
>> don't, we get to do part 3 again.
>> 
>> Part 3 is what makes this a monster.  I understand it's mechanical.  We
>> can merge it incrementally, but we do want to merge it all, and sooner
>> rather than later, to avoid a mix of old and new error handling code.
>> Such mixes inevitably confuse developers, and lead to new instances of
>> the old patterns creeping in.
>> 
>> I do have doubts about your automated split.
>> 
>> I acknowledge maintainers of active subsystems may want to merge this on
>> their own terms, to minimize disruption.  Splitting off sub-monsters for
>> them makes sense.  Splitting off the long tail of less busy subsystems
>> not so much; it'll only drag out the merging.  Your list below shows 100
>> parts, and chasing their maintainers is not going to be a fun
>> experience.
>> 
>> Moreover, using MAINTAINERS to guide an automatic split is a cute idea,
>> but it falls apart when MAINTAINERS attributes the same file to several
>> subsystems, which is fairly common.  A sane split requires human touch.
>> 
>> Instead, I'd start with big subsystems with maintainers known to be
>> sympathetic to this effort.  Split off their sub-monsters, get them
>> merged.  Iterate until the remainder can be merged in one final push.
>
> Do you mean to send them as separate per-subsystem series, or all in one,
> but limited to some subsystems?

Let's make it as easy as we can both for the subsystem maintainers and
for the people trying to track all of it.

When a subsystem takes multiple patches, I'd consider an independent
series to save the maintainer the trouble of extracting multiple patches
from a larger series.

For the ones that take just one patch, I'd consider an omnibus series.
Extracting a single patch is no harder than applying a series, but
tracking one omnibus is easier than a dozen lone patches.

There's no clear line between "busy" and "less busy" subsystem.  Just
start with some obviously busy ones, then iterate.  Each iteration
should be large enough to be worth the overhead, yet small enough not to
scare off reviewers :)

Trust your judgement!

[...]


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 024/126] error: auto propagated local_err
  2019-10-11 16:04 ` [Xen-devel] [RFC v5 024/126] " Vladimir Sementsov-Ogievskiy
  2019-11-08 21:10   ` Marc-André Lureau
@ 2019-12-04 14:59   ` Markus Armbruster
  2019-12-05  9:38     ` Vladimir Sementsov-Ogievskiy
  1 sibling, 1 reply; 34+ messages in thread
From: Markus Armbruster @ 2019-12-04 14:59 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy
  Cc: Ronnie Sahlberg, Jeff Cody, Jan Kiszka, Alberto Garcia,
	Hailiang Zhang, qemu-block, Aleksandar Rikalo, Halil Pasic,
	Hervé Poussineau, Anthony Perard, Samuel Thibault,
	Laszlo Ersek, Jason Wang, Laurent Vivier, Eduardo Habkost,
	Xie Changlong, Peter Lieven, Dr. David Alan Gilbert,
	Beniamino Galvani, Eric Auger, Alex Williamson, Stefan Hajnoczi,
	John Snow, Richard Henderson, Kevin Wolf, Andrew Jeffery,
	Chris Wulff, Subbaraya Sundeep, Michael Walle, qemu-ppc,
	Bastian Koppelmann, Igor Mammedov, Fam Zheng, Peter Maydell,
	sheepdog, Matthew Rosato, David Hildenbrand, Palmer Dabbelt,
	Eric Farman, Max Filippov, Denis V. Lunev, Hannes Reinecke,
	Stefano Stabellini, Gonglei (Arei),
	Liu Yuan, Artyom Tarasenko, Thomas Huth, Amit Shah, Stefan Weil,
	Greg Kurz, Yuval Shaia, qemu-s390x, qemu-arm, Peter Chubb,
	Cédric Le Goater, Stafford Horne, qemu-riscv, Cornelia Huck,
	Aleksandar Markovic, Aurelien Jarno, Paul Burton,
	Sagar Karandikar, Paul Durrant, Anthony Green, Gerd Hoffmann,
	Edgar E. Iglesias, Guan Xuetao, Ari Sundholm, Juan Quintela,
	Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Philippe Mathieu-Daudé,
	Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Michael S. Tsirkin, Mark Cave-Ayland, qemu-devel,
	Vincenzo Maffione, Marek Vasut, armbru, Marc-André Lureau,
	Alistair Francis, Pavel Dovgalyuk, Giuseppe Lettieri,
	Luigi Rizzo, David Gibson, Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:

> Here is introduced ERRP_AUTO_PROPAGATE macro, to be used at start of
> functions with errp OUT parameter.
>
> It has three goals:
>
> 1. Fix issue with error_fatal & error_prepend/error_append_hint: user
> can't see this additional information, because exit() happens in
> error_setg earlier than information is added. [Reported by Greg Kurz]
>
> 2. Fix issue with error_abort & error_propagate: when we wrap
> error_abort by local_err+error_propagate, resulting coredump will
> refer to error_propagate and not to the place where error happened.

I get what you mean, but I have plenty of context.

> (the macro itself doesn't fix the issue, but it allows to [3.] drop all
> local_err+error_propagate pattern, which will definitely fix the issue)

The parenthesis is not part of the goal.

> [Reported by Kevin Wolf]
>
> 3. Drop local_err+error_propagate pattern, which is used to workaround
> void functions with errp parameter, when caller wants to know resulting
> status. (Note: actually these functions could be merely updated to
> return int error code).
>
> To achieve these goals, we need to add invocation of the macro at start
> of functions, which needs error_prepend/error_append_hint (1.); add
> invocation of the macro at start of functions which do
> local_err+error_propagate scenario the check errors, drop local errors
> from them and just use *errp instead (2., 3.).

The paragraph talks about two cases: 1. and 2.+3.  Makes me think we
want two paragraphs, each illustrated with an example.

What about you provide the examples, and then I try to polish the prose?

> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> Reviewed-by: Eric Blake <eblake@redhat.com>
> ---
>
> CC: Gerd Hoffmann <kraxel@redhat.com>
> CC: "Gonglei (Arei)" <arei.gonglei@huawei.com>
> CC: Eduardo Habkost <ehabkost@redhat.com>
> CC: Igor Mammedov <imammedo@redhat.com>
> CC: Laurent Vivier <lvivier@redhat.com>
> CC: Amit Shah <amit@kernel.org>
> CC: Kevin Wolf <kwolf@redhat.com>
> CC: Max Reitz <mreitz@redhat.com>
> CC: John Snow <jsnow@redhat.com>
> CC: Ari Sundholm <ari@tuxera.com>
> CC: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
> CC: Paolo Bonzini <pbonzini@redhat.com>
> CC: Stefan Hajnoczi <stefanha@redhat.com>
> CC: Fam Zheng <fam@euphon.net>
> CC: Stefan Weil <sw@weilnetz.de>
> CC: Ronnie Sahlberg <ronniesahlberg@gmail.com>
> CC: Peter Lieven <pl@kamp.de>
> CC: Eric Blake <eblake@redhat.com>
> CC: "Denis V. Lunev" <den@openvz.org>
> CC: Markus Armbruster <armbru@redhat.com>
> CC: Alberto Garcia <berto@igalia.com>
> CC: Jason Dillaman <dillaman@redhat.com>
> CC: Wen Congyang <wencongyang2@huawei.com>
> CC: Xie Changlong <xiechanglong.d@gmail.com>
> CC: Liu Yuan <namei.unix@gmail.com>
> CC: "Richard W.M. Jones" <rjones@redhat.com>
> CC: Jeff Cody <codyprime@gmail.com>
> CC: "Marc-André Lureau" <marcandre.lureau@redhat.com>
> CC: "Daniel P. Berrangé" <berrange@redhat.com>
> CC: Richard Henderson <rth@twiddle.net>
> CC: Greg Kurz <groug@kaod.org>
> CC: "Michael S. Tsirkin" <mst@redhat.com>
> CC: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> CC: Beniamino Galvani <b.galvani@gmail.com>
> CC: Peter Maydell <peter.maydell@linaro.org>
> CC: "Cédric Le Goater" <clg@kaod.org>
> CC: Andrew Jeffery <andrew@aj.id.au>
> CC: Joel Stanley <joel@jms.id.au>
> CC: Andrew Baumann <Andrew.Baumann@microsoft.com>
> CC: "Philippe Mathieu-Daudé" <philmd@redhat.com>
> CC: Antony Pavlov <antonynpavlov@gmail.com>
> CC: Jean-Christophe Dubois <jcd@tribudubois.net>
> CC: Peter Chubb <peter.chubb@nicta.com.au>
> CC: Subbaraya Sundeep <sundeep.lkml@gmail.com>
> CC: Eric Auger <eric.auger@redhat.com>
> CC: Alistair Francis <alistair@alistair23.me>
> CC: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
> CC: Stefano Stabellini <sstabellini@kernel.org>
> CC: Anthony Perard <anthony.perard@citrix.com>
> CC: Paul Durrant <paul@xen.org>
> CC: Paul Burton <pburton@wavecomp.com>
> CC: Aleksandar Rikalo <arikalo@wavecomp.com>
> CC: Chris Wulff <crwulff@gmail.com>
> CC: Marek Vasut <marex@denx.de>
> CC: David Gibson <david@gibson.dropbear.id.au>
> CC: Cornelia Huck <cohuck@redhat.com>
> CC: Halil Pasic <pasic@linux.ibm.com>
> CC: Christian Borntraeger <borntraeger@de.ibm.com>
> CC: "Hervé Poussineau" <hpoussin@reactos.org>
> CC: Xiao Guangrong <xiaoguangrong.eric@gmail.com>
> CC: Aurelien Jarno <aurelien@aurel32.net>
> CC: Aleksandar Markovic <amarkovic@wavecomp.com>
> CC: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> CC: Jason Wang <jasowang@redhat.com>
> CC: Laszlo Ersek <lersek@redhat.com>
> CC: Yuval Shaia <yuval.shaia@oracle.com>
> CC: Palmer Dabbelt <palmer@sifive.com>
> CC: Sagar Karandikar <sagark@eecs.berkeley.edu>
> CC: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
> CC: David Hildenbrand <david@redhat.com>
> CC: Thomas Huth <thuth@redhat.com>
> CC: Eric Farman <farman@linux.ibm.com>
> CC: Matthew Rosato <mjrosato@linux.ibm.com>
> CC: Hannes Reinecke <hare@suse.com>
> CC: Michael Walle <michael@walle.cc>
> CC: Artyom Tarasenko <atar4qemu@gmail.com>
> CC: Stefan Berger <stefanb@linux.ibm.com>
> CC: Samuel Thibault <samuel.thibault@ens-lyon.org>
> CC: Alex Williamson <alex.williamson@redhat.com>
> CC: Tony Krowiak <akrowiak@linux.ibm.com>
> CC: Pierre Morel <pmorel@linux.ibm.com>
> CC: Michael Roth <mdroth@linux.vnet.ibm.com>
> CC: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
> CC: Juan Quintela <quintela@redhat.com>
> CC: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> CC: Luigi Rizzo <rizzo@iet.unipi.it>
> CC: Giuseppe Lettieri <g.lettieri@iet.unipi.it>
> CC: Vincenzo Maffione <v.maffione@gmail.com>
> CC: Jan Kiszka <jan.kiszka@siemens.com>
> CC: Anthony Green <green@moxielogic.com>
> CC: Stafford Horne <shorne@gmail.com>
> CC: Guan Xuetao <gxt@mprc.pku.edu.cn>
> CC: Max Filippov <jcmvbkbc@gmail.com>
> CC: qemu-block@nongnu.org
> CC: integration@gluster.org
> CC: sheepdog@lists.wpkg.org
> CC: qemu-arm@nongnu.org
> CC: xen-devel@lists.xenproject.org
> CC: qemu-ppc@nongnu.org
> CC: qemu-s390x@nongnu.org
> CC: qemu-riscv@nongnu.org
>
>  include/qapi/error.h | 38 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 38 insertions(+)
>
> diff --git a/include/qapi/error.h b/include/qapi/error.h
> index d6898d833b..47238d9065 100644
> --- a/include/qapi/error.h
> +++ b/include/qapi/error.h
> @@ -345,6 +345,44 @@ void error_set_internal(Error **errp,
>                          ErrorClass err_class, const char *fmt, ...)
>      GCC_FMT_ATTR(6, 7);
>  
> +typedef struct ErrorPropagator {
> +    Error *local_err;
> +    Error **errp;
> +} ErrorPropagator;
> +
> +static inline void error_propagator_cleanup(ErrorPropagator *prop)
> +{
> +    error_propagate(prop->errp, prop->local_err);
> +}
> +
> +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(ErrorPropagator, error_propagator_cleanup);
> +
> +/*
> + * ERRP_AUTO_PROPAGATE
> + *
> + * This macro is created to be the first line of a function with Error **errp
> + * OUT parameter. It's needed only in cases where we want to use error_prepend,
> + * error_append_hint or dereference *errp. It's still safe (but useless) in
> + * other cases.
> + *
> + * If errp is NULL or points to error_fatal, it is rewritten to point to a
> + * local Error object, which will be automatically propagated to the original
> + * errp on function exit (see error_propagator_cleanup).
> + *
> + * After invocation of this macro it is always safe to dereference errp
> + * (as it's not NULL anymore) and to add information (by error_prepend or
> + * error_append_hint)
> + * (as, if it was error_fatal, we swapped it with a local_error to be
> + * propagated on cleanup).
> + *
> + * Note: we don't wrap the error_abort case, as we want resulting coredump
> + * to point to the place where the error happened, not to error_propagate.
> + */
> +#define ERRP_AUTO_PROPAGATE()                                  \
> +    g_auto(ErrorPropagator) _auto_errp_prop = {.errp = errp};  \
> +    errp = ((errp == NULL || *errp == error_fatal)             \
> +            ? &_auto_errp_prop.local_err : errp)
> +
>  /*
>   * Special error destination to abort on error.
>   * See error_setg() and error_propagate() for details.

Missing: update of the big comment starting with "Error reporting system
loosely patterned after Glib's GError."


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 024/126] error: auto propagated local_err
  2019-12-04 14:59   ` Markus Armbruster
@ 2019-12-05  9:38     ` Vladimir Sementsov-Ogievskiy
  2019-12-05 12:36       ` Markus Armbruster
  0 siblings, 1 reply; 34+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2019-12-05  9:38 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: Ronnie Sahlberg, Jeff Cody, Jan Kiszka, Alberto Garcia,
	Hailiang Zhang, qemu-block, Aleksandar Rikalo, Halil Pasic,
	Hervé Poussineau, Anthony Perard, Samuel Thibault,
	Laszlo Ersek, Jason Wang, Laurent Vivier, Eduardo Habkost,
	Xie Changlong, Peter Lieven, Dr. David Alan Gilbert,
	Beniamino Galvani, Eric Auger, Alex Williamson, Stefan Hajnoczi,
	John Snow, Richard Henderson, Kevin Wolf, Andrew Jeffery,
	Chris Wulff, Subbaraya Sundeep, Michael Walle, qemu-ppc,
	Bastian Koppelmann, Igor Mammedov, Fam Zheng, Peter Maydell,
	sheepdog, Matthew Rosato, David Hildenbrand, Palmer Dabbelt,
	Eric Farman, Max Filippov, Hannes Reinecke, Stefano Stabellini,
	Gonglei (Arei),
	Liu Yuan, Artyom Tarasenko, Thomas Huth, Amit Shah, Stefan Weil,
	Greg Kurz, Yuval Shaia, qemu-s390x, qemu-arm, Peter Chubb,
	Cédric Le Goater, Stafford Horne, qemu-riscv, Cornelia Huck,
	Aleksandar Markovic, Aurelien Jarno, Paul Burton,
	Sagar Karandikar, Paul Durrant, Anthony Green, Gerd Hoffmann,
	Edgar E. Iglesias, Guan Xuetao, Ari Sundholm, Juan Quintela,
	Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Philippe Mathieu-Daudé,
	Richard W.M. Jones, Andrew Baumann, Max Reitz, Denis Lunev,
	Michael S. Tsirkin, Mark Cave-Ayland, qemu-devel,
	Vincenzo Maffione, Marek Vasut, Marc-André Lureau,
	Alistair Francis, Pavel Dovgalyuk, Giuseppe Lettieri,
	Luigi Rizzo, David Gibson, Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

04.12.2019 17:59, Markus Armbruster wrote:
> Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:
> 
>> Here is introduced ERRP_AUTO_PROPAGATE macro, to be used at start of
>> functions with errp OUT parameter.
>>
>> It has three goals:
>>
>> 1. Fix issue with error_fatal & error_prepend/error_append_hint: user
>> can't see this additional information, because exit() happens in
>> error_setg earlier than information is added. [Reported by Greg Kurz]
>>
>> 2. Fix issue with error_abort & error_propagate: when we wrap
>> error_abort by local_err+error_propagate, resulting coredump will
>> refer to error_propagate and not to the place where error happened.
> 
> I get what you mean, but I have plenty of context.
> 
>> (the macro itself doesn't fix the issue, but it allows to [3.] drop all
>> local_err+error_propagate pattern, which will definitely fix the issue)
> 
> The parenthesis is not part of the goal.
> 
>> [Reported by Kevin Wolf]
>>
>> 3. Drop local_err+error_propagate pattern, which is used to workaround
>> void functions with errp parameter, when caller wants to know resulting
>> status. (Note: actually these functions could be merely updated to
>> return int error code).
>>
>> To achieve these goals, we need to add invocation of the macro at start
>> of functions, which needs error_prepend/error_append_hint (1.); add
>> invocation of the macro at start of functions which do
>> local_err+error_propagate scenario the check errors, drop local errors
>> from them and just use *errp instead (2., 3.).
> 
> The paragraph talks about two cases: 1. and 2.+3. 

Hmm, I don't think so.. 1. and 2. are issues. 3. is a refactoring.. We just
fix achieve 2 and 3 by one action.

> Makes me think we
> want two paragraphs, each illustrated with an example.
> 
> What about you provide the examples, and then I try to polish the prose?

1: error_fatal problem

Assume the following code flow:

int f1(errp) {
    ...
    ret = f2(errp);
    if (ret < 0) {
       error_append_hint(errp, "very useful hint");
       return ret;
    }
    ...
}

Now, if we call f1 with &error_fatal argument and f2 fails, the program
will exit immediately inside f2, when setting the errp. User will not
see the hint.

So, in this case we should use local_err.

2: error_abort problem

Now, consider functions without return value. We normally use local_err
variable to catch failures:

void f1(errp) {
    Error *local_err = NULL;
    ...
    f2(&local_err);
    if (local_err) {
        error_propagate(errp, local_err);
        return;
    }
    ...
}

Now, if we call f2 with &error_abort and f2 fails, the stack in resulting
crash dump will point to error_propagate, not to the failure point in f2,
which complicates debugging.

So, we should never wrap error_abort by local_err.

===

Our solution:

- Fixes [1.], adding invocation of new macro into functions with error_appen_hint/error_prepend,
   New macro will wrap error_fatal.
- Fixes [2.], by switching from hand-written local_err to smart macro, which never
   wraps error_abort.
- Handles [3.], by switching to macro, which is less code
- Additionally, macro doesn't wrap normal non-zero errp, to avoid extra propagations
   (in fact, error_propagate is called, but returns immediately on first if (!local_err))

> 
>> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>> Reviewed-by: Eric Blake <eblake@redhat.com>
>> ---
>>
>> CC: Gerd Hoffmann <kraxel@redhat.com>
>> CC: "Gonglei (Arei)" <arei.gonglei@huawei.com>
>> CC: Eduardo Habkost <ehabkost@redhat.com>
>> CC: Igor Mammedov <imammedo@redhat.com>
>> CC: Laurent Vivier <lvivier@redhat.com>
>> CC: Amit Shah <amit@kernel.org>
>> CC: Kevin Wolf <kwolf@redhat.com>
>> CC: Max Reitz <mreitz@redhat.com>
>> CC: John Snow <jsnow@redhat.com>
>> CC: Ari Sundholm <ari@tuxera.com>
>> CC: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
>> CC: Paolo Bonzini <pbonzini@redhat.com>
>> CC: Stefan Hajnoczi <stefanha@redhat.com>
>> CC: Fam Zheng <fam@euphon.net>
>> CC: Stefan Weil <sw@weilnetz.de>
>> CC: Ronnie Sahlberg <ronniesahlberg@gmail.com>
>> CC: Peter Lieven <pl@kamp.de>
>> CC: Eric Blake <eblake@redhat.com>
>> CC: "Denis V. Lunev" <den@openvz.org>
>> CC: Markus Armbruster <armbru@redhat.com>
>> CC: Alberto Garcia <berto@igalia.com>
>> CC: Jason Dillaman <dillaman@redhat.com>
>> CC: Wen Congyang <wencongyang2@huawei.com>
>> CC: Xie Changlong <xiechanglong.d@gmail.com>
>> CC: Liu Yuan <namei.unix@gmail.com>
>> CC: "Richard W.M. Jones" <rjones@redhat.com>
>> CC: Jeff Cody <codyprime@gmail.com>
>> CC: "Marc-André Lureau" <marcandre.lureau@redhat.com>
>> CC: "Daniel P. Berrangé" <berrange@redhat.com>
>> CC: Richard Henderson <rth@twiddle.net>
>> CC: Greg Kurz <groug@kaod.org>
>> CC: "Michael S. Tsirkin" <mst@redhat.com>
>> CC: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
>> CC: Beniamino Galvani <b.galvani@gmail.com>
>> CC: Peter Maydell <peter.maydell@linaro.org>
>> CC: "Cédric Le Goater" <clg@kaod.org>
>> CC: Andrew Jeffery <andrew@aj.id.au>
>> CC: Joel Stanley <joel@jms.id.au>
>> CC: Andrew Baumann <Andrew.Baumann@microsoft.com>
>> CC: "Philippe Mathieu-Daudé" <philmd@redhat.com>
>> CC: Antony Pavlov <antonynpavlov@gmail.com>
>> CC: Jean-Christophe Dubois <jcd@tribudubois.net>
>> CC: Peter Chubb <peter.chubb@nicta.com.au>
>> CC: Subbaraya Sundeep <sundeep.lkml@gmail.com>
>> CC: Eric Auger <eric.auger@redhat.com>
>> CC: Alistair Francis <alistair@alistair23.me>
>> CC: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
>> CC: Stefano Stabellini <sstabellini@kernel.org>
>> CC: Anthony Perard <anthony.perard@citrix.com>
>> CC: Paul Durrant <paul@xen.org>
>> CC: Paul Burton <pburton@wavecomp.com>
>> CC: Aleksandar Rikalo <arikalo@wavecomp.com>
>> CC: Chris Wulff <crwulff@gmail.com>
>> CC: Marek Vasut <marex@denx.de>
>> CC: David Gibson <david@gibson.dropbear.id.au>
>> CC: Cornelia Huck <cohuck@redhat.com>
>> CC: Halil Pasic <pasic@linux.ibm.com>
>> CC: Christian Borntraeger <borntraeger@de.ibm.com>
>> CC: "Hervé Poussineau" <hpoussin@reactos.org>
>> CC: Xiao Guangrong <xiaoguangrong.eric@gmail.com>
>> CC: Aurelien Jarno <aurelien@aurel32.net>
>> CC: Aleksandar Markovic <amarkovic@wavecomp.com>
>> CC: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>> CC: Jason Wang <jasowang@redhat.com>
>> CC: Laszlo Ersek <lersek@redhat.com>
>> CC: Yuval Shaia <yuval.shaia@oracle.com>
>> CC: Palmer Dabbelt <palmer@sifive.com>
>> CC: Sagar Karandikar <sagark@eecs.berkeley.edu>
>> CC: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
>> CC: David Hildenbrand <david@redhat.com>
>> CC: Thomas Huth <thuth@redhat.com>
>> CC: Eric Farman <farman@linux.ibm.com>
>> CC: Matthew Rosato <mjrosato@linux.ibm.com>
>> CC: Hannes Reinecke <hare@suse.com>
>> CC: Michael Walle <michael@walle.cc>
>> CC: Artyom Tarasenko <atar4qemu@gmail.com>
>> CC: Stefan Berger <stefanb@linux.ibm.com>
>> CC: Samuel Thibault <samuel.thibault@ens-lyon.org>
>> CC: Alex Williamson <alex.williamson@redhat.com>
>> CC: Tony Krowiak <akrowiak@linux.ibm.com>
>> CC: Pierre Morel <pmorel@linux.ibm.com>
>> CC: Michael Roth <mdroth@linux.vnet.ibm.com>
>> CC: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
>> CC: Juan Quintela <quintela@redhat.com>
>> CC: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>> CC: Luigi Rizzo <rizzo@iet.unipi.it>
>> CC: Giuseppe Lettieri <g.lettieri@iet.unipi.it>
>> CC: Vincenzo Maffione <v.maffione@gmail.com>
>> CC: Jan Kiszka <jan.kiszka@siemens.com>
>> CC: Anthony Green <green@moxielogic.com>
>> CC: Stafford Horne <shorne@gmail.com>
>> CC: Guan Xuetao <gxt@mprc.pku.edu.cn>
>> CC: Max Filippov <jcmvbkbc@gmail.com>
>> CC: qemu-block@nongnu.org
>> CC: integration@gluster.org
>> CC: sheepdog@lists.wpkg.org
>> CC: qemu-arm@nongnu.org
>> CC: xen-devel@lists.xenproject.org
>> CC: qemu-ppc@nongnu.org
>> CC: qemu-s390x@nongnu.org
>> CC: qemu-riscv@nongnu.org
>>
>>   include/qapi/error.h | 38 ++++++++++++++++++++++++++++++++++++++
>>   1 file changed, 38 insertions(+)
>>
>> diff --git a/include/qapi/error.h b/include/qapi/error.h
>> index d6898d833b..47238d9065 100644
>> --- a/include/qapi/error.h
>> +++ b/include/qapi/error.h
>> @@ -345,6 +345,44 @@ void error_set_internal(Error **errp,
>>                           ErrorClass err_class, const char *fmt, ...)
>>       GCC_FMT_ATTR(6, 7);
>>   
>> +typedef struct ErrorPropagator {
>> +    Error *local_err;
>> +    Error **errp;
>> +} ErrorPropagator;
>> +
>> +static inline void error_propagator_cleanup(ErrorPropagator *prop)
>> +{
>> +    error_propagate(prop->errp, prop->local_err);
>> +}
>> +
>> +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(ErrorPropagator, error_propagator_cleanup);
>> +
>> +/*
>> + * ERRP_AUTO_PROPAGATE
>> + *
>> + * This macro is created to be the first line of a function with Error **errp
>> + * OUT parameter. It's needed only in cases where we want to use error_prepend,
>> + * error_append_hint or dereference *errp. It's still safe (but useless) in
>> + * other cases.
>> + *
>> + * If errp is NULL or points to error_fatal, it is rewritten to point to a
>> + * local Error object, which will be automatically propagated to the original
>> + * errp on function exit (see error_propagator_cleanup).
>> + *
>> + * After invocation of this macro it is always safe to dereference errp
>> + * (as it's not NULL anymore) and to add information (by error_prepend or
>> + * error_append_hint)
>> + * (as, if it was error_fatal, we swapped it with a local_error to be
>> + * propagated on cleanup).
>> + *
>> + * Note: we don't wrap the error_abort case, as we want resulting coredump
>> + * to point to the place where the error happened, not to error_propagate.
>> + */
>> +#define ERRP_AUTO_PROPAGATE()                                  \
>> +    g_auto(ErrorPropagator) _auto_errp_prop = {.errp = errp};  \
>> +    errp = ((errp == NULL || *errp == error_fatal)             \
>> +            ? &_auto_errp_prop.local_err : errp)
>> +
>>   /*
>>    * Special error destination to abort on error.
>>    * See error_setg() and error_propagate() for details.
> 
> Missing: update of the big comment starting with "Error reporting system
> loosely patterned after Glib's GError."
> 


-- 
Best regards,
Vladimir
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 024/126] error: auto propagated local_err
  2019-12-05  9:38     ` Vladimir Sementsov-Ogievskiy
@ 2019-12-05 12:36       ` Markus Armbruster
  2019-12-05 14:58         ` Vladimir Sementsov-Ogievskiy
  0 siblings, 1 reply; 34+ messages in thread
From: Markus Armbruster @ 2019-12-05 12:36 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy
  Cc: Ronnie Sahlberg, Jeff Cody, Jan Kiszka, Alberto Garcia,
	Hailiang Zhang, qemu-block, Aleksandar Rikalo, Halil Pasic,
	Hervé Poussineau, Anthony Perard, Samuel Thibault,
	Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Stefan Hajnoczi, John Snow,
	Richard Henderson, Kevin Wolf, Andrew Jeffery, Chris Wulff,
	Subbaraya Sundeep, Michael Walle, qemu-ppc, Bastian Koppelmann,
	Igor Mammedov, Fam Zheng, Peter Maydell, sheepdog,
	Matthew Rosato, David Hildenbrand, Palmer Dabbelt, Eric Farman,
	Max Filippov, Hannes Reinecke, Stefano Stabellini, Gonglei (Arei),
	Liu Yuan, Artyom Tarasenko, Thomas Huth, Amit Shah, Stefan Weil,
	Greg Kurz, Yuval Shaia, qemu-s390x, qemu-arm, Peter Chubb,
	Cédric Le Goater, Stafford Horne, qemu-riscv, Cornelia Huck,
	Aleksandar Markovic, Aurelien Jarno, Paul Burton,
	Sagar Karandikar, Paul Durrant, Jason Wang, Gerd Hoffmann,
	Edgar E. Iglesias, Guan Xuetao, Ari Sundholm, Juan Quintela,
	Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Laszlo Ersek, Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Denis Lunev, Michael S. Tsirkin, Mark Cave-Ayland, qemu-devel,
	Vincenzo Maffione, Marek Vasut, Markus Armbruster,
	Marc-André Lureau, Alistair Francis, Pavel Dovgalyuk,
	Giuseppe Lettieri, Luigi Rizzo, David Gibson, Tony Krowiak,
	Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:

> 04.12.2019 17:59, Markus Armbruster wrote:
>> Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:
>> 
>>> Here is introduced ERRP_AUTO_PROPAGATE macro, to be used at start of
>>> functions with errp OUT parameter.
>>>
>>> It has three goals:
>>>
>>> 1. Fix issue with error_fatal & error_prepend/error_append_hint: user
>>> can't see this additional information, because exit() happens in
>>> error_setg earlier than information is added. [Reported by Greg Kurz]
>>>
>>> 2. Fix issue with error_abort & error_propagate: when we wrap
>>> error_abort by local_err+error_propagate, resulting coredump will
>>> refer to error_propagate and not to the place where error happened.
>> 
>> I get what you mean, but I have plenty of context.
>> 
>>> (the macro itself doesn't fix the issue, but it allows to [3.] drop all
>>> local_err+error_propagate pattern, which will definitely fix the issue)
>> 
>> The parenthesis is not part of the goal.
>> 
>>> [Reported by Kevin Wolf]
>>>
>>> 3. Drop local_err+error_propagate pattern, which is used to workaround
>>> void functions with errp parameter, when caller wants to know resulting
>>> status. (Note: actually these functions could be merely updated to
>>> return int error code).
>>>
>>> To achieve these goals, we need to add invocation of the macro at start
>>> of functions, which needs error_prepend/error_append_hint (1.); add
>>> invocation of the macro at start of functions which do
>>> local_err+error_propagate scenario the check errors, drop local errors
>>> from them and just use *errp instead (2., 3.).
>> 
>> The paragraph talks about two cases: 1. and 2.+3. 
>
> Hmm, I don't think so.. 1. and 2. are issues. 3. is a refactoring.. We just
> fix achieve 2 and 3 by one action.
>
>> Makes me think we
>> want two paragraphs, each illustrated with an example.
>> 
>> What about you provide the examples, and then I try to polish the prose?
>
> 1: error_fatal problem
>
> Assume the following code flow:
>
> int f1(errp) {
>     ...
>     ret = f2(errp);
>     if (ret < 0) {
>        error_append_hint(errp, "very useful hint");
>        return ret;
>     }
>     ...
> }
>
> Now, if we call f1 with &error_fatal argument and f2 fails, the program
> will exit immediately inside f2, when setting the errp. User will not
> see the hint.
>
> So, in this case we should use local_err.

How does this example look after the transformation?

> 2: error_abort problem
>
> Now, consider functions without return value. We normally use local_err
> variable to catch failures:
>
> void f1(errp) {
>     Error *local_err = NULL;
>     ...
>     f2(&local_err);
>     if (local_err) {
>         error_propagate(errp, local_err);
>         return;
>     }
>     ...
> }
>
> Now, if we call f2 with &error_abort and f2 fails, the stack in resulting
> crash dump will point to error_propagate, not to the failure point in f2,
> which complicates debugging.
>
> So, we should never wrap error_abort by local_err.

Likewise.

>
> ===
>
> Our solution:
>
> - Fixes [1.], adding invocation of new macro into functions with error_appen_hint/error_prepend,
>    New macro will wrap error_fatal.
> - Fixes [2.], by switching from hand-written local_err to smart macro, which never
>    wraps error_abort.
> - Handles [3.], by switching to macro, which is less code
> - Additionally, macro doesn't wrap normal non-zero errp, to avoid extra propagations
>    (in fact, error_propagate is called, but returns immediately on first if (!local_err))


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 024/126] error: auto propagated local_err
  2019-12-05 12:36       ` Markus Armbruster
@ 2019-12-05 14:58         ` Vladimir Sementsov-Ogievskiy
  2019-12-05 16:36           ` Vladimir Sementsov-Ogievskiy
  2019-12-05 17:32           ` Eric Blake
  0 siblings, 2 replies; 34+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2019-12-05 14:58 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: Stefan Hajnoczi, Jeff Cody, Jan Kiszka, Alberto Garcia,
	Hailiang Zhang, qemu-block, Aleksandar Rikalo, Halil Pasic,
	Hervé Poussineau, Anthony Perard, Samuel Thibault,
	Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Ronnie Sahlberg, John Snow,
	Richard Henderson, Kevin Wolf, Andrew Jeffery, Chris Wulff,
	Subbaraya Sundeep, Michael Walle, qemu-ppc, Bastian Koppelmann,
	Igor Mammedov, Fam Zheng, Peter Maydell, sheepdog,
	Matthew Rosato, David Hildenbrand, Palmer Dabbelt, Eric Farman,
	Max Filippov, Hannes Reinecke, Stefano Stabellini, Gonglei (Arei),
	Liu Yuan, Artyom Tarasenko, Thomas Huth, Amit Shah, Stefan Weil,
	Greg Kurz, Yuval Shaia, qemu-s390x, qemu-arm, Peter Chubb,
	Cédric Le Goater, Stafford Horne, qemu-riscv, Cornelia Huck,
	Aleksandar Markovic, Aurelien Jarno, Paul Burton,
	Sagar Karandikar, Paul Durrant, Jason Wang, Gerd Hoffmann,
	Edgar E. Iglesias, Guan Xuetao, Ari Sundholm, Juan Quintela,
	Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Laszlo Ersek, Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Denis Lunev, Michael S. Tsirkin, Mark Cave-Ayland, qemu-devel,
	Vincenzo Maffione, Marek Vasut, Marc-André Lureau,
	Alistair Francis, Pavel Dovgalyuk, Giuseppe Lettieri,
	Luigi Rizzo, David Gibson, Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

05.12.2019 15:36, Markus Armbruster wrote:
> Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:
> 
>> 04.12.2019 17:59, Markus Armbruster wrote:
>>> Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:
>>>
>>>> Here is introduced ERRP_AUTO_PROPAGATE macro, to be used at start of
>>>> functions with errp OUT parameter.
>>>>
>>>> It has three goals:
>>>>
>>>> 1. Fix issue with error_fatal & error_prepend/error_append_hint: user
>>>> can't see this additional information, because exit() happens in
>>>> error_setg earlier than information is added. [Reported by Greg Kurz]
>>>>
>>>> 2. Fix issue with error_abort & error_propagate: when we wrap
>>>> error_abort by local_err+error_propagate, resulting coredump will
>>>> refer to error_propagate and not to the place where error happened.
>>>
>>> I get what you mean, but I have plenty of context.
>>>
>>>> (the macro itself doesn't fix the issue, but it allows to [3.] drop all
>>>> local_err+error_propagate pattern, which will definitely fix the issue)
>>>
>>> The parenthesis is not part of the goal.
>>>
>>>> [Reported by Kevin Wolf]
>>>>
>>>> 3. Drop local_err+error_propagate pattern, which is used to workaround
>>>> void functions with errp parameter, when caller wants to know resulting
>>>> status. (Note: actually these functions could be merely updated to
>>>> return int error code).
>>>>
>>>> To achieve these goals, we need to add invocation of the macro at start
>>>> of functions, which needs error_prepend/error_append_hint (1.); add
>>>> invocation of the macro at start of functions which do
>>>> local_err+error_propagate scenario the check errors, drop local errors
>>>> from them and just use *errp instead (2., 3.).
>>>
>>> The paragraph talks about two cases: 1. and 2.+3.
>>
>> Hmm, I don't think so.. 1. and 2. are issues. 3. is a refactoring.. We just
>> fix achieve 2 and 3 by one action.
>>
>>> Makes me think we
>>> want two paragraphs, each illustrated with an example.
>>>
>>> What about you provide the examples, and then I try to polish the prose?
>>
>> 1: error_fatal problem
>>
>> Assume the following code flow:
>>
>> int f1(errp) {
>>      ...
>>      ret = f2(errp);
>>      if (ret < 0) {
>>         error_append_hint(errp, "very useful hint");
>>         return ret;
>>      }
>>      ...
>> }
>>
>> Now, if we call f1 with &error_fatal argument and f2 fails, the program
>> will exit immediately inside f2, when setting the errp. User will not
>> see the hint.
>>
>> So, in this case we should use local_err.
> 
> How does this example look after the transformation?

Good point.

int f1(errp) {
    ERRP_AUTO_PROPAGATE();
    ...
    ret = f2(errp);
    if (ret < 0) {
       error_append_hint(errp, "very useful hint");
       return ret;
    }
    ...
}

- nothing changed, only add macro at start. But now errp is safe, if it was
error_fatal it is wrapped by local error, and will only call exit on automatic
propagation on f1 finish.

> 
>> 2: error_abort problem
>>
>> Now, consider functions without return value. We normally use local_err
>> variable to catch failures:
>>
>> void f1(errp) {
>>      Error *local_err = NULL;
>>      ...
>>      f2(&local_err);
>>      if (local_err) {
>>          error_propagate(errp, local_err);
>>          return;
>>      }
>>      ...
>> }
>>
>> Now, if we call f2 with &error_abort and f2 fails, the stack in resulting
>> crash dump will point to error_propagate, not to the failure point in f2,
>> which complicates debugging.
>>
>> So, we should never wrap error_abort by local_err.
> 
> Likewise.

And here:

void f1(errp) {
     ERRP_AUTO_PROPAGATE();
     ...
     f2(errp);
     if (*errp) {
         return;
     }
     ...

- if errp was NULL, it is wrapped, so dereferencing errp is safe. On return,
   local error is automatically propagated to original one.

> 
>>
>> ===
>>
>> Our solution:
>>
>> - Fixes [1.], adding invocation of new macro into functions with error_appen_hint/error_prepend,
>>     New macro will wrap error_fatal.
>> - Fixes [2.], by switching from hand-written local_err to smart macro, which never
>>     wraps error_abort.
>> - Handles [3.], by switching to macro, which is less code
>> - Additionally, macro doesn't wrap normal non-zero errp, to avoid extra propagations
>>     (in fact, error_propagate is called, but returns immediately on first if (!local_err))
> 


-- 
Best regards,
Vladimir
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 024/126] error: auto propagated local_err
  2019-12-05 14:58         ` Vladimir Sementsov-Ogievskiy
@ 2019-12-05 16:36           ` Vladimir Sementsov-Ogievskiy
  2019-12-06  8:13             ` Markus Armbruster
  2019-12-05 17:32           ` Eric Blake
  1 sibling, 1 reply; 34+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2019-12-05 16:36 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: Stefan Hajnoczi, Jeff Cody, Jan Kiszka, Alberto Garcia,
	Hailiang Zhang, qemu-block, Aleksandar Rikalo, Halil Pasic,
	Hervé Poussineau, Anthony Perard, Samuel Thibault,
	Laszlo Ersek, Jason Wang, Laurent Vivier, Eduardo Habkost,
	Xie Changlong, Peter Lieven, Dr. David Alan Gilbert,
	Beniamino Galvani, Eric Auger, Alex Williamson, Ronnie Sahlberg,
	John Snow, Richard Henderson, Kevin Wolf, Andrew Jeffery,
	Chris Wulff, Subbaraya Sundeep, Michael Walle, qemu-ppc,
	Bastian Koppelmann, Igor Mammedov, Fam Zheng, Peter Maydell,
	sheepdog, Matthew Rosato, David Hildenbrand, Palmer Dabbelt,
	Eric Farman, Max Filippov, Hannes Reinecke, Stefano Stabellini,
	Gonglei (Arei),
	Liu Yuan, Artyom Tarasenko, Thomas Huth, Amit Shah, Stefan Weil,
	Greg Kurz, Yuval Shaia, qemu-s390x, qemu-arm, Peter Chubb,
	Cédric Le Goater, Stafford Horne, qemu-riscv, Cornelia Huck,
	Aleksandar Markovic, Aurelien Jarno, Paul Burton,
	Sagar Karandikar, Paul Durrant, Anthony Green, Gerd Hoffmann,
	Edgar E. Iglesias, Guan Xuetao, Ari Sundholm, Juan Quintela,
	Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Philippe Mathieu-Daudé,
	Richard W.M. Jones, Andrew Baumann, Max Reitz, Denis Lunev,
	Michael S. Tsirkin, Mark Cave-Ayland, qemu-devel,
	Vincenzo Maffione, Marek Vasut, Marc-André Lureau,
	Alistair Francis, Pavel Dovgalyuk, Giuseppe Lettieri,
	Luigi Rizzo, David Gibson, Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

05.12.2019 17:58, Vladimir Sementsov-Ogievskiy wrote:
> 05.12.2019 15:36, Markus Armbruster wrote:
>> Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:
>>
>>> 04.12.2019 17:59, Markus Armbruster wrote:
>>>> Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:
>>>>
>>>>> Here is introduced ERRP_AUTO_PROPAGATE macro, to be used at start of
>>>>> functions with errp OUT parameter.
>>>>>
>>>>> It has three goals:
>>>>>
>>>>> 1. Fix issue with error_fatal & error_prepend/error_append_hint: user
>>>>> can't see this additional information, because exit() happens in
>>>>> error_setg earlier than information is added. [Reported by Greg Kurz]
>>>>>
>>>>> 2. Fix issue with error_abort & error_propagate: when we wrap
>>>>> error_abort by local_err+error_propagate, resulting coredump will
>>>>> refer to error_propagate and not to the place where error happened.
>>>>
>>>> I get what you mean, but I have plenty of context.
>>>>
>>>>> (the macro itself doesn't fix the issue, but it allows to [3.] drop all
>>>>> local_err+error_propagate pattern, which will definitely fix the issue)
>>>>
>>>> The parenthesis is not part of the goal.
>>>>
>>>>> [Reported by Kevin Wolf]
>>>>>
>>>>> 3. Drop local_err+error_propagate pattern, which is used to workaround
>>>>> void functions with errp parameter, when caller wants to know resulting
>>>>> status. (Note: actually these functions could be merely updated to
>>>>> return int error code).
>>>>>
>>>>> To achieve these goals, we need to add invocation of the macro at start
>>>>> of functions, which needs error_prepend/error_append_hint (1.); add
>>>>> invocation of the macro at start of functions which do
>>>>> local_err+error_propagate scenario the check errors, drop local errors
>>>>> from them and just use *errp instead (2., 3.).
>>>>
>>>> The paragraph talks about two cases: 1. and 2.+3.
>>>
>>> Hmm, I don't think so.. 1. and 2. are issues. 3. is a refactoring.. We just
>>> fix achieve 2 and 3 by one action.
>>>
>>>> Makes me think we
>>>> want two paragraphs, each illustrated with an example.
>>>>
>>>> What about you provide the examples, and then I try to polish the prose?
>>>
>>> 1: error_fatal problem
>>>
>>> Assume the following code flow:
>>>
>>> int f1(errp) {
>>>       ...
>>>       ret = f2(errp);
>>>       if (ret < 0) {
>>>          error_append_hint(errp, "very useful hint");
>>>          return ret;
>>>       }
>>>       ...
>>> }
>>>
>>> Now, if we call f1 with &error_fatal argument and f2 fails, the program
>>> will exit immediately inside f2, when setting the errp. User will not
>>> see the hint.
>>>
>>> So, in this case we should use local_err.
>>
>> How does this example look after the transformation?
> 
> Good point.
> 
> int f1(errp) {
>      ERRP_AUTO_PROPAGATE();
>      ...
>      ret = f2(errp);
>      if (ret < 0) {
>         error_append_hint(errp, "very useful hint");
>         return ret;
>      }
>      ...
> }
> 
> - nothing changed, only add macro at start. But now errp is safe, if it was
> error_fatal it is wrapped by local error, and will only call exit on automatic
> propagation on f1 finish.
> 
>>
>>> 2: error_abort problem
>>>
>>> Now, consider functions without return value. We normally use local_err
>>> variable to catch failures:
>>>
>>> void f1(errp) {
>>>       Error *local_err = NULL;
>>>       ...
>>>       f2(&local_err);
>>>       if (local_err) {
>>>           error_propagate(errp, local_err);
>>>           return;
>>>       }
>>>       ...
>>> }
>>>
>>> Now, if we call f2 with &error_abort and f2 fails, the stack in resulting
>>> crash dump will point to error_propagate, not to the failure point in f2,
>>> which complicates debugging.
>>>
>>> So, we should never wrap error_abort by local_err.
>>
>> Likewise.
> 
> And here:
> 
> void f1(errp) {
>       ERRP_AUTO_PROPAGATE();
>       ...
>       f2(errp);
>       if (*errp) {
>           return;
>       }
>       ...
> 
> - if errp was NULL, it is wrapped, so dereferencing errp is safe. On return,
>     local error is automatically propagated to original one.

and if it was error_abort, it is not wrapped, so will crash where failed.

> 
>>
>>>
>>> ===
>>>
>>> Our solution:
>>>
>>> - Fixes [1.], adding invocation of new macro into functions with error_appen_hint/error_prepend,
>>>      New macro will wrap error_fatal.
>>> - Fixes [2.], by switching from hand-written local_err to smart macro, which never
>>>      wraps error_abort.
>>> - Handles [3.], by switching to macro, which is less code
>>> - Additionally, macro doesn't wrap normal non-zero errp, to avoid extra propagations
>>>      (in fact, error_propagate is called, but returns immediately on first if (!local_err))
>>
> 
> 


-- 
Best regards,
Vladimir
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 024/126] error: auto propagated local_err
  2019-12-05 14:58         ` Vladimir Sementsov-Ogievskiy
  2019-12-05 16:36           ` Vladimir Sementsov-Ogievskiy
@ 2019-12-05 17:32           ` Eric Blake
  1 sibling, 0 replies; 34+ messages in thread
From: Eric Blake @ 2019-12-05 17:32 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy, Markus Armbruster
  Cc: Stefan Hajnoczi, Jan Kiszka, Hailiang Zhang, qemu-block,
	Aleksandar Rikalo, Halil Pasic, Hervé Poussineau,
	Anthony Perard, Samuel Thibault, Laszlo Ersek, Jason Wang,
	Laurent Vivier, Eduardo Habkost, Xie Changlong, Peter Lieven,
	Dr. David Alan Gilbert, Beniamino Galvani, Eric Auger,
	Alex Williamson, Ronnie Sahlberg, Richard Henderson, Kevin Wolf,
	Andrew Jeffery, Chris Wulff, Subbaraya Sundeep, Michael Walle,
	qemu-ppc, Bastian Koppelmann, Igor Mammedov, Fam Zheng,
	Peter Maydell, sheepdog, Matthew Rosato, David Hildenbrand,
	Palmer Dabbelt, Max Filippov, Hannes Reinecke,
	Stefano Stabellini, Gonglei (Arei),
	Liu Yuan, Artyom Tarasenko, Thomas Huth, Amit Shah, Stefan Weil,
	Greg Kurz, Yuval Shaia, qemu-s390x, qemu-arm, Peter Chubb,
	Cédric Le Goater, Stafford Horne, qemu-riscv, Cornelia Huck,
	Aleksandar Markovic, Aurelien Jarno, Paul Burton,
	Sagar Karandikar, Paul Durrant, Anthony Green, Gerd Hoffmann,
	Edgar E. Iglesias, Guan Xuetao, Juan Quintela, Michael Roth,
	Christian Borntraeger, Joel Stanley, Antony Pavlov, xen-devel,
	integration, Philippe Mathieu-Daudé,
	Andrew Baumann, Max Reitz, Denis Lunev, Michael S. Tsirkin,
	Mark Cave-Ayland, qemu-devel, Vincenzo Maffione, Marek Vasut,
	Marc-André Lureau, Alistair Francis, Pavel Dovgalyuk,
	Giuseppe Lettieri, Luigi Rizzo, David Gibson, Tony Krowiak,
	Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

On 12/5/19 8:58 AM, Vladimir Sementsov-Ogievskiy wrote:

>>>> What about you provide the examples, and then I try to polish the prose?
>>>
>>> 1: error_fatal problem
>>>
>>> Assume the following code flow:
>>>
>>> int f1(errp) {
>>>       ...
>>>       ret = f2(errp);
>>>       if (ret < 0) {
>>>          error_append_hint(errp, "very useful hint");
>>>          return ret;
>>>       }
>>>       ...
>>> }
>>>
>>> Now, if we call f1 with &error_fatal argument and f2 fails, the program
>>> will exit immediately inside f2, when setting the errp. User will not
>>> see the hint.
>>>
>>> So, in this case we should use local_err.
>>
>> How does this example look after the transformation?

Without ERRP_AUTO_PROPAGATE(), the transformation is a lot of boilerplate:

int f1(errp) {
     Error *err = NULL;
     ret = f2(&err);
     if (ret < 0) {
         error_append_hint(&err, "very useful hint");
         error_propagate(errp, err);
         return ret;
     }
}

what's worse, that boilerplate to solve problem 1 turns out to be...

> 
> Good point.
> 
> int f1(errp) {
>      ERRP_AUTO_PROPAGATE();
>      ...
>      ret = f2(errp);
>      if (ret < 0) {
>         error_append_hint(errp, "very useful hint");
>         return ret;
>      }
>      ...
> }
> 
> - nothing changed, only add macro at start. But now errp is safe, if it was
> error_fatal it is wrapped by local error, and will only call exit on automatic
> propagation on f1 finish.
> 
>>
>>> 2: error_abort problem
>>>
>>> Now, consider functions without return value. We normally use local_err
>>> variable to catch failures:
>>>
>>> void f1(errp) {
>>>       Error *local_err = NULL;
>>>       ...
>>>       f2(&local_err);
>>>       if (local_err) {
>>>           error_propagate(errp, local_err);
>>>           return;
>>>       }
>>>       ...
>>> }

the very same code as the cause of problem 2.

>>>
>>> Now, if we call f2 with &error_abort and f2 fails, the stack in resulting
>>> crash dump will point to error_propagate, not to the failure point in f2,
>>> which complicates debugging.
>>>
>>> So, we should never wrap error_abort by local_err.
>>
>> Likewise.
> 
> And here:
> 
> void f1(errp) {
>       ERRP_AUTO_PROPAGATE();
>       ...
>       f2(errp);
>       if (*errp) {
>           return;
>       }
>       ...
> 
> - if errp was NULL, it is wrapped, so dereferencing errp is safe. On return,
>     local error is automatically propagated to original one.

So, the use of ERRP_AUTO_PROPAGATE() solves BOTH problems 1 and 2 - we 
avoid the boilerplate that trades one problem for another, by 
consolidating ALL of the boilerplate into a single-line macro, such that 
error_propagate() no longer needs to be called anywhere except inside 
the ERRP_AUTO_PROPAGATE macro.

> 
>>
>>>
>>> ===
>>>
>>> Our solution:
>>>
>>> - Fixes [1.], adding invocation of new macro into functions with error_appen_hint/error_prepend,
>>>      New macro will wrap error_fatal.
>>> - Fixes [2.], by switching from hand-written local_err to smart macro, which never
>>>      wraps error_abort.
>>> - Handles [3.], by switching to macro, which is less code
>>> - Additionally, macro doesn't wrap normal non-zero errp, to avoid extra propagations
>>>      (in fact, error_propagate is called, but returns immediately on first if (!local_err))
>>
> 
> 

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


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

* Re: [Xen-devel] [RFC v5 024/126] error: auto propagated local_err
  2019-12-05 16:36           ` Vladimir Sementsov-Ogievskiy
@ 2019-12-06  8:13             ` Markus Armbruster
  0 siblings, 0 replies; 34+ messages in thread
From: Markus Armbruster @ 2019-12-06  8:13 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy
  Cc: Stefan Hajnoczi, Jeff Cody, Jan Kiszka, Alberto Garcia,
	Hailiang Zhang, qemu-block, Aleksandar Rikalo, Halil Pasic,
	Hervé Poussineau, Anthony Perard, Samuel Thibault,
	Philippe Mathieu-Daudé,
	Anthony Green, Laurent Vivier, Eduardo Habkost, Xie Changlong,
	Peter Lieven, Dr. David Alan Gilbert, Beniamino Galvani,
	Eric Auger, Alex Williamson, Ronnie Sahlberg, John Snow,
	Richard Henderson, Kevin Wolf, Andrew Jeffery, Chris Wulff,
	Subbaraya Sundeep, Michael Walle, qemu-ppc, Bastian Koppelmann,
	Igor Mammedov, Fam Zheng, Peter Maydell, sheepdog,
	Matthew Rosato, David Hildenbrand, Palmer Dabbelt, Eric Farman,
	Max Filippov, Hannes Reinecke, Stefano Stabellini, Gonglei (Arei),
	Liu Yuan, Artyom Tarasenko, Thomas Huth, Amit Shah, Stefan Weil,
	Greg Kurz, Yuval Shaia, qemu-s390x, qemu-arm, Peter Chubb,
	Cédric Le Goater, Stafford Horne, qemu-riscv, Cornelia Huck,
	Aleksandar Markovic, Aurelien Jarno, Paul Burton,
	Sagar Karandikar, Paul Durrant, Jason Wang, Gerd Hoffmann,
	Edgar E. Iglesias, Guan Xuetao, Ari Sundholm, Juan Quintela,
	Michael Roth, Christian Borntraeger, Joel Stanley,
	Jason Dillaman, Antony Pavlov, xen-devel, integration,
	Laszlo Ersek, Richard W.M. Jones, Andrew Baumann, Max Reitz,
	Denis Lunev, Michael S. Tsirkin, Mark Cave-Ayland, qemu-devel,
	Vincenzo Maffione, Marek Vasut, Marc-André Lureau,
	Alistair Francis, Pavel Dovgalyuk, Giuseppe Lettieri,
	Luigi Rizzo, David Gibson, Tony Krowiak, Daniel P. Berrangé,
	Xiao Guangrong, Pierre Morel, Wen Congyang,
	Jean-Christophe Dubois, Paolo Bonzini, Stefan Berger

Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:

> 05.12.2019 17:58, Vladimir Sementsov-Ogievskiy wrote:
>> 05.12.2019 15:36, Markus Armbruster wrote:
>>> Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:
>>>
>>>> 04.12.2019 17:59, Markus Armbruster wrote:
>>>>> Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:
>>>>>
>>>>>> Here is introduced ERRP_AUTO_PROPAGATE macro, to be used at start of
>>>>>> functions with errp OUT parameter.
>>>>>>
>>>>>> It has three goals:
>>>>>>
>>>>>> 1. Fix issue with error_fatal & error_prepend/error_append_hint: user
>>>>>> can't see this additional information, because exit() happens in
>>>>>> error_setg earlier than information is added. [Reported by Greg Kurz]
>>>>>>
>>>>>> 2. Fix issue with error_abort & error_propagate: when we wrap
>>>>>> error_abort by local_err+error_propagate, resulting coredump will
>>>>>> refer to error_propagate and not to the place where error happened.
>>>>>
>>>>> I get what you mean, but I have plenty of context.
>>>>>
>>>>>> (the macro itself doesn't fix the issue, but it allows to [3.] drop all
>>>>>> local_err+error_propagate pattern, which will definitely fix the issue)
>>>>>
>>>>> The parenthesis is not part of the goal.
>>>>>
>>>>>> [Reported by Kevin Wolf]
>>>>>>
>>>>>> 3. Drop local_err+error_propagate pattern, which is used to workaround
>>>>>> void functions with errp parameter, when caller wants to know resulting
>>>>>> status. (Note: actually these functions could be merely updated to
>>>>>> return int error code).
>>>>>>
>>>>>> To achieve these goals, we need to add invocation of the macro at start
>>>>>> of functions, which needs error_prepend/error_append_hint (1.); add
>>>>>> invocation of the macro at start of functions which do
>>>>>> local_err+error_propagate scenario the check errors, drop local errors
>>>>>> from them and just use *errp instead (2., 3.).
>>>>>
>>>>> The paragraph talks about two cases: 1. and 2.+3.
>>>>
>>>> Hmm, I don't think so.. 1. and 2. are issues. 3. is a refactoring.. We just
>>>> fix achieve 2 and 3 by one action.
>>>>
>>>>> Makes me think we
>>>>> want two paragraphs, each illustrated with an example.
>>>>>
>>>>> What about you provide the examples, and then I try to polish the prose?
>>>>
>>>> 1: error_fatal problem
>>>>
>>>> Assume the following code flow:
>>>>
>>>> int f1(errp) {
>>>>       ...
>>>>       ret = f2(errp);
>>>>       if (ret < 0) {
>>>>          error_append_hint(errp, "very useful hint");
>>>>          return ret;
>>>>       }
>>>>       ...
>>>> }
>>>>
>>>> Now, if we call f1 with &error_fatal argument and f2 fails, the program
>>>> will exit immediately inside f2, when setting the errp. User will not
>>>> see the hint.
>>>>
>>>> So, in this case we should use local_err.
>>>
>>> How does this example look after the transformation?
>> 
>> Good point.
>> 
>> int f1(errp) {
>>      ERRP_AUTO_PROPAGATE();
>>      ...
>>      ret = f2(errp);
>>      if (ret < 0) {
>>         error_append_hint(errp, "very useful hint");
>>         return ret;
>>      }
>>      ...
>> }
>> 
>> - nothing changed, only add macro at start. But now errp is safe, if it was
>> error_fatal it is wrapped by local error, and will only call exit on automatic
>> propagation on f1 finish.
>> 
>>>
>>>> 2: error_abort problem
>>>>
>>>> Now, consider functions without return value. We normally use local_err
>>>> variable to catch failures:
>>>>
>>>> void f1(errp) {
>>>>       Error *local_err = NULL;
>>>>       ...
>>>>       f2(&local_err);
>>>>       if (local_err) {
>>>>           error_propagate(errp, local_err);
>>>>           return;
>>>>       }
>>>>       ...
>>>> }
>>>>
>>>> Now, if we call f2 with &error_abort and f2 fails, the stack in resulting
>>>> crash dump will point to error_propagate, not to the failure point in f2,
>>>> which complicates debugging.
>>>>
>>>> So, we should never wrap error_abort by local_err.
>>>
>>> Likewise.
>> 
>> And here:
>> 
>> void f1(errp) {
>>       ERRP_AUTO_PROPAGATE();
>>       ...
>>       f2(errp);
>>       if (*errp) {
>>           return;
>>       }
>>       ...
>> 
>> - if errp was NULL, it is wrapped, so dereferencing errp is safe. On return,
>>     local error is automatically propagated to original one.
>
> and if it was error_abort, it is not wrapped, so will crash where failed.

We still need to avoid passing on unwrapped @errp when we want to ignore
some errors, as in fit_load_fdt(), but that should be quite rare.
Doesn't invalidate your approach.

[...]


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2019-12-06 10:20 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-11 16:03 [Xen-devel] [RFC v5 000/126] error: auto propagated local_err Vladimir Sementsov-Ogievskiy
2019-10-11 16:04 ` [Xen-devel] [RFC v5 024/126] " Vladimir Sementsov-Ogievskiy
2019-11-08 21:10   ` Marc-André Lureau
2019-11-08 22:45     ` Eric Blake
2019-12-04 14:59   ` Markus Armbruster
2019-12-05  9:38     ` Vladimir Sementsov-Ogievskiy
2019-12-05 12:36       ` Markus Armbruster
2019-12-05 14:58         ` Vladimir Sementsov-Ogievskiy
2019-12-05 16:36           ` Vladimir Sementsov-Ogievskiy
2019-12-06  8:13             ` Markus Armbruster
2019-12-05 17:32           ` Eric Blake
2019-10-11 16:04 ` [Xen-devel] [RFC v5 025/126] scripts: add coccinelle script to use auto propagated errp Vladimir Sementsov-Ogievskiy
2019-10-11 17:12   ` Eric Blake
2019-10-11 18:15     ` Eric Blake
2019-10-14  8:19     ` Vladimir Sementsov-Ogievskiy
2019-10-14 14:00       ` Eric Blake
2019-10-11 16:04 ` [Xen-devel] [RFC v5 026/126] python: add commit-per-subsystem.py Vladimir Sementsov-Ogievskiy
2019-11-08 21:18   ` Marc-André Lureau
2019-11-11 16:37   ` Aleksandar Markovic
2019-11-12 13:08   ` Cornelia Huck
2019-10-11 16:04 ` [Xen-devel] [RFC v5 031/126] xen: introduce ERRP_AUTO_PROPAGATE Vladimir Sementsov-Ogievskiy
2019-11-20 15:38   ` Anthony PERARD
2019-10-11 17:02 ` [Xen-devel] [RFC v5 000/126] error: auto propagated local_err Eric Blake
2019-10-14  8:37   ` Vladimir Sementsov-Ogievskiy
2019-11-08 15:30 ` Vladimir Sementsov-Ogievskiy
2019-11-08 18:57   ` Marc-André Lureau
2019-11-12 13:46     ` Cornelia Huck
2019-11-12 15:33       ` Vladimir Sementsov-Ogievskiy
2019-11-20  9:50   ` Vladimir Sementsov-Ogievskiy
2019-11-20 12:59     ` Eric Blake
2019-11-20 13:13       ` Kevin Wolf
2019-11-28  8:54 ` Markus Armbruster
2019-11-28  9:20   ` Vladimir Sementsov-Ogievskiy
2019-11-28 12:21     ` Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).