kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* KVM: x86: fix pvclock guest stopped flag reporting
@ 2012-08-02 15:33 Marcelo Tosatti
  2012-08-02 15:42 ` Avi Kivity
  2012-08-03 18:57 ` KVM: x86: fix pvclock guest stopped flag reporting (v2) Marcelo Tosatti
  0 siblings, 2 replies; 8+ messages in thread
From: Marcelo Tosatti @ 2012-08-02 15:33 UTC (permalink / raw)
  To: kvm; +Cc: Amit Shah, Eric B Munson


kvm_guest_time_update unconditionally clears hv_clock.flags field, 
so the notification never reaches the guest.

Fix it by allowing PVCLOCK_GUEST_STOPPED to passthrough.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 3a53bcc..e8ce10f 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1217,7 +1217,9 @@ static int kvm_guest_time_update(struct kvm_vcpu *v)
 	vcpu->hv_clock.system_time = kernel_ns + v->kvm->arch.kvmclock_offset;
 	vcpu->last_kernel_ns = kernel_ns;
 	vcpu->last_guest_tsc = tsc_timestamp;
-	vcpu->hv_clock.flags = 0;
+	/* only support PVCLOCK_GUEST_STOPPED flag ATM */
+	if (vcpu->hv_clock.flags != PVCLOCK_GUEST_STOPPED)
+		vcpu->hv_clock.flags = 0;
 
 	/*
 	 * The interface expects us to write an even number signaling that the

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-08-07 13:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-02 15:33 KVM: x86: fix pvclock guest stopped flag reporting Marcelo Tosatti
2012-08-02 15:42 ` Avi Kivity
2012-08-02 15:43   ` Marcelo Tosatti
2012-08-02 15:52     ` Avi Kivity
2012-08-02 16:00     ` Marcelo Tosatti
2012-08-03 18:57 ` KVM: x86: fix pvclock guest stopped flag reporting (v2) Marcelo Tosatti
2012-08-07 12:16   ` Amit Shah
2012-08-07 13:18   ` Eric B Munson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).