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 <sam.bobr...@au1.ibm.com> --- hw/ppc/spapr_rtas.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index ea4a2b2..4f87673 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -225,6 +225,7 @@ static void rtas_stop_self(PowerPCCPU *cpu, sPAPREnvironment *spapr, } #define DIAGNOSTICS_RUN_MODE 42 +#define UUID 48 static void rtas_ibm_get_system_parameter(PowerPCCPU *cpu, sPAPREnvironment *spapr, @@ -244,6 +245,10 @@ static void rtas_ibm_get_system_parameter(PowerPCCPU *cpu, ret = RTAS_OUT_SUCCESS; } break; + case UUID: + rtas_st_buffer(buffer, length, qemu_uuid, (qemu_uuid_set ? 16 : 0)); + ret = RTAS_OUT_SUCCESS; + break; } rtas_st(rets, 0, ret); @@ -260,6 +265,7 @@ static void rtas_ibm_set_system_parameter(PowerPCCPU *cpu, switch (parameter) { case DIAGNOSTICS_RUN_MODE: + case UUID: ret = RTAS_OUT_NOT_AUTHORIZED; break; } -- 1.9.0