From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: ACPI shutdown unreliable with win7? Date: Fri, 22 May 2015 10:08:19 +0100 Message-ID: <1432285699.10746.147.camel@citrix.com> References: <1432284841.10746.136.camel@citrix.com> <555EEFD8.8020306@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <555EEFD8.8020306@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: Paul Durrant , Ian Jackson , Jan Beulich , xen-devel List-Id: xen-devel@lists.xenproject.org On Fri, 2015-05-22 at 09:59 +0100, Andrew Cooper wrote: > On 22/05/15 09:54, Ian Campbell wrote: > > In osstest self gate flight 56412 a change to make HVM guests > > configurably use "xl shutdown -F" (-F == use ACPI fallback if PV drivers > > absent) and apply the option to the win7 and winxpsp3 tests went into > > production. > > > > On winxpsp3 this appears to have been a success and things are working > > pretty well since that flight: > > http://logs.test-lab.xenproject.org/osstest/results/history.test-amd64-i386-xl-qemuu-winxpsp3.html > > http://logs.test-lab.xenproject.org/osstest/results/history.test-amd64-i386-xl-qemuu-winxpsp3-vcpus1.html > > http://logs.test-lab.xenproject.org/osstest/results/history.test-amd64-amd64-xl-qemut-winxpsp3.html > > http://logs.test-lab.xenproject.org/osstest/results/history.test-amd64-i386-xl-qemut-winxpsp3.html > > http://logs.test-lab.xenproject.org/osstest/results/history.test-amd64-i386-xl-qemut-winxpsp3-vcpus1.html > > > > However win7 seems to be in somewhat poorer shape: > > > > http://logs.test-lab.xenproject.org/osstest/results/history.test-amd64-amd64-xl-qemuu-win7-amd64.html > > http://logs.test-lab.xenproject.org/osstest/results/history.test-amd64-i386-xl-qemuu-win7-amd64.html > > http://logs.test-lab.xenproject.org/osstest/results/history.test-amd64-amd64-xl-qemut-win7-amd64.html > > http://logs.test-lab.xenproject.org/osstest/results/history.test-amd64-i386-xl-qemut-win7-amd64.html > > > > it passes less than one time in 10 (of the ones which don't get blocked > > earlier on). > > > > The problem seems to be independent of the qemu version and with qemuu > > of seabios vs rombios. dom0 kernel also seems irrelevant. > > This is because there is no such thing as ACPI shutdown. > > There is ACPI "Someone pressed the power button" and ACPI "Someone > closed the laptop lid". Understood, however this did work in my manual testing and does occasionally pass. e.g. in http://logs.test-lab.xenproject.org/osstest/logs/56759/test-amd64-amd64-xl-qemut-win7-amd64/info.html which was successful the qemu log shows: shutdown requested in cpu_handle_ioreq Issued domain 18 poweroff Log-dirty: no command yet. In the failure cases there is no indication in the logs or screenshots that windows is either hibernating or shutting down, or doing anything else at all. > I believe Win7 attempts to sleep by default, rather than to shut down, > although IIRC this does depend on which S states are offered in the ACPI > tables. osstest ought to be providing the exact same thing each time, so unless there is some non-determinism in win7's logic (I would hope not) I think it ought to be making the same choice each time. > One thing to try would be to boot windows without any S3 or S4 > SSDT tables, which should persuade windows into believing that "someone > pressed the power button" should mean S5 shutdown. If win7 doesn't shutdown given a power button request I'd be more inclined to remove the setting in osstest for those flights and let guest-stop go back to being never pass than to start making such changes to the VM config which I think would probably break the preceding suspend and migration tests (which aren't completely reliable, but are far more so than this shutdown one). Ian.