From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzEVu-0001lm-RT for qemu-devel@nongnu.org; Mon, 23 Jun 2014 20:23:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzEVk-000445-AW for qemu-devel@nongnu.org; Mon, 23 Jun 2014 20:23:06 -0400 Received: from e23smtp04.au.ibm.com ([202.81.31.146]:54294) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzEVj-00043q-JS for qemu-devel@nongnu.org; Mon, 23 Jun 2014 20:22:56 -0400 Received: from /spool/local by e23smtp04.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 24 Jun 2014 10:22:52 +1000 Message-ID: <53A8C4D8.1090401@au1.ibm.com> Date: Tue, 24 Jun 2014 10:22:48 +1000 From: Sam Bobroff MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH 2/4] spapr: Add RTAS sysparm UUID List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org 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 --- 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