summaryrefslogtreecommitdiffstats
path: root/hw/ppc/spapr_rtas.c
diff options
context:
space:
mode:
authorSam bobroff2014-06-25 05:54:32 +0200
committerAlexander Graf2014-06-27 13:48:26 +0200
commit3b50d8974b979bbaa091978e70d83de939593d1f (patch)
tree9e02f9bff77b6ac9da3ce9146931c3013cce03ec /hw/ppc/spapr_rtas.c
parentspapr: Add RTAS sysparm UUID (diff)
downloadqemu-3b50d8974b979bbaa091978e70d83de939593d1f.tar.gz
qemu-3b50d8974b979bbaa091978e70d83de939593d1f.tar.xz
qemu-3b50d8974b979bbaa091978e70d83de939593d1f.zip
spapr: Add RTAS sysparm SPLPAR Characteristics
Add support for the SPLPAR Characteristics parameter to the emulated RTAS call ibm,get-system-parameter. The support provides just enough information to allow "cat /proc/powerpc/lparcfg" to succeed without generating a kernel error message. Without this patch the above command will produce the following kernel message: arch/powerpc/platforms/pseries/lparcfg.c \ parse_system_parameter_string Error calling get-system-parameter \ (0xfffffffd) Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/ppc/spapr_rtas.c')
-rw-r--r--hw/ppc/spapr_rtas.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
index dba4e2b20b..9ba1ba69f9 100644
--- a/hw/ppc/spapr_rtas.c
+++ b/hw/ppc/spapr_rtas.c
@@ -234,6 +234,13 @@ static void rtas_ibm_get_system_parameter(PowerPCCPU *cpu,
target_ulong ret = RTAS_OUT_SUCCESS;
switch (parameter) {
+ case RTAS_SYSPARM_SPLPAR_CHARACTERISTICS: {
+ char *param_val = g_strdup_printf("MaxEntCap=%d,MaxPlatProcs=%d",
+ max_cpus, smp_cpus);
+ rtas_st_buffer(buffer, length, (uint8_t *)param_val, strlen(param_val));
+ g_free(param_val);
+ break;
+ }
case RTAS_SYSPARM_DIAGNOSTICS_RUN_MODE: {
uint8_t param_val = DIAGNOSTICS_RUN_MODE_DISABLED;
@@ -260,6 +267,7 @@ static void rtas_ibm_set_system_parameter(PowerPCCPU *cpu,
target_ulong ret = RTAS_OUT_NOT_SUPPORTED;
switch (parameter) {
+ case RTAS_SYSPARM_SPLPAR_CHARACTERISTICS:
case RTAS_SYSPARM_DIAGNOSTICS_RUN_MODE:
case RTAS_SYSPARM_UUID:
ret = RTAS_OUT_NOT_AUTHORIZED;