[PULL 03/28] hw/i386/kvm: Remove KVMClockState::mach_use_reliable_get_clock field

Thomas Huth posted 28 patches 1 month, 1 week ago
Maintainers: Gerd Hoffmann <kraxel@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Yanan Wang <wangyanan55@huawei.com>, Zhao Liu <zhao1.liu@intel.com>, Dmitry Fleytman <dmitry.fleytman@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>, Yi Liu <yi.l.liu@intel.com>, "Clément Mathieu--Drif" <clement.mathieu--drif@eviden.com>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>
[PULL 03/28] hw/i386/kvm: Remove KVMClockState::mach_use_reliable_get_clock field
Posted by Thomas Huth 1 month, 1 week ago
From: Philippe Mathieu-Daudé <philmd@linaro.org>

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>
---
 hw/i386/kvm/clock.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
index 10d34254f02..7d167c8b006 100644
--- a/hw/i386/kvm/clock.c
+++ b/hw/i386/kvm/clock.c
@@ -23,7 +23,6 @@
 #include "migration/vmstate.h"
 #include "hw/core/sysbus.h"
 #include "hw/i386/kvm/clock.h"
-#include "hw/core/qdev-properties.h"
 #include "exec/cpu-common.h"
 #include "qapi/error.h"
 
@@ -44,9 +43,6 @@ struct KVMClockState {
     /* whether the 'clock' value was obtained in the 'paused' state */
     bool runstate_paused;
 
-    /* whether machine type supports reliable KVM_GET_CLOCK */
-    bool mach_use_reliable_get_clock;
-
     /* whether the 'clock' value was obtained in a host with
      * reliable KVM_GET_CLOCK */
     bool clock_is_reliable;
@@ -292,18 +288,10 @@ static void kvmclock_realize(DeviceState *dev, Error **errp)
     kvm_vmfd_add_change_notifier(&s->kvmclock_vmfd_change_notifier);
 }
 
-static bool kvmclock_clock_is_reliable_needed(void *opaque)
-{
-    KVMClockState *s = opaque;
-
-    return s->mach_use_reliable_get_clock;
-}
-
 static const VMStateDescription kvmclock_reliable_get_clock = {
     .name = "kvmclock/clock_is_reliable",
     .version_id = 1,
     .minimum_version_id = 1,
-    .needed = kvmclock_clock_is_reliable_needed,
     .fields = (const VMStateField[]) {
         VMSTATE_BOOL(clock_is_reliable, KVMClockState),
         VMSTATE_END_OF_LIST()
@@ -364,18 +352,12 @@ static const VMStateDescription kvmclock_vmsd = {
     }
 };
 
-static const Property kvmclock_properties[] = {
-    DEFINE_PROP_BOOL("x-mach-use-reliable-get-clock", KVMClockState,
-                      mach_use_reliable_get_clock, true),
-};
-
 static void kvmclock_class_init(ObjectClass *klass, const void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->realize = kvmclock_realize;
     dc->vmsd = &kvmclock_vmsd;
-    device_class_set_props(dc, kvmclock_properties);
 }
 
 static const TypeInfo kvmclock_info = {
-- 
2.53.0