qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-1.2] target-xtensa: return EINVAL for unimplemented simcalls
@ 2012-08-22 17:15 Max Filippov
  2012-08-22 18:03 ` Max Filippov
  0 siblings, 1 reply; 2+ messages in thread
From: Max Filippov @ 2012-08-22 17:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: Max Filippov

This prevents guest from proceeding with uninitialised garbage returned
from unimplemented simcalls.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 target-xtensa/xtensa-semi.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/target-xtensa/xtensa-semi.c b/target-xtensa/xtensa-semi.c
index 1c8a19e..9afa99d 100644
--- a/target-xtensa/xtensa-semi.c
+++ b/target-xtensa/xtensa-semi.c
@@ -218,6 +218,8 @@ void HELPER(simcall)(CPUXtensaState *env)
 
     default:
         qemu_log("%s(%d): not implemented\n", __func__, regs[2]);
+        regs[2] = -1;
+        regs[3] = EINVAL;
         break;
     }
 }
-- 
1.7.7.6

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

* Re: [Qemu-devel] [PATCH for-1.2] target-xtensa: return EINVAL for unimplemented simcalls
  2012-08-22 17:15 [Qemu-devel] [PATCH for-1.2] target-xtensa: return EINVAL for unimplemented simcalls Max Filippov
@ 2012-08-22 18:03 ` Max Filippov
  0 siblings, 0 replies; 2+ messages in thread
From: Max Filippov @ 2012-08-22 18:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: Max Filippov

On Wed, Aug 22, 2012 at 9:15 PM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> This prevents guest from proceeding with uninitialised garbage returned
> from unimplemented simcalls.

Oops, looks like ENOSYS is the right errno for that.

-- 
Thanks.
-- Max

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

end of thread, other threads:[~2012-08-22 18:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-22 17:15 [Qemu-devel] [PATCH for-1.2] target-xtensa: return EINVAL for unimplemented simcalls Max Filippov
2012-08-22 18:03 ` Max Filippov

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).