Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/807882/?format=api
{ "id": 807882, "url": "http://patchwork.ozlabs.org/api/patches/807882/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170830194617.26621-8-clg@kaod.org/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api", "name": "Linux PPC development", "link_name": "linuxppc-dev", "list_id": "linuxppc-dev.lists.ozlabs.org", "list_email": "linuxppc-dev@lists.ozlabs.org", "web_url": "https://github.com/linuxppc/wiki/wiki", "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git", "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/", "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/", "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}" }, "msgid": "<20170830194617.26621-8-clg@kaod.org>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20170830194617.26621-8-clg@kaod.org/", "date": "2017-08-30T19:46:16", "name": "[v3,7/8] powerpc/xive: add XIVE Exploitation Mode to CAS", "commit_ref": "ac5e5a5402d64acd48af3287718e24ff8ba9fa21", "pull_url": null, "state": "accepted", "archived": false, "hash": "5f21f4cba7b74af72c50fbedfa0698770b9d7a4a", "submitter": { "id": 68548, "url": "http://patchwork.ozlabs.org/api/people/68548/?format=api", "name": "Cédric Le Goater", "email": "clg@kaod.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170830194617.26621-8-clg@kaod.org/mbox/", "series": [ { "id": 695, "url": "http://patchwork.ozlabs.org/api/series/695/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=695", "date": "2017-08-30T19:46:17", "name": "guest exploitation of the XIVE interrupt controller", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/695/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/807882/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/807882/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>", "X-Original-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-dev@lists.ozlabs.org" ], "Delivered-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-dev@lists.ozlabs.org" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjGfQ1zdCz9sN7\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 06:03:42 +1000 (AEST)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xjGfQ1BwQzDqnm\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 06:03:42 +1000 (AEST)", "from 1.mo68.mail-out.ovh.net (1.mo68.mail-out.ovh.net\n\t[46.105.41.146])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xjGTx2pXmzDqXl\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu, 31 Aug 2017 05:56:21 +1000 (AEST)", "from player776.ha.ovh.net (b6.ovh.net [213.186.33.56])\n\tby mo68.mail-out.ovh.net (Postfix) with ESMTP id C91407B73E\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tWed, 30 Aug 2017 21:47:16 +0200 (CEST)", "from zorba.kaod.org.com (LFbn-1-2231-173.w90-76.abo.wanadoo.fr\n\t[90.76.52.173]) (Authenticated sender: clg@kaod.org)\n\tby player776.ha.ovh.net (Postfix) with ESMTPSA id 9E4D640006E;\n\tWed, 30 Aug 2017 21:47:10 +0200 (CEST)" ], "From": "=?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@kaod.org>", "To": "linuxppc-dev@lists.ozlabs.org", "Subject": "[PATCH v3 7/8] powerpc/xive: add XIVE Exploitation Mode to CAS", "Date": "Wed, 30 Aug 2017 21:46:16 +0200", "Message-Id": "<20170830194617.26621-8-clg@kaod.org>", "X-Mailer": "git-send-email 2.13.5", "In-Reply-To": "<20170830194617.26621-1-clg@kaod.org>", "References": "<20170830194617.26621-1-clg@kaod.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "X-Ovh-Tracer-Id": "1604407368814332861", "X-VR-SPAMSTATE": "OK", "X-VR-SPAMSCORE": "-100", "X-VR-SPAMCAUSE": "gggruggvucftvghtrhhoucdtuddrfeelledrudeigddugedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm", "X-BeenThere": "linuxppc-dev@lists.ozlabs.org", "X-Mailman-Version": "2.1.23", "Precedence": "list", "List-Id": "Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>", "List-Unsubscribe": "<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://lists.ozlabs.org/pipermail/linuxppc-dev/>", "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>", "List-Help": "<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>", "List-Subscribe": "<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>", "Cc": "David Gibson <david@gibson.dropbear.id.au>, Paul Mackerras\n\t<paulus@samba.org>, =?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@kaod.org>", "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org", "Sender": "\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>" }, "content": "On POWER9, the Client Architecture Support (CAS) negotiation process\ndetermines whether the guest operates in XIVE Legacy compatibility or\nin XIVE exploitation mode. Now that we have initial guest support for\nthe XIVE interrupt controller, let's inform the hypervisor what we can\ndo.\n\nThe platform advertises the XIVE Exploitation Mode support using the\nproperty \"ibm,arch-vec-5-platform-support-vec-5\", byte 23 bits 0-1 :\n\n - 0b00 XIVE legacy mode Only\n - 0b01 XIVE exploitation mode Only\n - 0b10 XIVE legacy or exploitation mode\n\nThe OS asks for XIVE Exploitation Mode support using the property\n\"ibm,architecture-vec-5\", byte 23 bits 0-1:\n\n - 0b00 XIVE legacy mode Only\n - 0b01 XIVE exploitation mode Only\n\nSigned-off-by: Cédric Le Goater <clg@kaod.org>\n---\n\n Changes since v1:\n\n - fixed XIVE mode parsing \n - integrated the prom.h definitions\n - introduced extra bits definition : OV5_XIVE_LEGACY and OV5_XIVE_EITHER\n \n arch/powerpc/include/asm/prom.h | 5 ++++-\n arch/powerpc/kernel/prom_init.c | 34 +++++++++++++++++++++++++++++++++-\n 2 files changed, 37 insertions(+), 2 deletions(-)", "diff": "diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h\nindex 35c00d7a0cf8..825bd5998701 100644\n--- a/arch/powerpc/include/asm/prom.h\n+++ b/arch/powerpc/include/asm/prom.h\n@@ -159,7 +159,10 @@ struct of_drconf_cell {\n #define OV5_PFO_HW_842\t\t0x1140\t/* PFO Compression Accelerator */\n #define OV5_PFO_HW_ENCR\t\t0x1120\t/* PFO Encryption Accelerator */\n #define OV5_SUB_PROCESSORS\t0x1501\t/* 1,2,or 4 Sub-Processors supported */\n-#define OV5_XIVE_EXPLOIT\t0x1701\t/* XIVE exploitation supported */\n+#define OV5_XIVE_SUPPORT\t0x17C0\t/* XIVE Exploitation Support Mask */\n+#define OV5_XIVE_LEGACY\t\t0x1700\t/* XIVE legacy mode Only */\n+#define OV5_XIVE_EXPLOIT\t0x1740\t/* XIVE exploitation mode Only */\n+#define OV5_XIVE_EITHER\t\t0x1780\t/* XIVE legacy or exploitation mode */\n /* MMU Base Architecture */\n #define OV5_MMU_SUPPORT\t\t0x18C0\t/* MMU Mode Support Mask */\n #define OV5_MMU_HASH\t\t0x1800\t/* Hash MMU Only */\ndiff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c\nindex 613f79f03877..02190e90c7ae 100644\n--- a/arch/powerpc/kernel/prom_init.c\n+++ b/arch/powerpc/kernel/prom_init.c\n@@ -177,6 +177,7 @@ struct platform_support {\n \tbool hash_mmu;\n \tbool radix_mmu;\n \tbool radix_gtse;\n+\tbool xive;\n };\n \n /* Platforms codes are now obsolete in the kernel. Now only used within this\n@@ -1041,6 +1042,27 @@ static void __init prom_parse_mmu_model(u8 val,\n \t}\n }\n \n+static void __init prom_parse_xive_model(u8 val,\n+\t\t\t\t\t struct platform_support *support)\n+{\n+\tswitch (val) {\n+\tcase OV5_FEAT(OV5_XIVE_EITHER): /* Either Available */\n+\t\tprom_debug(\"XIVE - either mode supported\\n\");\n+\t\tsupport->xive = true;\n+\t\tbreak;\n+\tcase OV5_FEAT(OV5_XIVE_EXPLOIT): /* Only Exploitation mode */\n+\t\tprom_debug(\"XIVE - exploitation mode supported\\n\");\n+\t\tsupport->xive = true;\n+\t\tbreak;\n+\tcase OV5_FEAT(OV5_XIVE_LEGACY): /* Only Legacy mode */\n+\t\tprom_debug(\"XIVE - legacy mode supported\\n\");\n+\t\tbreak;\n+\tdefault:\n+\t\tprom_debug(\"Unknown xive support option: 0x%x\\n\", val);\n+\t\tbreak;\n+\t}\n+}\n+\n static void __init prom_parse_platform_support(u8 index, u8 val,\n \t\t\t\t\t struct platform_support *support)\n {\n@@ -1054,6 +1076,10 @@ static void __init prom_parse_platform_support(u8 index, u8 val,\n \t\t\tsupport->radix_gtse = true;\n \t\t}\n \t\tbreak;\n+\tcase OV5_INDX(OV5_XIVE_SUPPORT): /* Interrupt mode */\n+\t\tprom_parse_xive_model(val & OV5_FEAT(OV5_XIVE_SUPPORT),\n+\t\t\t\t support);\n+\t\tbreak;\n \t}\n }\n \n@@ -1062,7 +1088,8 @@ static void __init prom_check_platform_support(void)\n \tstruct platform_support supported = {\n \t\t.hash_mmu = false,\n \t\t.radix_mmu = false,\n-\t\t.radix_gtse = false\n+\t\t.radix_gtse = false,\n+\t\t.xive = false\n \t};\n \tint prop_len = prom_getproplen(prom.chosen,\n \t\t\t\t \"ibm,arch-vec-5-platform-support\");\n@@ -1095,6 +1122,11 @@ static void __init prom_check_platform_support(void)\n \t\t/* We're probably on a legacy hypervisor */\n \t\tprom_debug(\"Assuming legacy hash support\\n\");\n \t}\n+\n+\tif (supported.xive) {\n+\t\tprom_debug(\"Asking for XIVE\\n\");\n+\t\tibm_architecture_vec.vec5.intarch = OV5_FEAT(OV5_XIVE_EXPLOIT);\n+\t}\n }\n \n static void __init prom_send_capabilities(void)\n", "prefixes": [ "v3", "7/8" ] }