lkml.org 
[lkml]   [2012]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kvm: dont clear TMR on EOI
On Wed, Apr 11, 2012 at 06:49:55PM +0300, Michael S. Tsirkin wrote:
> Intel spec says that TMR needs to be set/cleared
> when IRR is set, but kvm also clears it on EOI.
>
> I did some tests on a real (AMD based) system,
> and I see same TMR values both before
> and after EOI, so I think it's a minor bug in kvm.
>
> This patch fixes TMR to be set/cleared on IRR set
> only as per spec.
>
> And now that we don't clear TMR, we can save
> an atomic read of TMR on EOI that's not propagated
> to ioapic, by checking whether ioapic needs
> a specific vector first and calculating
> the mode afterwards.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> arch/x86/kvm/lapic.c | 19 +++++++++++++------
> virt/kvm/ioapic.c | 10 +++++++---
> virt/kvm/ioapic.h | 1 +
> 3 files changed, 21 insertions(+), 9 deletions(-)

Applied, thanks.



\
 
 \ /
  Last update: 2012-04-14 03:35    [W:0.050 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site