linux/arch/s390/kvm
Matthew Rosato 5a5e65361f KVM: s390: Intercept the tprot instruction
Based on original patch from Jeng-fang (Nick) Wang

When standby memory is specified for a guest Linux, but no virtual memory has
been allocated on the Qemu host backing that guest, the guest memory detection
process encounters a memory access exception which is not thrown from the KVM
handle_tprot() instruction-handler function. The access exception comes from
sie64a returning EFAULT, which then passes an addressing exception to the guest.
Unfortunately this does not the proper PSW fixup (nullifying vs.
suppressing) so the guest will get a fault for the wrong address.

Let's just intercept the tprot instruction all the time to do the right thing
and not go the page fault handler path for standby memory. tprot is only used
by Linux during startup so some exits should be ok.
Without this patch, standby memory cannot be used with KVM.

Signed-off-by: Nick Wang <jfwang@us.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Tested-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
2014-05-30 09:39:40 +02:00
..
diag.c KVM: s390: split SIE state guest prefix field 2014-05-16 14:57:31 +02:00
gaccess.c KVM: s390: Enable DAT support for TPROT handler 2014-05-30 09:39:36 +02:00
gaccess.h KVM: s390: Enable DAT support for TPROT handler 2014-05-30 09:39:36 +02:00
guestdbg.c KVM: s390: return -EFAULT if copy_from_user() fails 2014-05-06 14:57:59 +02:00
intercept.c KVM: s390: interpretive execution of SIGP EXTERNAL CALL 2014-05-16 14:57:28 +02:00
interrupt.c KVM: s390: a VCPU is already started when delivering interrupts 2014-05-30 09:39:39 +02:00
irq.h KVM: s390: irq routing for adapter interrupts. 2014-03-21 13:43:00 +01:00
Kconfig KVM: s390: irq routing for adapter interrupts. 2014-03-21 13:43:00 +01:00
kvm-s390.c KVM: s390: Intercept the tprot instruction 2014-05-30 09:39:40 +02:00
kvm-s390.h KVM: s390: split SIE state guest prefix field 2014-05-16 14:57:31 +02:00
Makefile KVM: s390: hardware support for guest debugging 2014-04-22 13:24:51 +02:00
priv.c KVM: s390: Enable DAT support for TPROT handler 2014-05-30 09:39:36 +02:00
sigp.c KVM: s390: clean up interrupt injection in sigp code 2014-05-30 09:39:37 +02:00
trace-s390.h KVM: s390: enable IBS for single running VCPUs 2014-04-29 15:01:54 +02:00
trace.h KVM: s390: interpretive execution of SIGP EXTERNAL CALL 2014-05-16 14:57:28 +02:00