diff options
author | Peter Xu | 2019-10-16 04:29:30 +0200 |
---|---|---|
committer | Juan Quintela | 2020-01-20 09:10:23 +0100 |
commit | 1df2c9a26fcb2fa32d099f8e9adcdae4207872e3 (patch) | |
tree | 1a970b94d94b70bad869dd4103961e2c7cd76b60 /hw/tpm | |
parent | Bug #1829242 correction. (diff) | |
download | qemu-1df2c9a26fcb2fa32d099f8e9adcdae4207872e3.tar.gz qemu-1df2c9a26fcb2fa32d099f8e9adcdae4207872e3.tar.xz qemu-1df2c9a26fcb2fa32d099f8e9adcdae4207872e3.zip |
migration: Define VMSTATE_INSTANCE_ID_ANY
Define the new macro VMSTATE_INSTANCE_ID_ANY for callers who wants to
auto-generate the vmstate instance ID. Previously it was hard coded
as -1 instead of this macro. It helps to change this default value in
the follow up patches. No functional change.
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'hw/tpm')
-rw-r--r-- | hw/tpm/tpm_emulator.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/tpm/tpm_emulator.c b/hw/tpm/tpm_emulator.c index 10d587ed40..3a0fc442f3 100644 --- a/hw/tpm/tpm_emulator.c +++ b/hw/tpm/tpm_emulator.c @@ -914,7 +914,8 @@ static void tpm_emulator_inst_init(Object *obj) tpm_emu->cur_locty_number = ~0; qemu_mutex_init(&tpm_emu->mutex); - vmstate_register(NULL, -1, &vmstate_tpm_emulator, obj); + vmstate_register(NULL, VMSTATE_INSTANCE_ID_ANY, + &vmstate_tpm_emulator, obj); } /* |