[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 16/17] spapr: introduce the XIVE_EXPLOIT option in CAS
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 16/17] spapr: introduce the XIVE_EXPLOIT option in CAS |
Date: |
Tue, 11 Jul 2017 14:39:16 +1000 |
From: Cédric Le Goater <address@hidden>
On POWER9, the Client Architecture Support (CAS) negotiation process
determines whether the guest operates in XIVE Legacy compatibility
(the former POWER8 interrupt model) or in XIVE exploitation mode (the
newer POWER9 interrupt model).
Bit 7 of Byte 23 of vector 5 is used for this purpose.
Signed-off-by: Cédric Le Goater <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr.c | 13 +++++++------
include/hw/ppc/spapr_ovec.h | 1 +
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index ba8f57a..ff78a22 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -910,7 +910,8 @@ static void spapr_dt_ov5_platform_support(void *fdt, int
chosen)
{
PowerPCCPU *first_ppc_cpu = POWERPC_CPU(first_cpu);
- char val[2 * 3] = {
+ char val[2 * 4] = {
+ 23, 0x00, /* Xive mode: 0 = legacy (as in ISA 2.7), 1 = Exploitation */
24, 0x00, /* Hash/Radix, filled in below. */
25, 0x00, /* Hash options: Segment Tables == no, GTSE == no. */
26, 0x40, /* Radix options: GTSE == yes. */
@@ -918,19 +919,19 @@ static void spapr_dt_ov5_platform_support(void *fdt, int
chosen)
if (kvm_enabled()) {
if (kvmppc_has_cap_mmu_radix() && kvmppc_has_cap_mmu_hash_v3()) {
- val[1] = 0x80; /* OV5_MMU_BOTH */
+ val[3] = 0x80; /* OV5_MMU_BOTH */
} else if (kvmppc_has_cap_mmu_radix()) {
- val[1] = 0x40; /* OV5_MMU_RADIX_300 */
+ val[3] = 0x40; /* OV5_MMU_RADIX_300 */
} else {
- val[1] = 0x00; /* Hash */
+ val[3] = 0x00; /* Hash */
}
} else {
if (first_ppc_cpu->env.mmu_model & POWERPC_MMU_V3) {
/* V3 MMU supports both hash and radix (with dynamic switching) */
- val[1] = 0xC0;
+ val[3] = 0xC0;
} else {
/* Otherwise we can only do hash */
- val[1] = 0x00;
+ val[3] = 0x00;
}
}
_FDT(fdt_setprop(fdt, chosen, "ibm,arch-vec-5-platform-support",
diff --git a/include/hw/ppc/spapr_ovec.h b/include/hw/ppc/spapr_ovec.h
index f088833..0b464e2 100644
--- a/include/hw/ppc/spapr_ovec.h
+++ b/include/hw/ppc/spapr_ovec.h
@@ -50,6 +50,7 @@ typedef struct sPAPROptionVector sPAPROptionVector;
#define OV5_DRCONF_MEMORY OV_BIT(2, 2)
#define OV5_FORM1_AFFINITY OV_BIT(5, 0)
#define OV5_HP_EVT OV_BIT(6, 5)
+#define OV5_XIVE_EXPLOIT OV_BIT(23, 7)
/* ISA 3.00 MMU features: */
#define OV5_MMU_BOTH OV_BIT(24, 0) /* Radix and hash */
--
2.9.4
- [Qemu-ppc] [PULL 11/17] target/ppc: Refactor tcg radix mmu code, (continued)
- [Qemu-ppc] [PULL 11/17] target/ppc: Refactor tcg radix mmu code, David Gibson, 2017/07/11
- [Qemu-ppc] [PULL 07/17] spapr: Uniform DRC reset paths, David Gibson, 2017/07/11
- [Qemu-ppc] [PULL 14/17] spapr: Only report host/guest IOMMU page size mismatches on KVM, David Gibson, 2017/07/11
- [Qemu-ppc] [PULL 17/17] spapr: populate device tree depending on XIVE_EXPLOIT option, David Gibson, 2017/07/11
- [Qemu-ppc] [PULL 13/17] spapr: fix memory hotplug error path, David Gibson, 2017/07/11
- [Qemu-ppc] [PULL 10/17] spapr: Use unplug_request for PCI hot unplug, David Gibson, 2017/07/11
- [Qemu-ppc] [PULL 09/17] spapr: Remove unnecessary differences between hotplug and coldplug paths, David Gibson, 2017/07/11
- [Qemu-ppc] [PULL 16/17] spapr: introduce the XIVE_EXPLOIT option in CAS,
David Gibson <=
- [Qemu-ppc] [PULL 15/17] ppc/kvm: have the "family" CPU alias to point to TYPE_HOST_POWERPC_CPU, David Gibson, 2017/07/11
- [Qemu-ppc] [PULL 02/17] spapr: refresh "platform-specific" hcalls comment, David Gibson, 2017/07/11
- [Qemu-ppc] [PULL 04/17] spapr: fix migration to pseries machine < 2.8, David Gibson, 2017/07/11
- [Qemu-ppc] [PULL 06/17] spapr: Leave DR-indicator management to the guest, David Gibson, 2017/07/11
- [Qemu-ppc] [PULL 08/17] spapr: Add DRC release method, David Gibson, 2017/07/11
- [Qemu-ppc] [PULL 05/17] target-ppc: SPR_BOOKE_ESR not set on FP exceptions, David Gibson, 2017/07/11
- Re: [Qemu-ppc] [PULL 00/17] ppc-for-2.10 queue 20170711, Peter Maydell, 2017/07/11