All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joro@8bytes.org>
To: Avi Kivity <avi@redhat.com>
Cc: KVM list <kvm@vger.kernel.org>
Subject: Re: Problems on AMD laptops
Date: Mon, 29 Jun 2009 20:26:13 +0200	[thread overview]
Message-ID: <20090629182613.GH4182@8bytes.org> (raw)
In-Reply-To: <4A48D5B6.9040607@redhat.com>

On Mon, Jun 29, 2009 at 05:54:46PM +0300, Avi Kivity wrote:
> On 06/29/2009 05:39 PM, Joerg Roedel wrote:
>> On Mon, Jun 29, 2009 at 04:41:17PM +0300, Avi Kivity wrote:
>>    
>>> kerneloops.org shows tons of oopses on amd, see
>>> http://www.kerneloops.org/oops.php?number=79008.  I suspect this has to
>>> do with resuming a laptop while a guest is running.  Can anyone confirm
>>> or deny?
>>>      
>>
>> I havn't verified this yet but it may have to do with dirty caches that
>> are not written back to memory in suspend-to-ram and are thus lost.
>
> Wouldn't that kill resume generally, not just kvm on amd?

Its a race condition which may be more likely on one hardware than on
another. I remember similar bugs fixed by Mark in the past.

>>   The
>> resume code-path looks otherwise sane to me. The only thing I can
>> imagine is that a bit in the cpu_hardware_enabled cpumask is wrong after
>> resume.
>>    
>
> I saw some of these oopses on cpu 0, which had better be plugged in.

Yeah, but if this bit is set to 0 on suspend and this change does not
make it from cache to main memory it can still be 1 on resume. And
virtualization hardware will not be re-enabled then.
Anyway, this was only a guess from me. I think we should reproduce this
oops and find out what is really going on.

>> Btw. it is guaranteed that with cpu-hotplug the cpu isn't already
>> executing processes when the CPU_ONLINE event call chain is called?
>> At least the CPU is marked online and active at that point in time.
>>    
>
> Yes:
>
> static struct notifier_block kvm_cpu_notifier = {
>     .notifier_call = kvm_cpu_hotplug,
>     .priority = 20, /* must be > scheduler priority */
> };

Ok.

> One thing I think is missing is a call to svm_cpu_init() on real hotplug.

Yes, true. There is no svm_data allocated for cpus not online on module
load.

	Joerg


      reply	other threads:[~2009-06-29 18:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-29 13:41 Problems on AMD laptops Avi Kivity
2009-06-29 14:39 ` Joerg Roedel
2009-06-29 14:54   ` Avi Kivity
2009-06-29 18:26     ` Joerg Roedel [this message]

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=20090629182613.GH4182@8bytes.org \
    --to=joro@8bytes.org \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    /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.