]> Git Repo - qemu.git/commitdiff
spapr: Add RTAS sysparm UUID
authorSam bobroff <[email protected]>
Wed, 25 Jun 2014 03:54:31 +0000 (13:54 +1000)
committerAlexander Graf <[email protected]>
Fri, 27 Jun 2014 11:48:26 +0000 (13:48 +0200)
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 <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
hw/ppc/spapr_rtas.c
include/hw/ppc/spapr.h

index ac9a8601eaabb415bd1bbf8692a3fb953a0167b9..dba4e2b20bee5c93955fed87de8447f548db9f93 100644 (file)
@@ -240,6 +240,9 @@ static void rtas_ibm_get_system_parameter(PowerPCCPU *cpu,
         rtas_st_buffer(buffer, length, &param_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;
     }
index d043771616e2cce2f1d8b2b3fb5e3877b2fb5031..46b7a71734c54b330f75ad68d35e83f0cb3ff445 100644 (file)
@@ -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.
This page took 0.027255 seconds and 4 git commands to generate.