311 static inline void
312 compat_props_add(GPtrArray *arr,
313 GlobalProperty props[], size_t nelem)
314 {
315 int i;
316 for (i = 0; i < nelem; i++) {
317 g_ptr_array_add(arr, (void *)&props[i]);
318 }
319 }
So in debug on the init of the wily type we should see
{ "virtio-balloon-pci", "any_layout", "off" }
be added.
$ apt install qemu-system-x86-dbgsym
$ apt source qemu
$ cd qemu-4.2
$ gdb /usr/bin/qemu-system-x86_64
(gdb) b compat_props_add
Breakpoint 1 at 0x4aadd1: compat_props_add. (83 locations)
(gdb) b pc_i440fx_wily_machine_options
Breakpoint 2 at 0x4acdcb: file ./hw/i386/pc_piix.c, line 1198.
(gdb) run -m 128 -M pc-i440fx-wily,accel=kvm --nodefaults --nographic --monitor stdio -device virtio-balloon-pci,id=balloon0
Unfortunately on a normal build these functions like pc_i440fx_wily_machine_options and compat_props_add are very much inlined and arguments optimized out - so we might need a debug build to be able to track where this is lost more easily.
The type does: props_add( m->compat_ props, hw_compat_2_3, hw_compat_2_3_len);
1197 compat_
Defined as: balloon- pci", "any_layout", "off" }, serial- pci", "any_layout", "off" }, lnksta- dllla", "off" }, tion", "off" }, footer" , "off" }, global- state", "off" }, hw_compat_ 2_3);
198 GlobalProperty hw_compat_2_3[] = {
199 { "virtio-blk-pci", "any_layout", "off" },
200 { "virtio-
201 { "virtio-
202 { "virtio-9p-pci", "any_layout", "off" },
203 { "virtio-rng-pci", "any_layout", "off" },
204 { TYPE_PCI_DEVICE, "x-pcie-
205 { "migration", "send-configura
206 { "migration", "send-section-
207 { "migration", "store-
208 };
209 const size_t hw_compat_2_3_len = G_N_ELEMENTS(
311 static inline void props_add( GPtrArray *arr, add(arr, (void *)&props[i]);
312 compat_
313 GlobalProperty props[], size_t nelem)
314 {
315 int i;
316 for (i = 0; i < nelem; i++) {
317 g_ptr_array_
318 }
319 }
So in debug on the init of the wily type we should see balloon- pci", "any_layout", "off" }
{ "virtio-
be added.
$ apt install qemu-system- x86-dbgsym qemu-system- x86_64 wily_machine_ options pc_piix. c, line 1198. wily,accel= kvm --nodefaults --nographic --monitor stdio -device virtio- balloon- pci,id= balloon0
$ apt source qemu
$ cd qemu-4.2
$ gdb /usr/bin/
(gdb) b compat_props_add
Breakpoint 1 at 0x4aadd1: compat_props_add. (83 locations)
(gdb) b pc_i440fx_
Breakpoint 2 at 0x4acdcb: file ./hw/i386/
(gdb) run -m 128 -M pc-i440fx-
Unfortunately on a normal build these functions like pc_i440fx_ wily_machine_ options and compat_props_add are very much inlined and arguments optimized out - so we might need a debug build to be able to track where this is lost more easily.