aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2012-08-22 22:03:35 +0400
committerMichael Roth <mdroth@linux.vnet.ibm.com>2012-09-05 10:38:39 -0500
commit5a16dd9bc80bc1c519c500392122c179a2942b37 (patch)
tree74446f313076b480c3aff1d01d93af54da0c800c
parentc7580c103434c8b96c5a2cd54aaa9a092bb638a7 (diff)
target-xtensa: return ENOSYS for unimplemented simcalls
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>
-rw-r--r--xtensa-semi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xtensa-semi.c b/xtensa-semi.c
index b7c8c3456..44b7dc3a1 100644
--- a/xtensa-semi.c
+++ b/xtensa-semi.c
@@ -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;
}
}