]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target-xtensa: return ENOSYS for unimplemented simcalls
authorMax Filippov <jcmvbkbc@gmail.com>
Wed, 22 Aug 2012 18:03:35 +0000 (22:03 +0400)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 5 Sep 2012 15:38:39 +0000 (10:38 -0500)
This prevents guest from proceeding with uninitialised garbage returned
from unimplemented simcalls.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
(cherry picked from commit e7eee62a90c671d22d50964b7de05e3f4fd96f5f)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
xtensa-semi.c

index b7c8c3456436437bb13e004fad96862d2c074291..44b7dc3a12f357d4f6674c2f7497c29da867f096 100644 (file)
@@ -219,6 +219,8 @@ void HELPER(simcall)(CPUXtensaState *env)
 
     default:
         qemu_log("%s(%d): not implemented\n", __func__, regs[2]);
+        regs[2] = -1;
+        regs[3] = ENOSYS;
         break;
     }
 }