Skip to content

Commit

Permalink
hw/hyperv/hyperv.c: Use device_cold_reset() instead of device_legacy_…
Browse files Browse the repository at this point in the history
…reset()

The semantic difference between the deprecated device_legacy_reset()
function and the newer device_cold_reset() function is that the new
function resets both the device itself and any qbuses it owns,
whereas the legacy function resets just the device itself and nothing
else.  In hyperv_synic_reset() we reset a SynICState, which has no
qbuses, so for this purpose the two functions behave identically and
we can stop using the deprecated one.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Message-id: 20221013171817.1447562-1-peter.maydell@linaro.org
  • Loading branch information
pm215 committed Oct 27, 2022
1 parent 310616d commit 7764963
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/hyperv/hyperv.c
Expand Up @@ -157,7 +157,7 @@ void hyperv_synic_reset(CPUState *cs)
SynICState *synic = get_synic(cs);

if (synic) {
device_legacy_reset(DEVICE(synic));
device_cold_reset(DEVICE(synic));
}
}

Expand Down

0 comments on commit 7764963

Please sign in to comment.