Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
qemu.3217
0107-spapr-Add-RTAS-sysparm-SPLPAR-Chara.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0107-spapr-Add-RTAS-sysparm-SPLPAR-Chara.patch of Package qemu.3217
From f45b302528abdf74c3082e348653753845704269 Mon Sep 17 00:00:00 2001 From: Sam bobroff <sam.bobroff@au1.ibm.com> Date: Wed, 25 Jun 2014 13:54:32 +1000 Subject: [PATCH] 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> (cherry picked from commit 3b50d8974b979bbaa091978e70d83de939593d1f) --- hw/ppc/spapr_rtas.c | 8 ++++++++ include/hw/ppc/spapr.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index f1b701d..173aaff 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -236,6 +236,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; @@ -262,6 +269,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; diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 4099ff6..1948e3a 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -359,6 +359,7 @@ static inline int spapr_allocate_lsi(int hint) #define RTAS_OUT_NOT_AUTHORIZED -9002 /* RTAS ibm,get-system-parameter token values */ +#define RTAS_SYSPARM_SPLPAR_CHARACTERISTICS 20 #define RTAS_SYSPARM_DIAGNOSTICS_RUN_MODE 42 #define RTAS_SYSPARM_UUID 48
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor