From mboxrd@z Thu Jan 1 00:00:00 1970 From: Atom2 Subject: Re: Powerdown problem on XEN | ACPI S5 Date: Wed, 14 Aug 2013 19:00:39 +0200 Message-ID: <520BB7B7.1000108@web2web.at> References: <520B4465.6000600@web2web.at> <520B784F02000078000EBD42@nat28.tlf.novell.com> <520B8B8E.5020504@web2web.at> <520B8D63.6040903@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000305090704030702020008" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1V9eRF-0006pD-W0 for xen-devel@lists.xenproject.org; Wed, 14 Aug 2013 17:00:50 +0000 In-Reply-To: <520B8D63.6040903@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: xen-devel , Ian Campbell , Jan Beulich List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------000305090704030702020008 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Andrew, please see my inline comments further below. And many thanks to all of you for your support so far! Am 14.08.13 16:00, schrieb Andrew Cooper: > On 14/08/13 14:52, Atom2 wrote: >> Hi Jan, >> thanks for reply. You are obviously right that the first thing >> device_power_down does, is console_suspend(). I don't know why that >> escaped my eyes when I originally searched the file ... >> >> Anyways, I have now disabled console_suspend() and also added a few >> more lines to the code with printk statements indicating up to which >> point the system had gone (without errors). With hindsight I guess the >> new printk() statements might not have been required as now, with the >> console still active, a panic message pops up at the end, resulting in >> rebooting the system: >> >> (XEN) Disabling non-boot CPUs ... >> (XEN) Entering ACPI S5 state. >> (XEN) After local_irq_save >> (XEN) After spin_debug_disable >> (XEN) After time_suspend >> (XEN) After li8259_suspend >> (XEN) After ioapic_suspend >> (XEN) DMAR_IQA_REG = 80d87c002 >> (XEN) DMAR_IQH_REG = 120 >> (XEN) DMAR_IQT_REG = 140 >> (XEN) >> (XEN) **************************************** >> (XEN) Panic on CPU 0: >> (XEN) queue invalidate wait descriptor was not executed >> (XEN) **************************************** >> (XEN) >> (XEN) Reboot in five seconds... >> (XEN) Resetting with ACPI MEMORY or I/O RESET_REG. >> >> NOTE: All the messages starting with "(XEN) After" are from my changes >> to the code; the rest is as is - except me commenting out >> console_suspend() in power.c. I hope that helps in resolving the issue >> and the panic is not just the result of a knock-on effect from >> commenting out console_suspend() earlier. > > Huh - I thought I had fixed this issue already. > > Can you confirm exactly which version of Xen you are using (including > changeset), and perhaps compile in this patch: The version I am using is 4.2.2 from the gentoo ebuild. Interesting enough, the log in the consoles states (XEN) Latest ChangeSet: unavailable I don't know what to make out of this - or is there any other way to figure out, what you are after? The alternative would be to apply the WARN() to the 4.3.0 version I have downloaded yesterday from xenbits at http://www.xenproject.org/downloads/xen-archives/supported-xen-43-series/xen-430/287-xen-430-2/file.html (FYI: the reboot also happened there). If that helps, I'll rerun it on the 4.3.0 version. So far I have used the gentoo version as this allows me to stay within the portage system. > > diff --git a/xen/drivers/passthrough/vtd/qinval.c > b/xen/drivers/passthrough/vtd/qinval.c > index 6a410d8..d023b26 100644 > --- a/xen/drivers/passthrough/vtd/qinval.c > +++ b/xen/drivers/passthrough/vtd/qinval.c > @@ -220,6 +220,7 @@ static int queue_invalidate_wait(struct iommu *iommu, > if ( NOW() > (start_time + DMAR_OPERATION_TIMEOUT) ) > { > print_qi_regs(iommu); > + WARN(); > panic("queue invalidate wait descriptor was not > executed\n"); > } > cpu_relax(); I have manually applied the patch - which was just an added WARN(); inbetween if I read the patch correctly; the rest was already there in 4.2.2 (and also 4.3.0 - I checked its source as well). I have attached the serial log from my 4.2.2 run to prevent line-wrap. I hope that helps. > > ~Andrew > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel > --------------000305090704030702020008 Content-Type: text/plain; charset=windows-1252; name="XEN console log" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="XEN console log" (XEN) Entering ACPI S5 state. (XEN) After local_irq_save (XEN) After spin_debug_disable (XEN) After time_suspend (XEN) After li8259_suspend (XEN) After ioapic_suspend (XEN) DMAR_IQA_REG = 80d87c002 (XEN) DMAR_IQH_REG = 120 (XEN) DMAR_IQT_REG = 140 (XEN) Xen WARN at qinval.c:223 (XEN) ----[ Xen-4.2.2 x86_64 debug=n Not tainted ]---- (XEN) CPU: 0 (XEN) RIP: e008:[] invalidate_sync+0x22c/0x280 (XEN) RFLAGS: 0000000000010082 CONTEXT: hypervisor (XEN) rax: ffff82c4802f14a0 rbx: ffff83080d8855b0 rcx: 0000000000000000 (XEN) rdx: ffff82c4802a7f18 rsi: 000000000000000a rdi: ffff82c48025a640 (XEN) rbp: 0000000b2ae4ae9f rsp: ffff82c4802a7d20 r8: 0000000000000004 (XEN) r9: 0000000000000002 r10: 0000000000000003 r11: 0000000000000400 (XEN) r12: ffff83080d8855e4 r13: ffff83080d88562c r14: 0000000000000002 (XEN) r15: 0000000000000002 cr0: 000000008005003b cr4: 00000000000426f0 (XEN) cr3: 00000000db6b5000 cr2: ffff88001a89ea48 (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: e010 cs: e008 (XEN) Xen stack trace from rsp=ffff82c4802a7d20: (XEN) 0000000000000002 000000080d87c002 0000000000000082 000000000d87c002 (XEN) 0000000000000086 ffff83080d8855b0 0000000000000000 1000000000000000 (XEN) 0000000000000000 0000000000000000 0000000000000000 ffff82c480145546 (XEN) 0000000000000000 0000000000000000 0000000800000004 ffff83080d8855b0 (XEN) ffff83080d885530 ffff83080d885640 ffff82c48024bbe0 0000000000000000 (XEN) ffff82c4802f14e0 ffff82c4801413ee 0000000000000000 0000000000000086 (XEN) ffff82c4802f14a0 0000000000000005 0000000000000000 0000000000000000 (XEN) ffff82c4802db740 ffff82c480141e05 0000000000000082 0000000000000086 (XEN) ffff82c4802a7f18 ffff82c4802f14a0 0000000000000005 0000000000000000 (XEN) 0000000000000000 ffff82c4802db740 ffff82c4802f14e0 ffff82c48019a245 (XEN) ffff82c4802a7f18 00000000ffffffff 0000000000000286 ffff8300dc697000 (XEN) ffff8300dc697000 ffff830669301fc0 ffff8300dc697000 ffff82c4802f1488 (XEN) ffff82c4802db740 ffff82c4802db740 ffff82c4802f14e0 ffff82c4801054ae (XEN) ffff8300dc697180 0000000000000000 ffff82c4802f1590 ffff82c480125670 (XEN) ffff82c4802f1570 ffff82c480125878 ffff82c4802a7f18 ffff8300dc697000 (XEN) 00000000ffffffff ffff82c480156933 ffff8300dcda6000 0000000000000000 (XEN) 0000000000000003 0000000000000005 0000000000002003 ffffffff815adf58 (XEN) 0000000000000000 0000000000000246 0000000000000370 0000000000000005 (XEN) 0000000000000000 0000000000000000 ffffffff810010ea 0000000000002003 (XEN) 0000000000003c03 ffff880019dd1d18 0000010000000000 ffffffff810010ea (XEN) Xen call trace: (XEN) [] invalidate_sync+0x22c/0x280 (XEN) [] flush_iotlb_qi+0xb6/0x100 (XEN) [] iommu_flush_all+0x8e/0xf0 (XEN) [] vtd_suspend+0x55/0x110 (XEN) [] enter_state_helper+0x235/0x430 (XEN) [] continue_hypercall_tasklet_handler+0xee/0x100 (XEN) [] do_tasklet_work+0x60/0xc0 (XEN) [] do_tasklet+0x78/0xb0 (XEN) [] idle_loop+0x23/0x50 (XEN) (XEN) (XEN) **************************************** (XEN) Panic on CPU 0: (XEN) queue invalidate wait descriptor was not executed (XEN) **************************************** (XEN) (XEN) Reboot in five seconds... (XEN) Resetting with ACPI MEMORY or I/O RESET_REG. --------------000305090704030702020008 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --------------000305090704030702020008--