From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51134) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkAdG-0005kO-7z for qemu-devel@nongnu.org; Mon, 20 Apr 2015 08:17:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YkAdE-0006eh-6D for qemu-devel@nongnu.org; Mon, 20 Apr 2015 08:16:58 -0400 Received: from mail-la0-x234.google.com ([2a00:1450:4010:c03::234]:36206) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkAdD-0006e8-Ht for qemu-devel@nongnu.org; Mon, 20 Apr 2015 08:16:56 -0400 Received: by lagv1 with SMTP id v1so125187348lag.3 for ; Mon, 20 Apr 2015 05:16:53 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <5534C48B.7060901@cn.fujitsu.com> References: <5534C48B.7060901@cn.fujitsu.com> Date: Mon, 20 Apr 2015 14:16:53 +0200 Message-ID: From: Mohsin Kazmi Content-Type: multipart/alternative; boundary=089e0160c162cad9f8051426e721 Subject: Re: [Qemu-devel] Unparking vCPU mechanism List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Zhu Guihua Cc: qemu-devel@nongnu.org --089e0160c162cad9f8051426e721 Content-Type: text/plain; charset=UTF-8 Hi Zhu, I installed and enabled the --iasl=IASL at "configuration" for qemu and then "make" it. When i tried to delete the cpu1 after adding it using hotplug/unplug, I am facing the kernel panic at guest os. Kernel version (3.11.10-301.fc20.x86_64) [root@fedora20 ~]# [ 208.733033] general protection fault: 0000 [#1] SMP [ 208.733033] Modules linked in: nfsv3 rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache cfg80211 rfkill ppdev crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel parport_pc parport i2c_piix4 serio_raw pvpanic microcode bochs_drm ttm drm_kms_helper drm nfsd auth_rpcgss nfs_acl lockd sunrpc virtio_net virtio_pci virtio_ring virtio ata_generic pata_acpi [ 208.733033] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.17.7-200.fc20.x86_64 #1 [ 208.733033] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5.1-0-g8936dbb-20141113_115728-nilsson.home.kraxel.org 04/01/2014 [ 208.733033] task: ffff880139b7b110 ti: ffff880139bbc000 task.ti: ffff880139bbc000 [ 208.733033] RIP: 0010:[] [] native_read_pmc+0x6/0x20 [ 208.733033] RSP: 0018:ffff88013fc83e20 EFLAGS: 00000083 [ 208.733033] RAX: 0000000000000001 RBX: ffff88013fc8b9e0 RCX: 0000000040000001 [ 208.733033] RDX: 00000000ffffffff RSI: 0000000000000001 RDI: 0000000040000001 [ 208.733033] RBP: ffff88013fc83e20 R08: ffff88013fc97098 R09: 0000000000000000 [ 208.733033] R10: 0000000000000001 R11: 0000000000000005 R12: ffffffff80000001 [ 208.733033] R13: ffff8800b994dc00 R14: ffff8800b994dd98 R15: 0000000000000010 [ 208.733033] FS: 0000000000000000(0000) GS:ffff88013fc80000(0000) knlGS:0000000000000000 [ 208.733033] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 208.733033] CR2: 00007f2798f7c0b9 CR3: 0000000001c14000 CR4: 00000000000007e0 [ 208.733033] Stack: [ 208.733033] ffff88013fc83e58 ffffffff8102ab83 ffff88013fc8b9e0 ffff8800b994dc00 [ 208.733033] 0000000000000004 ffff88013fc97104 ffff88013fc9708c ffff88013fc83e80 [ 208.733033] ffffffff8102ac38 ffff8800b994dc00 ffff88013fc8b9e0 ffff8800b994dc00 [ 208.733033] Call Trace: [ 208.733033] [ 208.733033] [] x86_perf_event_update+0x43/0xa0 [ 208.733033] [] x86_pmu_stop+0x58/0xd0 [ 208.733033] [] x86_pmu_del+0x42/0x130 [ 208.733033] [] event_sched_out.isra.75+0x102/0x1f0 [ 208.733033] [] __perf_remove_from_context+0x51/0xb0 [ 208.733033] [] __perf_event_exit_context+0x91/0xe0 [ 208.733033] [] flush_smp_call_function_queue+0x5d/0x130 [ 208.733033] [] generic_smp_call_function_single_interrupt+0x13/0x60 [ 208.733033] [] smp_call_function_single_interrupt+0x27/0x40 [ 208.733033] [] call_function_single_interrupt+0x6d/0x80 [ 208.733033] [ 208.733033] [] ? native_safe_halt+0x6/0x10 [ 208.733033] [] default_idle+0x1f/0xc0 [ 208.733033] [] arch_cpu_idle+0xf/0x20 [ 208.733033] [] cpu_startup_entry+0x344/0x380 [ 208.733033] [] ? clockevents_register_device+0xbc/0x120 [ 208.733033] [] start_secondary+0x210/0x2d0 [ 208.733033] Code: c0 48 c1 e2 20 89 0e 48 09 c2 48 89 d0 5d c3 66 0f 1f 44 00 00 55 89 f0 89 f9 48 89 e5 0f 30 31 c0 5d c3 66 90 55 89 f9 48 89 e5 <0f> 33 89 c0 48 c1 e2 20 48 09 c2 48 89 d0 5d c3 66 2e 0f 1f 84 [ 208.733033] RIP [] native_read_pmc+0x6/0x20 [ 208.733033] RSP [ 208.733033] ---[ end trace 01a347638d675891 ]--- [ 208.733033] Kernel panic - not syncing: Fatal exception in interrupt [ 208.733033] Kernel Offset: 0x0 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffff9fffffff) [ 208.733033] drm_kms_helper: panic occurred, switching back to text console [ 208.733033] ---[ end Kernel panic - not syncing: Fatal exception in interrupt Can you please help me in that? On Mon, Apr 20, 2015 at 11:19 AM, Zhu Guihua wrote: > > On 04/16/2015 06:50 PM, Mohsin Kazmi wrote: > > Hi Zhu, > I am testing the hot unplug feature using your github branch > 'cpu-hotplug'. It is working fine when first time I added and deleted cpu. > But when I tried to add cpu second time, it showed me the following error: > (qemu) device_add kvm64-x86_64-cpu,apic-id=1,id=cpu1 > Duplicate ID 'cpu1' for device > > > Sorry for late reply. > > I guess you should use iasl and regenerate the ACPI tables. > > You can refer to the following issue:http://lists.nongnu.org/archive/html/qemu-devel/2014-09/msg02993.html > > > Thanks, > Zhu > > I get from one of your patch (https://patchwork.ozlabs.org/patch/439485/) > commit message that cpu is not literally removed from qemu but guest is > unable to use it anymore. Do you know the way how I can reuse that cpu > which has already added and deleted once. Or unparking the cpu mechanism. > > Thanks, > Mohsin Kazmi > > > --089e0160c162cad9f8051426e721 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Zhu,
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 I installed and enabled the --iasl=3DIASL at "= ;configuration" for qemu and then "make" it.

When i = tried to delete the cpu1 after adding it using hotplug/unplug, I am facing = the kernel panic at guest os. Kernel version (3.11.10-301.fc20.x86_64)
<= br>[root@fedora20 ~]# [=C2=A0 208.733033] general protection fault: 0000 [#= 1] SMP
[=C2=A0 208.733033] Modules linked in: nfsv3 rpcsec_gss_krb5 nfs= v4 dns_resolver nfs fscache cfg80211 rfkill ppdev crct10dif_pclmul crc32_pc= lmul crc32c_intel ghash_clmulni_intel parport_pc parport i2c_piix4 serio_ra= w pvpanic microcode bochs_drm ttm drm_kms_helper drm nfsd auth_rpcgss nfs_a= cl lockd sunrpc virtio_net virtio_pci virtio_ring virtio ata_generic pata_a= cpi
[=C2=A0 208.733033] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.17.7= -200.fc20.x86_64 #1
[=C2=A0 208.733033] Hardware name: QEMU Standard PC = (i440FX + PIIX, 1996), BIOS rel-1.7.5.1-0-g8936dbb= -20141113_115728-nilsson.home.kraxel.org 04/01/2014
[=C2=A0 208.7330= 33] task: ffff880139b7b110 ti: ffff880139bbc000 task.ti: ffff880139bbc000[=C2=A0 208.733033] RIP: 0010:[<ffffffff81058836>]=C2=A0 [<fffff= fff81058836>] native_read_pmc+0x6/0x20
[=C2=A0 208.733033] RSP: 0018:= ffff88013fc83e20=C2=A0 EFLAGS: 00000083
[=C2=A0 208.733033] RAX: 0000000= 000000001 RBX: ffff88013fc8b9e0 RCX: 0000000040000001
[=C2=A0 208.733033= ] RDX: 00000000ffffffff RSI: 0000000000000001 RDI: 0000000040000001
[=C2= =A0 208.733033] RBP: ffff88013fc83e20 R08: ffff88013fc97098 R09: 0000000000= 000000
[=C2=A0 208.733033] R10: 0000000000000001 R11: 0000000000000005 R= 12: ffffffff80000001
[=C2=A0 208.733033] R13: ffff8800b994dc00 R14: ffff= 8800b994dd98 R15: 0000000000000010
[=C2=A0 208.733033] FS:=C2=A0 0000000= 000000000(0000) GS:ffff88013fc80000(0000) knlGS:0000000000000000
[=C2=A0= 208.733033] CS:=C2=A0 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[=C2= =A0 208.733033] CR2: 00007f2798f7c0b9 CR3: 0000000001c14000 CR4: 0000000000= 0007e0
[=C2=A0 208.733033] Stack:
[=C2=A0 208.733033]=C2=A0 ffff88013= fc83e58 ffffffff8102ab83 ffff88013fc8b9e0 ffff8800b994dc00
[=C2=A0 208.7= 33033]=C2=A0 0000000000000004 ffff88013fc97104 ffff88013fc9708c ffff88013fc= 83e80
[=C2=A0 208.733033]=C2=A0 ffffffff8102ac38 ffff8800b994dc00 ffff88= 013fc8b9e0 ffff8800b994dc00
[=C2=A0 208.733033] Call Trace:
[=C2=A0 2= 08.733033]=C2=A0 <IRQ>
[=C2=A0 208.733033]=C2=A0 [<ffffffff810= 2ab83>] x86_perf_event_update+0x43/0xa0
[=C2=A0 208.733033]=C2=A0 [&l= t;ffffffff8102ac38>] x86_pmu_stop+0x58/0xd0
[=C2=A0 208.733033]=C2=A0= [<ffffffff8102acf2>] x86_pmu_del+0x42/0x130
[=C2=A0 208.733033]= =C2=A0 [<ffffffff8117c4b2>] event_sched_out.isra.75+0x102/0x1f0
[= =C2=A0 208.733033]=C2=A0 [<ffffffff8117c7f1>] __perf_remove_from_cont= ext+0x51/0xb0
[=C2=A0 208.733033]=C2=A0 [<ffffffff8117c8e1>] __per= f_event_exit_context+0x91/0xe0
[=C2=A0 208.733033]=C2=A0 [<ffffffff81= 10a82d>] flush_smp_call_function_queue+0x5d/0x130
[=C2=A0 208.733033]= =C2=A0 [<ffffffff8110af43>] generic_smp_call_function_single_interrup= t+0x13/0x60
[=C2=A0 208.733033]=C2=A0 [<ffffffff810455e7>] smp_cal= l_function_single_interrupt+0x27/0x40
[=C2=A0 208.733033]=C2=A0 [<fff= fffff8172ff7d>] call_function_single_interrupt+0x6d/0x80
[=C2=A0 208.= 733033]=C2=A0 <EOI>
[=C2=A0 208.733033]=C2=A0 [<ffffffff810589= 66>] ? native_safe_halt+0x6/0x10
[=C2=A0 208.733033]=C2=A0 [<fffff= fff8101e52f>] default_idle+0x1f/0xc0
[=C2=A0 208.733033]=C2=A0 [<f= fffffff8101eedf>] arch_cpu_idle+0xf/0x20
[=C2=A0 208.733033]=C2=A0 [&= lt;ffffffff810d1e24>] cpu_startup_entry+0x344/0x380
[=C2=A0 208.73303= 3]=C2=A0 [<ffffffff811023dc>] ? clockevents_register_device+0xbc/0x12= 0
[=C2=A0 208.733033]=C2=A0 [<ffffffff81045f30>] start_secondary+0= x210/0x2d0
[=C2=A0 208.733033] Code: c0 48 c1 e2 20 89 0e 48 09 c2 48 89= d0 5d c3 66 0f 1f 44 00 00 55 89 f0 89 f9 48 89 e5 0f 30 31 c0 5d c3 66 90= 55 89 f9 48 89 e5 <0f> 33 89 c0 48 c1 e2 20 48 09 c2 48 89 d0 5d c3 = 66 2e 0f 1f 84
[=C2=A0 208.733033] RIP=C2=A0 [<ffffffff81058836>]= native_read_pmc+0x6/0x20
[=C2=A0 208.733033]=C2=A0 RSP <ffff88013fc8= 3e20>
[=C2=A0 208.733033] ---[ end trace 01a347638d675891 ]---
[= =C2=A0 208.733033] Kernel panic - not syncing: Fatal exception in interrupt=
[=C2=A0 208.733033] Kernel Offset: 0x0 from 0xffffffff81000000 (relocat= ion range: 0xffffffff80000000-0xffffffff9fffffff)
[=C2=A0 208.733033] dr= m_kms_helper: panic occurred, switching back to text console
[=C2=A0 208= .733033] ---[ end Kernel panic - not syncing: Fatal exception in interrupt<= br>

Can you please help me in that?

<= div class=3D"gmail_extra">
On Mon, Apr 20, 20= 15 at 11:19 AM, Zhu Guihua <zhugh.fnst@cn.fujitsu.com> wrote:
=20 =20 =20

On 04/16/2015 06:50 PM, Mohsin Kazmi wrote:
=20
Hi Zhu,
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 I am testi= ng the hot unplug feature using your github branch 'cpu-hotplug'. It is working fine when firs= t time I added and deleted cpu. But when I tried to add cpu second time, it showed me the following error:
(qemu) device_add kvm64-x86_64-cpu,apic-id=3D1,id=3Dcpu1
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 D= uplicate ID 'cpu1' for device


Sorry for late reply.
I guess you should use iasl and regenerate the ACPI tables.

You can refer to the following issue:
http://lists.nongnu.org/archive/html/qemu-devel/20=
14-09/msg02993.html

Thanks,
Zhu

I get from one of your patch (https://patchwork.ozlabs.org/patch= /439485/) commit message that cpu is not literally removed from qemu but guest is unable to use it anymore. Do you know the way how I can reuse that cpu which has already added and deleted once. Or unparking the cpu mechanism.

Thanks,
Mohsin Kazmi


--089e0160c162cad9f8051426e721--