From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH kvm-unit-tests] x86: fix last commit Date: Sat, 1 Aug 2015 22:49:00 +0200 Message-ID: <55BD30BC.2090201@redhat.com> References: <1438263504-45362-1-git-send-email-pbonzini@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Bandan Das , Shih-Wei Li Return-path: Received: from mail-wi0-f176.google.com ([209.85.212.176]:36765 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751426AbbHAUtF (ORCPT ); Sat, 1 Aug 2015 16:49:05 -0400 Received: by wicgj17 with SMTP id gj17so58190243wic.1 for ; Sat, 01 Aug 2015 13:49:03 -0700 (PDT) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 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): 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