From: "Alex Bennée" <alex.bennee@linaro.org>
To: BitFriends <commandspider12@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: access guest address from within instruction
Date: Sun, 02 Oct 2022 14:56:52 +0100 [thread overview]
Message-ID: <87lepywcoi.fsf@linaro.org> (raw)
In-Reply-To: <CABVhSWP7XjNvCXUvawXLcOkP4vXQ8wbMObKbxc+jN6gv0wzawQ@mail.gmail.com>
BitFriends <commandspider12@gmail.com> writes:
> Hello,
>
> I am trying to create a custom instruction that accesses guest memory specified by an address in a register. I specifically
> want to read from that address. So I tried to do that using "tcg_gen_qemu_ld_i64(&res, env->regs[R_EDI], 0,
> MO_LEUQ);", but that doesn't save any result in res. So either my call is wrong, or I need to translate that guest address
> to a usable host address. I can't find much about this stuff in the
> docs. Could anyone help me out with that?
I still think you could solve your problem using semihosting (which
exactly exposes a "fake" instruction to make semihosting calls to save
data on the host system).
>
> Cheers
>
> BitFriends
--
Alex Bennée
prev parent reply other threads:[~2022-10-02 13:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-01 20:10 access guest address from within instruction BitFriends
2022-10-01 20:23 ` Richard Henderson
2022-10-01 20:59 ` BitFriends
2022-10-02 9:20 ` BitFriends
2022-10-02 14:40 ` Richard Henderson
2022-10-02 14:52 ` BitFriends
2022-10-02 17:13 ` Richard Henderson
2022-10-02 14:45 ` Peter Maydell
2022-10-02 14:57 ` BitFriends
2022-10-02 13:56 ` Alex Bennée [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lepywcoi.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=commandspider12@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.