From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8Sat-00052p-G3 for qemu-devel@nongnu.org; Mon, 14 Dec 2015 07:51:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8Saq-0000YY-6X for qemu-devel@nongnu.org; Mon, 14 Dec 2015 07:51:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8Saq-0000YT-0l for qemu-devel@nongnu.org; Mon, 14 Dec 2015 07:51:08 -0500 References: <1449926146-14828-1-git-send-email-arei.gonglei@huawei.com> <566E9259.2010404@redhat.com> <33183CC9F5247A488A2544077AF19020B02B4533@SZXEMA503-MBS.china.huawei.com> From: Paolo Bonzini Message-ID: <566EBB34.5030205@redhat.com> Date: Mon, 14 Dec 2015 13:51:00 +0100 MIME-Version: 1.0 In-Reply-To: <33183CC9F5247A488A2544077AF19020B02B4533@SZXEMA503-MBS.china.huawei.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] rtc: introduce nmi disable bit handler for cmos List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Gonglei (Arei)" , "qemu-devel@nongnu.org" Cc: "Huangpeng (Peter)" , "kevin@koconnor.net" , "ehabkost@redhat.com" , "rth@twiddle.net" On 14/12/2015 13:49, Gonglei (Arei) wrote: >>> > > This patch introduce nmi disable bit handler to fix the problem and >>> > > make the emulated CMOS like the real hardware. >> > >> > I think that this only works with -machine kernel_irqchip=off, however. > IIRCC, the kernel_irqchip is disabled by default, and we used the default value. No, it's enabled by default. > > You would have to add a new bit to struct kvm_vcpu_events, which could for > > example replace nmi.pad. > > You mean we should keep the value of nmi_disabled when we want to live migration? Yes. It can also be used to communicate the enabling/disabling of NMIs when the RTC is written. > > > Please refer to: > > > https://lists.gnu.org/archive/html/qemu-devel/2015-11/msg00616.html > > > > > > Note: We can't reproduce the problem, what a pity :( I holp the > > > patch can fix it. Please review, thanks! > > > > The effect of the patch could be tested with kvm-unit-tests. > > I'll test this version with kvm-unit-tests. Note that you'll have to write a new test. :) Paolo