From nobody Sun May 19 22:46:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linux.ibm.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1552345357423104.07560772785484; Mon, 11 Mar 2019 16:02:37 -0700 (PDT) Received: from localhost ([127.0.0.1]:41668 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3TwG-0002CZ-QC for importer@patchew.org; Mon, 11 Mar 2019 19:02:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3Tu4-0000lV-6A for qemu-devel@nongnu.org; Mon, 11 Mar 2019 19:00:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3Tra-0004Ka-VU for qemu-devel@nongnu.org; Mon, 11 Mar 2019 18:57:44 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:52028 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h3Tra-0004JT-2A for qemu-devel@nongnu.org; Mon, 11 Mar 2019 18:57:42 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2BMsjNg101179 for ; Mon, 11 Mar 2019 18:57:41 -0400 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0b-001b2d01.pphosted.com with ESMTP id 2r5x8w6e18-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 11 Mar 2019 18:57:40 -0400 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 11 Mar 2019 22:57:39 -0000 Received: from b01cxnp23033.gho.pok.ibm.com (9.57.198.28) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 11 Mar 2019 22:57:37 -0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x2BMvZ6d20644090 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 11 Mar 2019 22:57:36 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BD721AE060; Mon, 11 Mar 2019 22:57:35 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B6C9FAE05C; Mon, 11 Mar 2019 22:57:34 +0000 (GMT) Received: from maxibm.ibmmodules.com (unknown [9.85.200.192]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Mon, 11 Mar 2019 22:57:34 +0000 (GMT) From: "Maxiwell S. Garcia" To: qemu-devel@nongnu.org Date: Mon, 11 Mar 2019 19:57:08 -0300 X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190311225709.5535-1-maxiwell@linux.ibm.com> References: <20190311225709.5535-1-maxiwell@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 x-cbid: 19031122-0072-0000-0000-0000040936E7 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010741; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000281; SDB=6.01173014; UDB=6.00613263; IPR=6.00953667; MB=3.00025936; MTD=3.00000008; XFM=3.00000015; UTC=2019-03-11 22:57:38 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19031122-0073-0000-0000-00004B750D96 Message-Id: <20190311225709.5535-2-maxiwell@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-11_16:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=3 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903110156 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH v5 1/2] spapr: helper functions to get valid host fields X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, "Maxiwell S. Garcia" , david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" The pseries options 'host-serial' and 'host-model' accepts 'none', 'passthrough', or content. The helper functions in this commit return a valid host field based on user options. Signed-off-by: Maxiwell S. Garcia --- hw/ppc/spapr.c | 58 ++++++++++++++++++++++++++---------------- include/hw/ppc/spapr.h | 3 +++ 2 files changed, 39 insertions(+), 22 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 9e01226e18..a3078f0261 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1202,6 +1202,34 @@ static void spapr_dt_chosen(sPAPRMachineState *spapr= , void *fdt) g_free(bootlist); } =20 +char *spapr_get_valid_host_serial(sPAPRMachineState *spapr) +{ + char *host_serial =3D NULL; + if (spapr->host_serial && !g_str_equal(spapr->host_serial, "none")) { + if (g_str_equal(spapr->host_serial, "passthrough")) { + /* -M host-serial=3Dpassthrough */ + kvmppc_get_host_serial(&host_serial); + } else { + host_serial =3D g_strdup(spapr->host_serial); + } + } + return host_serial; +} + +char *spapr_get_valid_host_model(sPAPRMachineState *spapr) +{ + char *host_model =3D NULL; + if (spapr->host_model && !g_str_equal(spapr->host_model, "none")) { + if (g_str_equal(spapr->host_model, "passthrough")) { + /* -M host-model=3Dpassthrough */ + kvmppc_get_host_model(&host_model); + } else { + host_model =3D g_strdup(spapr->host_model); + } + } + return host_model; +} + static void spapr_dt_hypervisor(sPAPRMachineState *spapr, void *fdt) { /* The /hypervisor node isn't in PAPR - this is a hack to allow PR @@ -1247,30 +1275,16 @@ static void *spapr_build_fdt(sPAPRMachineState *spa= pr) * Add info to guest to indentify which host is it being run on * and what is the uuid of the guest */ - if (spapr->host_model && !g_str_equal(spapr->host_model, "none")) { - if (g_str_equal(spapr->host_model, "passthrough")) { - /* -M host-model=3Dpassthrough */ - if (kvmppc_get_host_model(&buf)) { - _FDT(fdt_setprop_string(fdt, 0, "host-model", buf)); - g_free(buf); - } - } else { - /* -M host-model=3D */ - _FDT(fdt_setprop_string(fdt, 0, "host-model", spapr->host_mode= l)); - } + buf =3D spapr_get_valid_host_model(spapr); + if (buf) { + _FDT(fdt_setprop_string(fdt, 0, "host-model", buf)); + g_free(buf); } =20 - if (spapr->host_serial && !g_str_equal(spapr->host_serial, "none")) { - if (g_str_equal(spapr->host_serial, "passthrough")) { - /* -M host-serial=3Dpassthrough */ - if (kvmppc_get_host_serial(&buf)) { - _FDT(fdt_setprop_string(fdt, 0, "host-serial", buf)); - g_free(buf); - } - } else { - /* -M host-serial=3D */ - _FDT(fdt_setprop_string(fdt, 0, "host-serial", spapr->host_ser= ial)); - } + buf =3D spapr_get_valid_host_serial(spapr); + if (buf) { + _FDT(fdt_setprop_string(fdt, 0, "host-serial", buf)); + g_free(buf); } =20 buf =3D qemu_uuid_unparse_strdup(&qemu_uuid); diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 59073a7579..f7ea99dc69 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -842,6 +842,9 @@ int spapr_caps_post_migration(sPAPRMachineState *spapr); =20 void spapr_check_pagesize(sPAPRMachineState *spapr, hwaddr pagesize, Error **errp); + +char *spapr_get_valid_host_serial(sPAPRMachineState *spapr); +char *spapr_get_valid_host_model(sPAPRMachineState *spapr); /* * XIVE definitions */ --=20 2.20.1 From nobody Sun May 19 22:46:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linux.ibm.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1552345505192615.9330370515154; Mon, 11 Mar 2019 16:05:05 -0700 (PDT) Received: from localhost ([127.0.0.1]:41690 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3Tyd-0004El-3z for importer@patchew.org; Mon, 11 Mar 2019 19:04:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3Tu1-0000lV-Hj for qemu-devel@nongnu.org; Mon, 11 Mar 2019 19:00:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3Tre-0004M4-Ie for qemu-devel@nongnu.org; Mon, 11 Mar 2019 18:57:47 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:36500 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h3Trc-0004Kv-Hf for qemu-devel@nongnu.org; Mon, 11 Mar 2019 18:57:45 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2BMraiB027304 for ; Mon, 11 Mar 2019 18:57:43 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0b-001b2d01.pphosted.com with ESMTP id 2r60t088r4-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 11 Mar 2019 18:57:43 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 11 Mar 2019 22:57:42 -0000 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 11 Mar 2019 22:57:41 -0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x2BMveO621823738 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 11 Mar 2019 22:57:40 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 386D1AE063; Mon, 11 Mar 2019 22:57:40 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3329EAE05C; Mon, 11 Mar 2019 22:57:39 +0000 (GMT) Received: from maxibm.ibmmodules.com (unknown [9.85.200.192]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Mon, 11 Mar 2019 22:57:39 +0000 (GMT) From: "Maxiwell S. Garcia" To: qemu-devel@nongnu.org Date: Mon, 11 Mar 2019 19:57:09 -0300 X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190311225709.5535-1-maxiwell@linux.ibm.com> References: <20190311225709.5535-1-maxiwell@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19031122-0040-0000-0000-000004D036D0 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010741; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000281; SDB=6.01173014; UDB=6.00606765; IPR=6.00953668; MB=3.00025936; MTD=3.00000008; XFM=3.00000015; UTC=2019-03-11 22:57:42 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19031122-0041-0000-0000-000008DB4ACD Message-Id: <20190311225709.5535-3-maxiwell@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-11_16:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=3 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=864 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903110156 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx0b-001b2d01.pphosted.com id x2BMraiB027304 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH v5 2/2] spapr-rtas: add ibm, get-vpd RTAS interface X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, "Maxiwell S. Garcia" , david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" This adds a handler for ibm,get-vpd RTAS calls, allowing pseries guest to collect host information. It is disabled by default to avoid unwanted information leakage. To enable it, use: =E2=80=98-M pseries,host-serial=3D{passthrough|string},host-model=3D{passth= rough|string}=E2=80=99 Only the SE and TM keywords are returned at the moment. SE for Machine or Cabinet Serial Number and TM for Machine Type and Model The SE and TM keywords are controlled by 'host-serial' and 'host-model' options, respectively. In the case of 'passthrough', the SE shows the host 'system-id' information and the TM shows the host 'model' information. Powerpc-utils tools can dispatch RTAS calls to retrieve host information using this ibm,get-vpd interface. The 'host-serial' and 'host-model' nodes of device-tree hold the same information but in a static manner, which is useless after a migration operation. Signed-off-by: Maxiwell S. Garcia --- hw/ppc/spapr_rtas.c | 110 +++++++++++++++++++++++++++++++++++++++++ include/hw/ppc/spapr.h | 12 ++++- 2 files changed, 121 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index 7a2cb786a3..778abcef91 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -287,6 +287,112 @@ static void rtas_ibm_set_system_parameter(PowerPCCPU = *cpu, rtas_st(rets, 0, ret); } =20 +static inline int vpd_st(target_ulong addr, target_ulong len, + const void *val, uint16_t val_len) +{ + hwaddr phys =3D ppc64_phys_to_real(addr); + if (len < val_len) { + return RTAS_OUT_PARAM_ERROR; + } + cpu_physical_memory_write(phys, val, val_len); + return RTAS_OUT_SUCCESS; +} + +static inline void vpd_ret(target_ulong rets, const int status, + const int next_seq_number, const int bytes_retu= rned) +{ + rtas_st(rets, 0, status); + rtas_st(rets, 1, next_seq_number); + rtas_st(rets, 2, bytes_returned); +} + +static struct { + char *keyword; + char *value; +} rtas_get_vpd_fields[RTAS_IBM_GET_VPD_KEYWORDS_MAX + 1]; + +static void rtas_ibm_get_vpd_fields_register(sPAPRMachineState *sm) +{ + int i =3D 0; + char *buf =3D NULL; + + memset(rtas_get_vpd_fields, 0, sizeof(rtas_get_vpd_fields)); + + buf =3D spapr_get_valid_host_serial(sm); + if (buf) { + rtas_get_vpd_fields[i].keyword =3D g_strdup("SE"); + rtas_get_vpd_fields[i++].value =3D g_strdup(buf); + g_free(buf); + } + buf =3D spapr_get_valid_host_model(sm); + if (buf) { + rtas_get_vpd_fields[i].keyword =3D g_strdup("TM"); + rtas_get_vpd_fields[i++].value =3D g_strdup(buf); + g_free(buf); + } +} + +static void rtas_ibm_get_vpd(PowerPCCPU *cpu, + sPAPRMachineState *spapr, + uint32_t token, uint32_t nargs, + target_ulong args, + uint32_t nret, target_ulong rets) +{ + target_ulong loc_code_addr; + target_ulong work_area_addr; + target_ulong work_area_size; + target_ulong seq_number; + unsigned char loc_code =3D 0; + unsigned int next_seq_number =3D 1; + int status =3D RTAS_IBM_GET_VPD_PARAMETER_ERROR; + int ret =3D RTAS_OUT_PARAM_ERROR; + char *vpd_field =3D NULL; + unsigned int vpd_field_len =3D 0; + + /* RTAS not authorized if no keywords have been registered */ + if (!rtas_get_vpd_fields[0].keyword) { + vpd_ret(rets, RTAS_OUT_NOT_AUTHORIZED, 1, 0); + return; + } + + loc_code_addr =3D rtas_ld(args, 0); + work_area_addr =3D rtas_ld(args, 1); + work_area_size =3D rtas_ld(args, 2); + seq_number =3D rtas_ld(args, 3); + + /* Specific Location Code is not supported and seq_number */ + /* must be checked to avoid out of bound index error */ + cpu_physical_memory_read(loc_code_addr, &loc_code, 1); + if ((loc_code !=3D 0) || (seq_number <=3D 0) || + (seq_number > RTAS_IBM_GET_VPD_KEYWORDS_MAX)) { + vpd_ret(rets, RTAS_IBM_GET_VPD_PARAMETER_ERROR, 1, 0); + return; + } + + vpd_field =3D g_strdup_printf("%s %s", + rtas_get_vpd_fields[seq_number - 1].keyword, + rtas_get_vpd_fields[seq_number - 1].value); + + if (vpd_field) { + vpd_field_len =3D strlen(vpd_field); + ret =3D vpd_st(work_area_addr, work_area_size, + vpd_field, vpd_field_len + 1); + + if (ret =3D=3D 0) { + next_seq_number =3D seq_number + 1; + if (rtas_get_vpd_fields[next_seq_number - 1].keyword) { + status =3D RTAS_IBM_GET_VPD_CONTINUE; + } else { + status =3D RTAS_IBM_GET_VPD_SUCCESS; + next_seq_number =3D 1; + } + } + } + + vpd_ret(rets, status, next_seq_number, vpd_field_len); + g_free(vpd_field); +} + static void rtas_ibm_os_term(PowerPCCPU *cpu, sPAPRMachineState *spapr, uint32_t token, uint32_t nargs, @@ -464,6 +570,8 @@ void spapr_load_rtas(sPAPRMachineState *spapr, void *fd= t, hwaddr addr) fdt_strerror(ret)); exit(1); } + + rtas_ibm_get_vpd_fields_register(spapr); } =20 static void core_rtas_register_types(void) @@ -485,6 +593,8 @@ static void core_rtas_register_types(void) rtas_ibm_set_system_parameter); spapr_rtas_register(RTAS_IBM_OS_TERM, "ibm,os-term", rtas_ibm_os_term); + spapr_rtas_register(RTAS_IBM_GET_VPD, "ibm,get-vpd", + rtas_ibm_get_vpd); spapr_rtas_register(RTAS_SET_POWER_LEVEL, "set-power-level", rtas_set_power_level); spapr_rtas_register(RTAS_GET_POWER_LEVEL, "get-power-level", diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index f7ea99dc69..84e57c3f34 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -608,14 +608,24 @@ target_ulong spapr_hypercall(PowerPCCPU *cpu, target_= ulong opcode, #define RTAS_IBM_CREATE_PE_DMA_WINDOW (RTAS_TOKEN_BASE + 0x27) #define RTAS_IBM_REMOVE_PE_DMA_WINDOW (RTAS_TOKEN_BASE + 0x28) #define RTAS_IBM_RESET_PE_DMA_WINDOW (RTAS_TOKEN_BASE + 0x29) +#define RTAS_IBM_GET_VPD (RTAS_TOKEN_BASE + 0x2A) =20 -#define RTAS_TOKEN_MAX (RTAS_TOKEN_BASE + 0x2A) +#define RTAS_TOKEN_MAX (RTAS_TOKEN_BASE + 0x2B) =20 /* RTAS ibm,get-system-parameter token values */ #define RTAS_SYSPARM_SPLPAR_CHARACTERISTICS 20 #define RTAS_SYSPARM_DIAGNOSTICS_RUN_MODE 42 #define RTAS_SYSPARM_UUID 48 =20 +/* RTAS ibm,get-vpd status values */ +#define RTAS_IBM_GET_VPD_VPD_CHANGED -4 +#define RTAS_IBM_GET_VPD_PARAMETER_ERROR -3 +#define RTAS_IBM_GET_VPD_HARDWARE_ERROR -1 +#define RTAS_IBM_GET_VPD_SUCCESS 0 +#define RTAS_IBM_GET_VPD_CONTINUE 1 + +#define RTAS_IBM_GET_VPD_KEYWORDS_MAX 2 + /* RTAS indicator/sensor types * * as defined by PAPR+ 2.7 7.3.5.4, Table 41 --=20 2.20.1