@samitouri / QOSamiQemu / commits / 8303ca1520

hw/i386/kvm: Remove KVMClockState::mach_use_reliable_get_clock field

The KVMClockState::mach_use_reliable_get_clock boolean was only used by the pc-q35-2.8 and pc-i440fx-2.8 machines, which got removed. Remove it, along with the 'x-mach-use-reliable-get-clock' property. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20250501210456.89071-5-philmd@linaro.org> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-ID: <20260225092024.794595-4-thuth@redhat.com>

Philippe Mathieu-Daudé committed Feb 25, 2026 at 10:20 UTC 8303ca1520c3aa1973cb811f18a4f8b7033e2e47
1 file changed -18
hw/i386/kvm/clock.c
-18
@@ -23,7 +23,6 @@
23 #include "migration/vmstate.h"
24 #include "hw/core/sysbus.h"
25 #include "hw/i386/kvm/clock.h"
26 -#include "hw/core/qdev-properties.h"
26 #include "exec/cpu-common.h"
27 #include "qapi/error.h"
28
@@ -44,9 +43,6 @@ struct KVMClockState {
43 /* whether the 'clock' value was obtained in the 'paused' state */
44 bool runstate_paused;
45
47 - /* whether machine type supports reliable KVM_GET_CLOCK */
48 - bool mach_use_reliable_get_clock;
49 -
46 /* whether the 'clock' value was obtained in a host with
47 * reliable KVM_GET_CLOCK */
48 bool clock_is_reliable;
@@ -292,18 +288,10 @@ static void kvmclock_realize(DeviceState *dev, Error **errp)
288 kvm_vmfd_add_change_notifier(&s->kvmclock_vmfd_change_notifier);
289 }
290
295 -static bool kvmclock_clock_is_reliable_needed(void *opaque)
296 -{
297 - KVMClockState *s = opaque;
298 -
299 - return s->mach_use_reliable_get_clock;
300 -}
301 -
291 static const VMStateDescription kvmclock_reliable_get_clock = {
292 .name = "kvmclock/clock_is_reliable",
293 .version_id = 1,
294 .minimum_version_id = 1,
306 - .needed = kvmclock_clock_is_reliable_needed,
295 .fields = (const VMStateField[]) {
296 VMSTATE_BOOL(clock_is_reliable, KVMClockState),
297 VMSTATE_END_OF_LIST()
@@ -364,18 +352,12 @@ static const VMStateDescription kvmclock_vmsd = {
352 }
353 };
354
367 -static const Property kvmclock_properties[] = {
368 - DEFINE_PROP_BOOL("x-mach-use-reliable-get-clock", KVMClockState,
369 - mach_use_reliable_get_clock, true),
370 -};
371 -
355 static void kvmclock_class_init(ObjectClass *klass, const void *data)
356 {
357 DeviceClass *dc = DEVICE_CLASS(klass);
358
359 dc->realize = kvmclock_realize;
360 dc->vmsd = &kvmclock_vmsd;
378 - device_class_set_props(dc, kvmclock_properties);
361 }
362
363 static const TypeInfo kvmclock_info = {