diff options
Diffstat (limited to 'hw/acpi')
-rw-r--r-- | hw/acpi/vmgenid.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/acpi/vmgenid.c b/hw/acpi/vmgenid.c index c3ddcc8..a32b847 100644 --- a/hw/acpi/vmgenid.c +++ b/hw/acpi/vmgenid.c @@ -221,6 +221,14 @@ static void vmgenid_realize(DeviceState *dev, Error **errp) return; } + /* Given that this function is executing, there is at least one VMGENID + * device. Check if there are several. + */ + if (!find_vmgenid_dev()) { + error_setg(errp, "at most one %s device is permitted", VMGENID_DEVICE); + return; + } + qemu_register_reset(vmgenid_handle_reset, vms); } |