Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:GA
qemu-testsuite.12243
0256-s390x-kvm-Handle-bpb-feature.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0256-s390x-kvm-Handle-bpb-feature.patch of Package qemu-testsuite.12243
From aa1dbf8050a4a89ea30ff23a53181de92d367a20 Mon Sep 17 00:00:00 2001 From: Christian Borntraeger <borntraeger@de.ibm.com> Date: Fri, 12 Jan 2018 17:34:47 +0100 Subject: [PATCH] s390x/kvm: Handle bpb feature We need to handle the bpb control on reset and migration. Normally stfle.82 is transparent (and the normal guest part works without hypervisor activity). To prevent any issues we require full host kernel support for this feature. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> (cherry picked from commit b073c87517d4d348c7bac0f0b35e8e83e6354d82) [LY: BSC#1076814] Signed-off-by: Liang Yan <lyan@suse.com> --- target-s390x/cpu.c | 1 + target-s390x/cpu.h | 1 + target-s390x/kvm.c | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c index 4bfff341dc..3373d3cb5c 100644 --- a/target-s390x/cpu.c +++ b/target-s390x/cpu.c @@ -101,6 +101,7 @@ static void s390_cpu_reset(CPUState *s) CPUS390XState *env = &cpu->env; env->pfault_token = -1UL; + env->bpbc = false; scc->parent_reset(s); cpu->env.sigp_order = 0; s390_cpu_set_state(CPU_STATE_STOPPED, cpu); diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h index 6d97c089a4..8ce1c5bb7b 100644 --- a/target-s390x/cpu.h +++ b/target-s390x/cpu.h @@ -89,6 +89,7 @@ typedef struct CPUS390XState { uint32_t fpc; /* floating-point control register */ uint32_t cc_op; + bool bpbc; /* branch prediction blocking */ float_status fpu_status; /* passed to softfloat lib */ diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index e1859cae04..8979944a1c 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -426,6 +426,11 @@ int kvm_arch_put_registers(CPUState *cs, int level) } } + if (can_sync_regs(cs, KVM_SYNC_BPBC)) { + cs->kvm_run->s.regs.bpbc = env->bpbc; + cs->kvm_run->kvm_dirty_regs |= KVM_SYNC_BPBC; + } + /* Finally the prefix */ if (can_sync_regs(cs, KVM_SYNC_PREFIX)) { cs->kvm_run->s.regs.prefix = env->psa; @@ -528,6 +533,10 @@ int kvm_arch_get_registers(CPUState *cs) kvm_get_one_reg(cs, KVM_REG_S390_PP, &env->pp); } + if (can_sync_regs(cs, KVM_SYNC_BPBC)) { + env->bpbc = cs->kvm_run->s.regs.bpbc; + } + /* pfault parameters */ if (can_sync_regs(cs, KVM_SYNC_PFAULT)) { env->pfault_token = cs->kvm_run->s.regs.pft;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor