From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bandan Das Subject: Re: [PATCH kvm-unit-tests] x86: fix last commit Date: Sat, 01 Aug 2015 17:20:36 -0400 Message-ID: References: <1438263504-45362-1-git-send-email-pbonzini@redhat.com> <55BD30BC.2090201@redhat.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Shih-Wei Li , kvm@vger.kernel.org To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:51082 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751428AbbHAVUi (ORCPT ); Sat, 1 Aug 2015 17:20:38 -0400 Sender: kvm-owner@vger.kernel.org List-ID: Paolo Bonzini writes: > On 01/08/2015 21:05, Bandan Das wrote: >> Shih-Wei Li writes: >> >>> Hi Paolo, >>> >>> I've tried to apply the patch, and found that it passed most of the >>> problematic tests I mentioned earlier (IPI related, kvmclock_test). >>> However, it stopped still at "s3" and couldn't finish it. Do you know >>> what might go wrong? >> >> Nothing is wrong, that's the way the test is. You need to resume from >> qemu for it to proceed and it should quit with 1 for error or 0 for >> success. > > Actually it should be using the RTC alarm to wake itself up. But the > firmware changed recently and the ACPI PMBASE moved from 0xb000 to > 0x600. Try this (untested): Ah thanks! your patch works for me. Is this one of the static entries in the ACPI tables ? I am wondering if we can read this value so it works for everybody. > diff --git a/x86/s3.c b/x86/s3.c > index d568aa7..d6cfef3 100644 > --- a/x86/s3.c > +++ b/x86/s3.c > @@ -177,7 +177,7 @@ int main(int argc, char **argv) > rtc_out(RTC_REG_B, rtc_in(RTC_REG_B) | REG_B_AIE); > > *(volatile int*)0 = 0; > - asm volatile("outw %0, %1" :: "a"((short)0x2400), "d"((short)0xb004):"memory"); > + asm volatile("outw %0, %1" :: "a"((short)0x2400), "d"((short)0x604):"memory"); > while(1) > *(volatile int*)0 = 1; > > > It's on my todo list to fix a very similar issue in vmexit.flat. > > Paolo