qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 2/2] Do not register kvmclock savevm section if


From: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH 2/2] Do not register kvmclock savevm section if kvmclock is disabled.
Date: Sat, 04 Dec 2010 14:41:15 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.6

On 12/03/2010 11:49 AM, Glauber Costa wrote:
+/* This has to happen after vcpu setup*/
+void kvmclock_register_savevm(void)
+{
+#ifdef KVM_CAP_ADJUST_CLOCK
+    if (kvmclock_enabled&&  kvm_check_extension(kvm_state, 
KVM_CAP_ADJUST_CLOCK)) {
+        printf("registering kvmclock savevm section\n");
+        vmstate_register(NULL, 0,&vmstate_kvmclock,&kvmclock_data);
+    }
+#endif
+}
+

You should use a state change notifier for patch 1. Even better, if you put this patch first adding the state change notifier will be very clean.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]