X-Git-Url: https://repo.jachan.dev/qemu.git/blobdiff_plain/7398166ddf7c6dbbc9cae6ac69bb2feda14b40ac..4f67d30b5e74e060b8dbe10528829b47345cd6e8:/hw/acpi/vmgenid.c diff --git a/hw/acpi/vmgenid.c b/hw/acpi/vmgenid.c index ba6f47b67b..2df7623d74 100644 --- a/hw/acpi/vmgenid.c +++ b/hw/acpi/vmgenid.c @@ -11,12 +11,16 @@ */ #include "qemu/osdep.h" -#include "qmp-commands.h" +#include "qapi/error.h" +#include "qapi/qapi-commands-misc.h" +#include "qemu/module.h" #include "hw/acpi/acpi.h" #include "hw/acpi/aml-build.h" #include "hw/acpi/vmgenid.h" #include "hw/nvram/fw_cfg.h" -#include "sysemu/sysemu.h" +#include "hw/qdev-properties.h" +#include "migration/vmstate.h" +#include "sysemu/reset.h" void vmgenid_build_acpi(VmGenIdState *vms, GArray *table_data, GArray *guid, BIOSLinker *linker) @@ -29,8 +33,7 @@ void vmgenid_build_acpi(VmGenIdState *vms, GArray *table_data, GArray *guid, * first, since that's what the guest expects */ g_array_set_size(guid, VMGENID_FW_CFG_SIZE - ARRAY_SIZE(guid_le.data)); - guid_le = vms->guid; - qemu_uuid_bswap(&guid_le); + guid_le = qemu_uuid_bswap(vms->guid); /* The GUID is written at a fixed offset into the fw_cfg file * in order to implement the "OVMF SDT Header probe suppressor" * see docs/specs/vmgenid.txt for more details @@ -148,8 +151,7 @@ static void vmgenid_update_guest(VmGenIdState *vms) * however, will expect the fields to be little-endian. * Perform a byte swap immediately before writing. */ - guid_le = vms->guid; - qemu_uuid_bswap(&guid_le); + guid_le = qemu_uuid_bswap(vms->guid); /* The GUID is written at a fixed offset into the fw_cfg file * in order to implement the "OVMF SDT Header probe suppressor" * see docs/specs/vmgenid.txt for more details. @@ -224,7 +226,7 @@ static void vmgenid_device_class_init(ObjectClass *klass, void *data) dc->vmsd = &vmstate_vmgenid; dc->realize = vmgenid_realize; - dc->props = vmgenid_device_properties; + device_class_set_props(dc, vmgenid_device_properties); dc->hotpluggable = false; set_bit(DEVICE_CATEGORY_MISC, dc->categories); }