From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K1210-00061j-K1 for qemu-devel@nongnu.org; Tue, 27 May 2008 12:27:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K120y-00060v-Uk for qemu-devel@nongnu.org; Tue, 27 May 2008 12:27:10 -0400 Received: from [199.232.76.173] (port=60599 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K120y-00060l-P1 for qemu-devel@nongnu.org; Tue, 27 May 2008 12:27:08 -0400 Received: from wf-out-1314.google.com ([209.85.200.171]:46575) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K120y-0003T2-SW for qemu-devel@nongnu.org; Tue, 27 May 2008 12:27:09 -0400 Received: by wf-out-1314.google.com with SMTP id 27so2181335wfd.4 for ; Tue, 27 May 2008 09:27:07 -0700 (PDT) Message-ID: <5d6222a80805270927ne00d796oc4af6777472f3f3@mail.gmail.com> Date: Tue, 27 May 2008 13:27:07 -0300 From: "Glauber Costa" Subject: Re: [Qemu-devel] [PATCH 4/6] simply cpu_exec further In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1211901505-30519-1-git-send-email-gcosta@redhat.com> <1211901505-30519-2-git-send-email-gcosta@redhat.com> <1211901505-30519-3-git-send-email-gcosta@redhat.com> <1211901505-30519-4-git-send-email-gcosta@redhat.com> <1211901505-30519-5-git-send-email-gcosta@redhat.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org On Tue, May 27, 2008 at 1:18 PM, Blue Swirl wrote: > On 5/27/08, Glauber Costa wrote: >> We change interrupt functions so they have the same >> signature, getting only an env parameter. When necessary, >> some more attributed were added to the relevant CPUState to >> make it possible. > >> +void arch_handle_interrupt_request(CPUState *env); > > I'd use cpu_handle_interrupt_request(). fair enough. It does not follow my own naming scheme. > >> --- a/target-sparc/op_helper.c >> +++ b/target-sparc/op_helper.c >> @@ -2689,8 +2689,9 @@ static const char * const excp_names[0x50] = { >> }; >> #endif >> >> -void do_interrupt(int intno) >> +void do_interrupt(CPUState *cpu) > > env1 would be better. > >> { >> + int intno = cpu->exception_index; >> #ifdef DEBUG_PCALL >> if (loglevel & CPU_LOG_INT) { >> static int count; >> @@ -2803,9 +2804,10 @@ static const char * const excp_names[0x80] = { >> }; >> #endif >> >> -void do_interrupt(int intno) >> +void do_interrupt(CPUState *env) > > Same here. Otherwise you shadow the AREG0 env. > >> +void arch_handle_interrupt_request(CPUState *env) > > And here. > > I think this function and do_interrupt should belong to helper.c, they > are not called from ops. I'll do some rearranging. After that my env > comment does not matter. Agreed. I had problems compiling this in helper.c, but if you can move the code so to better acomodate those, I'd happily change > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Glauber Costa. "Free as in Freedom" http://glommer.net "The less confident you are, the more serious you have to act."