From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 3/4] KVM: x86: change PIT discard tick policy Date: Wed, 3 Feb 2016 17:48:39 +0100 Message-ID: <56B22F67.2000509@redhat.com> References: <1454516585-28491-1-git-send-email-rkrcmar@redhat.com> <1454516585-28491-4-git-send-email-rkrcmar@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org, Yuki Shibuya To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , linux-kernel@vger.kernel.org Return-path: In-Reply-To: <1454516585-28491-4-git-send-email-rkrcmar@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 03/02/2016 17:23, Radim Kr=C4=8Dm=C3=A1=C5=99 wrote: > Discard policy uses ack_notifiers to prevent injection of PIT interru= pts > before EOI from the last one. >=20 > This patch changes the policy to always try to deliver the interrupt, > which makes a difference when its vector is in ISR. > Old implementation would drop the interrupt, but proposed one injects= to > IRR, like real hardware would. >=20 > The old policy breaks legacy NMI watchdogs, where PIT is used through > virtual wire (LVT0): PIT never sends an interrupt before receiving EO= I, > thus a guest deadlock with disabled interrupts will stop NMIs. >=20 > Note that NMI doesn't do EOI, so PIT also had to send a normal interr= upt > through IOAPIC. (KVM's PIT is deeply rotten and luckily not used muc= h > in modern systems.) >=20 > Even though there is a chance of regressions, I think we can fix the > LVT0 NMI bug without introducing a new tick policy. >=20 > Reported-by: Yuki Shibuya > Signed-off-by: Radim Kr=C4=8Dm=C3=A1=C5=99 Haven't looked at the patch yet, but this is definitely how DISCARD is supposed to work. Paolo