Skip to content

Instantly share code, notes, and snippets.

@ehabkost
ehabkost / alltypes.tsv
Last active December 9, 2020 06:02
QOM type declaration parsing and conversion
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 14 columns, instead of 1 in line 8.
filename variable_name name parent abstract interfaces instance_size instance_init instance_post_init instance_finalize class_size class_init class_base_init class_data
accel/accel.c accel_type TYPE_ACCEL TYPE_OBJECT sizeof(AccelState) sizeof(AccelClass)
accel/kvm/kvm-all.c kvm_accel_type TYPE_KVM_ACCEL TYPE_ACCEL sizeof(KVMState) kvm_accel_instance_init kvm_accel_class_init
accel/qtest.c qtest_accel_type TYPE_QTEST_ACCEL TYPE_ACCEL qtest_accel_class_init
accel/tcg/tcg-all.c tcg_accel_type TYPE_TCG_ACCEL TYPE_ACCEL sizeof(TCGState) tcg_accel_instance_init tcg_accel_class_init
accel/xen/xen-all.c xen_accel_type TYPE_XEN_ACCEL TYPE_ACCEL xen_accel_class_init
authz/base.c authz_info TYPE_QAUTHZ TYPE_OBJECT true sizeof(QAuthZ) sizeof(QAuthZClass)
authz/list.c qauthz_list_info TYPE_QAUTHZ_LIST TYPE_QAUTHZ (InterfaceInfo[]) { { TYPE_USER_CREATABLE }, { } } sizeof(QAuthZList) qauthz_list_finalize sizeof(QAuthZListClass) qauthz_list_class_init
au

virtio is a kernel virtual bus. From drivers/virtio/virtio.c:

static struct bus_type virtio_bus = {
	.name  = "virtio",
	.match = virtio_dev_match,
	.dev_groups = virtio_dev_groups,
	.uevent = virtio_uevent,
	.probe = virtio_dev_probe,
	.remove = virtio_dev_remove,