From patchwork Mon Jan 19 14:12:51 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, Xiantao" X-Patchwork-Id: 3125 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n0JE8V9R031137 for ; Mon, 19 Jan 2009 06:08:31 -0800 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751389AbZASOM6 (ORCPT ); Mon, 19 Jan 2009 09:12:58 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751439AbZASOM6 (ORCPT ); Mon, 19 Jan 2009 09:12:58 -0500 Received: from mga09.intel.com ([134.134.136.24]:48251 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751389AbZASOM4 (ORCPT ); Mon, 19 Jan 2009 09:12:56 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 19 Jan 2009 06:04:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.37,289,1231142400"; d="scan'208";a="379629259" Received: from fmsmsxpoc001.amr.corp.intel.com ([132.233.49.22]) by orsmga002.jf.intel.com with ESMTP; 19 Jan 2009 06:11:16 -0800 Received: from fmsmsxTAP001.amr.corp.intel.com (10.19.9.33) by fmsmsxpoc001.amr.corp.intel.com (132.233.49.22) with Microsoft SMTP Server (TLS) id 8.1.311.2; Mon, 19 Jan 2009 06:12:54 -0800 Received: from pdsmsx602.ccr.corp.intel.com (172.16.12.184) by fmsmsxTAP001.amr.corp.intel.com (10.19.9.33) with Microsoft SMTP Server (TLS) id 8.1.311.2; Mon, 19 Jan 2009 06:12:54 -0800 Received: from pdsmsx503.ccr.corp.intel.com ([172.16.12.95]) by pdsmsx602.ccr.corp.intel.com ([172.16.12.184]) with mapi; Mon, 19 Jan 2009 22:12:52 +0800 From: "Zhang, Xiantao" To: Anthony Liguori CC: "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" , Avi Kivity Date: Mon, 19 Jan 2009 22:12:51 +0800 Subject: RE: [PATCH] Always return latest pmsts instead of the old one. Thread-Topic: [PATCH] Always return latest pmsts instead of the old one. Thread-Index: Acl3XBBbW7k4FvQDTAeQ1zuLiLteCgC48K2g Message-ID: <706158FABBBA044BAD4FE898A02E4BC21F768F0D@pdsmsx503.ccr.corp.intel.com> References: <1231830545-1788-1-git-send-email-amit.shah@redhat.com> <706158FABBBA044BAD4FE898A02E4BC21C9A0745@pdsmsx503.ccr.corp.intel.com> <496FB0E1.3050306@us.ibm.com> In-Reply-To: <496FB0E1.3050306@us.ibm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Attached the new patch, please check. Xiantao Subject: Always return latest pmsts instead of the old one. It may lead to the issue when booting windows guests with acpi=1 if return the old pmsts. Signed-off-by: Xiantao Zhang Modified Paths: -------------- trunk/hw/acpi.c Modified: trunk/hw/acpi.c Anthony Liguori wrote: > Zhang, Xiantao wrote: >> For get_pmsts of acpi, it should always return latest value instead >> of the old one. Xiantao >> >> >> From: Xiantao Zhang >> Date: Tue, 13 Jan 2009 17:42:16 +0800 >> Subject: [PATCH] Always return latest pmsts instead of the old one. >> >> It may lead to the issue when booting windows guests with acpi=1 >> if return the old pmsts. >> >> Signed-off-by: Xiantao Zhang --- >> qemu/hw/acpi.c | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/qemu/hw/acpi.c b/qemu/hw/acpi.c >> > > Please resubmit against QEMU, not kvm-userspace. > > Regards, > > Anthony Liguori > >> index 0ff8851..8bde989 100644 >> --- a/qemu/hw/acpi.c >> +++ b/qemu/hw/acpi.c >> @@ -94,7 +94,7 @@ static int get_pmsts(PIIX4PMState *s) >> d = muldiv64(qemu_get_clock(vm_clock), PM_FREQ, ticks_per_sec); >> if (d >= s->tmr_overflow_time) >> s->pmsts |= TMROF_EN; >> - return pmsts; >> + return s->pmsts; >> } >> >> static void pm_update_sci(PIIX4PMState *s) =================================================================== --- trunk/hw/acpi.c +++ trunk/hw/acpi.c @@ -92,7 +92,7 @@ static int get_pmsts(PIIX4PMState *s) d = muldiv64(qemu_get_clock(vm_clock), PM_FREQ, ticks_per_sec); if (d >= s->tmr_overflow_time) s->pmsts |= TMROF_EN; - return pmsts; + return s->pmsts; } static void pm_update_sci(PIIX4PMState *s)