|
|
37e7a1 |
From 97905eb55273dac61e4d6ff300638c0b133e0f06 Mon Sep 17 00:00:00 2001
|
|
|
37e7a1 |
From: Suraj Jitindar Singh <sursingh@redhat.com>
|
|
|
37e7a1 |
Date: Tue, 13 Mar 2018 05:21:31 +0100
|
|
|
37e7a1 |
Subject: [PATCH 09/17] target/ppc: Check mask when setting
|
|
|
37e7a1 |
cap_ppc_safe_indirect_branch
|
|
|
37e7a1 |
|
|
|
37e7a1 |
RH-Author: Suraj Jitindar Singh <sursingh@redhat.com>
|
|
|
37e7a1 |
Message-id: <1520918499-27663-4-git-send-email-sursingh@redhat.com>
|
|
|
37e7a1 |
Patchwork-id: 79249
|
|
|
37e7a1 |
O-Subject: [RHEL7.5 qemu-kvm-rhev PATCH 03/11] target/ppc: Check mask when setting cap_ppc_safe_indirect_branch
|
|
|
37e7a1 |
Bugzilla: 1554957
|
|
|
37e7a1 |
RH-Acked-by: David Gibson <dgibson@redhat.com>
|
|
|
37e7a1 |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
37e7a1 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
37e7a1 |
|
|
|
37e7a1 |
From: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
|
|
|
37e7a1 |
|
|
|
37e7a1 |
Check the character and character_mask field when setting
|
|
|
37e7a1 |
cap_ppc_safe_indirect_branch based on the hypervisor response
|
|
|
37e7a1 |
to KVM_PPC_GET_CPU_CHAR. Previously the mask field wasn't checked
|
|
|
37e7a1 |
which was incorrect.
|
|
|
37e7a1 |
|
|
|
37e7a1 |
Fixes: 8acc2ae5 (target/ppc/kvm: Add cap_ppc_safe_[cache/bounds_check/indirect_branch])
|
|
|
37e7a1 |
|
|
|
37e7a1 |
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
|
|
|
37e7a1 |
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
|
|
|
37e7a1 |
(cherry picked from commit cb931c2108a59db0b4a22f0c439ee7362c4f95ab)
|
|
|
37e7a1 |
|
|
|
37e7a1 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1548919
|
|
|
37e7a1 |
|
|
|
37e7a1 |
Signed-off-by: Suraj Jitindar Singh <sursingh@redhat.com>
|
|
|
37e7a1 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
37e7a1 |
---
|
|
|
37e7a1 |
target/ppc/kvm.c | 2 +-
|
|
|
37e7a1 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
37e7a1 |
|
|
|
37e7a1 |
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
|
|
|
37e7a1 |
index 7a7bc3b..4383953 100644
|
|
|
37e7a1 |
--- a/target/ppc/kvm.c
|
|
|
37e7a1 |
+++ b/target/ppc/kvm.c
|
|
|
37e7a1 |
@@ -2511,7 +2511,7 @@ static void kvmppc_get_cpu_characteristics(KVMState *s)
|
|
|
37e7a1 |
cap_ppc_safe_bounds_check = 1;
|
|
|
37e7a1 |
}
|
|
|
37e7a1 |
/* Parse and set cap_ppc_safe_indirect_branch */
|
|
|
37e7a1 |
- if (c.character & H_CPU_CHAR_BCCTRL_SERIALISED) {
|
|
|
37e7a1 |
+ if (c.character & c.character_mask & H_CPU_CHAR_BCCTRL_SERIALISED) {
|
|
|
37e7a1 |
cap_ppc_safe_indirect_branch = 2;
|
|
|
37e7a1 |
}
|
|
|
37e7a1 |
}
|
|
|
37e7a1 |
--
|
|
|
37e7a1 |
1.8.3.1
|
|
|
37e7a1 |
|