From owner-freebsd-virtualization@FreeBSD.ORG Tue Jun 23 02:37:10 2015 Return-Path: Delivered-To: freebsd-virtualization@nevdull.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE412CA9 for ; Tue, 23 Jun 2015 02:37:10 +0000 (UTC) (envelope-from neelnatu@gmail.com) Received: from mail-qc0-x22e.google.com (mail-qc0-x22e.google.com [IPv6:2607:f8b0:400d:c01::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 98E4EAEC; Tue, 23 Jun 2015 02:37:10 +0000 (UTC) (envelope-from neelnatu@gmail.com) Received: by qcji3 with SMTP id i3so12716114qcj.1; Mon, 22 Jun 2015 19:37:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=FlMx9rQTmZ2UmpgvE37cj0jwT+BOxn9tjJo4AwcYAXk=; b=pgoT5vuz5Ndob40XJjC4hfcREHt+SXXa5tcxDUsuHqmYkrRTgds5XGIm9oNaYkWgNH WbpJlbVdJaDSplOBQnKGhxj5ONpvjiWV3IhWwdru06VPE9wcahdE7d6gjQseP1D/pK6b 8dbi1/kOLzMsSfvdydTukATpF8HpONf71Xv+QDjHx6mXDSftS6vLXyHGbaaLn+bXFnbm LFOV3CHxEaSBgO16cFtgDni56zAvHEtbzvSpgBtWRGroC1uVpukGUAIpDqnwEq5mhhNV wlwS9lS4Ms+T23BRbF9On1YmpYxLJuQR20Bb+DnCfAqjiTnxTC4IN2L+exYkTqaWe5pV cwDQ== MIME-Version: 1.0 X-Received: by 10.55.19.25 with SMTP id d25mr68593063qkh.19.1435027029665; Mon, 22 Jun 2015 19:37:09 -0700 (PDT) Received: by 10.140.40.200 with HTTP; Mon, 22 Jun 2015 19:37:09 -0700 (PDT) In-Reply-To: <5587EE05.2020001@FreeBSD.org> References: <5587EE05.2020001@FreeBSD.org> Date: Mon, 22 Jun 2015 19:37:09 -0700 Message-ID: Subject: Re: bhyve: centos 7.1 with multiple virtual processors From: Neel Natu To: Andriy Gapon Cc: "freebsd-virtualization@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2015 02:37:11 -0000 Hi Andriy, FWIW I can boot up a Centos 7.1 virtual machine with 2 and 4 vcpus fine on my host with 8 physical cores. I have some questions about your setup inline. On Mon, Jun 22, 2015 at 4:14 AM, Andriy Gapon wrote: > > If I run a CentOS 7.1 VM with more than one CPU more often than not it would > hang on startup and bhyve would start spinning. > > The following are the last messages seen in the VM: > > Switching to clocksource hpet > ------------[ cut here ]------------ > WARNING: at kernel/time/clockevents.c:239 clockevents_program_event+0xdb/0xf0() > Modules linked in: > CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.0-229.4.2.el7.x86_64 #1 > Hardware name: BHYVE, BIOS 1.00 03/14/2014 > 0000000000000000 00000000cab5bdb6 ffff88003fc03e08 ffffffff81604eaa > ffff88003fc03e40 ffffffff8106e34b 80000000000f423f 80000000000f423f > ffffffff81915440 0000000000000000 0000000000000000 ffff88003fc03e50 > Call Trace: > [] dump_stack+0x19/0x1b > [] warn_slowpath_common+0x6b/0xb0 > [] warn_slowpath_null+0x1a/0x20 > [] clockevents_program_event+0xdb/0xf0 > [] tick_handle_periodic_broadcast+0x41/0x50 > [] timer_interrupt+0x15/0x20 > [] handle_irq_event_percpu+0x3e/0x1e0 > [] handle_irq_event+0x3d/0x60 > [] handle_edge_irq+0x77/0x130 > [] handle_irq+0xbf/0x150 > [] ? irq_enter+0x17/0xa0 > [] do_IRQ+0x4f/0xf0 > [] common_interrupt+0x6d/0x6d > [] ? selinux_inode_alloc_security+0x59/0xa0 > [] ? __d_instantiate+0xbf/0x100 > [] ? __d_instantiate+0x9f/0x100 > [] d_instantiate+0x3d/0x70 > [] debugfs_mknod.isra.5.part.6.constprop.15+0x98/0x130 > [] __create_file+0x1c2/0x2c0 > [] ? set_graph_function+0x1f/0x1f > [] debugfs_create_dir+0x1b/0x20 > [] tracing_init_dentry_tr+0x7e/0x90 > [] tracing_init_dentry+0x10/0x20 > [] ftrace_init_debugfs+0x13/0x1fd > [] ? set_graph_function+0x1f/0x1f > [] do_one_initcall+0xb8/0x230 > [] kernel_init_freeable+0x18b/0x22a > [] ? initcall_blacklist+0xb0/0xb0 > [] ? rest_init+0x80/0x80 > [] kernel_init+0xe/0xf0 > [] ret_from_fork+0x7c/0xb0 > [] ? rest_init+0x80/0x80 > ---[ end trace d5caa1cab8e7e98d ]--- > A few questions to narrow this down: - Is the host very busy when the VM is started (or what is the host doing when this happened)? - How many vcpus are you giving to the VM? - How many cores on the host? > > At the same time sometimes there is one or more of spurious NMIs on the _host_ > system: > NMI ISA c, EISA ff > NMI ... going to debugger > Hmm, that's interesting. Are you using hwpmc to do instruction sampling? > bhyve seems to spin here: > vmm.ko`svm_vmrun+0x894 > vmm.ko`vm_run+0xbb7 > vmm.ko`vmmdev_ioctl+0x5a4 > kernel`devfs_ioctl_f+0x13b > kernel`kern_ioctl+0x1e1 > kernel`sys_ioctl+0x16a > kernel`amd64_syscall+0x3ca > kernel`0xffffffff8088997b > > (kgdb) list *svm_vmrun+0x894 > 0xffffffff813c9194 is in svm_vmrun > (/usr/src/sys/modules/vmm/../../amd64/vmm/amd/svm.c:1895). > 1890 > 1891 static __inline void > 1892 enable_gintr(void) > 1893 { > 1894 > 1895 __asm __volatile("stgi"); > 1896 } > 1897 > 1898 /* > 1899 * Start vcpu with specified RIP. > Yeah, that's not surprising because host interrupts are blocked when the cpu is executing in guest context. The 'enable_gintr()' enables interrupts so it gets blamed by the interrupt-based sampling. In this case it just means that the cpu was in guest context when a host-interrupt fired. best Neel > -- > Andriy Gapon > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@freebsd.org"