From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH] Always return latest pmsts instead of the old one. Date: Wed, 21 Jan 2009 10:35:30 -0600 Message-ID: <49774ED2.7080800@us.ibm.com> References: <1231830545-1788-1-git-send-email-amit.shah@redhat.com> <706158FABBBA044BAD4FE898A02E4BC21C9A0745@pdsmsx503.ccr.corp.intel.com> <496FB0E1.3050306@us.ibm.com> <706158FABBBA044BAD4FE898A02E4BC21F768F0D@pdsmsx503.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" , Avi Kivity To: "Zhang, Xiantao" Return-path: Received: from e8.ny.us.ibm.com ([32.97.182.138]:55144 "EHLO e8.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752503AbZAUQfo (ORCPT ); Wed, 21 Jan 2009 11:35:44 -0500 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e8.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id n0LGTZ04013098 for ; Wed, 21 Jan 2009 11:29:35 -0500 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id n0LGZiQA186550 for ; Wed, 21 Jan 2009 11:35:44 -0500 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n0LGZgRR002479 for ; Wed, 21 Jan 2009 11:35:43 -0500 In-Reply-To: <706158FABBBA044BAD4FE898A02E4BC21F768F0D@pdsmsx503.ccr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Zhang, Xiantao wrote: > Attached the new patch, please check. > Xiantao > Applied. Thanks. Regards, Anthony Liguori > 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 > =================================================================== > > --- 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) > > > > 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) >>> > >