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