From: Michael S. Tsirkin Date: Wed, 11 Apr 2012 15:49:55 +0000 (+0300) Subject: KVM: dont clear TMR on EOI X-Git-Tag: v3.5-rc1~88^2~31 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0c9a822bf37e6282eb6006b407ec5aec22e08fb;p=pandora-kernel.git KVM: dont clear TMR on EOI 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 Signed-off-by: Marcelo Tosatti --- Reading git-diff-tree failed