From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: qemu polling KVM_IRQ_LINE_STATUS when stopped Date: Fri, 20 Oct 2017 13:50:26 -0700 Message-ID: <20171020205026.GI5109@tassilo.jf.intel.com> References: <87a80pihlz.fsf@linux.intel.com> <1ffc9cf7-a81c-6eeb-4823-c6e0ef53d3af@redhat.com> <20171018174946.GU5109@tassilo.jf.intel.com> <3d37ef15-932a-1492-3068-9ef0b8cd5794@redhat.com> <20171020003449.GG5109@tassilo.jf.intel.com> <22d62b58-725b-9065-1f6d-081972ca32c3@redhat.com> <20171020140917.GH5109@tassilo.jf.intel.com> <2db78631-3c63-5e93-0ce8-f52b313593e1@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: Paolo Bonzini Return-path: Received: from mga03.intel.com ([134.134.136.65]:17070 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751690AbdJTUud (ORCPT ); Fri, 20 Oct 2017 16:50:33 -0400 Content-Disposition: inline In-Reply-To: <2db78631-3c63-5e93-0ce8-f52b313593e1@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Oct 20, 2017 at 05:12:40PM +0200, Paolo Bonzini wrote: > On 20/10/2017 16:09, Andi Kleen wrote: > >> Unfortunately that's not possible in general. Windows uses the periodic > >> timer to track wall time (!), so if you do that your clock is going to > >> be late when you resume the guest. > > > > But when the guest cannot execute instructions > > it cannot see whatever the handler does. > > > > So the handler could always catch up after stopping for longer, > > without making any difference. > > You may be right... you should get the interrupt storm *after > continuing* the guest, but not while it's stopped. Maybe be find to not have a storm, but only one. I belive real hardware cannot have a storm because only one interrupt can be pending at a time. The RTC driver should be able to figure it out from the actual time, and it already needs to handle it because this can happen for other reasons (e.g. a JTAG debugger) -Andi