public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm-s390: Fix problem state handling in guest sigp handler
@ 2008-11-17 13:50 Christian Borntraeger
  2008-11-18 13:24 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Borntraeger @ 2008-11-17 13:50 UTC (permalink / raw)
  To: Avi Kivity
  Cc: Carsten Otte, Martin Schwidefsky, Heiko Carstens, Olaf Schnapper,
	kvm

Hello Avi,

this patch should go into 2.6.28-rcx. It fixes an important guest bug.

-
From: Christian Borntraeger <borntraeger@de.ibm.com>

We can get an exit for instructions starting with 0xae, even if the guest is
in userspace. Lets make sure, that the signal processor handler is only called
in guest supervisor mode. Otherwise, send a program check.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
 arch/s390/kvm/sigp.c |    5 +++++
 1 file changed, 5 insertions(+)

Index: kvm/arch/s390/kvm/sigp.c
===================================================================
--- kvm.orig/arch/s390/kvm/sigp.c
+++ kvm/arch/s390/kvm/sigp.c
@@ -237,6 +237,11 @@ int kvm_s390_handle_sigp(struct kvm_vcpu
 	u8 order_code;
 	int rc;
 
+	/* sigp in userspace can exit */
+	if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
+		return kvm_s390_inject_program_int(vcpu,
+						   PGM_PRIVILEGED_OPERATION);
+
 	order_code = disp2;
 	if (base2)
 		order_code += vcpu->arch.guest_gprs[base2];

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] kvm-s390: Fix problem state handling in guest sigp handler
  2008-11-17 13:50 [PATCH] kvm-s390: Fix problem state handling in guest sigp handler Christian Borntraeger
@ 2008-11-18 13:24 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2008-11-18 13:24 UTC (permalink / raw)
  To: Christian Borntraeger
  Cc: Carsten Otte, Martin Schwidefsky, Heiko Carstens, Olaf Schnapper,
	kvm

Christian Borntraeger wrote:
> Hello Avi,
>
> this patch should go into 2.6.28-rcx. It fixes an important guest bug.
>
> -
> From: Christian Borntraeger <borntraeger@de.ibm.com>
>
> We can get an exit for instructions starting with 0xae, even if the guest is
> in userspace. Lets make sure, that the signal processor handler is only called
> in guest supervisor mode. Otherwise, send a program check

Applied and queued, thanks.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-11-18 13:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-17 13:50 [PATCH] kvm-s390: Fix problem state handling in guest sigp handler Christian Borntraeger
2008-11-18 13:24 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox