lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 11 Apr 2012 23:03:18 -0300
From:	Marcelo Tosatti <mtosatti@...hat.com>
To:	"Michael S. Tsirkin" <mst@...hat.com>,
	Gleb Natapov <gleb@...hat.com>
Cc:	kvm@...r.kernel.org, Avi Kivity <avi@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [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@...hat.com>
> ---
>  arch/x86/kvm/lapic.c |   19 +++++++++++++------
>  virt/kvm/ioapic.c    |   10 +++++++---
>  virt/kvm/ioapic.h    |    1 +
>  3 files changed, 21 insertions(+), 9 deletions(-)

Looks OK, ioapic_service -> accept_apic_irq will set TMR 
again if IRR is raised. Gleb, can you review please?


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ