Hi, I was wondering why one virtio-pci device has two different DeviceState? - one directly from VirtIOPCIProxy and the other from VirtIO<dev type> such as VirtIONet. As an example, they are denoted as qdev and vdev respectively in virtio_net_pci_realize().
I thought that just one DeviceState is enough for any device in QEMU. Maybe I'm missing something fundamental here. *Just* for people who wonder why I'm asking this question, I'd like to find a device in the list of SaveStateEntry on a MMIO operation to a PCI device. For virtio devices, I only have qdev information in the MMIO handler while I need to have vdev information to find the virtio device in the SaveStateEntry list. I can possibly do this by converting qdev to vdev knowing this is a virtio device as in virtio_net_pci_realize(), but I'd like to find a way to do it without knowing the device is a virtio device. Thanks, Jintack