]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/virtio/virtio-mem: Fix definition of VirtIOMEMClass
authorZhenzhong Duan <zhenzhong.duan@intel.com>
Fri, 6 Jun 2025 09:24:02 +0000 (17:24 +0800)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 10 Jun 2025 10:59:09 +0000 (12:59 +0200)
Parent of VirtIOMEMClass is VirtioDeviceClass rather than VirtIODevice.
This isn't catastrophic only because sizeof(VirtIODevice) >
sizeof(VirtioDeviceClass).

Fixes: 910b25766b33 ("virtio-mem: Paravirtualized memory hot(un)plug")
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250606092406.229833-2-zhenzhong.duan@intel.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
include/hw/virtio/virtio-mem.h

index bc4f787772ac8846950a0b8d7f085ecae4d3a3b5..e0ab31b45a498854c1f1467133946ffca06a7510 100644 (file)
@@ -134,7 +134,7 @@ struct VirtioMemSystemReset {
 
 struct VirtIOMEMClass {
     /* private */
-    VirtIODevice parent;
+    VirtioDeviceClass parent_class;
 
     /* public */
     void (*fill_device_info)(const VirtIOMEM *vmen, VirtioMEMDeviceInfo *vi);