Re: [PATCH: kvm 3/5] Fix hotadd of CPUs for KVM.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/26/2009 10:52 PM, Avi Kivity wrote:
On 09/25/2009 03:47 AM, Zachary Amsden wrote:

--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1716,9 +1716,6 @@ static int kvm_cpu_hotplug(struct notifier_block *notifier, unsigned long val,
  {
      int cpu = (long)v;

-    if (!kvm_usage_count)
-        return NOTIFY_OK;
-

Why?  You'll now do hardware_enable() even if kvm is not in use.

Because otherwise you'll never allocate and hardware_enable_all will fail:

Switch to broadcast mode on CPU1
svm_hardware_enable: svm_data is NULL on 1
kvm: enabling virtualization on CPU1 failed
qemu-system-x86[8698]: segfault at 20 ip 00000000004db22f sp 00007fff0a3b4560 error 6 in qemu-system-x86_64[400000+21f000]

Perhaps I can make this work better by putting the allocation within hardware_enable_all.

Zach
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux