Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Bandan Das <bsd@redhat.com>, Shih-Wei Li <shihwei@cs.columbia.edu>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH kvm-unit-tests] x86: fix last commit
Date: Sat, 1 Aug 2015 22:49:00 +0200	[thread overview]
Message-ID: <55BD30BC.2090201@redhat.com> (raw)
In-Reply-To: <jpg3802bzid.fsf@linux.bootlegged.copy>



On 01/08/2015 21:05, Bandan Das wrote:
> Shih-Wei Li <shihwei@cs.columbia.edu> 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

  reply	other threads:[~2015-08-01 20:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30 13:38 [PATCH kvm-unit-tests] x86: fix last commit Paolo Bonzini
2015-08-01 15:41 ` Shih-Wei Li
2015-08-01 19:05   ` Bandan Das
2015-08-01 20:49     ` Paolo Bonzini [this message]
2015-08-01 21:20       ` Bandan Das
2015-08-01 21:59         ` Shih-Wei Li
2015-08-02  7:47         ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55BD30BC.2090201@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=bsd@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=shihwei@cs.columbia.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox