From: "Blue Swirl" <blauwirbel@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] SVM support
Date: Tue, 18 Sep 2007 19:14:03 +0300 [thread overview]
Message-ID: <f43fc5580709180914m3ca36a52s1f14621360228e28@mail.gmail.com> (raw)
In-Reply-To: <1190110170.14938.244.camel@rapid>
On 9/18/07, J. Mayer <l_indien@magic.fr> wrote:
> Going this way, I see no reason why the interruption code in the cpu_exec loop
> could not finally become:
> interrupt_request = env->interrupt_request;
> if (__builtin_expect(interrupt_request, 0)) {
> if (interrupt_request & CPU_INTERRUPT_DEBUG) {
> env->interrupt_request &= ~CPU_INTERRUPT_DEBUG;
> env->exception_index = EXCP_DEBUG;
> cpu_loop_exit();
> }
> if (interrupt_request & CPU_INTERRUPT_HALT) {
> env->interrupt_request &= ~CPU_INTERRUPT_HALT;
> env->halted = 1;
> env->exception_index = EXCP_HLT;
> cpu_loop_exit();
> }
> if (interrupt_request & CPU_INTERRUPT_HARD) {
> hw_interrupt(env);
> if (env->pending_interrupts == 0)
> env->interrupt_request &= ~CPU_INTERRUPT_HARD;
> #if defined(__sparc__) && !defined(HOST_SOLARIS)
> tmp_T0 = 0;
> #else
> T0 = 0;
> #endif
> }
> /* Don't use the cached interupt_request value,
> do_interrupt may have updated the EXITTB flag. */
> if (interrupt_request & CPU_INTERRUPT_EXITTB) {
> env->interrupt_request &= ~CPU_INTERRUPT_EXITTB;
> /* ensure that no TB jump will be modified as
> the program flow was changed */
> #if defined(__sparc__) && !defined(HOST_SOLARIS)
> tmp_T0 = 0;
> #else
> T0 = 0;
> #endif
> }
> if (interrupt_request & CPU_INTERRUPT_EXIT) {
> env->interrupt_request &= ~CPU_INTERRUPT_EXIT;
> env->exception_index = EXCP_INTERRUPT;
> cpu_loop_exit();
> }
> }
> All the targets specific tricks could be done in the hw_interrupt routine. And the generic code
> would become much more readable. But this needs some works (not so much) and intensive tests...
> And I guess nobody feels like taking this risk right now ;-)
> But I think this will have to be done someday...
I vote for this. There are some other places where we could use the same API:
cpu_dump_state()
cpu_list()
cpu_register()
next prev parent reply other threads:[~2007-09-18 16:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-30 14:54 [Qemu-devel] [PATCH] SVM support Alexander Graf
2007-08-30 15:26 ` Bernhard Kauer
2007-08-30 16:01 ` Alexander Graf
2007-09-02 14:48 ` Alexander Graf
2007-09-13 2:49 ` Thiemo Seufer
2007-09-13 15:27 ` Alexander Graf
2007-09-17 8:08 ` J. Mayer
2007-09-17 10:02 ` Alexander Graf
2007-09-17 14:16 ` Jocelyn Mayer
2007-09-18 1:02 ` Alexander Graf
2007-09-18 1:24 ` Alexander Graf
2007-09-18 10:09 ` J. Mayer
2007-09-18 16:14 ` Blue Swirl [this message]
2007-09-17 14:07 ` Thiemo Seufer
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=f43fc5580709180914m3ca36a52s1f14621360228e28@mail.gmail.com \
--to=blauwirbel@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 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).