From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XS0wp-0000sa-2B for qemu-devel@nongnu.org; Thu, 11 Sep 2014 05:45:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XS0wj-000882-Tx for qemu-devel@nongnu.org; Thu, 11 Sep 2014 05:45:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51560) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XS0wj-00087r-Mm for qemu-devel@nongnu.org; Thu, 11 Sep 2014 05:45:45 -0400 Message-ID: <54116F40.8090704@redhat.com> Date: Thu, 11 Sep 2014 11:45:36 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [BUG] Guest kernel divide error in kvm_unlock_kick List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chris Webb , kvm@vger.kernel.org, qemu-devel@nongnu.org Il 08/09/2014 15:28, Chris Webb ha scritto: > divide error: 0000 [#1] PREEMPT SMP > Modules linked in: > CPU: 0 PID: 743 Comm: syslogd Not tainted 3.16.2-guest #2 > Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.7.5-0-ge51488c-20140602_164612-nilsson.home.kraxel.org 04/01/2014 > task: ffff88007c972580 ti: ffff88007cb7c000 task.ti: ffff88007cb7c000 > RIP: 0010:[] [] kvm_unlock_kick+0x72/0x80 > RSP: 0000:ffff88007fc03ec8 EFLAGS: 00010046 > RAX: 0000000000000005 RBX: 0000000000000000 RCX: 0000000000000003 > RDX: 0000000000000003 RSI: ffffffff81a466a0 RDI: 0000000000000000 > RBP: ffffffff81a466a0 R08: ffffffff81b98940 R09: 0000000000000246 > R10: 0000000000000400 R11: 0000000000000000 R12: 00000000000000ea > R13: 0000000000000009 R14: 0000000000000002 R15: ffff88007fc0d300 > FS: 00007f2a6473e700(0000) GS:ffff88007fc00000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b > CR2: 00000000004a8240 CR3: 000000007ac75000 CR4: 00000000000406f0 > Stack: > ffffffff81a46400 0000000000000246 0000000000000001 ffffffff8168979d > 0000000000000282 ffffffff81110d97 0000000000000007 ffff88007cb7ffd8 > ffff88007c972580 000000004b0782e8 0000000000000002 ffffffff81a0b0c8 > Call Trace: > > [] ? _raw_spin_unlock_irqrestore+0x5d/0x80 > [] ? rcu_process_callbacks+0x337/0x4f0 > [] ? __do_softirq+0xfd/0x210 > [] ? irq_exit+0x7e/0xa0 > [] ? smp_apic_timer_interrupt+0x3b/0x50 > [] ? apic_timer_interrupt+0x6d/0x80 > > [] ? filemap_map_pages+0x17b/0x240 > [] ? filemap_map_pages+0x230/0x240 > [] ? do_read_fault.isra.70+0x2a2/0x320 > [] ? handle_mm_fault+0x37c/0xd00 > [] ? __do_page_fault+0x185/0x4c0 > [] ? async_page_fault+0x28/0x30 > [] ? __put_user_4+0x20/0x30 > [] ? async_page_fault+0x28/0x30 > Code: c0 ca a7 81 48 8d 04 0b 48 8b 30 48 39 ee 75 c9 0f b6 40 08 44 38 e0 75 c0 48 c7 c0 22 b0 00 00 31 db 0f b7 0c 08 b8 05 00 00 00 <0f> 01 c1 0f 1f 00 5b 5d 41 5c c3 0f 1f 00 48 c7 c0 10 cf 00 00 Hi Chris, sorry for not following up on your previous patch. This is a hypercall that should have kicked VCPU 3 (see rcx). Can you please apply this patch and gather a trace of the host (using "trace-cmd -e kvm qemu-kvm ")? Thanks, diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index fb919c574e23..25ed29f68419 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -709,6 +709,8 @@ static int __apic_accept_irq(struct kvm_lapic *apic, int delivery_mode, int result = 0; struct kvm_vcpu *vcpu = apic->vcpu; + trace_kvm_apic_accept_irq(vcpu->vcpu_id, delivery_mode, + trig_mode, vector, false); switch (delivery_mode) { case APIC_DM_LOWEST: vcpu->arch.apic_arb_prio++; @@ -730,8 +732,6 @@ static int __apic_accept_irq(struct kvm_lapic *apic, int delivery_mode, kvm_make_request(KVM_REQ_EVENT, vcpu); kvm_vcpu_kick(vcpu); } - trace_kvm_apic_accept_irq(vcpu->vcpu_id, delivery_mode, - trig_mode, vector, false); break; case APIC_DM_REMRD: Paolo