From: Sam Bobroff <sam.bobroff@au1.ibm.com>
To: qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org
Subject: [Qemu-devel] [PATCH v2 3/4] spapr: Add RTAS sysparm UUID
Date: Wed, 25 Jun 2014 13:54:31 +1000 [thread overview]
Message-ID: <39a75e27c5f204214437d12102322ae86659fcca.1403668461.git.sam.bobroff@au1.ibm.com> (raw)
In-Reply-To: <cover.1403668461.git.sam.bobroff@au1.ibm.com>
In-Reply-To: <cover.1403668461.git.sam.bobroff@au1.ibm.com>
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.bobroff@au1.ibm.com>
---
hw/ppc/spapr_rtas.c | 4 ++++
include/hw/ppc/spapr.h | 1 +
2 files changed, 5 insertions(+)
diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
index d3b57a1..9804873 100644
--- a/hw/ppc/spapr_rtas.c
+++ b/hw/ppc/spapr_rtas.c
@@ -242,6 +242,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;
}
@@ -260,6 +263,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 9b28e96..fe02fb4 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -360,6 +360,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.
--
1.9.0
next prev parent reply other threads:[~2014-06-25 3:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-25 3:54 [Qemu-devel] [PATCH v2 0/4] spapr: improve RTAS get_system_parameter Sam Bobroff
2014-06-25 3:54 ` [Qemu-devel] [PATCH v2 1/4] spapr: Add rtas_st_buffer utility function Sam Bobroff
2014-06-25 3:54 ` [Qemu-devel] [PATCH v2 2/4] spapr: Fix RTAS sysparm DIAGNOSTICS_RUN_MODE Sam Bobroff
2014-06-25 11:10 ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
2014-06-25 3:54 ` Sam Bobroff [this message]
2014-06-25 3:54 ` [Qemu-devel] [PATCH v2 4/4] spapr: Add RTAS sysparm SPLPAR Characteristics Sam Bobroff
2014-06-25 11:12 ` [Qemu-devel] [Qemu-ppc] [PATCH v2 0/4] spapr: improve RTAS get_system_parameter Alexander Graf
2014-06-25 23:38 ` Sam Bobroff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=39a75e27c5f204214437d12102322ae86659fcca.1403668461.git.sam.bobroff@au1.ibm.com \
--to=sam.bobroff@au1.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).