Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 2/2] target-ppc: Implement rtas_get_sysparm(PROCESSOR_MODULE_INFO)

2015-12-02 Thread Sukadev Bhattiprolu
David Gibson [da...@gibson.dropbear.id.au] wrote: | > Should we walk the /proc/device-tree/cpus/ tree and count only dirs with | > device-type "cpu" (rather than relying on the pattern PowerPC,POWER*)? | | Yes, I think you'll have to. | Ok. Are we ok with the xscom check I have (copied below): +

Re: [Qemu-devel] [PATCH v3 2/2] target-ppc: Implement rtas_get_sysparm(PROCESSOR_MODULE_INFO)

2015-12-01 Thread Sukadev Bhattiprolu
David Gibson [da...@gibson.dropbear.id.au] wrote: | > @@ -240,6 +241,36 @@ static void rtas_ibm_get_system_parameter(PowerPCCPU *cpu, | > target_ulong ret = RTAS_OUT_SUCCESS; | > | > switch (parameter) { | > +case RTAS_SYSPARM_PROCESSOR_MODULE_INFO: { | > +struct sPAPRRTASM

Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 2/2] target-ppc: Implement rtas_get_sysparm(PROCESSOR_MODULE_INFO)

2015-11-24 Thread Sukadev Bhattiprolu
David, Alexey, Any comments on this patch? Suka Sukadev Bhattiprolu [suka...@linux.vnet.ibm.com] wrote: | Implement RTAS_SYSPARM_PROCESSOR_MODULE_INFO parameter to rtas_get_sysparm() | call in qemu. This call returns the processor module (socket), chip and core | information as specified in

[Qemu-devel] [PATCH v3 1/2] target-ppc: Define kvmppc_read_int_dt()

2015-11-13 Thread Sukadev Bhattiprolu
Extract code from the function kvmppc_read_int_cpu_dt() that actually reads the file into a separate function, so it can be called from other places. Signed-off-by: Sukadev Bhattiprolu --- target-ppc/kvm.c | 36 ++-- 1 file changed, 22 insertions(+), 14 deletions

[Qemu-devel] [PATCH v3 2/2] target-ppc: Implement rtas_get_sysparm(PROCESSOR_MODULE_INFO)

2015-11-13 Thread Sukadev Bhattiprolu
later. Thanks to input from Nishanth Aravamudan, Alexey Kardashevskiy, David Gibson, Thomas Huth. Signed-off-by: Sukadev Bhattiprolu --- Changelog[v3]: [David Gibson] Use glob() to simplify pattern matching path names. Move new code into target-ppc/{kvm.c,kvm_ppc.h} to not i

Re: [Qemu-devel] [PATCH v2 1/1] target-ppc: Implement rtas_get_sysparm(PROCESSOR_MODULE_INFO)

2015-11-13 Thread Sukadev Bhattiprolu
Thomas Huth [th...@redhat.com] wrote: | On 10/11/15 05:22, Sukadev Bhattiprolu wrote: | [...] | > | > +static int file_read_buf(char *file_name, char *buf, int len) | > | > +{ | > | > +int rc; | > | > +FILE *fp; | > | > + | > | > +fp = fopen(f

Re: [Qemu-devel] [PATCH v2 1/1] target-ppc: Implement rtas_get_sysparm(PROCESSOR_MODULE_INFO)

2015-11-13 Thread Sukadev Bhattiprolu
David Gibson [da...@gibson.dropbear.id.au] wrote: | On Mon, Nov 09, 2015 at 08:22:32PM -0800, Sukadev Bhattiprolu wrote: | > David Gibson [da...@gibson.dropbear.id.au] wrote: | > | On Wed, Nov 04, 2015 at 03:06:05PM -0800, Sukadev Bhattiprolu wrote: | > | &g

Re: [Qemu-devel] [PATCH v2 1/1] target-ppc: Implement rtas_get_sysparm(PROCESSOR_MODULE_INFO)

2015-11-10 Thread Sukadev Bhattiprolu
Alexey Kardashevskiy [a...@ozlabs.ru] wrote: | | | No, you do not try reading "ibm,chip-id" if there is no "xscom@" | under /proc/device-tree, there is "continue": | | +if (strncmp(xscom_prefix, ent->d_name, strlen(xscom_prefix))) { | +continue; | +} | Ah, yes, Than

Re: [Qemu-devel] [PATCH v2 1/1] target-ppc: Implement rtas_get_sysparm(PROCESSOR_MODULE_INFO)

2015-11-09 Thread Sukadev Bhattiprolu
Alexey Kardashevskiy [a...@ozlabs.ru] wrote: | >| When exactly does a socket become a module? The SPAPR spec uses "sockets" here. | > | >I am trying to get the terminology too :-) Is socket a slot where a | >module is attached? | | Sorry, no idea. Ok. | | | > | >I will change the variable n

Re: [Qemu-devel] [PATCH v2 1/1] target-ppc: Implement rtas_get_sysparm(PROCESSOR_MODULE_INFO)

2015-11-09 Thread Sukadev Bhattiprolu
David Gibson [da...@gibson.dropbear.id.au] wrote: | On Wed, Nov 04, 2015 at 03:06:05PM -0800, Sukadev Bhattiprolu wrote: | > Implement RTAS_SYSPARM_PROCESSOR_MODULE_INFO parameter to rtas_get_sysparm() | > call in qemu. This call returns the processor module (socket), chip and core | > in

Re: [Qemu-devel] [PATCH v2 1/1] target-ppc: Implement rtas_get_sysparm(PROCESSOR_MODULE_INFO)

2015-11-09 Thread Sukadev Bhattiprolu
Alexey Kardashevskiy [a...@ozlabs.ru] wrote: | On 11/05/2015 10:06 AM, Sukadev Bhattiprolu wrote: | >Implement RTAS_SYSPARM_PROCESSOR_MODULE_INFO parameter to rtas_get_sysparm() | >call in qemu. This call returns the processor module (socket), chip and core | >information as specified i

[Qemu-devel] [PATCH v2 1/1] target-ppc: Implement rtas_get_sysparm(PROCESSOR_MODULE_INFO)

2015-11-04 Thread Sukadev Bhattiprolu
: Sukadev Bhattiprolu --- Changelog[v2]: [Alexey Kardashevsk] Use existing interfaces like ldl_be_p(), stw_be_phys(), g_hash_table_new_full(), error_report() rather than re-inventing; fix indentation, function prottypes etc; Drop the fts