[kvm-unit-tests PATCH 2/3] x86: smp: assert to avoid multiple init of smp

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

 



Signed-off-by: Peter Xu <peterx@xxxxxxxxxx>
---
 lib/x86/smp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/x86/smp.c b/lib/x86/smp.c
index 1eb49f2..1a05d0f 100644
--- a/lib/x86/smp.c
+++ b/lib/x86/smp.c
@@ -113,6 +113,7 @@ void smp_init(void)
     int i;
     void ipi_entry(void);
 
+    assert(_cpu_count == 0);
     _cpu_count = fwcfg_get_nb_cpus();
 
     setup_idt();
-- 
2.7.4

--
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