From: Alexander Graf <agraf@suse.de>
To: "Zhang, Xiantao" <xiantao.zhang@intel.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"avi@redhat.com" <avi@redhat.com>,
"kraxel@redhat.com" <kraxel@redhat.com>,
"anthony@codemonkey.ws" <anthony@codemonkey.ws>,
"Sander.Vanleeuwen@sun.com" <Sander.Vanleeuwen@sun.com>,
"zach@vmware.com" <zach@vmware.com>,
"brogers@novell.com" <brogers@novell.com>
Subject: Re: [PATCH] Activate Virtualization On Demand v2
Date: Wed, 05 Nov 2008 11:54:03 +0100 [thread overview]
Message-ID: <49117B4B.8060406@suse.de> (raw)
In-Reply-To: <706158FABBBA044BAD4FE898A02E4BC2172ECF06@pdsmsx503.ccr.corp.intel.com>
Zhang, Xiantao wrote:
> Alexander Graf wrote:
>
>> X86 CPUs need to have some magic happening to enable the
>> virtualization
>> extensions on them. This magic can result in unpleasant results for
>> users, like blocking other VMMs from working (vmx) or using invalid
>> TLB
>> entries (svm).
>>
>> Currently KVM activates virtualization when the respective kernel
>> module
>> is loaded. This blocks us from autoloading KVM modules without
>> breaking
>> other VMMs.
>>
>> To circumvent this problem at least a bit, this patch introduces on
>> demand activation of virtualization. This means, that instead
>> virtualization is enabled on creation of the first virtual machine
>> and disabled on removal of the last one.
>>
>> So using this, KVM can be easily autoloaded, while keeping other
>> hypervisors usable.
>>
>> v2 adds returns to non-x86 hardware_enables and adds IA64 change
>>
>> Signed-off-by: Alexander Graf <agraf@suse.de>
>> ---
>> arch/ia64/kvm/kvm-ia64.c | 8 +++--
>> arch/powerpc/kvm/powerpc.c | 3 +-
>> arch/s390/kvm/kvm-s390.c | 3 +-
>> arch/x86/kvm/svm.c | 13 +++++--
>> arch/x86/kvm/vmx.c | 7 ++++-
>> arch/x86/kvm/x86.c | 4 +-
>> include/asm-x86/kvm_host.h | 2 +-
>> include/linux/kvm_host.h | 2 +-
>> virt/kvm/kvm_main.c | 72
>> +++++++++++++++++++++++++++++++------------ 9 files changed, 80
>> insertions(+), 34 deletions(-)
>>
>> diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
>> index c25c75b..2bd79db 100644
>> --- a/arch/ia64/kvm/kvm-ia64.c
>> +++ b/arch/ia64/kvm/kvm-ia64.c
>> @@ -110,7 +110,7 @@ long ia64_pal_vp_create(u64 *vpd, u64 *host_iva,
>> u64 *opt_handler)
>>
>> static DEFINE_SPINLOCK(vp_lock);
>>
>> -void kvm_arch_hardware_enable(void *garbage)
>> +int kvm_arch_hardware_enable(void *garbage)
>> {
>> long status;
>> long tmp_base;
>> @@ -124,7 +124,7 @@ void kvm_arch_hardware_enable(void *garbage)
>> slot = ia64_itr_entry(0x3, KVM_VMM_BASE, pte, KVM_VMM_SHIFT);
>> local_irq_restore(saved_psr);
>> if (slot < 0)
>> - return;
>> + return -ENOMEM;
>>
>
> Return -EINVAL maybe more accurate. Here slot < 0 means invalid or uncorrect parameters are passed to ia64_itr_entry.
> Xiantao
>
Okies.
next prev parent reply other threads:[~2008-11-05 10:54 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
2008-11-05 11:23 ` Alexander Graf
2008-11-05 10:45 ` Zhang, Xiantao
2008-11-05 10:54 ` Alexander Graf [this message]
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=49117B4B.8060406@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=xiantao.zhang@intel.com \
--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.