summaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm/priv.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-03-23 10:13:36 +0100
committerIngo Molnar <mingo@kernel.org>2015-03-23 10:13:36 +0100
commiteda2360ad18b7cde87728fad85c6735a52c2576e (patch)
tree2bc28704b40686c0d3d0fd5aa7d000f9d9dd153f /arch/s390/kvm/priv.c
parent1d23c4518b1f3a03c278f23333149245c178d2a6 (diff)
parentbc465aa9d045feb0e13b4a8f32cc33c1943f62d6 (diff)
downloadlinux-eda2360ad18b7cde87728fad85c6735a52c2576e.tar.gz
linux-eda2360ad18b7cde87728fad85c6735a52c2576e.tar.bz2
linux-eda2360ad18b7cde87728fad85c6735a52c2576e.zip
Merge tag 'v4.0-rc5' into x86/fpu, to prevent conflicts
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/s390/kvm/priv.c')
-rw-r--r--arch/s390/kvm/priv.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c
index 1be578d64dfc..351116939ea2 100644
--- a/arch/s390/kvm/priv.c
+++ b/arch/s390/kvm/priv.c
@@ -337,19 +337,24 @@ static int handle_io_inst(struct kvm_vcpu *vcpu)
static int handle_stfl(struct kvm_vcpu *vcpu)
{
int rc;
+ unsigned int fac;
vcpu->stat.instruction_stfl++;
if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
+ /*
+ * We need to shift the lower 32 facility bits (bit 0-31) from a u64
+ * into a u32 memory representation. They will remain bits 0-31.
+ */
+ fac = *vcpu->kvm->arch.model.fac->list >> 32;
rc = write_guest_lc(vcpu, offsetof(struct _lowcore, stfl_fac_list),
- vfacilities, 4);
+ &fac, sizeof(fac));
if (rc)
return rc;
- VCPU_EVENT(vcpu, 5, "store facility list value %x",
- *(unsigned int *) vfacilities);
- trace_kvm_s390_handle_stfl(vcpu, *(unsigned int *) vfacilities);
+ VCPU_EVENT(vcpu, 5, "store facility list value %x", fac);
+ trace_kvm_s390_handle_stfl(vcpu, fac);
return 0;
}