qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] S390: Fail on unknown instructions
@ 2009-12-17 12:56 Alexander Graf
  0 siblings, 0 replies; only message in thread
From: Alexander Graf @ 2009-12-17 12:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: aurelien

We were being a bit too nice and didn't give the guest an invalid instruction
interrupt.

While that works, it's not exactly the fastest thing to do, since now the
guest doesn't know that we're not really implementing that instruction, so it
continues doing it.

We run into this with the set_page_unstable hint instruction. So let's bail out
in these cases.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 target-s390x/kvm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index b6aac42..0992563 100644
--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -405,7 +405,7 @@ static int handle_instruction(CPUState *env, struct kvm_run *run)
     unsigned int ipa0 = (run->s390_sieic.ipa & 0xff00);
     uint8_t ipa1 = run->s390_sieic.ipa & 0x00ff;
     int ipb_code = (run->s390_sieic.ipb & 0x0fff0000) >> 16;
-    int r = 0;
+    int r = -1;
 
     dprintf("handle_instruction 0x%x 0x%x\n", run->s390_sieic.ipa, run->s390_sieic.ipb);
     switch (ipa0) {
-- 
1.6.0.2

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-12-17 12:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-17 12:56 [Qemu-devel] [PATCH] S390: Fail on unknown instructions Alexander Graf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).