#include "kvm/kvm_i386.h"
#include "migration/vmstate.h"
#include "hw/sysbus.h"
-#include "hw/kvm/clock.h"
+#include "hw/i386/kvm/clock.h"
#include "hw/qdev-properties.h"
#include "qapi/error.h"
static uint64_t kvmclock_current_nsec(KVMClockState *s)
{
CPUState *cpu = first_cpu;
- CPUX86State *env = cpu->env_ptr;
+ CPUX86State *env = cpu_env(cpu);
hwaddr kvmclock_struct_pa;
uint64_t migration_tsc = env->tsc;
struct pvclock_vcpu_time_info time;
{
X86CPU *cpu = X86_CPU(first_cpu);
- if (!kvm_enabled() || !kvm_has_adjust_clock())
+ assert(kvm_enabled());
+ if (!kvm_has_adjust_clock()) {
return;
+ }
if (create_always ||
cpu->env.features[FEAT_KVM] & ((1ULL << KVM_FEATURE_CLOCKSOURCE) |