All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org, kraxel@redhat.com, anthony@codemonkey.ws,
	Sander.Vanleeuwen@sun.com, zach@vmware.com, brogers@novell.com
Subject: Re: [PATCH] Activate Virtualization On Demand v2
Date: Wed, 05 Nov 2008 11:53:30 +0100	[thread overview]
Message-ID: <49117B2A.5050903@suse.de> (raw)
In-Reply-To: <4911795A.6020807@redhat.com>

Avi Kivity wrote:
> Alexander Graf wrote:
>
>  
>
>>> We'll be in a nice fix if we can only enable virtualization on some
>>> processors; that's the reason hardware_enable() was originally
>>> specified as returning void.
>>>
>>> I don't see an easy way out, but it's hardly a likely event.
>>>     
>>
>> I don't think there's any way we can circumvent that.
>>   
>
> No.  We can live with it though.
>
>> What I've wanted to ask for some time already: How does suspend/resume
>> work? 
>
> The question is important, even without the first word.
>
>> I only see one suspend/resume hook that disables virt on the
>> currently running CPU. Why don't we have to loop through the CPUs to
>> enable/disable all of them?
>> At least for suspend-to-disk this sounds pretty necessary.
>>
>>   
>
> Suspend first offlines all other cpus.

Ah, ok.

>>>>  {
>>>> -    hardware_enable(NULL);
>>>> +    if (atomic_read(&kvm_usage_count))
>>>> +        hardware_enable(NULL);
>>>>      return 0;
>>>>  }
>>>>         
>>> Move the test to hardware_enable()?  It's repeated too often.
>>>     
>>
>> What do we do about the on_each_cpu(hardware_enable) cases? We couldn't
>> tell when to activate/deactive virtualization then, as that's
>> semantically bound to "amount of VMs".
>>   
>  static int kvm_resume(struct sys_device *dev)
>
> I don't understand.  Moving the test to within the IPI shouldn't
> affect anything.

Oh, you only want the test to be in hardware_enable and
hardware_disable. Now I see what you mean: modify and lock
kvm_usage_count outside, but test inside of hardware_enable.


  reply	other threads:[~2008-11-05 10:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-05  8:48 [PATCH] Activate Virtualization On Demand v2 Alexander Graf
2008-11-05 10:06 ` Avi Kivity
2008-11-05 10:28   ` Alexander Graf
2008-11-05 10:45     ` Avi Kivity
2008-11-05 10:53       ` Alexander Graf [this message]
2008-11-05 11:23       ` Alexander Graf
2008-11-05 10:45 ` Zhang, Xiantao
2008-11-05 10:54   ` Alexander Graf
2008-11-05 10:58 ` Daniel P. Berrange
2008-11-05 11:01   ` Alexander Graf
2008-11-05 13:06 ` Christian Borntraeger
2008-11-05 13:12   ` Avi Kivity
  -- strict thread matches above, loose matches on Subject: below --
2009-06-15 11:30 Alexander Graf
2009-06-15 12:17 ` Christoph Hellwig
2009-06-15 12:25   ` Alexander Graf
2009-06-15 12:27     ` Christoph Hellwig
2009-06-16 14:02   ` Avi Kivity
2009-06-16 14:01 ` Avi Kivity
2009-06-16 14:08   ` Alexander Graf
2009-06-16 15:13     ` Avi Kivity
2009-06-17 21:56       ` Alexander Graf
2009-06-18  8:35         ` Avi Kivity

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=49117B2A.5050903@suse.de \
    --to=agraf@suse.de \
    --cc=Sander.Vanleeuwen@sun.com \
    --cc=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=brogers@novell.com \
    --cc=kraxel@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=zach@vmware.com \
    /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.