From: Sam bobroff Date: Wed, 25 Jun 2014 03:54:31 +0000 (+1000) Subject: spapr: Add RTAS sysparm UUID X-Git-Tag: v2.1.0-rc0~20^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b907d7b0fdc8b2bbb93a37ac4b5c68a44f22e8ac;p=thirdparty%2Fqemu.git spapr: Add RTAS sysparm UUID Add support for the UUID parameter to the emulated RTAS call ibm,get-system-parameter. Return the guest's UUID as the value for the RTAS UUID system parameter, or null (a zero length result) if it is not set. Signed-off-by: Sam Bobroff Signed-off-by: Alexander Graf --- diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index ac9a8601eaa..dba4e2b20be 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -240,6 +240,9 @@ static void rtas_ibm_get_system_parameter(PowerPCCPU *cpu, rtas_st_buffer(buffer, length, ¶m_val, sizeof(param_val)); break; } + case RTAS_SYSPARM_UUID: + rtas_st_buffer(buffer, length, qemu_uuid, (qemu_uuid_set ? 16 : 0)); + break; default: ret = RTAS_OUT_NOT_SUPPORTED; } @@ -258,6 +261,7 @@ static void rtas_ibm_set_system_parameter(PowerPCCPU *cpu, switch (parameter) { case RTAS_SYSPARM_DIAGNOSTICS_RUN_MODE: + case RTAS_SYSPARM_UUID: ret = RTAS_OUT_NOT_AUTHORIZED; break; } diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index d043771616e..46b7a71734c 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -399,6 +399,7 @@ static inline int spapr_allocate_lsi(int hint) /* RTAS ibm,get-system-parameter token values */ #define RTAS_SYSPARM_DIAGNOSTICS_RUN_MODE 42 +#define RTAS_SYSPARM_UUID 48 /* Possible values for the platform-processor-diagnostics-run-mode parameter * of the RTAS ibm,get-system-parameter call.