All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bandan Das <bsd@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Shih-Wei Li <shihwei@cs.columbia.edu>, kvm@vger.kernel.org
Subject: Re: [PATCH kvm-unit-tests] x86: fix last commit
Date: Sat, 01 Aug 2015 17:20:36 -0400	[thread overview]
Message-ID: <jpglhdu904b.fsf@linux.bootlegged.copy> (raw)
In-Reply-To: 55BD30BC.2090201@redhat.com

Paolo Bonzini <pbonzini@redhat.com> writes:

> 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):

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

  reply	other threads:[~2015-08-01 21:20 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
2015-08-01 21:20       ` Bandan Das [this message]
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=jpglhdu904b.fsf@linux.bootlegged.copy \
    --to=bsd@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.