All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Krempa <pkrempa@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: lvivier@redhat.com, thuth@redhat.com, ehabkost@redhat.com,
	qemu-block@nongnu.org, libvir-list@redhat.com,
	jasowang@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com,
	kraxel@redhat.com, pbonzini@redhat.com, dgilbert@redhat.com
Subject: Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add
Date: Wed, 10 Mar 2021 15:22:58 +0100	[thread overview]
Message-ID: <YEjWQnWKbr5teciB@angien.pipo.sk> (raw)
In-Reply-To: <20210308165440.386489-1-kwolf@redhat.com>

On Mon, Mar 08, 2021 at 17:54:10 +0100, Kevin Wolf wrote:
> This series adds a QAPI type for the properties of all user creatable
> QOM types and finally makes the --object command line option (in all
> binaries) and the object-add monitor commands (in QMP and HMP) use the
> new ObjectOptions union.
> 
> This change improves things in more than just one way:
> 
> 1. Documentation for QOM object types has always been lacking. Adding
>    the schema, we get documentation for every property.
> 
> 2. It prevents bugs by performing parts of the input validation (e.g.
>    checking presence of mandatory properties) already in QAPI instead of
>    relying on separate manual implementations in each class.
> 
> 3. It provides QAPI introspection for user creatable objects.
> 
> 4. Non-scalar properties are now supported everywhere because the
>    command line parsers (including HMP) use the keyval parser now.
> 
> 
> If you are in the CC list and didn't expect this series, it's probably
> because you're the maintainer of one of the objects for which I'm adding
> a QAPI schema description. Please just have a look at the specific patch
> for your object and check whether the schema and its documentation make
> sense to you. You can ignore all other patches.
> 
> 
> In a next step after this series, we can add make use of the QAPI
> structs in the implementation of the object and separate their
> configuration from the runtime state. Specifically, the plan is to
> add a .configure() callback to ObjectClass that allows configuring the
> object in one place at creation time and keeping QOM property setters
> only for properties that can actually be changed at runtime. Paolo made
> an example of what the state could look like after this:
> 
>     https://wiki.qemu.org/Features/QOM-QAPI_integration
> 
> Finally, the intention is to extend the QAPI schema to have separate
> 'object' entities and generate some of the code that was written
> manually in the intermediate state before.
> 
> 
> This series is available as a git tag at:
> 
>     https://repo.or.cz/qemu/kevin.git qapi-object-v3
> 
> 
> v3:
> - Removed now useless QAuthZListRuleListHack
> - Made some more ObjectOptions branches conditional
> - Improved documentation for some properties
> - Fixed 'qemu-img compare' exit code for option parsing failure
> 
> v2:
> - Convert not only object-add, but all external interfaces so that the
>   schema will always be enforced and mismatch between implementation and
>   schema can't go unnoticed.
> - Rebased, covering properties and object types added since v1 (yes,
>   things do become outdated rather quickly when you touch all user
>   creatable objects)
> - Changed the "Since:" version number in the schema documentation to
>   refer to the version when the object was introduced rather than 6.0
>   where the schema will (hopefully) be added
> - Probably some other minor changes

I've stumbled upon a regression with this patchset applied:

error: internal error: process exited while connecting to monitor: qemu-system-x86_64: -object memory-backend-ram,id=pc.ram,size=1048576000,host-nodes=0,policy=bind: Invalid parameter type for 'host-nodes', expected: array

Full commandline is:

LC_ALL=C \
PATH=/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin \
HOME=/var/lib/libvirt/qemu/domain-15-cd \
USER=root \
LOGNAME=root \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain-15-cd/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain-15-cd/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain-15-cd/.config \
/home/pipo/git/qemu.git/build/x86_64-softmmu/qemu-system-x86_64 \
-name guest=cd,debug-threads=on \
-S \
-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-15-cd/master-key.aes \
-machine pc-i440fx-2.9,accel=kvm,usb=off,vmport=off,dump-guest-core=off,memory-backend=pc.ram \
-cpu EPYC-Rome,x2apic=on,tsc-deadline=on,hypervisor=on,tsc-adjust=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,cmp-legacy=on,amd-ssbd=on,virt-ssbd=on,rdctl-no=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on \
-m 1000 \
-object memory-backend-ram,id=pc.ram,size=1048576000,host-nodes=0,policy=bind \
-overcommit mem-lock=off \
-smp 2,maxcpus=8,sockets=8,cores=1,threads=1 \
-uuid 8e70100a-64b4-4186-aff9-e055c3075cb0 \
-no-user-config \
-nodefaults \
-device sga \
-chardev socket,id=charmonitor,fd=42,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc,driftfix=slew \
-global kvm-pit.lost_tick_policy=delay \
-no-hpet \
-no-shutdown \
-global PIIX4_PM.disable_s3=1 \
-global PIIX4_PM.disable_s4=1 \
-boot menu=on,strict=on \
-device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x6.0x7 \
-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x6 \
-device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x6.0x1 \
-device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x6.0x2 \
-device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x9 \
-device ahci,id=sata0,bus=pci.0,addr=0xb \
-device ahci,id=sata1,bus=pci.0,addr=0x3 \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/systemrescuecd-amd64-6.1.2.iso","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw","file":"libvirt-1-storage"}' \
-device ide-cd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
-chardev pty,id=charserial0 \
-device isa-serial,chardev=charserial0,id=serial0 \
-chardev socket,id=charchannel0,fd=44,server=on,wait=off \
-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 \
-chardev spicevmc,id=charchannel1,name=vdagent \
-device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 \
-device usb-tablet,id=input0,bus=usb.0,port=1 \
-audiodev id=audio1,driver=spice \
-spice port=5901,addr=127.0.0.1,disable-ticketing=on,image-compression=off,seamless-migration=on \
-device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pci.0,addr=0x2 \
-device intel-hda,id=sound0,bus=pci.0,addr=0x4 \
-device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0,audiodev=audio1 \
-chardev spicevmc,id=charredir0,name=usbredir \
-device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2 \
-chardev spicevmc,id=charredir1,name=usbredir \
-device usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=3 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0xa \
-object rng-random,id=objrng0,filename=/dev/random \
-device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x7 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on





  parent reply	other threads:[~2021-03-10 14:24 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-08 16:54 [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 01/30] qapi/qom: Drop deprecated 'props' from object-add Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 02/30] qapi/qom: Add ObjectOptions for iothread Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 03/30] qapi/qom: Add ObjectOptions for authz-* Kevin Wolf
2021-03-09  9:17   ` Daniel P. Berrangé
2021-03-08 16:54 ` [PATCH v3 04/30] qapi/qom: Add ObjectOptions for cryptodev-* Kevin Wolf
2021-03-08 19:23   ` Eric Blake
2021-03-08 16:54 ` [PATCH v3 05/30] qapi/qom: Add ObjectOptions for dbus-vmstate Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 06/30] qapi/qom: Add ObjectOptions for memory-backend-* Kevin Wolf
2021-03-08 19:25   ` Eric Blake
2021-03-08 16:54 ` [PATCH v3 07/30] qapi/qom: Add ObjectOptions for rng-*, deprecate 'opened' Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 08/30] qapi/qom: Add ObjectOptions for throttle-group Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 09/30] qapi/qom: Add ObjectOptions for secret*, deprecate 'loaded' Kevin Wolf
2021-03-09  9:21   ` Daniel P. Berrangé
2021-03-08 16:54 ` [PATCH v3 10/30] qapi/qom: Add ObjectOptions for tls-*, " Kevin Wolf
2021-03-09  9:23   ` Daniel P. Berrangé
2021-03-08 16:54 ` [PATCH v3 11/30] qapi/qom: Add ObjectOptions for can-* Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 12/30] qapi/qom: Add ObjectOptions for colo-compare Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 13/30] qapi/qom: Add ObjectOptions for filter-* Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 14/30] qapi/qom: Add ObjectOptions for pr-manager-helper Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 15/30] qapi/qom: Add ObjectOptions for confidential-guest-support Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 16/30] qapi/qom: Add ObjectOptions for input-* Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 17/30] qapi/qom: Add ObjectOptions for x-remote-object Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 18/30] qapi/qom: QAPIfy object-add Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 19/30] qom: Make "object" QemuOptsList optional Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 20/30] qemu-storage-daemon: Implement --object with qmp_object_add() Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 21/30] qom: Remove user_creatable_add_dict() Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 22/30] qom: Factor out user_creatable_process_cmdline() Kevin Wolf
2021-03-13  8:41   ` Markus Armbruster
2021-03-13  9:28     ` Paolo Bonzini
2021-03-15 11:48     ` Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 23/30] qemu-io: Use user_creatable_process_cmdline() for --object Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 24/30] qemu-nbd: " Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 25/30] qom: Add user_creatable_add_from_str() Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 26/30] qemu-img: Use user_creatable_process_cmdline() for --object Kevin Wolf
2021-03-08 19:32   ` Eric Blake
2021-03-13  7:40   ` Markus Armbruster
2021-03-13  7:47     ` Paolo Bonzini
2021-03-13 12:30       ` Markus Armbruster
2021-03-15 11:38         ` Kevin Wolf
2021-03-15 14:15           ` Markus Armbruster
2021-03-15 14:43             ` Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 27/30] hmp: QAPIfy object_add Kevin Wolf
2021-03-13 13:28   ` Markus Armbruster
2021-03-13 14:11     ` Paolo Bonzini
2021-03-15  9:39       ` Markus Armbruster
2021-03-15 11:09         ` Kevin Wolf
2021-03-15 11:38           ` Dr. David Alan Gilbert
2021-03-15 11:58             ` Paolo Bonzini
2021-03-08 16:54 ` [PATCH v3 28/30] qom: Add user_creatable_parse_str() Kevin Wolf
2021-03-08 16:54 ` [PATCH v3 29/30] vl: QAPIfy -object Kevin Wolf
2021-03-08 19:34   ` Eric Blake
2021-03-08 16:54 ` [PATCH v3 30/30] qom: Drop QemuOpts based interfaces Kevin Wolf
2021-03-10 14:22 ` Peter Krempa [this message]
2021-03-10 14:31   ` [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add Paolo Bonzini
2021-03-10 14:48     ` Peter Krempa
2021-03-10 17:30     ` Kevin Wolf
2021-03-11  7:47       ` Peter Krempa
2021-03-11  8:16         ` Paolo Bonzini
2021-03-11  8:37         ` Kevin Wolf
2021-03-11 11:24           ` Peter Krempa
2021-03-11 11:41             ` Kevin Wolf
2021-03-11 12:29               ` Peter Krempa
2021-03-11 14:01               ` Markus Armbruster
2021-03-11  8:14       ` Paolo Bonzini
2021-03-11  8:45         ` Kevin Wolf
2021-03-11  8:49           ` Paolo Bonzini
2021-03-11 10:38       ` Markus Armbruster
2021-03-11 11:00         ` Paolo Bonzini
2021-03-11 14:08           ` Markus Armbruster
2021-03-11 17:50             ` Paolo Bonzini
2021-03-12  8:14               ` Markus Armbruster
2021-03-12  8:46                 ` Paolo Bonzini
2021-03-12  8:52                   ` Peter Krempa
2021-03-13 13:40                 ` Markus Armbruster
2021-03-15 11:36                   ` Kevin Wolf
2021-03-15 15:26                     ` Markus Armbruster
2021-03-15 15:52                       ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YEjWQnWKbr5teciB@angien.pipo.sk \
    --to=pkrempa@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.