[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH v2 0/7] ppc: compute cpu_dt_id in the machine code
From: |
Bharata B Rao |
Subject: |
Re: [Qemu-ppc] [PATCH v2 0/7] ppc: compute cpu_dt_id in the machine code |
Date: |
Sat, 2 Jul 2016 15:25:07 +0530 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Sat, Jul 02, 2016 at 12:41:14AM +0200, Greg Kurz wrote:
> This series is a sequel to the discussion on a patch from Ben's powernv
> patchset:
>
> http://patchwork.ozlabs.org/patch/597153/
>
> Indeed, since the DT is a machine abstraction, it should definitely sit
> under hw/ppc and not in the target code:
> - all machine types are forced to share the same numbering logic
> - user mode does not need that => there are #ifdef everywhere
>
> So this series moves all the current numbering logic to the machine
> code.
>
> The patchset was completely re-written according to Igor's valuable
> suggestions. The main change is that cpu_dt_id is now computed out
> of a cpu_index provided by the machine, instead of bending the code
> to use cs->cpu_index.
>
> I resend Bharata's patch without any modification because patch 6 is
> based on it (pseries-2.7 support).
>
> I did not see any regression on pseries-2.6, pseries-2.7 and CPU hotplug.
Haven't had a chance to debug yet, but just noticed that CPU hotplug
seems to have issues after this patchset on mainline.
-smp 8,cores=1,threads=4,maxcpus=32
(qemu) device_add host-spapr-cpu-core,id=core1,core-id=16
(qemu) info cpus
* CPU #0: nip=0xc00000000007dc6c thread_id=10865
CPU #1: nip=0xc00000000007dc6c thread_id=10866
CPU #2: nip=0xc00000000007dc6c thread_id=10867
CPU #3: nip=0xc00000000007dc6c thread_id=10868
CPU #4: nip=0xc00000000007dc6c thread_id=10869
CPU #5: nip=0xc00000000007dc6c thread_id=10870
CPU #6: nip=0xc00000000007dc6c thread_id=10871
CPU #7: nip=0xc00000000007dc6c thread_id=10872
CPU #8: nip=0x0000000000000000 (halted) thread_id=10948
CPU #9: nip=0x0000000000000000 (halted) thread_id=10949
CPU #10: nip=0x0000000000000000 (halted) thread_id=10950
CPU #11: nip=0x0000000000000000 (halted) thread_id=10951
address@hidden cpus]# ls
#address-cells ibm,drc-power-domains name #size-cells
ibm,drc-indexes ibm,drc-types PowerPC,address@hidden
ibm,drc-names linux,phandle PowerPC,address@hidden
address@hidden cpus]# DEBUG: read_rtas_events(): Received RTAS event 1
DEBUG: handle_rtas_event(): Handling RTAS event 1
DEBUG: handle_rtas_event(): Entering check_platform_dump()
DEBUG: print_rtas_event(): Writing RTAS event 1 to /var/log/platform
DEBUG: handle_rtas_event(): Entering Hotplug handler
DEBUG: handle_hotplug_event(): Build drmgr command
DEBUG: handle_hotplug_event(): run: drmgr -c cpu -a -s 0x10000010 (null)
DEBUG: handle_hotplug_event(): Invoke drmgr command
Validating CPU DLPAR capability...yes.
Requested CPU with drc index 10000010 is already present.
DEBUG: handle_hotplug_event(): drmgr call exited with 1
If instead of core-id=16, if I use core-id=24, then hotplug succeeds but
the CPU gets unexpected dt_id(0x30) as shown below:
(qemu) device_add host-spapr-cpu-core,id=core2,core-id=24
address@hidden cpus]# ls
#address-cells ibm,drc-power-domains name #size-cells
ibm,drc-indexes ibm,drc-types PowerPC,address@hidden
ibm,drc-names linux,phandle PowerPC,address@hidden
address@hidden cpus]# DEBUG: read_rtas_events(): Received RTAS event 1
DEBUG: handle_rtas_event(): Handling RTAS event 1
DEBUG: handle_rtas_event(): Entering check_platform_dump()
DEBUG: print_rtas_event(): Writing RTAS event 1 to /var/log/platform
DEBUG: handle_rtas_event(): Entering Hotplug handler
DEBUG: handle_hotplug_event(): Build drmgr command
DEBUG: handle_hotplug_event(): run: drmgr -c cpu -a -s 0x10000018 (null)
DEBUG: handle_hotplug_event(): Invoke drmgr command
Validating CPU DLPAR capability...yes.
Could not retrieve ibm,ppc-interrupt-server#s property for
CPU 24
Rotating logs...
DEBUG: handle_hotplug_event(): drmgr call exited with 0
DEBUG: process_v6(): Processing version 6 event
DEBUG: report_menugoal(): menugoal: number = 651301, message = "Platform
Firmware Not applicable."
DEBUG: (Sequence #1) servicelog key 96.
address@hidden cpus]# ls
#address-cells ibm,drc-power-domains name
PowerPC,address@hidden
ibm,drc-indexes ibm,drc-types PowerPC,address@hidden #size-cells
ibm,drc-names linux,phandle PowerPC,address@hidden
- Re: [Qemu-ppc] [PATCH v2 4/7] ppc: open code cpu creation for machine types, (continued)
[Qemu-ppc] [PATCH v2 5/7] ppc: introduce ppc_set_vcpu_dt_id(), Greg Kurz, 2016/07/01
[Qemu-ppc] [PATCH v2 6/7] spapr: use ppc_set_vcpu_dt_id() in CPU hotplug code, Greg Kurz, 2016/07/01
[Qemu-ppc] [PATCH v2 7/7] ppc: move the cpu_dt_id logic to machine code, Greg Kurz, 2016/07/01
Re: [Qemu-ppc] [PATCH v2 0/7] ppc: compute cpu_dt_id in the machine code,
Bharata B Rao <=