From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: [PATCH] Set bit 1 in disabled processor's _STA Date: Sun, 17 May 2009 12:47:03 -0300 Message-ID: <20090517154703.GP27295@poweredge.glommer> References: <1242389683-12967-1-git-send-email-glommer@redhat.com> <20090517082347.GG3909@redhat.com> <20090517132741.GL27295@poweredge.glommer> <20090517143006.GJ3909@redhat.com> <20090517150622.GN27295@poweredge.glommer> <20090517152145.GA21386@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, avi@redhat.com To: Gleb Natapov Return-path: Received: from mx2.redhat.com ([66.187.237.31]:42888 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754306AbZEQPl6 (ORCPT ); Sun, 17 May 2009 11:41:58 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4HFg0rc013877 for ; Sun, 17 May 2009 11:42:00 -0400 Content-Disposition: inline In-Reply-To: <20090517152145.GA21386@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, May 17, 2009 at 06:21:45PM +0300, Gleb Natapov wrote: > On Sun, May 17, 2009 at 12:06:22PM -0300, Glauber Costa wrote: > > On Sun, May 17, 2009 at 05:30:06PM +0300, Gleb Natapov wrote: > > > On Sun, May 17, 2009 at 10:27:41AM -0300, Glauber Costa wrote: > > > > On Sun, May 17, 2009 at 11:23:47AM +0300, Gleb Natapov wrote: > > > > > On Fri, May 15, 2009 at 08:14:43AM -0400, Glauber Costa wrote: > > > > > > This patch sets bits 1 in disabled processor's _STA. > > > > > > According to the ACPI spec, this bit means: > > > > > > "Set if the device is enabled and decoding its resources." > > > > > > > > > > > > Without it, Windows 2008 device manager shows the processors > > > > > > as malfunctioning hardware. > > > > > > > > > > > If you uncheck "show hidden devices" option in View menu of the > > > > > device manager you should see only enabled CPUs (bit 2 of _STA). > > > > Yes, that is what happens. But then, by checking "show hidden devices", > > > > the disabled processor appears, but are listed as malfunctioning. > > > > > > > > Because of this, SVVP tests break without this patch. > > > > > > > What kind of error? > > Message 4/15/2009 4:07:04.635 AM Checking Intel Processor > > Error 4/15/2009 4:07:04.635 AM ERROR: Device (QEMU Virtual CPU version 0.9.1) > > is not currently enabled, or has some problem > > File: Line: 0 > > Error Type: BOOL > > Error Code: 0x1 > > Error Text: Error 0x00000001 > > > > Alternatively, if you go to the device manager, and "Show hidden processors", > > you'll see the processors appear, but marked with a "!". Clicking into details, > > there is a message saying that the device is malfunctioning. > > > > > > > > > > This patch breaks resume from hibernate on windows 2008/vista. > > > > Oh god... do you have any idea why? > > > > > > > > which bits should we set for everything to work? > > > Bit 1 should not be set :) What I think is happening windows finds more > > > CPUs on resume then it had before hibernate. > > > > It does not make sense to me at first. resume should not be a much different > > use case than plain boot. If it does the right thing on bootup, why would it > > mess up in case of resume? > I wish I had an answer to this. It may be a bug. On boot windows calculates > number of processors from madt tables, but on resume it does the same > by executing _STA method of each defined CPU. I admitedly know almost nothing about windows, but one thing jumped to my eyes: By looking at the device manager, hidden devices, the "working" cpu seems to be cpu1, not cpu0. Maybe this is related to this problem?