All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH] Activate Virtualization On Demand
Date: Mon, 14 Sep 2009 18:54:46 +0200	[thread overview]
Message-ID: <2B9B7243-C5BA-466D-9554-5463A8BD0D68@suse.de> (raw)
In-Reply-To: <20090914164635.GA11728@amt.cnet>


On 14.09.2009, at 18:46, Marcelo Tosatti wrote:

> On Mon, Sep 14, 2009 at 06:25:20PM +0200, Alexander Graf wrote:
>>>> having succeeded. The hardware_enable_all caller calls
>>>> hardware_disable_all (kvm_usage_count--) when enabling fails.
>>>
>>> But it does not hold any lock in between hardware_enable_all
>>> and hardware_disable_all.
>>>
>>> So its unsafe if another kvm_create_vm call happens in between,  
>>> while
>>> kvm_usage_count is 1 ?
>>
>> So what we really need is a lock, so hardware_enable_all doesn't get
>> called twice? Isn't that what the kvm_lock here does?
>
> Either that or check hardware_enable_failed atomic variable even
> if kvm_usage_count > 1.

The patch does a lock already.

>>>>> Also, better move vmx.c's ept_sync_global from vmx_init to
>>>>> hardware_enable.
>>>>
>>>> Why? What does that do?
>>>
>>> 25.3.3.4 Guidelines for Use of the INVEPT Instruction
>>>
>>> Software can use the INVEPT instruction with the “all-context”
>>> INVEPT type immediately after execution of the VMXON instruction or
>>> immediately prior to execution of the VMXOFF instruction. Either
>>> prevents potentially undesired retention of information cached from
>>> EPT
>>> paging structures between separate uses of VMX operation.
>>
>> Hmhm. I don't have EPT hardware to test things on, but I can of  
>> course
>> make a blind move of the call.
>
> OK, i can do some basic testing before applying the patch.

Great :-)

Alex


  reply	other threads:[~2009-09-14 16:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-09 14:18 [PATCH] Activate Virtualization On Demand Alexander Graf
2009-09-14  5:05 ` Avi Kivity
2009-09-14 13:23 ` Marcelo Tosatti
2009-09-14 15:52   ` Alexander Graf
2009-09-14 16:14     ` Marcelo Tosatti
2009-09-14 16:25       ` Alexander Graf
2009-09-14 16:46         ` Marcelo Tosatti
2009-09-14 16:54           ` Alexander Graf [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-09-15  9:37 Alexander Graf
2009-03-17  8:47 Alexander Graf
2009-03-17 12:04 ` Avi Kivity
2009-03-17 15:48   ` Alexander Graf
2009-03-18  6:43     ` 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=2B9B7243-C5BA-466D-9554-5463A8BD0D68@suse.de \
    --to=agraf@suse.de \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.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.