public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: kvm@vger.kernel.org
Cc: avi@redhat.com, sheng@linux.intel.com,
	Marcelo Tosatti <mtosatti@redhat.com>
Subject: [patch 1/2] KVM: PIT: fix i8254 pending count read
Date: Tue, 30 Dec 2008 15:55:05 -0200	[thread overview]
Message-ID: <20081230175534.705028782@localhost.localdomain> (raw)
In-Reply-To: 20081230175504.218547087@localhost.localdomain

[-- Attachment #1: i8254-fix-count --]
[-- Type: text/plain, Size: 669 bytes --]

count_load_time assignment is bogus: its supposed to contain what it
means, not the expiration time.

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

Index: kvm/arch/x86/kvm/i8254.c
===================================================================
--- kvm.orig/arch/x86/kvm/i8254.c
+++ kvm/arch/x86/kvm/i8254.c
@@ -207,7 +207,7 @@ static int __pit_timer_fn(struct kvm_kpi
 	hrtimer_add_expires_ns(&pt->timer, pt->period);
 	pt->scheduled = hrtimer_get_expires_ns(&pt->timer);
 	if (pt->period)
-		ps->channels[0].count_load_time = hrtimer_get_expires(&pt->timer);
+		ps->channels[0].count_load_time = ktime_get();
 
 	return (pt->period == 0 ? 0 : 1);
 }

-- 


  reply	other threads:[~2008-12-30 18:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-30 17:55 [patch 0/2] PIT: optionally disable interrupt reinjection (v2) Marcelo Tosatti
2008-12-30 17:55 ` Marcelo Tosatti [this message]
2008-12-30 17:55 ` [patch 2/2] KVM: PIT: provide an option to disable interrupt reinjection Marcelo Tosatti
2008-12-31  9:52 ` [patch 0/2] PIT: optionally disable interrupt reinjection (v2) Avi Kivity
  -- strict thread matches above, loose matches on Subject: below --
2008-12-29 17:38 [patch 0/2] PIT: optionally disable interrupt reinjection Marcelo Tosatti
2008-12-29 17:38 ` [patch 1/2] KVM: PIT: fix i8254 pending count read Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081230175534.705028782@localhost.localdomain \
    --to=mtosatti@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=sheng@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox