During plugging we can see this event: echo 1 > cpu8/online. But during unplugging , we can't see the event echo 0 > cpu8/online. Just for additional check, in my code I have added following udev rule echo 0 > cpu[0-9]*/online. May be this is of any help. Thanks Anshul Makkar On Fri, Sep 12, 2014 at 11:53 AM, 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. > > Thanks, > Gu > > > > > [root@localhost boot]# grep -ir hot config-3.11.10-301.fc20.x86_64 > > CONFIG_TICK_ONESHOT=y > > # CONFIG_MEMORY_HOTPLUG is not set > > CONFIG_HOTPLUG_CPU=y > > # CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set > > # CONFIG_DEBUG_HOTPLUG_CPU0 is not set > > CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y > > CONFIG_ACPI_HOTPLUG_CPU=y > > CONFIG_HOTPLUG_PCI_PCIE=y > > CONFIG_HOTPLUG_PCI=y > > CONFIG_HOTPLUG_PCI_ACPI=y > > CONFIG_HOTPLUG_PCI_ACPI_IBM=m > > # CONFIG_HOTPLUG_PCI_CPCI is not set > > CONFIG_HOTPLUG_PCI_SHPC=m > > . > > > > >