From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSO7N-0001ob-97 for qemu-devel@nongnu.org; Fri, 12 Sep 2014 06:30:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSO7L-0005M6-Ec for qemu-devel@nongnu.org; Fri, 12 Sep 2014 06:30:17 -0400 Received: from mail-vc0-x22d.google.com ([2607:f8b0:400c:c03::22d]:42586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSO7L-0005M0-A3 for qemu-devel@nongnu.org; Fri, 12 Sep 2014 06:30:15 -0400 Received: by mail-vc0-f173.google.com with SMTP id le20so470750vcb.32 for ; Fri, 12 Sep 2014 03:30:14 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <5412C2B6.4020603@cn.fujitsu.com> References: <1409197002-9498-1-git-send-email-guz.fnst@cn.fujitsu.com> <1409197002-9498-11-git-send-email-guz.fnst@cn.fujitsu.com> <54117105.8000007@cn.fujitsu.com> <54124B47.2050504@cn.fujitsu.com> <5412C2B6.4020603@cn.fujitsu.com> Date: Fri, 12 Sep 2014 16:00:14 +0530 Message-ID: From: Bharata B Rao Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gu Zheng Cc: "qemu-devel@nongnu.org" , tangchen@cn.fujitsu.com, isimatu.yasuaki@jp.fujitsu.com, Anshul Makkar , chen.fan.fnst@cn.fujitsu.com, imammedo@redhat.com, "afaerber@suse.de" On Fri, Sep 12, 2014 at 3:23 PM, Gu Zheng wrote: > Hi Bharata, > On 09/12/2014 04:09 PM, Bharata B Rao wrote: > >> On Fri, Sep 12, 2014 at 6:54 AM, Gu Zheng wrote: >>> Is guest os enabled acpi cpu hotplug? What's the guest's cpu info? >>> Please try latest QEMU, and any feedback is welcome. >>> >> >> Tried with latest QEMU git + your patchset and Fedora 20 guest, but >> QEMU monitor still shows the removed CPU. >> >> Guest kernel messages during hotplug: >> >> [root@localhost cpu]# echo 1 > cpu8/online >> [ 72.936069] smpboot: Booting Node 0 Processor 8 APIC 0x8 >> [ 0.003000] kvm-clock: cpu 8, msr 0:7ffc9201, secondary cpu clock >> [ 72.950003] TSC synchronization [CPU#0 -> CPU#8]: >> [ 72.950003] Measured 199886723309 cycles TSC warp between CPUs, >> turning off TSC clock. >> [ 72.950003] tsc: Marking TSC unstable due to check_tsc_sync_source failed >> [ 72.972976] KVM setup async PF for cpu 8 >> [ 72.973648] kvm-stealtime: cpu 8, msr 7d30df00 >> [ 72.974415] Will online and init hotplugged CPU: 8 >> [ 72.975307] microcode: CPU8 sig=0x663, pf=0x1, revision=0x1 >> >> Guest kernel messages during hotunplug: >> >> [root@localhost cpu]# [ 95.482172] Unregister pv shared memory for cpu 8 >> [ 95.487169] smpboot: CPU 8 is now offline >> [ 95.488667] ACPI: Device does not support D3cold >> >> >> Guest cpuinfo (showing for the last CPU only after adding and removing CPU 8) >> >> processor : 7 >> vendor_id : GenuineIntel >> cpu family : 6 >> model : 6 >> model name : QEMU Virtual CPU version 2.1.50 >> stepping : 3 >> microcode : 0x1 >> cpu MHz : 2899.998 >> cache size : 4096 KB >> fpu : yes >> fpu_exception : yes >> cpuid level : 4 >> wp : yes >> flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca >> cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl pni >> cx16 x2apic popcnt hypervisor lahf_lm >> bogomips : 5799.99 >> clflush size : 64 >> cache_alignment : 64 >> address sizes : 40 bits physical, 48 bits virtual >> power management: > > Guest ejected CPU 8 successfully. > I confirmed it with the same environment as yours, it works well. > Could you please offer your QEMU config and the guest start cmd? > It may help me to investigate the issue. Let me also debug this a bit in my environment, but here are the details you asked for. # ./x86_64-softmmu/qemu-system-x86_64 --nographic --enable-kvm -m 2G -smp 8,maxcpus=32 -device virtio-blk-pci,drive=rootdisk -drive file=/home/bharata/F20.img,if=none,cache=none,format=qcow2,id=rootdisk -monitor telnet:localhost:1234,server,nowait # cat config-host.h /* Automatically generated by create_config - do not modify */ #define CONFIG_QEMU_CONFDIR "/usr/local/etc/qemu" #define CONFIG_QEMU_DATADIR "/usr/local/share/qemu" #define CONFIG_QEMU_DOCDIR "/usr/local/share/doc/qemu" #define CONFIG_QEMU_MODDIR "/usr/local/lib/qemu" #define CONFIG_QEMU_LOCALSTATEDIR "/usr/local/var" #define CONFIG_QEMU_HELPERDIR "/usr/local/libexec" #define CONFIG_QEMU_LOCALEDIR "/usr/local/share/locale" #define HOST_X86_64 1 #define CONFIG_DEBUG_TCG 1 #define CONFIG_POSIX 1 #define CONFIG_LINUX 1 #define CONFIG_SLIRP 1 #define CONFIG_SMBD_COMMAND "/usr/sbin/smbd" #define CONFIG_L2TPV3 1 #define CONFIG_AUDIO_DRIVERS \ &oss_audio_driver,\ #define CONFIG_OSS 1 #define CONFIG_BDRV_RW_WHITELIST\ NULL #define CONFIG_BDRV_RO_WHITELIST\ NULL #define CONFIG_VNC 1 #define CONFIG_FNMATCH 1 #define QEMU_VERSION "2.1.50" #define QEMU_PKGVERSION "" #define CONFIG_UTIMENSAT 1 #define CONFIG_PIPE2 1 #define CONFIG_ACCEPT4 1 #define CONFIG_SPLICE 1 #define CONFIG_EVENTFD 1 #define CONFIG_FALLOCATE 1 #define CONFIG_FALLOCATE_PUNCH_HOLE 1 #define CONFIG_SYNC_FILE_RANGE 1 #define CONFIG_FIEMAP 1 #define CONFIG_DUP3 1 #define CONFIG_PPOLL 1 #define CONFIG_PRCTL_PR_SET_TIMERSLACK 1 #define CONFIG_EPOLL 1 #define CONFIG_EPOLL_CREATE1 1 #define CONFIG_EPOLL_PWAIT 1 #define CONFIG_SENDFILE 1 #define CONFIG_TIMERFD 1 #define CONFIG_INOTIFY 1 #define CONFIG_INOTIFY1 1 #define CONFIG_BYTESWAP_H 1 #define CONFIG_ATTR 1 #define CONFIG_VHOST_SCSI 1 #define CONFIG_VHOST_NET_USED 1 #define CONFIG_IOVEC 1 #define CONFIG_PREADV 1 #define CONFIG_SIGNALFD 1 #define CONFIG_FDATASYNC 1 #define CONFIG_MADVISE 1 #define CONFIG_POSIX_MADVISE 1 #define CONFIG_SIGEV_THREAD_ID 1 #define CONFIG_QOM_CAST_DEBUG 1 #define CONFIG_COROUTINE_BACKEND ucontext #define CONFIG_COROUTINE_POOL 1 #define CONFIG_LINUX_MAGIC_H 1 #define CONFIG_HAS_ENVIRON 1 #define CONFIG_CPUID_H 1 #define CONFIG_INT128 1 #define CONFIG_TPM $(CONFIG_SOFTMMU) #define CONFIG_TPM_PASSTHROUGH 1 #define CONFIG_TRACE_NOP 1 #define CONFIG_TRACE_FILE trace #define CONFIG_THREAD_SETNAME_BYTHREAD 1 #define CONFIG_PTHREAD_SETNAME_NP 1 #define HOST_DSOSUF ".so And I am on commit ID 0dfa7e30126364c434a4 Regards, Bharata.