From: "Cédric Le Goater" <clg@kaod.org>
To: linuxppc-dev@lists.ozlabs.org
Cc: "Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Paul Mackerras" <paulus@samba.org>,
"David Gibson" <david@gibson.dropbear.id.au>,
"Cédric Le Goater" <clg@kaod.org>
Subject: [RFC PATCH 2/2] powerpc/xive: add XIVE exploitation mode to CAS
Date: Thu, 22 Jun 2017 11:29:17 +0200 [thread overview]
Message-ID: <1498123757-18427-3-git-send-email-clg@kaod.org> (raw)
In-Reply-To: <1498123757-18427-1-git-send-email-clg@kaod.org>
On POWER9, the Client Architecture Support (CAS) negotiation process
determines whether the guest operates in XIVE Legacy compatibility or
in XIVE exploitation mode.
Now that we have initial guest support for the XIVE interrupt
controller, let's inform the hypervisor what we can do.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
arch/powerpc/kernel/prom_init.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index dd8a04f3053a..d7065d801f94 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -174,6 +174,7 @@ struct platform_support {
bool hash_mmu;
bool radix_mmu;
bool radix_gtse;
+ bool xive;
};
/* Platforms codes are now obsolete in the kernel. Now only used within this
@@ -1051,6 +1052,12 @@ static void __init prom_parse_platform_support(u8 index, u8 val,
support->radix_gtse = true;
}
break;
+ case OV5_INDX(OV5_XIVE_EXPLOIT): /* XIVE Exploitation mode */
+ if (val & OV5_FEAT(OV5_XIVE_EXPLOIT)) {
+ prom_debug("XIVE - exploitation mode\n");
+ support->xive = true;
+ }
+ break;
}
}
@@ -1059,7 +1066,8 @@ static void __init prom_check_platform_support(void)
struct platform_support supported = {
.hash_mmu = false,
.radix_mmu = false,
- .radix_gtse = false
+ .radix_gtse = false,
+ .xive = false
};
int prop_len = prom_getproplen(prom.chosen,
"ibm,arch-vec-5-platform-support");
@@ -1092,6 +1100,11 @@ static void __init prom_check_platform_support(void)
/* We're probably on a legacy hypervisor */
prom_debug("Assuming legacy hash support\n");
}
+
+ if (supported.xive) {
+ prom_debug("Asking for XIVE\n");
+ ibm_architecture_vec.vec5.intarch = OV5_FEAT(OV5_XIVE_EXPLOIT);
+ }
}
static void __init prom_send_capabilities(void)
--
2.7.5
prev parent reply other threads:[~2017-06-22 9:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-22 9:29 [RFC PATCH 0/2] guest exploitation of the XIVE interrupt controller Cédric Le Goater
2017-06-22 9:29 ` [RFC PATCH 1/2] powerpc/xive: " Cédric Le Goater
2017-06-22 12:20 ` Benjamin Herrenschmidt
2017-06-23 13:05 ` Cédric Le Goater
2017-07-03 3:55 ` David Gibson
2017-07-03 4:19 ` Benjamin Herrenschmidt
2017-07-03 7:11 ` Cédric Le Goater
2017-07-05 11:07 ` David Gibson
2017-07-05 14:38 ` Benjamin Herrenschmidt
2017-07-05 15:13 ` Cédric Le Goater
2017-07-05 17:31 ` Cédric Le Goater
2017-06-22 9:29 ` Cédric Le Goater [this message]
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=1498123757-18427-3-git-send-email-clg@kaod.org \
--to=clg@kaod.org \
--cc=benh@kernel.crashing.org \
--cc=david@gibson.dropbear.id.au \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.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).