]> git.proxmox.com Git - qemu.git/commitdiff
target-s390: Fail on unknown instructions
authorAlexander Graf <agraf@suse.de>
Thu, 17 Dec 2009 12:56:47 +0000 (13:56 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Fri, 18 Dec 2009 15:32:03 +0000 (16:32 +0100)
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>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-s390x/kvm.c

index b6aac424dbb1f7817e808034ecbc71c9d12fbf15..09925639249648994ecaba3e1435e67c73c8029d 100644 (file)
@@ -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) {