[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2] spapr: Don't set the TM ibm, pa-features bit in
From: |
Anton Blanchard |
Subject: |
[Qemu-devel] [PATCH v2] spapr: Don't set the TM ibm, pa-features bit in PR KVM mode |
Date: |
Sat, 30 Apr 2016 10:48:00 +1000 |
We don't support transactional memory in PR KVM, so don't tell
the OS that we do.
Signed-off-by: Anton Blanchard <address@hidden>
---
v2: Fix build with CONFIG_KVM disabled, noticed by Alex.
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index b69995e..dc3e3c9 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -696,6 +696,14 @@ static void spapr_populate_cpu_dt(CPUState *cs, void *fdt,
int offset,
} else /* env->mmu_model == POWERPC_MMU_2_07 */ {
pa_features = pa_features_207;
pa_size = sizeof(pa_features_207);
+
+#ifdef CONFIG_KVM
+ /* Don't enable TM in PR KVM mode */
+ if (kvm_enabled() &&
+ kvm_vm_check_extension(cs->kvm_state, KVM_CAP_PPC_GET_PVINFO)) {
+ pa_features[24] &= ~0x80;
+ }
+#endif
}
if (env->ci_large_pages) {
pa_features[3] |= 0x20;