[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [EXT] Re: xen arm64 low power sleep support


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Anthony Chan <anthonychan@xxxxxxxxxx>
  • Date: Wed, 13 Sep 2023 15:16:13 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nureva.com; dmarc=pass action=none header.from=nureva.com; dkim=pass header.d=nureva.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rmmsACECVviZJ2mdN4XRi7iU34hFjDIwSw+ed/WV6ww=; b=hJs0r5+oug/+i83sYK7Yz+fLeaGe430vo/hvtYYViUnI2Bttxle58j3LjlElV1h+ax+lTCQDPWOrpJUFkGutbKYOUCDD5O/8Ot9z4lLlVMPm6lN+2+N6Kh60v9RGhS80z/FYbMKm86ElY1W2bT3qVUa9AHkJiGY9QH+R/WbhuhF8dAeZ1q6AA8BQjQ6Mfe6jVo+UGpPnSnN2lo6HsEyzTQ36vQ93TLCUVqVr67nRTrCHGkAbUi8TD4YGqFNQllhd+2GQQEE1XUu7DI1YSzU63LpBGDJPt+QcGiIFJ//wwphd053R4sJ51brNeaFgVK0qdRq9o3gyd+htQACCDVmWHQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lLjhMZoBptIA7xq/DA6R3fvRxZLXSf/KGZ03cjP0MgYutBxhqZ6TanQh242ss6sH6/p896RqCMz7hsL2h7ti9ol1/JlQVV4tnqiQW4dUfyCG/JuMST+36WNJ5qKHqcdVvgRbmlIic29AneL4Tv/FjxdC2Z+5L4A57WpGmITAZ+c6S8Cn5HdOtsh3sR1HtxycR0jFD+YobOeRL30ZhriBO2GWIIJNsoF6rukOm8EMNQhOAB5RZLAqVdsGb06hJy74yaL8e/pxrOG+ANPLUOEvTRWTiNFVJMCQZb4A00nFj9DnxkU83t+4gNFINJD+hftTo8cAtzDHVt3lz40sP4SPJA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nureva.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "bertrand.marquis@xxxxxxx" <bertrand.marquis@xxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, "Volodymyr_Babchuk@xxxxxxxx" <Volodymyr_Babchuk@xxxxxxxx>, "michal.orzel@xxxxxxx" <michal.orzel@xxxxxxx>, Dan Waqar <danwaqar@xxxxxxxxxx>
  • Delivery-date: Wed, 13 Sep 2023 15:16:29 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AdnanCj70Orzia5aQfSER7H0AUNnzgAKb5uAACL7QIAAFccGAAAoRLpQAQalgwAAJhokEAAI5CkAACis4mAA1S71AAAexGNw
  • Thread-topic: [EXT] Re: xen arm64 low power sleep support

On Mon, 11 Sep 2023, Stefano Stabellini wrote:
> On Mon, 11 Sep 2023, Anthony Chan wrote:
> > On Wed, 6 Sep 2023, Stefano Stabellini wrote:
> > > On Wed, 6 Sep 2023, Anthony Chan wrote:
> > > > Thanks, I've tried patches that stemmed from that discussion but
> > > > unfortunately, doesn't resolve the issue.  In fact, the
> > > > s2idle_loop branch might not be the problem at all.  I
> > > > experimented with Xen to allow the 'idle-states' into the FDT and
> > > > prevented xen_guest_init on Linux from disabling the 'cpuidle'
> > > > driver (arch/arm/xen/enlighten.c).  When I trigger a suspend, I
> > > > can see now another thread (believe it's the idle thread) call
> > > > into drivers/firmware/psci/psci.c:__psci_cpu_suspend and then the Xen
> > > > counterpart at xen/arch/arm/vpsci.c:do_psci_0_2_cpu_suspend.
> > >
> > > OK but remember that Xen is not implementing do_psci_0_2_cpu_suspend
> > > correctly at the moment. Either we need to fix the Xen
> > > implementation, or we need to configure Linux so that it calls WFI instead
> > > of __psci_cpu_suspend.
> > >
> > > As a test, can you try to apply the attached patch to Xen as a
> > > tenative fix?  Or you could change
> > > drivers/firmware/psci/psci.c:__psci_cpu_suspend to call WFI instead
> > > of the PSCI operation (making sure to go to the entry_point instead of
> > > returning).
> >
> > Tried the patch and substituting a WFI for a PSCI op, but Xen still 
> > watchdogs
> on the VMs in both cases.  I noticed the other Linux generic arm 'cpu-idle'
> driver which used to do issue a WFI/cpu_do_idle isn't useable anymore either.
> I'm not sure if Xen may have used to rely on this generic driver to get the 
> WFI.
>
> I was running out of ideas so I went back to look at the watchdog console log:
>
> (XEN) do_psci_0_2_cpu_suspend
> (XEN) Watchdog timer fired for domain 0
> (XEN) Hardware Dom0 shutdown: watchdog rebooting machine
>
> Checking the code, it seems that the Xen watchdog is set by
> xen/common/sched/core.c:SCHEDOP_watchdog, which is called by
> tools/libs/ctrl/xc_domain.c:xc_watchdog.
>
> xc_watchdog is called by tools/misc/xenwatchdogd.c. Is it possible that this
> problem is entirely caused by the daemon xenwatchdogd running in the
> background? What happens if you kill xenwatchdogd and try again without it
> (even better not start it at all)?
Disabling that daemon resolved the watchdog timing out.  Never noticed that 
daemon running before.  That clears a lot up and I think I understand what's 
going on here now, thank you for the help.

CONFIDENTIALITY NOTICE: This e-mail, including any attachments, may contain 
information that is confidential and privileged. Any unauthorized disclosure, 
reproduction or use of this e-mail is prohibited. If you are not the intended 
recipient, please notify the sender by reply e-mail or telephone and 
permanently delete this e-mail and any reproductions immediately.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.