Skip to content

Commit

Permalink
Merge tag 'kvm-s390-master-4.13-2' of git://git.kernel.org/pub/scm/li…
Browse files Browse the repository at this point in the history
…nux/kernel/git/kvms390/linux

KVM: s390: two fixes for sthyi emulation

- missing inline assembly constraint
- wrong exception handling
  • Loading branch information
Radim Krčmář committed Aug 21, 2017
2 parents 14ccee7 + 857b8de commit f2d8421
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions arch/s390/kvm/sthyi.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ static int sthyi(u64 vaddr)
"srl %[cc],28\n"
: [cc] "=d" (cc)
: [code] "d" (code), [addr] "a" (addr)
: "memory", "cc");
: "3", "memory", "cc");
return cc;
}

Expand Down Expand Up @@ -425,14 +425,17 @@ int handle_sthyi(struct kvm_vcpu *vcpu)
VCPU_EVENT(vcpu, 3, "STHYI: fc: %llu addr: 0x%016llx", code, addr);
trace_kvm_s390_handle_sthyi(vcpu, code, addr);

if (reg1 == reg2 || reg1 & 1 || reg2 & 1 || addr & ~PAGE_MASK)
if (reg1 == reg2 || reg1 & 1 || reg2 & 1)
return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);

if (code & 0xffff) {
cc = 3;
goto out;
}

if (addr & ~PAGE_MASK)
return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);

/*
* If the page has not yet been faulted in, we want to do that
* now and not after all the expensive calculations.
Expand Down

0 comments on commit f2d8421

Please sign in to comment.